/* --- HEADER BASIC SETUP --- */
#main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent; /* Trasparente all'inizio */
    z-index: 9999; /* Assicura che sia sempre sopra a tutto (Swiper incluso) */
    transition: background-color 0.3s ease, padding 0.3s ease;
}

/* Stato Header Scrollato (gestito da JS) */
#main-header.scrolled {
    background-color: var(--header-overlay, rgba(12, 12, 12, 0.95));
    padding: 0.8rem 2rem;
    backdrop-filter: blur(10px);
}

.logo {
    flex-shrink: 0; /* Impedisce al logo di schiacciarsi */
    margin-right: 1rem;
}

.logo img {
    height: 40px;
    display: block;
}

/* --- NAVIGATION RESET (Rimuove Bullet Points) --- */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem; /* Ridotto leggermente per guadagnare spazio */
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-primary, #fff);
    font-weight: 500;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    white-space: nowrap; /* Impedisce al testo di andare a capo sovrapponendosi */
}

nav a:hover {
    color: var(--primary-color, #cca43b);
}

/* --- DESKTOP NAV --- */
.desktop-nav {
    display: flex;
}

.mobile-nav {
    display: none; /* Nascosto su desktop */
}

/* --- DROPDOWN MENU --- */
.dropdown {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--surface-color, #1e1e1e);
    flex-direction: column;
    gap: 0;
    min-width: 180px;
    display: none; /* Nascosto di default */
    border: 1px solid rgba(255,255,255,0.1);
}

.dropdown:hover .submenu {
    display: flex;
}

.submenu li a {
    display: block;
    padding: 1rem;
    text-transform: none;
}

.submenu li a:hover {
    background-color: rgba(255,255,255,0.05);
}

/* --- LANG SWITCHER --- */
.lang-switcher button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.3s;
    padding: 0 2px;
}

.lang-switcher button:hover {
    color: var(--text-primary);
}

/* Stile lingua attiva (spostato qui da components.css) */
.active-lang {
    color: var(--accent-color) !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* --- HAMBURGER MENU ICON (Base Style) --- */
.hamburger-menu {
    display: none; /* Nascosto su desktop */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 2100; /* Sopra al menu mobile */
}

.line {
    width: 30px;
    height: 2px;
    background-color: var(--text-primary, #fff);
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

/* Animazione Hamburger Attivo */
.hamburger-menu.active .line1 {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .line2 {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger-menu.active .line3 {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- MOBILE RESPONSIVE LOGIC --- */
@media (max-width: 1200px) { /* Aumentato breakpoint per evitare sovrapposizioni su laptop piccoli */
    /* Nascondi elementi Desktop */
    .desktop-nav, 
    .lang-switcher {
        display: none;
    }

    /* Mostra Hamburger */
    .hamburger-menu {
        display: flex;
    }

    /* Configurazione Menu Mobile (Overlay) */
    .mobile-nav {
        display: flex; /* Flex per centrare il contenuto */
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--bg-main, #0c0c0c);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 100px;
        padding-bottom: 40px;
        overflow-y: auto;
        align-items: center;
        z-index: 2050;
        opacity: 0;
        pointer-events: none; /* Non cliccabile quando invisibile */
        transition: opacity 0.4s ease;
    }

    /* Stato Aperto del Menu Mobile */
    .mobile-nav.open {
        opacity: 1;
        pointer-events: auto;
    }

    /* Override stile lista per mobile */
    .mobile-nav ul {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
    }

    .mobile-nav a {
        font-size: 1.8rem;
        font-family: var(--font-serif);
        margin: 5px 0;
        display: block;
    }

    .mobile-nav a.sub-link {
        font-size: 1.1rem;
        font-family: var(--font-sans);
        color: var(--accent-color);
        margin-top: -5px;
        margin-bottom: 5px;
    }

    .mobile-lang-switcher {
        margin-top: 2rem;
        font-size: 1.2rem;
    }
}

/* --- HERO SLIDER HEIGHT --- */
.hero-slider {
    height: 100vh; /* Imposta l'altezza a tutto schermo */
    min-height: 600px; /* Altezza minima di sicurezza */
}

.myHeroSwiper, 
.hero-media {
    height: 100%;
    width: 100%;
    object-fit: cover; /* Assicura che immagini e video coprano l'area senza deformarsi */
}
