/* ==========================================
   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; }
/* --- License warning (non-commercial) --- */
.ph-license-warning {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.75rem 1.4rem;
    background: #fef2f2;
    border-top: 2px solid #dc2626;
    border-bottom: 1px solid #fca5a5;
    text-align: center;
}
.ph-license-warning strong {
    color: #dc2626;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}
.ph-license-warning span {
    color: #7f1d1d;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
}
/* --- Download notice (attribution) --- */
.ph-download-notice {
    text-align: center;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    line-height: 1.5;
}
.ph-download-notice a {
    color: #1e293b;
    font-weight: 600;
    margin-inline-start: 0.4rem;
    text-decoration: underline;
}
.ph-download-notice a:hover {
    color: #0f172a;
}
.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;
}

/* --- Private license notice --- */
.ph-private-notice {
    text-align: center;
    padding: 1.2rem 1.4rem;
    margin-bottom: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.6;
}

/* --- Downloads disabled: viewing-only notice --- */
.ph-viewonly-notice {
    text-align: center;
    padding: 2rem 1.5rem;
    margin-bottom: 1.8rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    color: #92400e;
}
.ph-viewonly-notice strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #78350f;
}
.ph-viewonly-notice p {
    margin: 0.3rem 0;
    font-size: 0.92rem;
    line-height: 1.6;
}
.ph-viewonly-contact {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    background: var(--c-primary, #2563eb);
    color: #fff;
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}
.ph-viewonly-contact:hover {
    background: #1d4ed8;
    color: #fff;
}

/* --- Palette + Rating: stacked full-width sections --- */
.ph-duo {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.ph-duo-section {
    padding: 1.4rem 1.6rem;
    border: 1px solid #cfd7e3;
    border-radius: 10px;
    background: #f2f5f9;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    text-align: center;
}
.ph-duo-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* --- Color Palette: horizontal strip --- */
.ph-palette {
    display: flex;
    gap: 3px;
}
.ph-swatch:first-child .ph-swatch-bar { border-radius: 6px 0 0 6px; }
.ph-swatch:last-child .ph-swatch-bar { border-radius: 0 6px 6px 0; }
.ph-swatch {
    flex: 1 1 0;
    display: block;
    text-decoration: none;
    position: relative;
    height: 40px;
    transition: opacity 0.2s;
}
.ph-swatch:hover {
    opacity: 0.85;
}
.ph-swatch-bar {
    width: 100%;
    height: 100%;
    display: block;
}
.ph-swatch-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    line-height: 1.4;
    text-align: center;
}
.ph-swatch-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
}
.ph-swatch.active .ph-swatch-tip {
    opacity: 1;
}

/* --- Rating: refined section --- */
.ph-rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}
.ph-rating-stars svg {
    width: 22px;
    height: 22px;
}
.ph-star-filled { fill: #f59e0b; }
.ph-star-empty { fill: #d1d5db; }
.ph-rating-score {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.15rem;
}
.ph-rating-meta {
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 0.8rem;
    letter-spacing: 0.01em;
}
.ph-star-form {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    direction: rtl;
    margin-bottom: 0.3rem;
}
.ph-star-form input[type="radio"] { display: none; }
.ph-star-form label {
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.2s, transform 0.15s;
    display: flex;
}
.ph-star-form label svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}
.ph-star-form label:hover,
.ph-star-form label:hover ~ label {
    color: #f59e0b;
    transform: scale(1.12);
}
.ph-star-form input[type="radio"]:checked ~ label {
    color: #f59e0b;
}
.ph-voted {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
}
.ph-rate-label {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.35rem;
    letter-spacing: 0.01em;
}

/* --- 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-section {
        padding: 1rem 1.2rem;
    }
    .ph-swatch {
        height: 36px;
    }
    .ph-star-form label svg {
        width: 24px;
        height: 24px;
    }
    .ph-rating-score {
        font-size: 1.3rem;
    }
    .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; }
    .ph-swatch {
        height: 32px;
    }
    .ph-swatch-tip {
        font-size: 0.65rem;
        padding: 0.3rem 0.5rem;
    }
}
