/* --- RESET E BASE --- */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { font-family: 'Montserrat', sans-serif; color: #2c2c2c; background: #fff; line-height: 1.8; overflow-x: hidden; width: 100%; }

h1, h2, h3, h4 { font-family: 'Cormorant Garamond', serif; text-transform: uppercase; font-weight: 400; letter-spacing: 2px; }

/* --- NAVBAR & MOBILE MENU TOGGLE --- */

.nav-main { position: fixed; top: 0; left: 0; width: 100%; display: flex; justify-content: center; padding: 30px 0; z-index: 9999; transition: 0.4s; background: transparent; }

.nav-main.scrolled { background-color: #000 !important; padding: 15px 0 !important; border-bottom: 1px solid #c5a059; }

.nav-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; transition: 0.4s; }

.nav-links li { margin: 5px 15px; }

.nav-links a { color: #fff !important; text-decoration: none; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; transition: 0.3s; }

.nav-links a:hover { color: #c5a059 !important; }

/* Stile per le tre lineette (Hamburger) */

.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; z-index: 10001; }

.bar { width: 25px; height: 3px; background-color: #fff; transition: 0.3s; border-radius: 2px; }

.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0; /* Fa sparire la linea centrale */
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* Ruota la linea superiore */
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); /* Ruota la linea inferiore */
}

/* --- HERO --- */

.hero-home { height: 100vh; min-height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #000; }

#hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6) contrast(1.1); }

.hero-content { z-index: 2; text-align: center; color: #fff; margin-top: -50px; padding: 0 20px; }

.hero-logo { width: 100%; max-width: 320px; filter: brightness(0) invert(1); margin-bottom: 15px; }

.hero-tagline { font-size: 1.1rem; letter-spacing: 1px; font-weight: 300; }

/* --- SEZIONI --- */

.full-screen-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 100px 20px; }

.section-padding { padding: 100px 20px; }

.container { max-width: 1100px; margin: 0 auto; width: 100%; }

.center { text-align: center; }

.line { width: 50px; height: 1px; background: #c5a059; margin: 25px auto; }

.gold { color: #c5a059; font-size: 0.8rem; letter-spacing: 3px; font-weight: 600; text-transform: uppercase; display: block; }

/* --- GRIGLIA VINI --- */

.vini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; width: 100%; margin-top: 20px; align-items: stretch; }

.vini-card { padding: 30px 20px; border: 1px solid #eee; text-align: center; background: #fff; transition: 0.4s; color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }

.vini-card:hover { border-color: #c5a059; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.vini-card-img { height: 250px; margin-bottom: 15px; display: flex; justify-content: center; align-items: flex-end; }

.vini-card-img img { max-height: 100%; width: auto; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1)); transition: 0.4s; }

.vini-card h3 { font-size: 1.1rem; color: #2c2c2c; margin-top: 5px; }

/* --- GALLERIA --- */

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 250px; gap: 15px; margin-top: 40px; grid-auto-flow: dense; }

.gallery-item { overflow: hidden; }

.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.7s; }

.gallery-item:hover img { transform: scale(1.08); }

.gallery-wide { grid-column: span 2; }

.gallery-tall { grid-row: span 2; }

/* --- SFONDI SPECIALI --- */

#storia, #accoglienza { position: relative; overflow: hidden; }

#storia::before, #accoglienza::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; z-index: 0; }

#storia::before { background-image: url('img/foto-storia.webp'); opacity: 0.15; filter: grayscale(100%); }

#accoglienza::before { background-image: url('img/foto-ospitalita.webp'); background-attachment: fixed; opacity: 0.3; }

#storia .container, #accoglienza .container { position: relative; z-index: 1; }

#accoglienza .vini-card { background: rgba(255, 255, 255, 0.8) !important; border: 1px solid #c5a059 !important; backdrop-filter: blur(5px); }

/* --- CONTATTI E FOOTER --- */

#contatti { background-color: #f9f9f9; padding: 80px 0; }

.contact-wrapper { display: flex; flex-wrap: wrap; gap: 50px; margin-top: 50px; }

.btn-gold { background: #c5a059; color: #fff; padding: 15px; border: none; width: 100%; font-weight: 600; cursor: pointer; transition: 0.3s; }

.btn-gold:hover { background: #a38445; }

.google-map-container { width: 100%; height: 450px; }

/* --- OTTIMIZZAZIONE RESPONSIVE FINALE --- */

section { scroll-margin-top: 70px; }

.nav-logo-mobile { display: none; }

@media (max-width: 768px) {

    .nav-main { 
        position: fixed;
        top: 0; left: 0;
        width: 100%;
        height: 70px; 
        background-color: #000 !important; 
        display: flex;
        align-items: center;
        justify-content: space-between; 
        padding: 0 20px;
        z-index: 10001;
        border-bottom: 1px solid #c5a059;
    }

    .nav-logo-mobile { 
        display: block; 
        color: #fff; 
        font-family: 'Cormorant Garamond', serif;
        text-transform: uppercase;
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .hero-home {
        margin-top: 70px; 
        height: 55vh; 
        min-height: 350px;
    }

    #hero-video {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: brightness(0.6);
    }

    .menu-toggle { display: flex; position: relative; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh;
        background: #000;
        align-items: center;
        justify-content: center;
        z-index: 10000;
    }
    .nav-links.active { display: flex; }

    .vini-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding: 20px;
        margin-left: -20px;
        width: calc(100% + 40px);
        -webkit-overflow-scrolling: touch;
        grid-template-columns: none !important;
    }

    .vini-card {
        flex: 0 0 70%; 
        scroll-snap-align: center;
        background: #fff;
        border: 1px solid #eee;
    }

    .gallery-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding: 0 20px 20px 20px;
        margin-left: -20px;
        width: calc(100% + 40px);
        -webkit-overflow-scrolling: touch;
        grid-template-columns: none !important;
    }

    .gallery-item {
        flex: 0 0 80%;
        scroll-snap-align: center;
        height: 350px;
    }

    .vini-grid::-webkit-scrollbar, .gallery-grid::-webkit-scrollbar {
        display: none;
    }

    .contact-wrapper { 
        flex-direction: column !important; 
        padding: 0 10px;
        width: 100% !important;
    }

    .contact-info, .contact-form {
        width: 100% !important;
        padding: 0 5px !important;
    }

    .full-screen-section { min-height: auto; padding: 60px 20px; }

}

@media (max-width: 480px) {
    .vini-card { flex: 0 0 75%; }
    .gallery-item { flex: 0 0 85%; height: 300px; }
    .hero-logo { max-width: 180px; }
}

/* --- CORREZIONI TITOLI E SPAZIATURA --- */

h2 {
    color: #1a1a1a; 
    margin-bottom: 20px; 
}

.content-text p {
    line-height: 1.8; 
    margin-bottom: 25px; 
}

.line {
    margin: 35px auto !important;
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.5rem;
        padding: 0 10px;
    }
}

.lang-switch a {
    border: 1px solid #c5a059; 
    padding: 5px 10px;          
    border-radius: 3px;        
    font-size: 0.7rem !important; 
    transition: 0.3s;
}

.lang-switch a:hover {
    background-color: #c5a059; 
    color: #000 !important;    
}

@media (max-width: 768px) {
    .lang-switch {
        margin-top: 20px; 
    }
    .lang-switch a {
        font-size: 1rem !important; 
        padding: 10px 20px;
    }
}

/* --- FIX FINALI DI COERENZA --- */

@media (max-width: 768px) {
    .vini-card, .gallery-item {
        flex-shrink: 0 !important;
    }
    .nav-links li.lang-switch {
        margin: 20px 0 0 0 !important; 
    }
}

#accoglienza .vini-card {
    -webkit-backdrop-filter: blur(5px);
}

@media (pointer: coarse) {
    #accoglienza::before, #storia::before {
        background-attachment: scroll !important;
    }
}

#contatti {
    height: auto !important;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .vini-grid {
        align-items: stretch !important; 
    }

    .vini-card {
        display: flex;
        flex-direction: column;
        justify-content: space-between; 
        height: auto; 
        min-height: 380px; 
    }

    .vini-card h3 {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 50px; 
        font-size: 1rem;
        line-height: 1.2;
        margin-top: auto; 
    }
    
    .vini-card-img {
        flex-grow: 1; 
        display: flex;
        align-items: flex-end;
        justify-content: center;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    #vini .vini-card {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        flex-shrink: 0 !important; 
        min-height: 380px !important; 
        padding: 20px 15px !important;
    }

    #vini .vini-card-img {
        flex-grow: 1;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        margin-bottom: 15px;
        height: 220px; 
    }

    #vini .vini-card h3 {
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin-top: auto;
    }

    #accoglienza .vini-card {
        min-height: 120px !important; 
        justify-content: center !important;
        flex-shrink: 0 !important;
        margin-bottom: 10px;
    }
}

/* --- FIX AUTOMATICO PER PAGINE INGLESI (NON TOCCARE IL LAYOUT) --- */
/* Questo serve solo per far vedere le immagini di sfondo anche nella cartella /en/ */
.en-page #storia::before { background-image: url('../img/foto-storia.webp'); }
.en-page #accoglienza::before { background-image: url('../img/foto-ospitalita.webp'); }


/* --- FIX HERO MOBILE: ZOOM 1.8 + LINEA + VELO ORIGINALE --- */
@media (max-width: 768px) {
    
    .hero-home {
        height: 100dvh !important; 
        min-height: 100dvh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        background-image: url('img/anteprima-video.webp') !important;
        background-size: cover !important;
        background-position: center !important;
        overflow: hidden !important;
        margin-top: 0 !important;
    }

    /* IL VELO SCURO (come lo avevi prima) */
    .hero-home::before {
        content: "";
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, 0.45); /* Valore bilanciato per scurire il fondo */
        backdrop-filter: blur(15px); 
        -webkit-backdrop-filter: blur(15px);
        z-index: 2;
    }

    #hero-video {
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important; 
        z-index: 3 !important;
        
        /* VALORI ORIGINALI PC */
        filter: brightness(0.6) contrast(1.1) !important; 
        
        transform: scale(1.8) !important; 
    }

    .hero-content {
        position: absolute !important;
        top: 58% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 10 !important;
        width: 100% !important;
        text-align: center !important;
    }

    .hero-logo {
        width: 45% !important;
        max-width: 180px !important;
        filter: brightness(0) invert(1) !important;
        margin: 0 auto 10px auto !important;
        display: block !important;
    }

    /* TAGLINE IN MINUSCOLO */
    .hero-tagline {
        display: block !important;
        color: #fff !important;
        font-family: 'Montserrat', sans-serif !important;
        font-size: 0.9rem !important;
        letter-spacing: 1px !important;
        text-transform: none !important;
        font-weight: 400 !important;
        margin-bottom: 0 !important;
        text-shadow: 0px 2px 8px rgba(0,0,0,0.6) !important;
    }

    /* LA LINEA DORATA */
    .hero-home .line {
        display: block !important;
        width: 40px !important;
        height: 1px !important;
        background: #c5a059 !important;
        margin: 15px auto !important;
        position: relative !important;
        z-index: 11 !important;
    }

    /* LOCALITÀ IN MAIUSCOLO */
    .hero-home .gold {
        display: block !important;
        color: #c5a059 !important;
        font-family: 'Montserrat', sans-serif !important;
        font-size: 0.8rem !important;
        letter-spacing: 2px !important;
        text-transform: uppercase !important;
        font-weight: 600 !important;
        margin-top: 0 !important;
    }
}

/* --- PRIVACY NOTICE NEL FORM CONTATTI --- */
.privacy-notice {
    font-size: 0.75rem !important; /* Piccola e discreta */
    color: #777 !important;
    line-height: 1.4 !important;
    margin: 15px 0 !important;
    text-align: center !important;
    font-family: 'Montserrat', sans-serif !important;
}

.privacy-notice a {
    color: #c5a059 !important; /* Colore oro come il resto del sito */
    text-decoration: underline !important;
}

/* Assicuriamoci che il pulsante invio abbia un po' di distacco */
.btn-gold {
    margin-top: 5px !important;
}