/* Reset di base e Stili Globali */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #B08D57;
    --secondary-color: #8A6F4D;
    --dark-bg-color: #1A1A1A;
    --medium-dark-bg-color: #272727;
    --light-bg-color: #FBF9F3;
    --text-on-dark: #EAE0D5;
    --text-on-light: #210e0e;
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Lato', sans-serif;
     --header-height: 70px;
    --container-width: 1160px;
    --border-radius: 5px;
    --transition-speed: 0.4s;
    --shadow-light: 0 6px 18px rgba(0,0,0,0.06);
    --shadow-medium: 0 8px 25px rgba(0,0,0,0.08);
    --shadow-strong: 0 12px 28px rgba(0,0,0,0.1);
    
    
}

body {
    font-family: var(--font-secondary);
    line-height: 1.75;
    color: var(--text-on-light);
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* overflow-x: hidden; */
} 
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--text-on-light);
    margin-bottom: 1.25rem;
    line-height: 1.2;
    font-weight: 700;
}
/*letter-spacing: 0.5px;*/
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); letter-spacing: 0.5px; }
h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-on-light);
}
h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 2.5px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
}

p {
    margin-bottom: 1.25rem;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed) ease;
}
a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
}

.section-padding {
    padding: clamp(50px, 8vw, 90px) 0;
}

.bg-light {
    background-color: var(--light-bg-color);
}
.bg-dark {
    background-color: var(--dark-bg-color);
}
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark p, .bg-dark span, .bg-dark strong, .bg-dark li, .bg-dark label {
    color: var(--text-on-dark);
}
.bg-dark a {
    color: var(--primary-color);
}
.bg-dark a:hover {
    color: var(--light-bg-color);
}
.bg-dark h2::after {
    background-color: var(--primary-color);
}

.text-light { color: var(--text-on-dark); }
.text-light h1, .text-light h2, .text-light h3 { color: var(--text-on-dark); }


.text-center {
    text-align: center;
    margin-top: 2.5rem;
}

header {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* padding: 0.8rem 0;  <-- CANCELLA o COMMENTA QUESTA RIGA se usi un'altezza fissa con 'height' */
    box-shadow: 0 2px 15px rgba(0,0,0,0.07);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 2px solid #e5c156;

    /* Proprietà per l'altezza fissa e allineamento verticale */
    height: var(--header-height); /* Assicurati che --header-height sia definito in :root */
    display: flex;
    align-items: center;

    /* Righe duplicate da CANCELLARE qui sotto: */
    /* position: sticky; */ /* Già definito sopra */
    /* top: 0; */         /* Già definito sopra */
    /* background-color: rgba(255, 255, 255, 0.97); */ /* Già definito sopra */
    /* z-index: 1000; */    /* Già definito sopra */
}
.menu-toggle {
    display: none; /* OK - Nascosto di default (per desktop) */
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-on-light);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1005; /* OK - Per stare sopra il menu se si sovrappone */
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: clamp(40px, 6vw, 55px);
}

.logo-text {
    font-family: var(--font-primary);
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: var(--text-on-light);
    letter-spacing: 0.5px;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}
body.mobile-menu-open {
    overflow: hidden; /* OK - Bloccherà lo scroll */
}
.nav-menu li {
    margin-left: clamp(15px, 2.5vw, 30px);
}

.nav-menu a {
    font-family: var(--font-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    color: var(--text-on-light);
    padding: 10px 5px;
    position: relative;
    letter-spacing: 1px;
    transition: color var(--transition-speed) ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1.5px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}
.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.hero2 {
    background: linear-gradient(rgba(20,20,20,0.5), rgba(20,20,20,0.5)), url('../images/pane-sfondo.jpg') no-repeat center center/cover;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 40px 20px;
}

.hero-content2 {
    max-width: 800px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInSlideUp 1s ease-out 0.5s forwards;
}
   .hero {
    min-height: 85vh;
    position: relative; /* CORRETTO E FONDAMENTALE */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 40px 20px;
    color: #fff;
}
.page-title-section .container {
    position: relative; 
    z-index: 2;  
}
.page-title-section p {
    font-size: clamp(1.1rem, 2.2vw, 1.35rem); 
    color: rgba(245, 245, 245, 0.9); 
    max-width: 750px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.6); 
}
.page-title-section h1 {
    color: #FFFFFF; 
    font-size: clamp(2.6rem, 5.8vw, 3.8rem); 
    margin-bottom: 0.8rem;
   
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7); 
}
.page-title-section {
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('../images/pane-sfondo.jpg') no-repeat center center/cover;
    color: var(--text-on-dark); 
    padding: clamp(80px, 15vw, 140px) 0; 
    text-align: center;
    position: relative; 
}
.hero-video-wrapper {
     position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}
#heroBgVideo { 
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover; 
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 2; 
}
.hero-content {
    max-width: 800px;
    /* opacity: 0; */ /* Mantieni commentato per ora o imposta direttamente a 1 */
    /* transform: translateY(30px); */ /* Mantieni commentato per ora o imposta direttamente a 0 */
    opacity: 1; /* IMPOSTA DIRETTAMENTE PER VEDERLO */
    transform: translateY(0); /* IMPOSTA DIRETTAMENTE PER VEDERLO */
    animation: fadeInSlideUp 1s ease-out 0.5s forwards; /* Lascia questa attiva */
    position: relative;
    color: #fff; /* O assicurati che i figli h1, p abbiano colore bianco */
    z-index: 3;
    text-align: center;  
}

.hero-content h1 { 
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    margin-bottom: 1.5rem;
    color: #fff; 
    text-shadow: 2px 2px 10px rgba(0,0,0,0.6); 
    font-weight: 700;
}

.hero-content p {
    color: rgba(255,255,255,0.95);
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 2.5rem;
    font-family: var(--font-secondary);
    font-weight: 300;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.55);
}


@keyframes fadeInSlideUp {
     to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: var(--border-radius);
    font-family: var(--font-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
    cursor: pointer;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}
.hero .btn-primary:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}


.btn-secondary {
    background-color: transparent;
    color: var(--text-on-light);
    border: 2px solid var(--text-on-light);
}
.btn-secondary:hover {
    background-color: var(--text-on-light);
    color: #fff;
}
.bg-light .btn-secondary {
    color: var(--text-on-light);
    border-color: var(--text-on-light);
}
.bg-light .btn-secondary:hover {
    background-color: var(--text-on-light);
    color: var(--light-bg-color);
}
.bg-dark .btn-secondary {
    color: var(--text-on-dark);
    border-color: var(--text-on-dark);
}
.bg-dark .btn-secondary:hover {
    background-color: var(--text-on-dark);
    color: var(--dark-bg-color);
}

.chi-siamo-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(30px, 5vw, 50px);
    align-items: center;
}
.chi-siamo-img {
    box-shadow: var(--shadow-medium);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.chi-siamo-img:hover {
    transform: scale(1.03) translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.prodotti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(25px, 4vw, 35px);
    margin-bottom: 2.5rem;
}


.prodotto-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #EAEAEA;
}
.prodotto-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.prodotto-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    transition: transform 0.5s ease;
}
.prodotto-card:hover img {
    transform: scale(1.05);
}

.prodotto-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.prodotto-card h3 {
    font-size: 1.4rem;
    margin: 0 0 0.75rem;
    color: var(--text-on-light);
}

.prodotto-card p {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 1rem;
    flex-grow: 1;
    line-height: 1.6;
}
.prodotto-card .prezzo {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: auto;
    display: block;
}

.galleria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(10px, 2vw, 20px);
}
.galleria-grid img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    box-shadow: var(--shadow-light);
    transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    cursor: pointer;
}
.galleria-grid img:hover {
    transform: scale(1.04) rotate(1deg);
    opacity: 0.85;
    box-shadow: var(--shadow-medium);
}

#contatti {
    background-color: var(--dark-bg-color);
}
.contatti-flex {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(30px, 5vw, 50px);
}
.contatti-info, .contatti-mappa {
    flex: 1;
    min-width: min(100%, 320px);
}
.contatti-info p {
    margin-bottom: 1rem;
    font-size: 1rem;
}
.contatti-info strong {
    font-weight: 600;
    color: var(--primary-color);
}
.contatti-mappa iframe {
    border-radius: var(--border-radius);
    filter: grayscale(40%) contrast(90%) brightness(95%);
    height: 350px;
}

footer {
    background-color: var(--medium-dark-bg-color);
    color: var(--text-on-dark);
    text-align: center;
    padding: 3rem 1.5rem;
    font-size: 0.9rem;
}
footer p {
    margin-bottom: 0.6rem;
    color: rgba(234, 224, 213, 0.75);
}
footer p:first-child {
    color: var(--text-on-dark);
    font-weight: 500;
}

.fade-in-element, .slide-up-element {
    opacity: 1; 
    transform: translateY(0); 
    transition-property: opacity, transform;
    transition-duration: 0.8s;
    transition-timing-function: ease-out;
}
/*
.fade-in-element, .slide-up-element {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: 0.8s;
    transition-timing-function: ease-out;
}
.slide-up-element {
    transform: translateY(40px);
}
*/
.fade-in-element.is-visible,
.slide-up-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-up-element:nth-child(2).is-visible { transition-delay: 0.1s; }
.slide-up-element:nth-child(3).is-visible { transition-delay: 0.2s; }
.slide-up-element:nth-child(4).is-visible { transition-delay: 0.3s; }


#tutti-i-prodotti .product-category { 
    margin-bottom: 4rem;
    display: flex;
     flex-direction: column;
    text-align: center;
}
#tutti-i-prodotti .product-category h2 {
    text-align: center; 
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    margin-bottom: 0.8rem;
    color: var(--text-on-light);
    position: relative;
}
#tutti-i-prodotti .product-category h2::after {
   margin-left: auto;
        margin-right: auto;
}

#tutti-i-prodotti .category-description {
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    color: #555;
    margin-bottom: 2.5rem;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

#aperitivi .section-description {
    text-align: center;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    color: #555;
    line-height: 1.6;
}

.aperitivo-card-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.aperitivo-card {
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    min-height: 400px; 
    display: flex;
    flex-direction: column;
    justify-content: center;   
    color: #fff;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.aperitivo-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.aperitivo-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: var(--border-radius);
}

.aperitivo-card:hover .aperitivo-bg-image {
    transform: scale(1.05);
}

.aperitivo-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    z-index: 2;
    pointer-events: none;
    border-radius: var(--border-radius);
}

.aperitivo-card-content { 
    position: relative;
    z-index: 3;
    
    text-align: center; 
    padding: clamp(1.5rem, 3vw, 2.5rem);
    width: 100%;
    box-sizing: border-box;
}

.aperitivo-card-content h3 {
    font-size: clamp(1.8rem, 4vw, 2.8rem); 
    color: #fff;
    margin: 0; 
    text-shadow: 2px 2px 6px rgba(0,0,0,0.75);
    font-family: var(--font-primary);
    line-height: 1.3;
}

.aperitivo-dettagli-sotto-card {
    text-align: center;
    padding: 2rem 1rem 0;
    max-width: 700px;
    margin: 0 auto; 
}

.aperitivo-dettagli-sotto-card .descrizione-offerta {
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    color: var(--text-on-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-family: var(--font-secondary);
}

.aperitivo-dettagli-sotto-card .aperitivo-prezzo {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: block;
    font-family: var(--font-secondary);
}

/* ... (presumibilmente stili precedenti nel tuo file) ... */

.aperitivo-dettagli-sotto-card .aperitivo-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Media Query per schermi fino a 992px (per aperitivi o altro) */
@media (max-width: 992px) {
    .aperitivo-card {
        min-height: 350px;
    }
    .aperitivo-card-content h3 {
        font-size: clamp(1.7rem, 3.8vw, 2.5rem);
    }
    /* Qui potresti avere altri stili per questo breakpoint */
}

/* Media Query INDIPENDENTE per schermi fino a 768px (per MENU MOBILE e altri aggiustamenti) */
@media (max-width: 768px) {
    /* --- INIZIO STILI MENU MOBILE --- */
    .menu-toggle {
        display: block;
    }

    .nav-menu { /* Questo è l'UL della navigazione */
        display: none; /* Nascosto di default su mobile */
        flex-direction: column;
        position: fixed; /* O absolute, a seconda del posizionamento dell'header */
        top: var(--header-height); /* Assicurati che --header-height sia definito in :root */
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--light-bg-color, #fdfdfd); /* Sfondo per il menu */
        padding-top: 1.5rem; /* Spazio sopra i link */
        overflow-y: auto; /* Scroll se i link non entrano */
        z-index: 999;
        border-top: 1px solid #eee;
    }

    .nav-menu.menu-open { /* Quando il JS aggiunge la classe .menu-open */
        display: flex; /* Mostra il menu */
    }

    .nav-menu li {
        margin-left: 0;
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 1.5rem;
        text-align: center;
        border-bottom: 1px solid #e0e0e0;
        width: 100%;
        color: var(--text-on-light);
    }

    .nav-menu li:last-child a {
        border-bottom: none;
    }

    .nav-menu a::after { /* Rimuovi la linea sotto per i link mobili */
        display: none;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background-color: var(--primary-color);
        color: #fff;
    }
    /* --- FINE STILI MENU MOBILE --- */

    /* --- INIZIO ALTRI STILI RESPONSIVE PER < 768px (es. aperitivi) --- */
    .aperitivo-card { /* Questi stili per .aperitivo-card si applicheranno sotto i 768px */
        min-height: 300px;
    }
    .aperitivo-card-content {
         padding: clamp(1.2rem, 2.5vw, 2rem);
    }
    .aperitivo-card-content h3 {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }

    .aperitivo-dettagli-sotto-card {
        padding-top: 1.5rem;
    }
    .aperitivo-dettagli-sotto-card .descrizione-offerta {
        font-size: clamp(0.9rem, 2.8vw, 1rem);
    }
    .aperitivo-dettagli-sotto-card .aperitivo-prezzo {
        font-size: clamp(1.1rem, 3.8vw, 1.4rem);
    }
    .aperitivo-dettagli-sotto-card .aperitivo-actions .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    h1 { font-size: clamp(2rem, 7vw, 2.8rem); }
    
} /* Chiusura della @media (max-width: 768px) */

/* Qui potresti avere altre media query per breakpoint diversi, es. @media (max-width: 480px) */