/* ==========================================
   PHOTO PAGE v4 — RONROV GALLERY
   Screenshot-matched, centered, white bg
   ========================================== */

/* --- Hero --- */
.ph-hero {
    background: #080c18;
    min-height: 65vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 1.5rem;
}
.ph-hero::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glow, #2563eb);
    filter: blur(150px);
    opacity: 0.08;
    pointer-events: none;
}
.ph-hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Breadcrumb nav above image (desktop only) */
.ph-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    justify-content: flex-start;
    direction: rtl;
    position: relative;
    z-index: 3;
}
.ph-breadcrumb a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.2s;
}
.ph-breadcrumb a:hover {
    color: #fff;
}
.ph-breadcrumb-sep {
    font-size: 0.7rem;
}
.ph-breadcrumb-current {
    color: rgba(255,255,255,0.7);
    font-weight: 600;
}

.ph-img {
    max-width: 88vw;
    max-height: 72vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    border: 16px solid #fff;
    box-shadow: 0 20px 60px -10px rgba(0,0,0,0.6), 0 8px 24px -4px rgba(0,0,0,0.3);
    display: block;
    margin: 0 auto;
}

/* Zoom button below image (desktop only) */
.ph-zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto 0;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s;
    font-family: inherit;
}
.ph-hero-inner:hover .ph-zoom {
    opacity: 1;
}
.ph-zoom svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* --- Content area (white bg, centered) --- */
.ph-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
    text-align: center;
}

/* --- Title (inside dark hero) --- */
.ph-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    margin: 2.8rem 0 0;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* --- Share buttons (inside hero) --- */
.ph-share {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
}
.ph-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.25s;
    border: 1px solid rgba(255,255,255,0.08);
}
.ph-share-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
    transform: scale(1.1);
}
.ph-share-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* --- Tags --- */
.ph-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}
.ph-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    background: #f1f5f9;
    color: var(--c-text-muted);
    border: 1px solid var(--c-border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.ph-tag:hover {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
}

/* --- Specs inline row --- */
.ph-specs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.8rem;
    padding: 0;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-size: 0.88rem;
    color: var(--c-text-muted);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.ph-spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.9rem 1.2rem;
    flex: 1;
    min-width: 0;
    border-left: 1px solid #cbd5e1;
}
.ph-spec:last-child {
    border-left: none;
}
.ph-spec-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}
.ph-spec-val {
    color: var(--c-text);
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}

/* --- Download buttons row --- */
.ph-downloads {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.8rem;
    padding: 1.2rem 1.4rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 12px 12px 0 0;
}
.ph-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 1.3rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    color: var(--c-text);
}
.ph-dl-btn:hover {
    border-color: #16a34a;
    color: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(22,163,74,0.15);
}
.ph-dl-btn--primary {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}
.ph-dl-btn--primary:hover {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

/* --- License + Attribution block --- */
.ph-license-block {
    margin-bottom: 1.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ph-license-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 1rem 1.4rem;
}
.ph-license-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 1rem;
    background: #dc2626;
    color: #fff;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    flex-shrink: 0;
}
.ph-license-text {
    color: var(--c-text-muted);
    line-height: 1.5;
    font-size: 0.92rem;
}
.ph-license-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.85rem 1.4rem;
    background: rgba(255,255,255,0.6);
    border-top: 1px solid #cbd5e1;
    cursor: pointer;
    transition: background 0.2s;
}
.ph-license-credit:hover {
    background: rgba(255,255,255,0.9);
}
.ph-license-credit code {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: var(--c-text);
}
.ph-license-credit-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--c-text-muted);
}
.ph-license-credit-copy {
    color: #1e293b;
    font-weight: 700;
    font-size: 0.82rem;
}
.ph-license-credit.copied .ph-license-credit-copy { color: #16a34a; }
.ph-license-link {
    display: block;
    text-align: center;
    padding: 0.65rem 1rem;
    background: rgba(255,255,255,0.4);
    border-top: 1px solid #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    transition: background 0.2s;
}
.ph-license-link:hover {
    background: rgba(255,255,255,0.8);
    text-decoration: underline;
}

/* --- Duo row: Palette + Rating side by side --- */
.ph-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}
.ph-duo-section {
    padding: 1.2rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px 12px 0 0;
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ph-duo-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-text-muted);
    margin-bottom: 0.8rem;
}

/* Palette in duo */
.ph-palette {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}
.ph-swatch {
    text-align: center;
    text-decoration: none;
    color: var(--c-text);
}
.ph-swatch-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 0.25rem;
    border: 2px solid rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ph-swatch:hover .ph-swatch-dot {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}
.ph-swatch-name { font-size: 0.62rem; color: var(--c-text-muted); line-height: 1.15; }

/* Rating in duo */
.ph-rating-stars {
    font-size: 2rem;
    letter-spacing: 0.08em;
    color: #fbbf24;
    margin-bottom: 0.15rem;
}
.ph-rating-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--c-text);
    margin-bottom: 0.2rem;
}
.ph-rating-meta {
    font-size: 0.78rem;
    color: var(--c-text-muted);
    margin-bottom: 0.6rem;
}
.ph-star-form {
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    direction: rtl;
}
.ph-star-form label {
    font-size: 2rem;
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.2s, transform 0.15s;
}
.ph-star-form label:hover,
.ph-star-form label:hover ~ label {
    color: #fbbf24;
    transform: scale(1.1);
}
.ph-star-form input[type="radio"] { display: none; }
.ph-star-form input[type="radio"]:checked ~ label { color: #fbbf24; }
.ph-voted {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.8rem;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
}
.ph-rate-label {
    font-size: 0.8rem;
    color: var(--c-text-muted);
    margin-top: 0.2rem;
}

/* --- Divider --- */
.ph-divider {
    border: none;
    border-top: 1px solid var(--c-border);
    margin: 0 0 1.8rem;
}

/* --- Comments --- */
.ph-comments {
    text-align: start;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 1.4rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ph-cm-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 1rem;
    text-align: center;
}
.ph-comment {
    padding: 0.8rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}
.ph-comment-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.ph-comment-name { font-weight: 700; font-size: 0.84rem; }
.ph-comment-date { font-size: 0.7rem; color: var(--c-text-muted); }
.ph-comment-text { font-size: 0.88rem; line-height: 1.55; }
.ph-no-comments {
    text-align: center;
    padding: 1.5rem;
    color: var(--c-text-muted);
    font-size: 1rem;
}

/* Comment form */
.ph-cf { margin-top: 1.2rem; }
.ph-cf-row { margin-bottom: 0.7rem; }
.ph-cf-inline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
    align-items: start;
}
.ph-cf input[type="text"],
.ph-cf textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--c-text);
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.ph-cf input:focus,
.ph-cf textarea:focus {
    outline: none;
    border-color: #1e293b;
    box-shadow: 0 0 0 3px rgba(30,41,59,0.08);
}
.ph-cf textarea { min-height: 90px; resize: vertical; }
.ph-captcha {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ph-captcha img {
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--c-border);
}
.ph-captcha input {
    width: 100px;
    padding: 0.85rem 0.7rem;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
}
.ph-captcha input:focus { outline: none; border-color: #1e293b; }
.ph-cf-submit {
    display: block;
    width: 100%;
    padding: 0.9rem;
    margin-top: 0.7rem;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.ph-cf-submit:hover { background: #0f172a; }
.ph-alert {
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    text-align: center;
}
.ph-alert--ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.ph-alert--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }


/* Behind story teaser */
.ph-story {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding: 0.7rem 1.2rem;
    background: #f0f9ff;
    border: 1px solid #cbd5e1;
    border-radius: 100px;
    text-decoration: none;
    color: var(--c-text);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s;
}
.ph-story:hover {
    border-color: #1e293b;
    box-shadow: 0 3px 12px rgba(30,41,59,0.1);
}

/* Admin edit */
.ph-admin {
    margin-bottom: 1rem;
}
.ph-admin a {
    color: #1e293b;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

/* --- Mobile bar --- */
.ph-mob-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--c-border);
    padding: 0.5rem 0.8rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.ph-mob-bar.show { transform: translateY(0); }
.ph-mob-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 340px;
    margin: 0 auto;
}
.ph-mob-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    text-decoration: none;
    color: var(--c-text);
    font-size: 0.66rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
}
.ph-mob-btn-icon { font-size: 1.1rem; }

/* Comments toggle (mobile) */
.ph-cm-toggle {
    display: none;
    width: 100%;
    padding: 0.65rem;
    background: #f8fafc;
    color: var(--c-text);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    margin-bottom: 0.6rem;
    font-family: inherit;
}
.ph-cm-body { transition: max-height 0.4s ease, opacity 0.3s ease; }

/* --- Animations --- */
@keyframes phFade {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.ph-anim { animation: phFade 0.4s cubic-bezier(0.22,1,0.36,1) both; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .ph-hero {
        min-height: auto;
        padding: 1rem 0.5rem;
    }
    .ph-img {
        max-width: 100%;
        max-height: 50vh;
        border-radius: 0;
        border-width: 6px;
    }
    .ph-breadcrumb { display: none; }
    .ph-zoom { display: none; }
    .ph-mob-bar { display: block; }
    .ph-body {
        padding: 1.5rem 1rem 5rem;
    }
    .ph-title { font-size: 0.9rem; }
    .ph-specs { flex-wrap: wrap; }
    .ph-spec { flex: 1 1 40%; padding: 0.6rem 0.8rem; border-left: none; border-bottom: 1px solid #cbd5e1; }
    .ph-spec:last-child { border-bottom: none; }
    .ph-downloads { gap: 0.4rem; }
    .ph-dl-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.76rem;
    }
    .ph-duo {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .ph-swatch-dot { width: 34px; height: 34px; }
    .ph-star-form label { font-size: 1.6rem; }
    .ph-license { font-size: 0.78rem; padding: 0.7rem 1rem; }
    .ph-cm-toggle { display: block; }
    .ph-cm-body {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }
    .ph-cm-body.open {
        max-height: 5000px;
        opacity: 1;
    }
    .ph-cf-inline { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .ph-title { font-size: 0.85rem; }
    .ph-tags { gap: 0.3rem; }
    .ph-tag { font-size: 0.7rem; padding: 0.2rem 0.55rem; }
    .ph-dl-btn { padding: 0.4rem 0.7rem; font-size: 0.72rem; }
}
