/* ================================================================
   BIAFF — INDIVIDUAL FILM PAGE (film_detail.html)
   Light editorial design matching the site default:
   background #f5f5f5 · body text #000 · headings #030A19.
   No accent/gold colors anywhere.
   ================================================================ */

:root {
    --fd-bg: #f5f5f5;
    --fd-text: #000;
    --fd-heading: #030A19;
    --fd-accent: #BE1333;
    --fd-muted: rgba(0, 0, 0, 0.55);
    --fd-hairline: rgba(0, 0, 0, 0.15);
    --fd-max-width: 1200px;
    --fd-gutter: clamp(20px, 5vw, 90px);
}

body.film-detail-page {
    background-color: var(--fd-bg);
    color: var(--fd-text);
}

.film-detail {
    width: 100%;
    overflow-x: clip;
    background: var(--fd-bg);
    color: var(--fd-text);
}

.film-detail img {
    display: block;
    max-width: 100%;
}

/* Section label — small letter-spaced identification, not a banner */
.film-detail__heading {
    font-size: clamp(0.8rem, 1.1vw, 0.95rem);
    font-weight: 400;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--fd-accent);
    margin: 0 0 clamp(28px, 4vw, 48px);
}

.film-detail__heading--center {
    text-align: center;
}

/* Thin structural separator — rhythm, not decoration */
.film-detail__rule {
    width: min(var(--fd-max-width), calc(100% - 2 * var(--fd-gutter)));
    height: 1px;
    margin: 0 auto;
    background: var(--fd-hairline);
    border: 0;
}

/* ================================================================
   01 — HERO
   Scene image 1 fullscreen. Bottom stack: film title (lower, close
   to the credit block) → small "Directed by" line → director name.
   ================================================================ */

.film-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--fd-bg);
}

.film-hero__media,
.film-hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.film-hero__media img {
    object-fit: cover;
}

.film-hero__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 30%),
        linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 45%),
        rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.film-hero__bottom {
    position: absolute;
    left: 50%;
    bottom: clamp(28px, 6vh, 64px);
    transform: translateX(-50%);
    width: min(90vw, 1100px);
    text-align: center;
}

.film-hero__title {
    margin: 0 0 clamp(10px, 1.6vh, 20px);
    font-size: clamp(2rem, 5vw, 4.2rem);
    font-weight: 400;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}

.film-hero__directed-by {
    margin: 0 0 8px;
    font-size: clamp(0.72rem, 1vw, 0.85rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.film-hero__director {
    margin: 0;
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
}

/* ================================================================
   02 — IDENTITY
   ================================================================ */

.film-identity {
    padding: clamp(28px, 4vw, 48px) var(--fd-gutter);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
}

.film-identity__line {
    margin: 0;
    font-size: clamp(0.72rem, 1vw, 0.85rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--fd-text);
}

/* Dot separators only between parts that actually rendered */
.film-identity__part + .film-identity__part::before {
    content: "\00B7";
    margin: 0 0.9em;
    color: var(--fd-accent);
}

.film-identity__cta {
    display: inline-block;
    padding: 12px 26px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    color: var(--fd-text);
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.film-identity__cta:hover,
.film-identity__cta:focus-visible {
    background-color: var(--fd-accent);
    border-color: var(--fd-accent);
    color: #fff;
}

/* Section rhythm */
.film-synopsis,
.film-gallery,
.film-director,
.film-credits,
.film-screenings,
.film-more {
    width: min(var(--fd-max-width), calc(100% - 2 * var(--fd-gutter)));
    margin: 0 auto;
    padding: clamp(56px, 8vw, 110px) 0;
}

/* ================================================================
   03 — SYNOPSIS + SCENE IMAGE 2 (two-column editorial)
   ================================================================ */

.film-synopsis {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: clamp(36px, 6vw, 96px);
}

.film-synopsis__image {
    overflow: hidden;
}

.film-synopsis__image img {
    width: 100%;
    height: 100%;
    max-height: 640px;
    object-fit: cover;
}

.film-synopsis__body {
    margin: 0;
    max-width: 58ch;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.9;
    color: rgba(0, 0, 0, 0.85);
}

/* Alternating pages: image on the right instead of the left */
.film-synopsis--flip .film-synopsis__image { order: 2; }
.film-synopsis--flip .film-synopsis__text  { order: 1; }

/* No scene image 2 → beautifully constrained text block */
.film-synopsis--text-only .film-synopsis__text {
    grid-column: 1 / -1;
    justify-self: center;
    text-align: center;
}

.film-synopsis--text-only .film-synopsis__body {
    margin: 0 auto;
}


/* ================================================================
   04 — GALLERY
   Uses the BIAFF 2026 homepage gallery feature design: the
   horizontal slider strip (home_gallery.css classes) with the
   existing lightbox for full-size viewing.
   ================================================================ */

.film-gallery__controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.film-gallery .home-gallery__item {
    cursor: pointer;
}

/* ================================================================
   05 — DIRECTOR
   Portrait sits right next to the text (no section title).
   No portrait → the text block simply centers itself.
   ================================================================ */

.film-director {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(36px, 6vw, 96px);
}

.film-director__image img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
}

.film-director__name {
    margin: 0 0 clamp(14px, 2vw, 22px);
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 400;
    color: var(--fd-heading);
}

.film-director__bio {
    max-width: 60ch;
    font-size: clamp(0.95rem, 1.2vw, 1.08rem);
    line-height: 1.85;
    color: rgba(0, 0, 0, 0.8);
}

.film-director__bio p {
    margin: 0 0 1em;
}

.film-director__bio p:last-child {
    margin-bottom: 0;
}

.film-director--no-image {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
}

.film-director--no-image .film-director__bio {
    margin: 0 auto;
}

/* ================================================================
   06 — CREDITS (centered)
   ================================================================ */

.film-credits__list {
    margin: 0 auto;
    max-width: 760px;
}

.film-credits__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: clamp(20px, 4vw, 60px);
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.film-credits__row:first-child {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.film-credits__label {
    flex: 0 0 auto;
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.film-credits__value {
    margin: 0;
    text-align: right;
    font-size: clamp(0.95rem, 1.2vw, 1.08rem);
    line-height: 1.6;
    color: var(--fd-text);
}

/* ================================================================
   07 — SCREENINGS
   ================================================================ */

.film-screenings__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(24px, 3vw, 40px);
}

.film-screenings__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
}

.film-screenings__datetime {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
}

.film-screenings__date {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fd-text);
}

.film-screenings__time {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    letter-spacing: 0.14em;
    color: var(--fd-accent);
}

.film-screenings__venue {
    margin: 0;
    color: var(--fd-text);
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.6;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

a.film-screenings__venue:hover,
a.film-screenings__venue:focus-visible {
    color: var(--fd-accent);
    border-bottom-color: var(--fd-accent);
}

.film-screenings__venue-arrow {
    display: inline-block;
    margin-left: 0.35em;
}

.film-screenings__venue--text {
    color: var(--fd-muted);
}

.film-screenings__ticket {
    margin-top: 6px;
    padding: 10px 22px;
    border: 1px solid var(--fd-accent);
    color: var(--fd-accent);
    font-size: 0.72rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.film-screenings__ticket:hover,
.film-screenings__ticket:focus-visible {
    background: var(--fd-accent);
    color: #fff;
}

/* ================================================================
   08 — MORE FROM [CATEGORY]
   ================================================================ */

.film-more .carousel-section {
    margin: 0;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 900px) {
    .film-synopsis {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .film-synopsis--flip .film-synopsis__image { order: 0; }
    .film-synopsis--flip .film-synopsis__text  { order: 0; }

    .film-synopsis__text {
        text-align: left;
    }

    .film-director {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .film-credits__row {
        flex-direction: column;
        gap: 4px;
    }

    .film-credits__value {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .film-screenings__list {
        grid-template-columns: 1fr;
    }

    /* Hero: the photo takes ~half the screen height on phones.
       A full-viewport hero crops landscape stills extremely hard on
       narrow/tall screens ("too zoomed in") — halving the height halves
       the zoom, so roughly 50% of the screen shows the film photo. */
    .film-hero {
        height: 50vh;   /* fallback for browsers without small-viewport units */
        height: 50svh;  /* stable 50% of the visible screen (URL bar aware) */
        min-height: 0;  /* drop the 560px desktop floor, it would force zoom back */
    }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .film-identity__cta,
    .film-screenings__venue,
    .film-screenings__ticket {
        transition: none;
    }
}

