/* ==========================================================================
   CSS Custom per "A due passi dal mare" - Mobile First Approach
   ========================================================================== */

/* --- Variabili CSS --- */
:root {
    --color-bg-primary: #F9F6F0; /* Sabbia/Avorio */
    --color-bg-secondary: #E8DFD5; /* Beige/Terracotta molto chiara */
    --color-text-main: #2C241B; /* Legno scuro/Antracite */
    --color-text-light: #FFFFFF;
    --color-accent: #B89369; /* Bronzo sofisticato */
    --color-deep-sea: #1A2C38; /* Blu profondo */

    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;

    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --header-height: 80px; /* Modificato: Header più alto e maestoso */
}

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition-smooth); }
ul { list-style: none; }

/* --- Utility Classes --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.container-narrow { max-width: 800px; }
.text-center { text-align: center; }
.text-light { color: var(--color-text-light) !important; }
.bg-primary { background-color: var(--color-bg-primary); }
.bg-secondary { background-color: var(--color-bg-secondary); }
.bg-deep-sea { background-color: var(--color-deep-sea); }
.section-padding { padding: 80px 0; }
.mt-4 { margin-top: 2rem; }

/* --- Tipografia --- */
h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
}
/* --- Titolo Hero: Eleganza Editoriale --- */
.hero-title {
    font-family: var(--font-heading); /* Usa il Cormorant Garamond */
    font-weight: 300; /* Peso leggerissimo, molto chic */
    font-style: italic; /* Corsivo elegante */
    font-size: 4rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
    line-height: 1.1;
    text-shadow: 2px 4px 15px rgba(0,0,0,0.5); /* Ombra morbida per staccarlo dallo sfondo */
}
.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 600; /* Aumentiamo lo spessore per renderlo più solido */
    letter-spacing: 4px; /* Più aria tra le lettere per il look premium */
    text-transform: uppercase;
    color: #ffffff; /* Bianco puro per il massimo contrasto visivo */
    /* Doppia ombra nera profonda: una stretta per i bordi, una larga per staccarlo dallo sfondo */
    text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 8px 20px rgba(0,0,0,0.7);
    margin-top: 1rem; /* Un po' di respiro dal titolo principale in corsivo */
}
.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}
.suptitle {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: 1rem;
}
.body-text {
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}
.large-text { font-size: 1.2rem; line-height: 1.8; }
.divider {
    width: 60px;
    height: 1px;
    background-color: var(--color-accent);
    margin: 0 auto 2rem auto;
}

/* --- Bottoni --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-outline {
    border-color: var(--color-text-main);
    color: var(--color-text-main);
}
.btn-outline:hover {
    background-color: var(--color-text-main);
    color: var(--color-bg-primary);
}
.btn-solid {
    background-color: var(--color-accent);
    color: var(--color-text-light);
}
.btn-solid:hover {
    background-color: #a3815a; /* Bronzo scuro */
}

/* ================= HEADER & NAV ================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 999;
    transition: var(--transition-smooth);
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-header.scrolled {
    background: rgba(249, 246, 240, 0.98); /* Bg Primary con opacità */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(44, 36, 27, 0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.logo {
    font-size: 1.8rem;
    font-style: italic;
    color: var(--color-text-light);
    transition: var(--transition-smooth);
}
.site-header.scrolled .logo { color: var(--color-text-main); }
.desktop-only { display: none; }

/* Hamburger Menu */
.menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001; /* Sopra l'overlay */
}
.hamburger, .hamburger::before, .hamburger::after {
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--color-text-light);
    transition: var(--transition-smooth);
    position: absolute;
}
.site-header.scrolled .hamburger,
.site-header.scrolled .hamburger::before,
.site-header.scrolled .hamburger::after {
    background-color: var(--color-text-main);
}
.menu-toggle.is-active .hamburger { background-color: transparent !important; }
.menu-toggle.is-active .hamburger::before,
.menu-toggle.is-active .hamburger::after {
    background-color: var(--color-text-main); /* Menu aperto: scuro */
}
.hamburger::before { content: ''; top: -8px; }
.hamburger::after { content: ''; bottom: -8px; }
.menu-toggle.is-active .hamburger::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active .hamburger::after { transform: translateY(-8px) rotate(-45deg); }

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 1000;
}
.mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.mobile-nav ul { text-align: center; }
.mobile-nav li { margin-bottom: 2rem; }
.mobile-link {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-text-main);
}

/* ================= HERO ================= */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.hero-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background-color: var(--color-deep-sea);
}
/* L'Overlay scuro ed elegante */
.hero-background::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Più scuro in alto per l'header, scuro al centro per il testo */
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center; /* Magia: centra l'immagine partendo dall'alto, salvando i volti */
}

.hero-content {
    position: relative;
    z-index: 2; /* Assicura che il testo stia sopra l'overlay scuro */
}

/* ================= SECTIONS ================= */
.split-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}
.split-image img {
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 3rem;
}
.gallery-item img {
    border-radius: 4px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/5;
}

/* ================= FOOTER ================= */
.site-footer {
    padding: 60px 0 20px;
    border-top: 1px solid rgba(44,36,27,0.1);
}
.footer-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo { font-size: 1.5rem; margin-bottom: 0.5rem; }
.micro-payoff { font-size: 0.85rem; color: var(--color-accent); text-transform: uppercase; letter-spacing: 1px; }
.footer-heading {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}
.footer-links ul li, .footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-weight: 300;
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(44,36,27,0.1);
    font-size: 0.8rem;
    color: #666;
}

/* --- Animazioni --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= MEDIA QUERIES (Desktop First adjustments from Mobile base) ================= */

@media (min-width: 768px) {
    .section-padding { padding: 120px 0; }
    .hero-title { font-size: 5rem; }
    .section-title { font-size: 3.2rem; }
    
    .split-layout {
        flex-direction: row;
        align-items: center;
        gap: 80px;
    }
    .split-image, .split-content { flex: 1; }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .desktop-only { display: block; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    
    .footer-grid {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ================= MEDIA QUERIES DESKTOP (1024px+) ================= */
@media (min-width: 1024px) {

    :root {
        --header-height: 110px; 
    }
    /* Layout Header: Maggiore respiro tra logo e menu */
    .header-inner {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 100px; /* Aumentata la distanza tra il logo e i blocchi menu laterali */
    }
    
.site-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
    
.logo-img {
    max-height: 100px; /* Questa è la magia che lo tiene elegante e compatto su mobile */
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}
    
    .nav-left, .nav-right { 
        flex: 0 0 auto; 
    }
    
    .nav-left ul, .nav-right ul { 
        display: flex; 
        gap: 50px; /* Aumentata la distanza tra le singole voci (es: HOME e CHEF) */
    }

    .menu-toggle {
        display: none !important; 
    }

    /* --- Voci di Menu: Stile base --- */
    .site-header nav ul li a {
        position: relative; 
        padding-bottom: 6px; 
        font-size: 0.95rem; /* Aumentato (era 0.85rem) */
        font-weight: 500; /* Spessore aumentato per renderle più solide */
        text-transform: uppercase;
        letter-spacing: 2px;
        color: #ffffff; 
        transition: color 0.4s ease;
    }

    /* --- Effetto Hover Elegante: Linea animata dal centro --- */
    .site-header nav ul li a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%; /* Parte dal centro */
        transform: translateX(-50%); /* Centra la linea */
        width: 0; /* Inizialmente invisibile */
        height: 1px; /* Spessore finissimo */
        background-color: var(--color-accent); /* Colore bronzo */
        transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .site-header nav ul li a:hover { 
        color: var(--color-accent); 
    }

    .site-header nav ul li a:hover::after {
        width: 100%; /* La linea si espande al passaggio del mouse */
    }

    /* Menu allo scroll (quando l'header diventa solido) */
    .site-header.scrolled nav ul li a { 
        color: var(--color-text-main); 
    }
    
    /* Logo rimpicciolito e SCURO allo scroll */
    .site-header.scrolled .logo-img {
        max-height: 70px; 
        /* Trasforma il logo bianco in un color antracite scuro senza usare un'altra immagine */
        filter: invert(1) brightness(0.3); 
    }
}

/* --- Dimensione Titolo Hero su Desktop --- */
@media (min-width: 768px) {
    .hero-title { 
        font-size: 6.5rem; 
    }
}

/* ================= MEDIA QUERIES MOBILE & TABLET (Fino a 1023px) ================= */
@media (max-width: 1023px) {
    .site-branding {
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }

    .logo-img {
        max-height: 75px !important; /* Agisce SOLO su mobile, il desktop è salvo */
        width: auto;
        object-fit: contain;
    }
}

/* --- Logo nel Footer --- */
.footer-logo-link {
    display: block;
    margin-bottom: 1rem;
}

.footer-logo-img {
    max-width: 140px; /* Dimensione contenuta ed elegante */
    height: auto;
    /* Trasforma il logo bianco in antracite scuro per contrastare col fondo chiaro */
    filter: invert(1) brightness(0.3); 
}