/* HERO */

.hero {
    position: relative;
    background: url("../imm/home/home_1.jpg") no-repeat center center/cover;
    height: 100vh;
    /* FIX: impedisce che sfori a destra */
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.66);
    z-index: 0;
}

/* SEZIONE CHI SIAMO */

.chi-siamo .container {
    display: flex;
    gap: 40px;
    padding: 80px 10%;
    align-items: center;
}

.chi-siamo img {
    width: 480px;
    border-radius: 10px;
}

.chi-siamo h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    padding-left: 50px;
}

.chi-siamo p {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
    padding-left: 50px;
    padding-right: 50px;
}

/* GALLERIA PIATTI */

.piatti {
    text-align: center;
    padding: 60px 10%;
}

.piatti h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.piatti .galleria {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.piatti .galleria img {
    height: 250px;
    width: 330px;
    object-fit: cover;
    border-radius: 8px;
    margin: 10px;
}

/* CAROSELLO LOCALE */

.locale {
    text-align: center;
    margin: 40px 0;
    /* FIX: non sfora mai */
    width: 100%;
    overflow: hidden;
}

.carosello {
    position: relative;
    /* FIX PRINCIPALE: era 900px fisso, ora fluido */
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    /* altezza proporzionale */
    aspect-ratio: 9 / 5;
    overflow: hidden;
    border-radius: 8px;
}

.carosello img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Frecce dentro l'immagine */
.freccia {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(40px, 8vw, 100px);
    color: white;
    text-shadow: 0 0 8px rgba(0,0,0,0.8);
    cursor: pointer;
    user-select: none;
    z-index: 10;
    /* area touch più grande */
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.freccia.sx { left: 10px; }
.freccia.dx { right: 10px; }

.freccia:hover {
    transform: translateY(-50%) scale(1.2);
}

/* TESTO SOTTO CAROSELLO */

.testoLocale {
    margin-top: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    padding: 0 20px;
}

.testoLocale h2 {
    font-size: 28px;
    color: #3a1f1f;
    margin-bottom: 15px;
}

/* PRENOTA */
.prenota {
    background: #f3e4b0;
    padding: 60px 10%;
    text-align: center;
}

.prenota h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

#btnContatta {
    display: inline-block;
    background: #9e6a00;
    padding: 1rem 2rem;
    color: white;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    border-radius: 5px;
    transition: transform 0.3s, opacity 0.3s;
    /* area touch */
    min-height: 44px;
    line-height: 1.4;
}

#btnContatta:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* FOOTER */
footer {
    background: #4f200d;
    color: #fff2ab;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    padding: 0 20px;
}

.footer-mappa iframe {
    width: 100%;
    height: 330px;
    border: 0;
    pointer-events: auto;
    display: block;
}

/* ANIMAZIONI */

.animato {
    opacity: 0;
    transition: all 1s ease;
}
.animato.attivo {
    opacity: 1;
    transform: translate(0, 0);
}

.from-left  { transform: translateX(-80px); }
.from-right { transform: translateX(80px); }
.from-top   { transform: translateY(-80px); }
.from-bottom{ transform: translateY(80px); }

/* =============================================
   RESPONSIVE – TABLET (max 900px)
   ============================================= */

@media (max-width: 900px) {

    /* CHI SIAMO: da affiancato a colonna */
    .chi-siamo .container {
        flex-direction: column;
        padding: 50px 6%;
        gap: 24px;
    }

    .chi-siamo img {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        display: block;
    }

    .chi-siamo h2 {
        padding-left: 0;
        text-align: center;
    }

    .chi-siamo p {
        padding-left: 0;
        padding-right: 0;
    }

    /* GALLERIA PIATTI */
    .piatti {
        padding: 40px 5%;
    }

    .piatti .galleria img {
        width: 100%;
        height: auto;
        max-width: 400px;
        margin: 8px auto;
        display: block;
    }

    /* CAROSELLO */
    .carosello {
        width: 96%;
    }

    /* TESTO LOCALE */
    .testoLocale {
        max-width: 96%;
        padding: 0 16px;
    }

    /* PRENOTA */
    .prenota {
        padding: 40px 6%;
    }

    /* FOOTER MAPPA */
    .footer-content {
    padding: 0 20px;
}

.footer-mappa iframe {
        height: 220px;
    }
}

/* =============================================
   RESPONSIVE – MOBILE (max 480px)
   ============================================= */

@media (max-width: 480px) {

    .chi-siamo .container {
        padding: 36px 4%;
    }

    .chi-siamo h2 {
        padding-left: 0;
    }

    .chi-siamo p {
        padding-left: 0;
        padding-right: 0;
    }

    .piatti {
        padding: 30px 4%;
    }

    .piatti h2 {
        font-size: 1.5rem;
    }

    .carosello {
        width: 100%;
        border-radius: 0;
    }

    .prenota {
        padding: 30px 5%;
    }

    .prenota h2 {
        font-size: 1.5rem;
    }

    .testoLocale h2 {
        font-size: 22px;
    }
}
