:root {
    --bg-color: #fcfaf7;
    --text-color: #2c2c2c;
    --accent-gold: #b2945e;
    --serif: 'Cormorant Garamond', serif;
    --sans: 'Montserrat', sans-serif;
}

/* --- RESET & BASE --- */
- { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    font-family: var(--sans); 
    line-height: 1.6; 
    overflow-x: hidden;
}

/* --- NAVBAR & LOGO --- */
.navbar-container {
    position: fixed;
    top: 0; width: 100%;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    padding: 20px 0 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}
.navbar-container.scrolled { padding: 5px 0; }
.logo-central { max-width: 350px; height: auto; transition: max-width 0.4s ease; }
.navbar-container.scrolled .logo-central { max-width: 150px; }
.logo-central-container { margin-bottom: 30px; transition: 0.4s; }
.navbar-container.scrolled .logo-central-container { margin-bottom: 5px; }

.nav-links-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 15px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.nav-links { display: flex; gap: 50px; }
.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
}
.nav-links a:hover { color: var(--accent-gold); }

/* --- HAMBURGER --- */
.hamburger {
    display: none;
    background: none; border: none; cursor: pointer; padding: 10px;
}
.hamburger span {
    display: block; width: 25px; height: 2px;
    background-color: var(--text-color); margin: 5px 0; transition: 0.4s;
}
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- HERO (Desktop) --- */
.hero {
    min-height: 100vh; 
    width: 100%;
    display: flex; 
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    position: relative; 
    color: white;
    text-align: center;
    background: url('img/vigneto-roero.webp') center/cover no-repeat fixed;
    overflow: hidden;
    /* AGGIUNTO: Spazio per allontanare il testo dalla navbar su PC */
    padding-top: 150px; 
}

/* --- LEGGIBILITÀ DEL TESTO (Desktop) --- */
.hero-text {
    position: relative;
    z-index: 5;
    width: 100%;        /* Torna a tutto schermo */
    max-width: 1200px;   /* Limite per schermi molto larghi */
    padding: 0 20px;
    text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.7), 0 0 5px rgba(0,0,0,0.5);
}

.hero-text h1 {
    font-family: var(--serif);
    font-size: clamp(3rem, 8vw, 5.5rem); 
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero-text p {
    color: white !important;
    text-align: center !important; /* Vince sul justify generale */
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
    max-width: 800px;  /* Rende il paragrafo leggibile */
    margin: 0 auto;    /* Lo centra orizzontalmente */
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); 
}

/* --- SEZIONI DI TESTO --- */
.storia, .sostenibilita-sqnpi, .catalogo, .contatti { padding: 100px 20px; }
.container-small { max-width: 900px; margin: 0 auto; }
.container { max-width: 1200px; margin: 0 auto; }
.subtitle { font-family: var(--sans); text-transform: uppercase; letter-spacing: 3px; font-size: 0.8rem; color: var(--accent-gold); display: block; margin-bottom: 10px; }
h2 { font-family: var(--serif); font-size: 3rem; margin-bottom: 25px; line-height: 1.1; }
p { font-size: 1.1rem; color: #4a4a4a; line-height: 1.8; text-align: justify; margin-bottom: 20px; }

/* --- PARALLAX IMAGES --- */
.img-storia, .parallax-vigneto, .parallax-contatti {
    width: 100%; height: 500px;
    background-attachment: fixed; background-position: center;
    background-repeat: no-repeat; background-size: cover;
}
.img-storia { background-image: url('img/vigneto-storia.webp'); }
.parallax-vigneto { background-image: url('img/vigneti-panoramica.webp'); }
.parallax-contatti { background-image: url('img/cantina-ingresso.webp'); }

/* --- SOSTENIBILITÀ --- */
.sqnpi-content { display: flex; align-items: center; gap: 60px; }
.sqnpi-text { flex: 2; }
.logo-sqnpi { max-width: 180px; height: auto; filter: sepia(20%); }

/* --- CATALOGO --- */
.section-title { font-family: var(--serif); font-size: 3.5rem; text-align: center; margin-bottom: 60px; }
.categoria-titolo { font-family: var(--serif); font-size: 2.2rem; text-align: center; margin: 40px 0; color: var(--accent-gold); }
.grid-vini { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.vino-card { 
    background: white; padding: 40px 20px; text-align: center; transition: 0.4s; 
    border: 1px solid rgba(0,0,0,0.03); display: flex; flex-direction: column; height: 520px; 
}
.vino-card img { height: 320px; object-fit: contain; margin-bottom: 20px; filter: drop-shadow(0 10px 10px rgba(0,0,0,0.08)); }
.vino-card h4 { font-family: var(--serif); font-size: 1.3rem; margin-top: auto; }
.vino-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.05); }

/* --- CONTATTI --- */
.contatti-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contatti-form form { display: flex; flex-direction: column; gap: 15px; }
.contatti-form input, .contatti-form textarea { padding: 15px; border: 1px solid #ddd; background: #fff; font-family: inherit; }
.btn-gold { background: var(--accent-gold); color: white; padding: 18px; border: none; text-transform: uppercase; cursor: pointer; transition: 0.3s; letter-spacing: 2px; }
.btn-gold:hover { background: #967b4b; }

/* --- FOOTER --- */
footer { background: #1a1a1a; color: white; padding: 60px 20px; text-align: center; }
footer p { color: white; text-align: center; margin-bottom: 0; }
.avviso { font-size: 0.75rem; opacity: 0.5; margin-top: 20px; letter-spacing: 1px; }

/* --- MOBILE RESPONSIVE COMPLETO --- */
@media (max-width: 768px) {
    .navbar-container { 
        padding: 20px 0 10px 0; 
        position: fixed;
        width: 100%;
        left: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: all 0.4s ease-in-out;
    }
    
    .logo-central { 
        width: 280px; 
        max-width: 80%;
        display: block;
        margin: 0 auto;
        transition: all 0.4s ease-in-out;
    }
    
    .logo-central-container { 
        margin-bottom: 15px; 
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .navbar-container.scrolled { padding: 10px 0; }
    .navbar-container.scrolled .logo-central { width: 130px; }
    .navbar-container.scrolled .logo-central-container { margin-bottom: 5px; }

    .hamburger { 
        display: block; 
        position: absolute;
        right: 20px;
        top: 35px;
        transition: all 0.4s ease-in-out;
    }

    .navbar-container.scrolled .hamburger { top: 20px; }

    .nav-links-container {
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: white; 
        padding: 20px 0;
    }
    .nav-links-container.active { display: flex; flex-direction: column; }
    .nav-links { flex-direction: column; align-items: center; gap: 20px; }

    .hero { 
        height: 100dvh; 
        min-height: 100dvh;
        padding-top: 200px;
        background-attachment: scroll; 
        background-position: right center;
        margin-top: 0;
        display: flex;
        align-items: center;
    }

    .img-storia, .parallax-vigneto, .parallax-contatti {
        background-attachment: scroll;
        height: 300px;
    }

    .grid-vini {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding: 10px 20px 40px 20px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .vino-card { flex: 0 0 85%; scroll-snap-align: center; height: auto; }

    .sqnpi-content, .contatti-grid { 
        flex-direction: column; 
        text-align: center; 
        gap: 40px; 
    }
    h2 { font-size: 2.2rem; }
    .sqnpi-text p, .contatti-info p { text-align: center; }
}