/* --- SEZIONE HERO GENERALE --- */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    /* Background di fallback */
    background: #000;
    /* Posizionamento sotto l'header */
    margin-top: -150px; 
    z-index: 5;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden; 
}

/* --- SLIDER IMMAGINI --- */
.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out; 
    z-index: 0;
}

.slide.active {
    opacity: 1;
}

/* Filtro scuro sopra le immagini */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 1;
}

/* --- CONTENUTO CENTRALE (TITOLO E TASTI) --- */
/* --- CONTENUTO CENTRALE --- */
.hero-content {
    position: relative;
    z-index: 10;
    font-family: 'Century Gothic', sans-serif;
    padding: 0 20px;
    
    /* Stato iniziale per l'animazione di ingresso */
    opacity: 0;
    transform: translateY(30px);
    
    /* La transizione serve per l'ingresso, lo scroll sarà gestito dal JS */
    transition: opacity 1s ease-out, transform 1s ease-out;
    visibility: visible;
}

/* Questa classe viene aggiunta dal JS nel footer dopo mezzo secondo */
.hero-content.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Rimuovi eventuali altre righe che forzano opacity: 1 !important */

.hero-content h1 {
    font-size: 45px;
    letter-spacing: 8px;
    text-transform: uppercase;
    font-weight: 300;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-content p {
    font-size: 16px;
    letter-spacing: 4px;
    margin-bottom: 40px;
    color: #dddddd;
    text-transform: uppercase;
}

/* --- BOTTONI --- */
.hero-buttons {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid #ffffff;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    transition: all 0.4s ease;
    margin: 10px;
}

.cta-button:hover {
    background: #ffffff;
    color: #000000;
}

.cta-button.secondary {
    background: rgba(139, 0, 0, 0.8); /* Rosso L'Arte nel Vetro */
    border-color: #8B0000;
}

.cta-button.secondary:hover {
    background: #8B0000;
    color: #ffffff;
}

/* --- RETTANGOLO BIANCO BLOCCATO A DESTRA --- */

.hero-captions-container {
    position: absolute;
    top: 140px; /* Altezza sotto l'header */
    right: 0;   /* Ancoraggio fisso al bordo destro */
    width: auto; /* Impedisce al contenitore di occupare tutto lo spazio e centrarsi */
    z-index: 1000;
    pointer-events: none;
    display: block !important; /* Forza il comportamento a blocco invece di flex */
}

.slide-caption {
    position: relative;
    margin-left: auto; /* Spinge il rettangolo verso destra */
    right: -100%; /* Inizia fuori dallo schermo a destra */
    background-color: #ffffff !important;
    padding: 15px 35px;
    white-space: nowrap;
    display: block;
    /* Transizione fluida per l'entrata */
    transition: right 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: -5px 5px 15px rgba(0,0,0,0.2);
}

/* Stato attivo: il rettangolo si ferma esattamente a filo del bordo destro */
.slide-caption.active {
    right: 0 !important;
}

/* Stato uscita: scompare tornando a destra */
.slide-caption.exit {
    right: -100% !important;
}

.slide-caption p {
    font-family: "Century Gothic", sans-serif !important;
    color: #333333 !important;
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
}

/* Fix per Mobile */
@media screen and (max-width: 1024px) {
    .hero-captions-container {
        top: 90px;
    }
    .slide-caption {
        padding: 10px 20px;
        right: -120%; /* Più margine per nascondersi su schermi piccoli */
    }
}
@media (max-width: 480px) {
    .hero-content {
        /* Riduce la dimensione globale del testo dentro il box */
        font-size: 0.9rem !important; 
    }

    .hero-content h1, 
    .hero-content .title {
        /* Riduce il titolo (regola il valore 1.8 se lo vuoi ancora più piccolo) */
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 10px;
    }

    .hero-content p, 
    .hero-content .description {
        /* Riduce il paragrafo per farlo stare comodamente nei bordi */
        font-size: 1rem !important;
        line-height: 1.4;
    }
    
    .hero-content .button, 
    .hero-content btn {
        /* Riduce leggermente anche eventuali bottoni */
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
}
@media (max-width: 480px) {
    /* Accorcia il contenitore e lo centra */
    .hero-captions-container {
        width: 85% !important;     /* Lo rende più corto rispetto allo schermo */
        max-width: 320px;         /* Impedisce che si allarghi troppo */
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 10px !important; /* Riduce lo spazio interno */
        box-sizing: border-box;
    }

    /* Rimpicciolisce tutto il testo all'interno delle didascalie */
    .hero-captions-container h1,
    .hero-captions-container h2,
    .hero-captions-container .title {
        font-size: 1.5rem !important; /* Titolo più piccolo e proporzionato */
        line-height: 1.1 !important;
        letter-spacing: 0px !important; /* Riduce lo spazio tra lettere se eccessivo */
    }

    .hero-captions-container p,
    .hero-captions-container .subtitle,
    .hero-captions-container span {
        font-size: 0.9rem !important; /* Testo secondario più sottile */
        line-height: 1.3 !important;
    }
}