/* ─────────────────────────────────────────────
   film.css  —  Film gallery page styles
   Extends styles.css (loaded first)
───────────────────────────────────────────── */

/* ── Nav additions ── */
.top-bar .film-nav {
    position: absolute;
    top: 16px;
    right: 380px;
    font-size: 14px;
    color: black;
    text-decoration: none;
    letter-spacing: 1px;
    background-color: transparent;
    padding: 5px 10px;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.top-bar .film-nav:hover {
    background-color: black;
    color: white;
}

.dark-mode .film-nav {
    color: white;
}

.dark-mode .film-nav:hover {
    background-color: white;
    color: black;
}

/* ── Page layout ── */
.film-page {
    padding-top: 80px;
    min-height: 100vh;
}

/* ── Hero ── */
.film-hero {
    text-align: center;
    padding: 60px 20px 40px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 60px;
}

.film-title {
    font-family: 'Sofia Pro', Arial, sans-serif;
    font-size: clamp(48px, 8vw, 100px);
    font-weight: 700;
    letter-spacing: 0.15em;
    margin: 0 0 8px;
    color: black;
    transition: color 0.5s ease;
}

.film-subtitle {
    font-family: 'Sofia Pro', Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 0.3em;
    color: #999;
    margin: 0;
    text-transform: uppercase;
}

.dark-mode .film-hero {
    border-bottom-color: rgba(255,255,255,0.08);
}

.dark-mode .film-title {
    color: white;
}

/* ── Loading / error states ── */
.loading-state,
.error-state,
.gallery-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-family: 'Sofia Pro', Arial, sans-serif;
    letter-spacing: 0.05em;
}

.error-detail {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 8px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: black;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.dark-mode .loading-spinner {
    border-color: rgba(255,255,255,0.1);
    border-top-color: white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Year sections ── */
.year-section {
    max-width: 1400px;
    margin: 0 auto 80px;
    padding: 0 40px;
}

.year-heading {
    font-family: 'Sofia Pro', Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.4em;
    color: #aaa;
    text-transform: uppercase;
    margin: 0 0 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.dark-mode .year-heading {
    border-bottom-color: rgba(255,255,255,0.08);
}

/* ── Roll cards grid ── */
.rolls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.roll-card {
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.07);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.roll-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    border-color: rgba(0,0,0,0.15);
}

.dark-mode .roll-card {
    border-color: rgba(255,255,255,0.07);
}

.dark-mode .roll-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.15);
}

/* ── Roll cover image ── */
.roll-cover {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.dark-mode .roll-cover {
    background: #1a1a1a;
}

.roll-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    /* Override about-me img styles from styles.css */
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.roll-card:hover .roll-cover img {
    transform: scale(1.03);
}

.roll-cover--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 11px;
    letter-spacing: 0.2em;
}

/* ── Roll info bar ── */
.roll-info {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 1px solid rgba(0,0,0,0.06);
    transition: border-color 0.5s ease;
}

.dark-mode .roll-info {
    border-top-color: rgba(255,255,255,0.06);
}

.roll-name {
    font-family: 'Sofia Pro', Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: black;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
    transition: color 0.5s ease;
}

.dark-mode .roll-name {
    color: white;
}

.roll-count {
    font-family: 'Sofia Pro', Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #aaa;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.lightbox.lightbox--open {
    display: flex;
    pointer-events: all;
}

.lightbox-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1999;
    background: rgba(0,0,0,0);
    display: none;
    transition: background 0.3s ease;
}

.lightbox-backdrop.lightbox--open {
    display: block;
    background: rgba(0,0,0,0.92);
}

.lightbox-inner {
    position: relative;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 80px);
}

#lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    display: block;
    /* Override about-me img styles */
    margin: 0 !important;
    border-radius: 0 !important;
    max-width: 100% !important;
}

.lightbox-caption {
    color: rgba(255,255,255,0.5);
    font-family: 'Sofia Pro', Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 14px;
    text-align: center;
}

.lightbox-counter {
    color: rgba(255,255,255,0.3);
    font-family: 'Sofia Pro', Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.15em;
    margin-top: 6px;
    text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    padding: 12px;
    z-index: 2002;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close {
    top: 20px;
    right: 24px;
    font-size: 32px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
}

/* ── Mobile ── */
@media (max-width: 1100px) {
    .top-bar .film-nav {
        display: none;
    }
    .year-section {
        padding: 0 20px;
    }
    .rolls-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    .lightbox-inner {
        max-width: calc(100vw - 60px);
    }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}


/* Film Hero Section (Mirroring About Me) */
.film-hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 40px; /* Space for the fixed top-bar */
    max-width: 1200px;
    margin: 0 auto;
}

.film-about {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
}

.film-about img {
    max-width: 400px; /* Slightly larger for the camera gear shot */
    height: auto;
    border-radius: 4px;
}

.film-about .text {
    max-width: 550px;
    text-align: left;
}

.film-about h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.film-subtitle {
    font-weight: bold;
    color: #888;
    margin-bottom: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .film-about {
        flex-direction: column;
        text-align: center;
        padding-top: 40px; /* Space from the top-bar */
    }
    
    .film-about .text {
        text-align: center;
        padding: 0 20px;
    }
    
    /* Pull the copy up */
    .film-about img {
        max-width: 50%; /* Scales the camera down slightly more */
        margin-bottom: 5px; /* Significantly reduced margin below the camera */
        height: auto;
    }

    .film-about h1 {
        margin-top: 0; /* Removes the extra space at the top of the 'FILM' title */
        font-size: 2.2rem; /* Adjusted for better mobile balance */
    }

    .film-subtitle {
        margin-bottom: 10px; /* Brings the body copy closer to the subtitle */
    }
}
