/* ==========================================================================
   STILE NAVBAR IBRIDA FLUIDA AL 100% & AD ALTA LEGGIBILITÀ - MENU.CSS (iOS 26)
   ========================================================================== */

#custom-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
}

/* Barra fluida da bordo a bordo senza margini laterali */
.nav-container {
    width: 100%;
    max-width: 100%; /* Occupa l'intera larghezza della pagina */
    padding: 30px 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- LOGO STRUTTURA --- */
/* ==========================================================================
   VERSIONE DEFINITIVA LOGO AVIF (Inversione Colore e Dimensionamento Millimetrico)
   ========================================================================== */
.nav-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 44px; 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Gestione millimetrica dell'immagine AVIF inserita */
.logo-img {
    height: 100%; /* Prende l'altezza del contenitore padre (44px) */
    width: auto;  /* Mantiene le proporzioni originali senza distorcere */
    display: block;
    
    /* Forza l'immagine chiara a diventare scura sulla Hero chiara */
    filter: brightness(0); 
    opacity: 0.9;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Quando si scorre la pagina la navbar si restringe armoniosamente */
.navbar-scrolled .nav-logo {
    height: 34px; 
}

.navbar-scrolled .logo-img {
    opacity: 1;
}

/* --- NAVIGAZIONE DESKTOP (Testi scuri fin dall'inizio per massima leggibilità) --- */
.nav-desktop-menu {
    display: flex;
    gap: 40px;
}

.nav-desktop-menu a {
    font-family: "Lato", sans-serif;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700; /* Incrementato contrasto */
    letter-spacing: 2px;
    color: #111111; /* Scurito per contrasto nativo immediato */
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-desktop-menu a:hover {
    transform: translateY(-1px);
    color: #000000;
}

/* Animazione elastica della linea sotto il link stile Apple */
.nav-desktop-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px; /* Linea leggermente più definita */
    background-color: #000000;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-desktop-menu a:hover::after,
.nav-desktop-menu a.page-active::after {
    width: 100%;
    left: 0;
}

/* --- SELETTORE LINGUE DESKTOP (Scurito per contrasto) --- */
.lang-selector-desktop {
    display: flex;
    gap: 18px;
}

.lang-selector-desktop .lang-btn {
    font-family: "Lato", sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.35); /* Contrasto calibrato */
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-selector-desktop .lang-btn:hover,
.lang-selector-desktop .lang-btn.lang-active {
    color: #000000;
    transform: scale(1.05);
}

/* --- PULSANTE HAMBURGER MOBILE (Scurito anch'esso) --- */
.hamburger-trigger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    transition: transform 0.3s ease;
}

.hamburger-trigger:hover {
    transform: scale(1.05);
}

.hamburger-trigger span {
    width: 100%;
    height: 2px;
    background-color: #111111; /* Linee scure stabili */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}


/* ==========================================================================
   COMPORTAMENTO ALLO SCROLL (TRASFORMAZIONE GLASSMORPHISM iOS 26 CHIARO)
   ========================================================================== */
.navbar-scrolled .nav-container {
    padding: 16px 50px;
    background: rgba(255, 255, 255, 0.5) !important; /* Opacità a 0.5 come da linea guida */
    backdrop-filter: blur(20px) saturate(190%); /* Sfocatura iPhone nativa */
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
}

/* Rinforzo totale del contrasto durante lo scroll */
.navbar-scrolled .nav-desktop-menu a {
    color: #000000;
}

.navbar-scrolled .nav-desktop-menu a::after {
    background-color: #000000;
}

.navbar-scrolled .lang-selector-desktop .lang-btn {
    color: rgba(0, 0, 0, 0.4);
}

.navbar-scrolled .lang-selector-desktop .lang-btn:hover,
.navbar-scrolled .lang-selector-desktop .lang-btn.lang-active {
    color: #000000;
}

.navbar-scrolled .hamburger-trigger span {
    background-color: #000000;
}


/* ==========================================================================
   PANNELLO MOBILE SIDEBAR (CURVATURA IMPORTANTE ED EFFETTO VETRO PROFONDO)
   ========================================================================== */
#mobile-sidebar-menu {
    position: fixed;
    top: 15px; /* Staccato dal bordo per effetto scheda fluttuante iOS */
    left: -340px;
    width: 310px;
    height: calc(100vh - 30px);
    z-index: 2000;
    background: rgba(255, 255, 255, 0.5) !important; /* Opacità a 0.5 senza effetto cartolina rettangolare */
    backdrop-filter: blur(25px) saturate(190%);
    -webkit-backdrop-filter: blur(25px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 28px !important; /* Forzato l'arrotondamento importante stile iPhone */
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
    padding: 40px 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-sidebar-menu.open {
    transform: translateX(355px); /* Spostamento calibrato per includere il margine d'aria */
}

.nav-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.nav-mobile-links a {
    font-family: "Josefin Sans", sans-serif;
    font-size: 18px;
    font-weight: 700; /* Contrasto aumentato */
    text-transform: uppercase;
    color: #111111;
    letter-spacing: 2px;
    padding: 10px 14px;
    border-radius: 14px !important; /* Arrotondamento micro-link interni */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-mobile-links a:hover {
    background: rgba(255, 255, 255, 0.4);
    padding-left: 20px;
}

/* Eliminato il vecchio bordo verde, sostituito con stile scuro monocromatico minimalista */
.nav-mobile-links a.page-active {
    color: #000000;
    background: rgba(255, 255, 255, 0.6);
    padding-left: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.sidebar-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
    margin: 35px 0;
}

.lang-selector-mobile {
    display: flex;
    flex-direction: row; /* Disposti in orizzontale come icone di controllo iOS */
    gap: 20px;
    padding-left: 14px;
}

.lang-selector-mobile .lang-btn {
    font-family: "Lato", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Rimosso il verde attivo dal selettore mobile */
.lang-selector-mobile .lang-btn.lang-active {
    color: #000000;
    transform: scale(1.1);
}

/* Overlay dello sfondo sfocato e cinematica d'ingresso */
#sidebar-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


/* ==========================================================================
   RESPONSIVITÀ PER DISPOSITIVI MOBILI
   ========================================================================== */
@media (max-width: 850px) {
    .nav-container {
        padding: 20px 30px;
    }
    .navbar-scrolled .nav-container {
        padding: 14px 30px;
    }
    .nav-desktop-menu, 
    .lang-selector-desktop {
        display: none;
    }
    .hamburger-trigger {
        display: flex;
    }
}

/* --- Allineamento Intestazione Hamburger (Logo + X) --- */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    width: 100%;
    margin-bottom: 40px;
    padding: 0 10px;
}

.sidebar-logo {
    height: 32px; 
    display: flex;
    align-items: center;
}

.sidebar-logo img {
    height: 100%;
    width: auto;
    filter: brightness(0);
}

/* Gestione della X di chiusura dentro il pannello */
.sidebar-close-trigger {
    font-size: 28px;
    cursor: pointer;
    color: #111111;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-close-trigger:hover {
    transform: rotate(90deg);
}


/* ==========================================================================
   --- FOOTER SEMPLICE E MINIMAL (HIGH FASHION - ALTA VISIBILITÀ) ---
   ========================================================================== */
.simple-footer {
    padding: 50px 0; 
    background: transparent; 
    position: relative;
    margin-top: 120px; 
}

/* Linea divisoria finissima ed elegante */
.simple-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px; 
    height: 1px;
    background: #000000; 
    opacity: 0.15;
}

.simple-footer p {
    margin: 0;
    font-size: 11px; 
    text-transform: uppercase; 
    letter-spacing: 2.5px; 
    color: #000000; /* Massimo contrasto nero puro */
    font-weight: 600; /* Definizione carattere aumentata */
    text-align: center;
}