/**
 * ==========================================================================
 * OPERA.CSS — Pagina singola opera (scroll orizzontale a schede)
 * ==========================================================================
 * Caricato solo su is_singular('opera'). Sostituisce la vecchia sezione 15 di
 * main.css. Tutto in rem: la scala fluida la fa html{font-size} (main.css),
 * quindi dall'iPad al 4K ogni scheda cresce in proporzione.
 *
 * INDICE
 *  1. Shell (viewport, track, slide, ambient)
 *  2. Navigazione in basso
 *  3. Componenti condivisi (.os-*)
 *  4. Schede: cover · video/player · synopsis · statement · technical ·
 *             credits · festivals · press · gallery · moodboard · editorial
 *  5. Lightbox <dialog> (.sgal-lightbox, assets/js/lightbox.js)
 *  6. Responsive · landscape · reduced motion
 *
 * Linguaggio visivo (uguale a Contatti / Documentari):
 *  - eyebrow "— LABEL" (Jost maiuscolo, tracking) + titolo in serif (Times) con la
 *    parte finale grigia in corsivo ("Cre|dits");
 *  - filetti sottili, nessun testo leggibile sotto --testo-xs (13px @16px root);
 *  - contrasto testo ≥ 4.5:1 (mai alpha < .6 su testo).
 * ==========================================================================
 */


/* ==========================================================================
   1. SHELL
   ========================================================================== */

/* Nessuno scroll di pagina: le schede sono a viewport fisso */
body.single-opera { overflow: hidden; }
html:has(body.single-opera) { scrollbar-gutter: auto; }

/* Lo sfondo delle schede è nero: la navbar resta sempre trasparente */
body.single-opera .navbar,
body.single-opera .navbar.navbar--scrolled {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom-color: transparent !important;
}

.opera,
.persona__gallery-wrap {
    --os-text:      rgba(255, 255, 255, 0.88);
    --os-muted:     rgba(255, 255, 255, 0.64);   /* ≈ #a2a2a2 su nero → 8:1 */
    --os-line:      rgba(255, 255, 255, 0.16);
    --os-line-soft: rgba(255, 255, 255, 0.09);
    --os-dim:       rgba(234, 228, 219, 0.32);   /* parte grigia dei titoli */
    --os-accent:    #fff;
    --os-ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.opera {
    --os-gutter:    clamp(1.25rem, 4vw, 3.5rem);
    --os-max:       72rem;                       /* larghezza contenuto (scala con la root) */
    --os-nav-h:     3.5rem;
    --os-top:       calc(var(--navbar-altezza) + clamp(0.75rem, 2vw, 2rem));
    --os-bottom:    calc(var(--os-nav-h) + env(safe-area-inset-bottom, 0px) + 1.25rem);

    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: var(--z-contenuto);
    overflow: hidden;
    background: #000;
    color: var(--os-text);
    font-family: var(--font-principale);
}

/* Sfumature: sotto la navbar (il contenuto scorre "dietro" il logo) e sopra la nav */
.opera::before,
.opera::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    z-index: 3;
    pointer-events: none;
}
.opera::before {
    top: 0;
    height: calc(var(--navbar-altezza) * 1.5);
    background: linear-gradient(to bottom, #000 30%, rgba(0, 0, 0, 0));
}
.opera::after {
    bottom: 0;
    height: calc(var(--os-nav-h) + env(safe-area-inset-bottom, 0px) + 1.25rem);
    background: linear-gradient(to top, #000 45%, rgba(0, 0, 0, 0));
}

.opera__track {
    position: absolute;
    inset: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.opera__track::-webkit-scrollbar { display: none; }

.opera__slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Immagine d'atmosfera (locandina / sfondo video): sfocata e molto scura */
.opera__ambient {
    position: absolute;
    inset: -4%;
    width: 108%;
    height: 108%;
    object-fit: cover;
    opacity: 0.2;
    filter: blur(2.5rem) saturate(1.15);
    transform: translateZ(0);
    pointer-events: none;
    user-select: none;
}

/* Area scorrevole verticale. Il body interno usa margin:auto → centrato se c'è spazio,
   parte dall'alto e scorre se il contenuto è più alto (mai tagliato in cima). */
.opera__slide-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--os-top) var(--os-gutter) var(--os-bottom);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.opera__slide-body {
    width: 100%;
    max-width: var(--os-max);
    margin: auto;
}

/* Schede "larghe": video, galleria, moodboard */
.opera__slide[data-slide-type="video"] .opera__slide-body,
.opera__slide[data-slide-type="gallery"] .opera__slide-body,
.opera__slide[data-slide-type="moodboard"] .opera__slide-body {
    --os-max: 84rem;
}

/* Galleria: riempie l'altezza disponibile (il viewer si adatta, niente scroll) */
.opera__slide[data-slide-type="gallery"] .opera__slide-body {
    flex: 1 1 auto;
    min-height: 0;
    margin-block: 0;
}

/* Focus visibile ovunque nella pagina opera */
.opera :focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}


/* ==========================================================================
   2. NAVIGAZIONE IN BASSO
   ========================================================================== */

.opera__nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: var(--os-nav-h);
    padding: 0 var(--os-gutter) env(safe-area-inset-bottom, 0px);
}

.opera__nav-back {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    font-size: var(--testo-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--os-muted);
    transition: color 0.25s var(--os-ease);
}
.opera__nav-back:hover { color: #fff; }

.opera__nav-center {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.opera__nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--os-muted);
    transition: color 0.25s var(--os-ease), opacity 0.25s;
}
.opera__nav-arrow:hover { color: #fff; }
.opera__nav-arrow[disabled] { opacity: 0.25; cursor: default; pointer-events: none; }
.opera__nav-arrow svg { width: 1.25rem; height: 1.25rem; }

.opera__nav-dots {
    display: none;
    align-items: center;
}

.opera__nav-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
    min-width: 2rem;
    min-height: 2.75rem;
    padding: 0 0.6rem;
    color: var(--os-muted);
    font-size: var(--testo-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.25s var(--os-ease);
}
.opera__nav-dot:hover { color: #fff; }

.opera__nav-dot-point {
    flex: none;
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 50%;
    background: currentColor;
    transition: transform 0.3s var(--os-ease), background 0.3s;
}
.opera__nav-dot.is-active { color: #fff; }
.opera__nav-dot.is-active .opera__nav-dot-point { transform: scale(1.7); }

.opera__nav-dot-label { display: none; }

.opera__nav-count {
    display: none;
    margin: 0 0.5rem;
    font-size: var(--testo-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--os-muted);
    white-space: nowrap;
}
.opera__nav-count-num { color: #fff; }
.opera__nav-count-label::before { content: '·'; margin: 0 0.6em; opacity: 0.6; }

.opera__nav-spacer { justify-self: end; }

/* ≥1024px: etichette. Se ci stanno tutte (JS: .opera__nav--labels-all) le mostra tutte,
   altrimenti solo quella attiva */
@media (min-width: 1024px) {
    .opera__nav-dots { display: flex; }
    .opera__nav-dot.is-active .opera__nav-dot-label { display: inline; }
    .opera__nav--labels-all .opera__nav-dot-label   { display: inline; }
}

/* Touch (tablet in orizzontale ≥1024px): punti con area di tocco da 44px */
@media (pointer: coarse) {
    .opera__nav-dot { min-width: 2.75rem; }
}

/* <1024px: niente punti (14 punti da 44px non ci stanno su tablet/telefono):
   frecce + contatore "02 / 08 · Credits" */
@media (max-width: 1023px) {
    .opera__nav-count { display: block; }
}

/* <640px: contatore senza etichetta, back solo freccia */
@media (max-width: 639px) {
    .opera__nav { grid-template-columns: auto 1fr auto; }
    .opera__nav-center { justify-self: center; }
    .opera__nav-back-label { display: none; }
    .opera__nav-back { width: 2.75rem; justify-content: center; }
    .opera__nav-spacer { width: 2.75rem; }
    .opera__nav-count-label { display: none; }
}


/* ==========================================================================
   3. COMPONENTI CONDIVISI (.os-*)
   ========================================================================== */

/* --- Eyebrow "— LABEL" --- */
.os-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 0 0.6rem;
    font-size: var(--testo-xs);
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--os-muted);
}
.os-eyebrow::before {
    content: '';
    flex: none;
    width: 1.4rem;
    height: 1px;
    background: currentColor;
}
.os-eyebrow span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Titolo: serif (Times) + parte grigia in corsivo --- */
.os-head { margin-bottom: clamp(1.75rem, 3.5vw, 3.25rem); }

.os-title {
    margin: 0;
    font-family: var(--font-titoli);
    font-size: clamp(2.5rem, 4.4vw, 4.5rem);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: 0;
    color: #fff;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.os-title .dim {
    font-style: italic;
    color: var(--os-dim);
}

/* Variante compatta: schede visive (video, galleria, moodboard) */
.os-head--compact { margin-bottom: clamp(0.75rem, 1.6vw, 1.5rem); }
.os-head--compact .os-title { font-size: clamp(1.75rem, 2.6vw, 2.75rem); }

/* --- Layout "titolo a sinistra | contenuto a destra" --- */
.os-split { display: block; }
.os-split__main { min-width: 0; }

@media (min-width: 900px) {
    .os-split {
        display: grid;
        grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
        column-gap: clamp(2.5rem, 6vw, 6rem);
        align-items: start;
    }
    .os-split > .os-head,
    .os-split > .os-split__side {
        position: sticky;
        top: 0;
        margin-bottom: 0;
    }
    .os-split .os-title { font-size: clamp(2.25rem, 3.6vw, 3.75rem); }
}

/* --- Testo corrente --- */
.os-prose {
    max-width: 40rem;
    font-size: 1.0625rem;
    font-weight: 350;
    line-height: 1.8;
    color: var(--os-text);
}
.os-prose > * + * { margin-top: 1.1em; }
.os-prose h2,
.os-prose h3,
.os-prose h4 {
    margin-top: 1.6em;
    font-family: var(--font-titoli);
    font-weight: 400;
    line-height: 1.25;
    color: #fff;
}
.os-prose h2 { font-size: 1.6rem; }
.os-prose h3 { font-size: 1.35rem; }
.os-prose h4 { font-size: 1.15rem; }
.os-prose a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--os-line);
    text-underline-offset: 0.25em;
}
.os-prose a:hover { text-decoration-color: #fff; }
.os-prose ul,
.os-prose ol { padding-left: 1.3em; list-style: revert; }
.os-prose blockquote {
    padding-left: 1.2em;
    border-left: 1px solid var(--os-line);
    font-family: var(--font-titoli);
    font-style: italic;
    color: #fff;
}
.os-prose img { max-width: 100%; height: auto; }
.os-prose strong { font-weight: 500; color: #fff; }

/* Statement: primo paragrafo come "lead" in serif corsivo */
.os-prose--statement > p:first-child {
    font-family: var(--font-titoli);
    font-style: italic;
    font-size: clamp(1.4rem, 2.3vw, 2.1rem);
    line-height: 1.45;
    color: #fff;
}

/* --- Sotto-titolo di colonna (Cast / Troupe / Scheda tecnica) --- */
.os-subhead {
    margin: 0 0 0.9rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--os-line);
    font-size: var(--testo-xs);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--os-muted);
}

/* --- Elenco chiave / valore con filetti (scheda tecnica, credits) --- */
.os-dl { margin: 0; }
.os-dl__row {
    display: grid;
    grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
    column-gap: 1.5rem;
    align-items: baseline;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--os-line-soft);
    break-inside: avoid;
}
.os-dl dt {
    font-size: var(--testo-xs);
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--os-muted);
}
.os-dl dd {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 350;
    line-height: 1.45;
    color: #fff;
    overflow-wrap: anywhere;
}
.os-dl a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--os-line);
    text-underline-offset: 0.25em;
    transition: text-decoration-color 0.25s;
}
.os-dl a:hover { text-decoration-color: #fff; }

@media (min-width: 900px) {
    .os-dl--cols {
        column-count: 2;
        column-gap: clamp(2.5rem, 6vw, 5rem);
    }
}

/* --- Bottone --- */
.os-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    padding: 0.55rem 1.2rem;
    border: 1px solid var(--os-line);
    font-size: var(--testo-xs);
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--os-text);
    background: transparent;
    cursor: pointer;
    transition: color 0.25s var(--os-ease), border-color 0.25s var(--os-ease), background 0.25s var(--os-ease);
}
.os-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.06);
}
.os-btn--sm { min-height: 2.5rem; padding: 0.4rem 0.95rem; }

/* --- Stato vuoto --- */
.os-empty {
    margin: 0;
    padding: 2rem 0;
    font-size: var(--testo-sm);
    letter-spacing: 0.08em;
    color: var(--os-muted);
}

/* --- Striscia scorrevole con frecce (foto festival) --- */
.os-strip { position: relative; }
.os-strip__track {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.os-strip__track::-webkit-scrollbar { display: none; }
.os-strip__item {
    flex: none;
    height: clamp(6rem, 15dvh, 9.5rem);
    aspect-ratio: 3 / 2;
    overflow: hidden;
    scroll-snap-align: start;
    background: #111;
    cursor: zoom-in;
}
.os-strip__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s, transform 0.6s var(--os-ease);
}
.os-strip__item:hover img { opacity: 1; transform: scale(1.04); }
.os-strip__btn {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-top: -1.5rem;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid var(--os-line);
}
.os-strip__btn[hidden] { display: none; }
.os-strip__btn--prev { left: 0.5rem; }
.os-strip__btn--next { right: 0.5rem; }


/* ==========================================================================
   4.1 SCHEDA: COVER
   ========================================================================== */

.slide-cover {
    display: grid;
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
}

.slide-cover__poster {
    justify-self: center;
    margin: 0;
    max-width: 100%;
}
.slide-cover__poster-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(42dvh, 26rem);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.6);
}

.slide-cover__body { min-width: 0; }

.slide-cover__title {
    margin: 0 0 clamp(1rem, 2vw, 1.75rem);
    font-family: var(--font-titoli);
    font-size: clamp(2.6rem, 6.2vw, 6rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    color: #fff;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.slide-cover__title--img img {
    width: auto;
    max-width: min(100%, 26rem);
    max-height: clamp(3rem, 12dvh, 8rem);
}

.slide-cover__logline {
    max-width: 34rem;
    margin: 0 0 clamp(1.25rem, 2.4vw, 2rem);
    font-size: clamp(1.0625rem, 1.5vw, 1.375rem);
    font-weight: 350;
    line-height: 1.6;
    color: var(--os-text);
}

.slide-cover__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem clamp(1.5rem, 3vw, 3rem);
    margin: 0 0 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--os-line);
    max-width: 34rem;
}
.slide-cover__meta-item { display: flex; flex-direction: column; gap: 0.15rem; }
.slide-cover__meta dt {
    font-size: var(--testo-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--os-muted);
}
.slide-cover__meta dd { margin: 0; font-size: 1.0625rem; color: #fff; }

.slide-cover__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
}
.slide-cover__tag {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--os-line);
    font-size: var(--testo-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--os-text);
}

.slide-cover__director {
    margin: 0;
    font-size: var(--testo-sm);
    letter-spacing: 0.06em;
    color: #fff;
}
.slide-cover__director span {
    margin-right: 0.6rem;
    font-size: var(--testo-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--os-muted);
}
.slide-cover__director span::after { content: '—'; margin-left: 0.6rem; }

/* Senza locandina: testo grande, larghezza contenuta */
.slide-cover:not(.slide-cover--poster) .slide-cover__body { max-width: 46rem; }
.slide-cover:not(.slide-cover--poster) .slide-cover__title { font-size: clamp(3rem, 7.5vw, 7rem); }

@media (min-width: 900px) {
    .slide-cover--poster {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    }
    .slide-cover__poster-img {
        max-height: calc(100dvh - var(--os-top) - var(--os-bottom));
    }
}


/* ==========================================================================
   4.2 SCHEDA: VIDEO + PLAYER
   ========================================================================== */

.slide-video {
    /* Altezza disponibile per il player = viewport − padding scheda − eyebrow − riga titolo/icone */
    --sv-avail-h: calc(100dvh - var(--os-top) - var(--os-bottom) - 6.75rem); /* eyebrow + riga titolo/icone */
    --ar: 1.7778;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Gruppo (titolo+icone+player): la larghezza segue l'altezza disponibile,
   così il video non esce mai dalla scheda. */
.slide-video__group {
    width: min(100%, calc(var(--sv-avail-h) * var(--ar)));
    min-width: min(100%, 18rem);
}

.slide-video__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    min-height: 2.75rem;
    margin-bottom: 0.9rem;
}
.slide-video__title { min-width: 0; }
.slide-video__title-img { width: auto; max-width: 100%; max-height: 3rem; }
.slide-video__title-text {
    display: block;
    font-family: var(--font-titoli);
    font-size: clamp(1.4rem, 2.2vw, 2.25rem);
    line-height: 1.1;
    color: #fff;
    overflow-wrap: anywhere;
}

.slide-video__links { display: flex; align-items: center; gap: 0.9rem; flex: none; }
.slide-video__links-label {
    font-size: var(--testo-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--os-muted);
}
.slide-video__icons { display: flex; align-items: center; }
.slide-video__icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--os-text);
    opacity: 0.8;
    transition: opacity 0.25s, color 0.25s;
}
.slide-video__icon-link:hover { opacity: 1; color: #fff; }
.slide-video__icon { display: inline-flex; width: 1.6rem; height: 1.6rem; }
.slide-video__icon svg,
img.slide-video__icon { width: 100%; height: 100%; object-fit: contain; }

/* --- Player --- */
.opera-player {
    position: relative;
    width: 100%;
    aspect-ratio: var(--ar, 1.7778);
    max-height: var(--sv-avail-h);
    overflow: hidden;
    background: #0a0a0a;
    cursor: pointer;
    outline: none;
}
.opera-player:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

.opera-player__poster {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.5s ease;
}
.opera-player__poster.is-hidden { opacity: 0; pointer-events: none; }
.opera-player__poster-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }

.opera-player__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(4rem, 8vw, 6rem);
    height: clamp(4rem, 8vw, 6rem);
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}
.opera-player__play:hover { transform: translate(-50%, -50%) scale(1.08); }
.opera-player__play-icon { width: 100%; height: 100%; }

.opera-player__video {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.opera-player__embed-wrap { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.opera-player__embed-wrap > * { pointer-events: auto; }
.opera-player__iframe { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; border: 0; background: #000; color-scheme: normal; }

.opera-player__loader {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.opera-player.is-loading .opera-player__loader { opacity: 1; }
.opera-player__spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    animation: operaSpinner 0.8s linear infinite;
}
@keyframes operaSpinner { to { transform: rotate(360deg); } }

.opera-player__controls {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.25rem 0.5rem 0.25rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.opera-player.is-playing .opera-player__controls { opacity: 1; }
.opera-player.is-playing:not(:hover):not(:focus-within) .opera-player__controls {
    opacity: 0;
    transition: opacity 1.5s ease 2s;
}
/* Touch: nessun hover → controlli sempre visibili durante la riproduzione */
@media (hover: none) {
    .opera-player.is-playing .opera-player__controls,
    .opera-player.is-playing:not(:hover):not(:focus-within) .opera-player__controls {
        opacity: 1;
        transition: none;
    }
}

.opera-player__progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    height: 2rem;              /* area di tocco comoda, la barra visibile resta sottile */
    cursor: pointer;
    background: linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)) center / 100% 0.25rem no-repeat;
}
.opera-player__progress { width: 0; height: 0.25rem; background: #fff; transition: width 0.15s linear; }

.opera-player__mute,
.opera-player__fullscreen {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.opera-player__mute:hover,
.opera-player__fullscreen:hover { opacity: 1; }
.opera-player__mute-icon,
.opera-player__fullscreen-icon { width: 1.35rem; height: 1.35rem; }
.opera-player.is-muted .opera-player__mute-waves { display: none; }

.opera-player:fullscreen,
.opera-player:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    background: #000;
}


/* ==========================================================================
   4.3 SCHEDA: SINOSSI (+ mini scheda)
   ========================================================================== */

.slide-synopsis__scheda { margin-top: clamp(1.75rem, 3vw, 2.75rem); max-width: 40rem; }
.slide-synopsis__scheda .os-btn { margin-top: 1.25rem; }


/* ==========================================================================
   4.4 SCHEDA: STATEMENT
   ========================================================================== */

.slide-statement__person {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: clamp(1.25rem, 2.5vw, 2.25rem) 0 0;
}
.slide-statement__photo {
    flex: none;
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(1);
    transition: filter 0.4s var(--os-ease);
}
.slide-statement__person:hover .slide-statement__photo { filter: grayscale(0); }
.slide-statement__caption { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.slide-statement__name {
    font-family: var(--font-titoli);
    font-size: clamp(1.15rem, 1.6vw, 1.5rem);
    line-height: 1.2;
    color: #fff;
}
a.slide-statement__name {
    text-decoration: underline;
    text-decoration-color: var(--os-line);
    text-underline-offset: 0.25em;
}
a.slide-statement__name:hover { text-decoration-color: #fff; }
.slide-statement__role {
    font-size: var(--testo-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--os-muted);
}

@media (min-width: 900px) {
    /* Ritratto rettangolare 3:4 nella colonna sinistra */
    .slide-statement__person { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
    .slide-statement__photo {
        width: min(15rem, 100%);
        height: auto;
        max-height: 34dvh;
        aspect-ratio: 3 / 4;
        border-radius: 0;
    }
}


/* ==========================================================================
   4.5 SCHEDA: TECNICA
   ========================================================================== */

.slide-technical__actions { margin-top: clamp(1.5rem, 3vw, 2.5rem); }


/* ==========================================================================
   4.6 SCHEDA: CREDITS
   ========================================================================== */

.slide-credits__cols { display: grid; gap: 2.5rem; }

@media (min-width: 900px) {
    .slide-credits--two-col .slide-credits__cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: clamp(2.5rem, 6vw, 5rem);
        align-items: start;
    }
}

.slide-credits__col { min-width: 0; }
.slide-credits .os-dl__row { grid-template-columns: minmax(6rem, 42%) minmax(0, 1fr); }

/* Loghi partner: riga flessibile centrata (niente posizionamento assoluto) */
.slide-credits__partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.25rem clamp(2rem, 6vw, 5rem);
    margin-top: clamp(2.25rem, 4vw, 3.5rem);
    padding-top: clamp(1.75rem, 3vw, 2.5rem);
    border-top: 1px solid var(--os-line);
}
.slide-credits__partner-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 100%;
}
.slide-credits__partner-label {
    font-size: var(--testo-xs);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--os-muted);
    text-align: center;
}
.slide-credits__logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--logo-gap, 1.25rem);
}
.slide-credits__logo {
    display: block;
    width: var(--w, 3.75rem);
    max-width: 42vw;
}
.slide-credits__logo a { display: block; }
.slide-credits__logo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 5rem;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: opacity 0.25s;
}
.slide-credits__logo:hover img { opacity: 1; }


/* ==========================================================================
   4.7 SCHEDA: FESTIVAL E PREMI
   ========================================================================== */

.slide-festivals > * + * { margin-top: clamp(1.75rem, 3.5vw, 3rem); }
.slide-festivals > .os-head + * { margin-top: 0; }

.slide-festivals__laurels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 2rem 2.5rem;
    justify-items: center;
}
.slide-festivals__laurels--single { grid-template-columns: minmax(0, 15rem); justify-content: center; }
.slide-festivals__laurel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    max-width: 15rem;
    text-align: center;
}
.slide-festivals__laurel-img {
    width: 100%;
    max-height: clamp(8rem, 24dvh, 14rem);
    object-fit: contain;
}
.slide-festivals__laurel-text { display: flex; flex-direction: column; gap: 0.35rem; }
.slide-festivals__laurel-award {
    font-family: var(--font-titoli);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.2;
    color: #fff;
}
.slide-festivals__laurel-name { font-size: var(--testo-sm); color: var(--os-text); }
.slide-festivals__laurel-year {
    font-size: var(--testo-xs);
    letter-spacing: 0.2em;
    color: var(--os-muted);
}
.slide-festivals__awarded {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0;
    font-size: var(--testo-xs);
    letter-spacing: 0.1em;
    color: var(--os-muted);
}
.slide-festivals__awarded strong { font-weight: 400; color: var(--os-text); }

.slide-festivals__list { margin: 0; padding: 0; }
.slide-festivals__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--os-line-soft);
    break-inside: avoid;
}
.slide-festivals__item-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.slide-festivals__item-name { font-size: 1.0625rem; color: #fff; }
.slide-festivals__item-award {
    font-family: var(--font-titoli);
    font-style: italic;
    font-size: var(--testo-base);
    color: var(--os-muted);
}
.slide-festivals__item--award .slide-festivals__item-award { color: var(--os-text); }
.slide-festivals__item-year {
    flex: none;
    font-size: var(--testo-xs);
    letter-spacing: 0.18em;
    color: var(--os-muted);
}
@media (min-width: 900px) {
    .slide-festivals__list { column-count: 2; column-gap: clamp(2.5rem, 6vw, 5rem); }
}

.slide-festivals__more {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0;
    margin: 0;
    padding: 0;
    font-size: var(--testo-xs);
    letter-spacing: 0.06em;
    color: var(--os-muted);
}
.slide-festivals__more li + li::before { content: '·'; margin: 0 0.8em; opacity: 0.7; }


/* ==========================================================================
   4.8 SCHEDA: RASSEGNA STAMPA
   ========================================================================== */

.slide-press__list { display: grid; gap: clamp(1.75rem, 3vw, 3rem); }

.slide-press__year {
    display: grid;
    gap: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--os-line);
}
.slide-press__year-label {
    margin: 0;
    font-family: var(--font-titoli);
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    font-weight: 400;
    line-height: 1;
    color: var(--os-dim);
    font-style: italic;
}
.slide-press__items { display: grid; gap: 0; min-width: 0; }
.slide-press__item {
    padding: 0 0 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--os-line-soft);
}
.slide-press__item:last-child { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }

.slide-press__quote { margin: 0 0 1rem; max-width: 46rem; }
.slide-press__quote p {
    margin: 0;
    font-family: var(--font-titoli);
    font-style: italic;
    font-size: clamp(1.2rem, 1.9vw, 1.65rem);
    line-height: 1.5;
    color: #fff;
}
.slide-press__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    max-width: 46rem;
}
.slide-press__source {
    margin: 0;
    font-size: var(--testo-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--os-muted);
}
.slide-press__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (min-width: 768px) {
    .slide-press__year {
        grid-template-columns: minmax(5rem, 9rem) minmax(0, 1fr);
        column-gap: clamp(1.5rem, 4vw, 4rem);
    }
    .slide-press__year-label { position: sticky; top: 0; align-self: start; }
}


/* ==========================================================================
   4.9 SCHEDA: GALLERIA
   ========================================================================== */

.slide-gallery {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Didascalia (titolo / descrizione / crediti) — una alla volta */
.gal-caption { position: relative; flex: 1; min-width: 0; min-height: 3.25rem; }
.gal-caption__item { display: none; }
.gal-caption__item.is-active { display: block; }
.gal-caption__title {
    margin: 0 0 0.25rem;
    font-family: var(--font-titoli);
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.25;
    color: #fff;
}
.gal-caption__desc { margin: 0 0 0.3rem; max-width: 48rem; font-size: var(--testo-sm); line-height: 1.55; color: var(--os-text); }
.gal-caption__meta { margin: 0; font-size: var(--testo-xs); letter-spacing: 0.12em; color: var(--os-muted); }

.gal-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 0.9rem;
}
.gal-counter {
    flex: none;
    margin-left: auto;
    font-size: var(--testo-xs);
    letter-spacing: 0.18em;
    color: var(--os-muted);
    font-variant-numeric: tabular-nums;
}
.gal-counter__cur { color: #fff; }

.gal-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-top: -1.375rem;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--os-line);
    transition: background 0.25s, border-color 0.25s;
}
.gal-arrow:hover { background: rgba(0, 0, 0, 0.85); border-color: rgba(255, 255, 255, 0.6); }
.gal-arrow--prev { left: 0.75rem; }
.gal-arrow--next { right: 0.75rem; }

/* --- Showcase --- */
.gal-show { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.gal-show__stage {
    position: relative;
    flex: 1 1 auto;
    min-height: clamp(14rem, 40dvh, 60rem);
    background: #050505;
}
.gal-show__frame {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s var(--os-ease);
    cursor: zoom-in;
}
.gal-show__frame.is-active { opacity: 1; pointer-events: auto; }
.gal-show__frame img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.gal-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-bottom: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.gal-thumbs::-webkit-scrollbar { display: none; }
.gal-thumb {
    flex: none;
    height: clamp(3.25rem, 8dvh, 5.5rem);
    aspect-ratio: 3 / 2;
    overflow: hidden;
    opacity: 0.5;
    transition: opacity 0.25s, outline-color 0.25s;
    outline: 1px solid transparent;
    outline-offset: 2px;
}
.gal-thumb:hover { opacity: 0.85; }
.gal-thumb.is-active { opacity: 1; outline-color: rgba(255, 255, 255, 0.8); }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* --- Masonry --- */
.gal-masonry { columns: 2; column-gap: 0.75rem; }
.gal-masonry__item {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 0.75rem;
    overflow: hidden;
    break-inside: avoid;
    background: #0a0a0a;
    cursor: zoom-in;
}
.gal-masonry__item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.7s var(--os-ease), opacity 0.3s;
    opacity: 0.92;
}
.gal-masonry__item:hover img { transform: scale(1.03); opacity: 1; }
.gal-masonry__title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem 0.9rem 0.7rem;
    font-size: var(--testo-xs);
    letter-spacing: 0.12em;
    text-align: left;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}
.gal-masonry--grid { columns: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.gal-masonry--grid .gal-masonry__item { margin: 0; aspect-ratio: 4 / 3; }
.gal-masonry--grid .gal-masonry__item img { height: 100%; object-fit: cover; }

@media (min-width: 640px) {
    .gal-masonry { columns: 3; }
    .gal-masonry--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .gal-masonry { columns: 4; }
    .gal-masonry--grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --- Filmstrip --- */
.gal-film { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.gal-film__viewport { position: relative; flex: 1 1 auto; min-height: clamp(14rem, 40dvh, 60rem); }
.gal-film__track {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.gal-film__track::-webkit-scrollbar { display: none; }
.gal-film__frame {
    flex: none;
    height: 100%;
    max-width: 100%;
    scroll-snap-align: center;
    background: #050505;
    cursor: zoom-in;
}
.gal-film__frame img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; opacity: 0.55; transition: opacity 0.4s; }
.gal-film__frame.is-active img { opacity: 1; }


/* ==========================================================================
   4.10 SCHEDA: MOODBOARD
   ========================================================================== */

.slide-moodboard__text { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }

.slide-moodboard__mosaic {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(7.5rem, 26vw, 12rem);
    grid-auto-flow: dense;
    gap: 0.6rem;
}
.slide-moodboard__tile {
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
    cursor: zoom-in;
}
.slide-moodboard__tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
    transition: transform 0.7s var(--os-ease), opacity 0.3s;
}
.slide-moodboard__tile:hover img { transform: scale(1.04); opacity: 1; }

/* Mosaico: alcuni riquadri grandi / alti / larghi a ritmo fisso */
.slide-moodboard__tile:nth-child(7n + 1) { grid-column: span 2; grid-row: span 2; }
.slide-moodboard__tile:nth-child(7n + 4) { grid-row: span 2; }
.slide-moodboard__tile:nth-child(7n + 6) { grid-column: span 2; }

@media (min-width: 640px) {
    .slide-moodboard__mosaic {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: clamp(7rem, 13vw, 12rem);
    }
}
@media (min-width: 1280px) {
    .slide-moodboard__mosaic {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-auto-rows: clamp(7rem, 9vw, 12rem);
    }
}


/* ==========================================================================
   4.11 SCHEDA: EDITORIALE
   ========================================================================== */

.slide-editorial__flow { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); max-width: 46rem; }

.slide-editorial__heading {
    margin: 0;
    font-family: var(--font-titoli);
    font-weight: 400;
    line-height: 1.2;
    color: #fff;
}
.slide-editorial__heading--h2 { font-size: clamp(1.8rem, 3vw, 2.75rem); }
.slide-editorial__heading--h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
.slide-editorial__heading--h4 {
    font-family: var(--font-principale);
    font-size: var(--testo-xs);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--os-muted);
}

.slide-editorial__figure { margin: 0; }
.slide-editorial__figure img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(70dvh, 52rem);
    margin: 0 auto;
}
.slide-editorial__caption {
    margin-top: 0.7rem;
    font-size: var(--testo-xs);
    letter-spacing: 0.08em;
    text-align: center;
    color: var(--os-muted);
}
.slide-editorial__duo { display: grid; gap: 1rem; }
@media (min-width: 640px) {
    .slide-editorial__duo { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .slide-editorial__duo .slide-editorial__figure img { width: 100%; }
}

.slide-editorial__quote { margin: 0; padding: 0.25rem 0 0.25rem 1.5rem; border-left: 1px solid var(--os-line); }
.slide-editorial__quote p {
    margin: 0;
    font-family: var(--font-titoli);
    font-style: italic;
    font-size: clamp(1.4rem, 2.4vw, 2.1rem);
    line-height: 1.4;
    color: #fff;
}
.slide-editorial__quote cite {
    display: block;
    margin-top: 0.9rem;
    font-size: var(--testo-xs);
    font-style: normal;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--os-muted);
}

.slide-editorial__video { position: relative; aspect-ratio: 16 / 9; background: #0a0a0a; }
.slide-editorial__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.slide-editorial__rule { width: 100%; height: 1px; border: 0; background: var(--os-line); }


/* ==========================================================================
   5. LIGHTBOX — <dialog class="sgal-lightbox"> (assets/js/lightbox.js)
   ==========================================================================
   Un solo lightbox per galleria, moodboard, festival e rassegna stampa.
   ========================================================================== */

/* =============== LIGHTBOX ===============
   <dialog class="sgal-lightbox"> aperto con showModal() (assets/js/lightbox.js): sta nel
   top layer, quindi sopra a tutto senza z-index e senza subire overflow/transform dei genitori.
   Pannello info laterale (toggle con icona i).
   ========================================= */
dialog.sgal-lightbox {
    /* azzera gli stili predefiniti del <dialog> */
    position: fixed;
    inset: 0;                       /* niente 100vw/100vh: su iOS l'altezza include la barra URL */
    margin: 0;
    padding: 0;
    border: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    overflow: hidden;
    background: transparent;
    color: inherit;

    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
}

dialog.sgal-lightbox[open] {
    display: flex;
    opacity: 1;
}

dialog.sgal-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    transition: opacity 0.3s ease, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
}

dialog.sgal-lightbox[open]::backdrop {
    opacity: 1;
}

/* Dissolvenza in apertura (senza supporto: compare subito) */
@starting-style {
    dialog.sgal-lightbox[open] { opacity: 0; }
    dialog.sgal-lightbox[open]::backdrop { opacity: 0; }
}

.sgal-lightbox__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
    max-height: 80dvh;
    width: 100%;
    gap: 0;
    transition: gap 0.3s ease;
}

/* Quando info è attivo: gap per il pannello laterale */
.sgal-lightbox.has-info .sgal-lightbox__content {
    gap: 2rem;
}

/* Foto nel lightbox — centrata, si restringe quando info è attivo */
.sgal-lightbox__viewer {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    max-height: 80vh;
    max-height: 80dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: flex 0.3s ease;
}

.sgal-lightbox__img {
    max-width: 100%;
    max-height: 80vh;
    max-height: 80dvh;
    object-fit: contain;
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sgal-lightbox__img.is-active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

/* Frecce lightbox — aree cliccabili su tutto il lato (sotto i bottoni top) */
.sgal-lightbox__arrow {
    position: absolute;
    top: calc(var(--navbar-altezza, 68px) + 50px);
    bottom: 3rem;
    z-index: 5;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    padding: 0 clamp(1rem, 3vw, 3rem);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}
.sgal-lightbox__arrow:hover { color: #fff; }
.sgal-lightbox__arrow svg { width: 2.25rem; height: 2.25rem; }
.sgal-lightbox__arrow--prev { left: 0; }
.sgal-lightbox__arrow--next { right: 0; }

/* Chiudi — posizionato sotto la navbar, z-index sopra le frecce */
.sgal-lightbox__close {
    position: absolute;
    top: calc(var(--navbar-altezza, 68px) + 12px);
    right: clamp(1rem, 2vw, 2rem);
    z-index: 10;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    transition: color 0.2s ease;
    line-height: 1;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.4rem;
}
.sgal-lightbox__close:hover { color: #fff; }

/* Contatore lightbox */
.sgal-lightbox__counter {
    position: absolute;
    bottom: clamp(0.8rem, 2vh, 1.5rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    font-size: var(--testo-xs);
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.1em;
}

/* Toggle info nel lightbox — allineato con il counter in basso a destra */
.sgal-lightbox__info-toggle {
    position: absolute;
    bottom: clamp(0.8rem, 2vh, 1.5rem);
    right: clamp(0.8rem, 2vw, 1.5rem);
    z-index: 10;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    transition: color 0.2s ease, border-color 0.2s ease;
    min-height: 2.5rem;
    padding: 0.4rem 0.9rem;
    font-size: var(--testo-xs);
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.05em;
}
.sgal-lightbox__info-toggle:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.sgal-lightbox__info-toggle.is-active { color: #fff; border-color: rgba(255,255,255,0.5); }

/* Pannello info — nascosto di default, appare a destra */
.sgal-lightbox__info {
    flex: 0 0 0;
    max-height: 80vh;
    max-height: 80dvh;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, flex-basis 0.3s ease;
    pointer-events: none;
    scrollbar-width: none;
}
.sgal-lightbox__info::-webkit-scrollbar { display: none; }

.sgal-lightbox.has-info .sgal-lightbox__info {
    flex: 0 0 16rem;
    opacity: 1;
    pointer-events: auto;
}

.sgal-lightbox__info-item {
    display: none;
    flex-direction: column;
    gap: 0.6rem;
}

.sgal-lightbox__info-item.is-active {
    display: flex;
}

.sgal-lightbox__info-title {
    font-size: var(--testo-md);
    font-family: var(--font-titoli);
    font-weight: 400;
    color: var(--colore-testo);
}

.sgal-lightbox__info-desc {
    font-size: var(--testo-base);
    color: rgba(255,255,255,0.78);
    line-height: 1.6;
}

.sgal-lightbox__info-author {
    font-size: var(--testo-sm);
    color: rgba(255,255,255,0.5);
    font-style: italic;
}

.sgal-lightbox__info-year,
.sgal-lightbox__info-people {
    font-size: var(--testo-xs);
    color: rgba(255,255,255,0.5);
}

/* Lightbox mobile: info sotto la foto */
@media (max-width: 767px) {
    .sgal-lightbox__content {
        flex-direction: column;
        max-width: 95vw;
    }
    .sgal-lightbox.has-info .sgal-lightbox__info {
        width: 100%;
        flex-basis: auto;
        max-height: 30vh;
    }
    .sgal-lightbox__arrow {
        font-size: 2rem;
        padding: 0.5rem;
    }
}

/* PDF (rassegna stampa) nel lightbox */
.sgal-lightbox__pdf {
    width: min(90vw, 50rem);
    height: 80vh;
    height: 80dvh;
    border: none;
    background: #fff;
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.sgal-lightbox__pdf.is-active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}
@media (max-width: 767px) {
    .sgal-lightbox__pdf { width: 95vw; height: 85dvh; }
}


/* ==========================================================================
   6. RESPONSIVE · LANDSCAPE · REDUCED MOTION
   ========================================================================== */

/* Telefoni: gutter più stretto, titolo scheda più contenuto, player a tutta larghezza */
@media (max-width: 639px) {
    .opera { --os-nav-h: 3.25rem; }

    .slide-video { --sv-avail-h: calc(100dvh - var(--os-top) - var(--os-bottom) - 8.5rem); }
    .slide-video__top { flex-wrap: wrap; }
    .slide-video__links { width: 100%; justify-content: space-between; }

    .gal-arrow { width: 2.5rem; height: 2.5rem; margin-top: -1.25rem; }
}

/* Tablet in orizzontale / telefoni in landscape: poca altezza */
@media (max-height: 520px) and (orientation: landscape) {
    .opera { --os-top: calc(var(--navbar-altezza) + 0.25rem); --os-nav-h: 3rem; }

    .os-head { margin-bottom: 1.25rem; }
    .os-title { font-size: clamp(1.75rem, 4.4vw, 2.75rem); }
    .slide-cover__title { font-size: clamp(2rem, 5vw, 3.25rem); }
    .slide-cover--poster { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
    .slide-cover__poster-img { max-height: calc(100dvh - var(--os-top) - var(--os-bottom)); }
    .slide-video { --sv-avail-h: calc(100dvh - var(--os-top) - var(--os-bottom) - 3.5rem); }
    .slide-video .os-eyebrow { display: none; }
    .os-split > .os-head,
    .os-split > .os-split__side { position: static; }
}

@media (prefers-reduced-motion: reduce) {
    .opera *,
    .persona__gallery-wrap * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
