@import url('https://fonts.googleapis.com/css2?family=Suez+One&display=swap');

/* ============================
   VARIABILI COLORE
============================ */
:root {
    --rosso-teatrale: #CC3A3A;
    --rosso-scuro: #A52A2A;
    --rosso-footer: #B03030;
    --sfondo-chiaro: #F7F7F7;
}

/* ============================
   GENERALE
============================ */
body {
    margin: 0;
    font-family: 'Suez One', serif;
    background: var(--sfondo-chiaro);
    color: #333;
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================
   HERO
============================ */
.hero-header {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 550px;
    overflow: hidden;
    background: black;
}

.hero-img {
    position: absolute;
    top: 25%;
    left: 50%;
    width: 80%;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: contain;
    object-position: center 65%;
    z-index: 1;
}

.hero-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, black 0%, transparent 30%),
        linear-gradient(to bottom, transparent 60%, black 100%),
        linear-gradient(to left, black 0%, transparent 25%),
        linear-gradient(to right, black 0%, transparent 25%);
    pointer-events: none;
    z-index: 2;
}

/* LOGO */
.hero-logo {
    position: relative;
    top: 15px;
    left: 10px;
    z-index: 4;
}

.hero-logo img {
    height: 200px;
    width: auto;
    position: relative;
    z-index: 4;
    mask-image: radial-gradient(circle, black 55%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, black 65%, transparent 100%);
}

.zoomable-logo {
    cursor: pointer;
    position: relative;
    z-index: 9999;
}

/* OVERLAY LOGO */
.logo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    opacity: 0;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease;
    z-index: 9998;
}

.logo-overlay.show {
    opacity: 1;
    visibility: visible;
}

.logo-overlay img {
    max-width: 80vw;
    max-height: 80vh;
    transform: scale(0.85);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.logo-overlay.show img {
    transform: scale(1);
    opacity: 1;
}

/* MENU */
.hero-menu {
    position: absolute;
    top: 25px;
    right: 40px;
    z-index: 4;
}

.hero-menu ul {
    list-style: none;
    display: flex;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.hero-menu a,
.hero-menu a:link,
.hero-menu a:visited {
    color: white !important;
    font-size: 1.8rem;
    text-decoration: none;
    text-shadow: 0 0 10px black;
}

/* TITOLO HERO */
.hero-overlay {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    text-align: center;
}

.hero-title {
    color: white;
    font-size: 4rem;
    text-shadow: 0 0 18px black;
}

/* ============================
   TITOLI SEZIONI
============================ */
h2 {
    font-size: 3rem;
    text-align: center;
    color: var(--rosso-teatrale);
    margin: 50px 0 30px;
}

/* ============================
   EVENTI
============================ */
.eventi-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.evento-btn,
.evento-btn:link,
.evento-btn:visited {
    font-size: 1.6rem;
    color: white !important;
    background: var(--rosso-teatrale);
    padding: 18px 35px;
    border-radius: 12px;
    text-decoration: none;
    transition: 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.evento-btn:hover {
    background: var(--rosso-scuro);
    transform: scale(1.05);
}

/* ============================
   GALLERIA
============================ */
.foto-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 20px;
}

.foto-container img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    background: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.foto-container img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* ============================
   LIGHTBOX
============================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s ease-in-out, visibility 0.35s ease-in-out;
    z-index: 9999;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 85%;
    max-height: 85%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.45);
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.35s ease-in-out, transform 0.35s ease-in-out;
}

.lightbox.show img {
    opacity: 1;
    transform: scale(1);
}

/* Frecce del lightbox */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: white;
    cursor: pointer;
    padding: 10px;
    z-index: 10000;
    user-select: none;
    text-shadow: 0 0 10px black;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.2);
}


/* ============================
   CONTATTI
============================ */
#contatti {
    text-align: center;
}

#contatti p {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

#contatti .social {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* SOLO ICONE */
#contatti .social a {
    background: none !important;
    padding: 0 !important;
    border: none !important;
    font-size: 0 !important;
}

#contatti .social .icon {
    width: 40px !important;
    height: 40px !important;
    margin: 5px;
}

/* YouTube più grande */
#contatti .social .icon.youtube {
    width: 95px !important;
    height: 95px !important;
}

/* Allinea verticalmente il logo YouTube */
#contatti .social .icon.youtube {
    margin-top: -22px !important; /* alza l’icona */
}

/* ============================
   FOOTER
============================ */
footer {
    background: var(--rosso-teatrale);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

/* ============================
   CHI SIAMO
============================ */
#chi-siamo {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

#testo-chi-siamo {
    overflow: hidden;
    transition: max-height 3s cubic-bezier(0.25, 0.1, 0.25, 1.4),
                opacity 2.2s ease,
                transform 2.2s ease;
}

#testo-chi-siamo.testo-ridotto {
    max-height: 350px;
    opacity: 0.4;
    transform: translateY(25px);
}

#testo-chi-siamo.aperto {
    max-height: 5000px;
    opacity: 1;
    transform: translateY(0);
}

#chi-siamo .toggle-btn {
    color: var(--rosso-teatrale);
    font-size: 1.3rem;
    cursor: pointer;
    margin-top: 45px;
    display: inline-block;
}

/* ============================
   ANIMAZIONE SEZIONI
============================ */
.section-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   LINK GLOBALI
============================ */

/* niente viola/blu di default */
a:link,
a:visited {
    color: inherit;
    text-decoration: none;
}

/* link rossi dove serve */
.link-rosso,
.link-rosso:link,
.link-rosso:visited {
    color: var(--rosso-teatrale);
    text-decoration: none;
}

.link-rosso:hover {
    text-decoration: underline;
}

/* ============================
   RESPONSIVE — SMARTPHONE
============================ */
@media (max-width: 768px) {

    /* HERO */
    .hero-header {
        height: 100vh !important;
        min-height: 100vh !important;
        overflow: hidden !important;
        background: black;
    }

    .hero-img {
        position: absolute;
        top: 40% !important;
        left: 50% !important;
        width: 100% !important;
        height: 100% !important;
        transform: translate(-50%, -50%) !important;
        object-fit: cover !important;
        object-position: center 25%
    }

    .hero-logo img {
        height: 90px;
        margin-top: 10px !important;
    }

.hero-logo {
        left: 10px !important;
        top: 10px !important;
        position: fixed !important;
        z-index: 999 !important;
    }

/* MENU smartphone — versione più compatta */
.hero-menu {
    top: 18px !important;
    right: 10px !important;
}

.hero-menu ul {
    gap: 10px !important; /* ancora meno spazio tra le voci */
}

.hero-menu a {
    font-size: 0.95rem !important; /* più piccolo ma ancora leggibile */
    letter-spacing: 0.5px !important; /* più elegante e stretto */
    text-shadow: 0 0 5px black !important;
}

    .hero-title {
        font-size: 2rem;
        padding: 0 20px;
    }

    /* TITOLI */
    h2 {
        font-size: 2rem;
        margin: 30px 0 20px;
    }

/* Titolo Galleria Fotografica e Video — versione smartphone */
section#galleria > h2 {
    font-size: 1.2rem !important;
    line-height: 1.2;
}
    /* SEZIONI */
    section {
        margin-top: 120px;
        margin-bottom: 120px;
    }

    /* GALLERIA HOME */
    #home-anteprime {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 0 10px;
    }

    #home-anteprime img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* GALLERIA COMPLETA */
    .foto-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }

    .foto-container img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: cover;
    }

    /* ANTEPRIME SINGOLI SPETTACOLI */
    .anteprime {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }

    .anteprime img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* CHI SIAMO */
    #chi-siamo {
        padding: 0 15px;
    }

    #chi-siamo .toggle-btn {
        font-size: 1rem;
        margin-top: 25px;
    }

    /* CONTATTI */
    #contatti p {
        font-size: 1rem;
    }

    #contatti .social .icon {
        width: 30px !important;
        height: 30px !important;
    }

    #contatti .social .icon.youtube {
        width: 70px !important;
        height: 70px !important;
        margin-top: -10px !important;
    }
}

/* Ridimensiona le locandine nella lista eventi */
.locandine-container img {
    width: 100%;
    max-width: 280px;   /* dimensione ideale */
    height: auto;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    object-fit: contain;
}

/* Griglia per locandine nuove e passate */
#locandine-nuove,
.locandine-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    justify-items: center;
    padding: 0 20px;
}

/* Stile uniforme per tutte le locandine */
#locandine-nuove img,
.locandine-container img {
    width: 100%;
    max-width: 280px;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

/* Titolo dei singoli spettacoli nella galleria */
.titolo-spettacolo {
    text-align: center;
    margin-bottom: 15px;
}

.titolo-spettacolo a {
    color: var(--rosso-teatrale) !important;
    font-size: 2.2rem;
    text-decoration: none;
}

.titolo-spettacolo a:hover {
    text-decoration: underline;
}

.anteprime img {
    width: 360px;
    height: 240px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

/* Centra le anteprime sotto ogni titolo */
.spettacolo-preview {
    text-align: center;
}

/* Contenitore delle tre foto */
.anteprime {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px; /* spazio tra le foto */
    margin-top: 20px; /* spazio dal titolo */
    margin-bottom: 25px; /* spazio sotto le foto */
}

/* Centrare e distanziare le anteprime nella pagina galleria */
.spettacolo-preview {
    text-align: center;
    margin-bottom: 60px; /* spazio sotto ogni blocco spettacolo */
}

.anteprime {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; /* spazio tra le tre foto */
    margin-top: 25px; /* spazio tra titolo e foto */
}

/* Spazio e centratura delle anteprime nella pagina galleria */
.spettacolo-preview {
    text-align: center;
    margin-bottom: 150px; /* spazio sotto le tre foto */
}

.anteprime {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; /* spazio tra le tre foto */
    margin-top: 50px; /* spazio tra titolo e foto */
}

/* Contenitore e immagini anteprima home */
#home-anteprime {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 0 20px;
}

#home-anteprime img {
    width: 100%;
    max-width: 320px;
    height: 220px;
    object-fit: contain;
    background: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: opacity 1.2s ease;
    opacity: 1;
}

/* Fade usato dallo script */
.fade-out {
    opacity: 0;
    transition: opacity 2.5s ease;
}

.fade-in {
    opacity: 1;
    transition: opacity 2.5s ease;
}

/* Spazio tra le sezioni */
section {
    margin-top: 220px;
    margin-bottom: 220px;
}

/* Link rossi di base (NON enormi) */
.link-rosso,
.link-rosso:link,
.link-rosso:visited {
    color: var(--rosso-teatrale);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: normal;
}

/* "Entra nella galleria completa" più piccolo */
.link-galleria {
    font-size: 1.4rem;
    font-weight: normal;
}

/* "Torna alla home" più piccolo ovunque */
.torna-home,
.torna-home a {
    font-size: 1.3rem;
    font-weight: normal;
}

/* Rende più grande SOLO il titolo "Galleria Fotografica" nella home */
section#galleria > h2 {
    font-size: 3.6rem !important;
    font-weight: bold !important;
}

.hero-menu {
    position: fixed;
    top: 20px;
    right: 40px;
    z-index: 999;
}

.hero-logo {
    position: fixed;
    top: 20px;
    left: 40px;
    z-index: 999;
}


