/* ============================
   NAVBAR — PREMIUM VERSION
============================ */

.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(53, 88, 102, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 3px solid #4d798b;
    z-index: 9999;
    transition: backdrop-filter 0.3s ease, background 0.3s ease;
}

body.scrolled .site-header {
    backdrop-filter: blur(18px);
    background: rgba(53, 88, 102, 0.92);
}

.header-inner {
    width: 90%;
    max-width: 1300px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

/* ============================
   LOGO
============================ */

.header-logo {
    font-size: 1.9rem;
    font-weight: 700;
    font-family: "Quicksand", sans-serif;
    color: #e6eef1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-icon {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
}

/* ============================
   MENU DESKTOP
============================ */

.nav-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-menu>li>a {
    font-family: "Quicksand", sans-serif;
    color: #e6eef1;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    transition: 0.25s ease;
}

.nav-menu>li>a:hover {
    background: #4d798b;
    color: #ffffff;
}

/* ============================
   ACTIVE — PILL + UNDERLINE
============================ */

.nav-menu>li>a.active,
.dropdown.active>a {
    background: #e6eef1;
    color: #355866 !important;
    font-weight: 700;
    border-radius: 999px;
    position: relative;
}

.nav-menu>li>a.active::after,
.dropdown.active>a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -6px;
    height: 3px;
    background: #e6eef1;
    border-radius: 3px;
}

/* ============================
   DROPDOWN DESKTOP
============================ */

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #355866;
    border: 1px solid #4d798b;
    border-radius: 10px;
    list-style: none !important;
    padding: 10px 0;
    min-width: 220px;
    display: none;
    z-index: 2000;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 18px;
    color: #e6eef1;
    font-size: 0.95rem;
    transition: 0.25s ease;
}

.dropdown-menu li a:hover {
    background: #4d798b;
    color: #ffffff;
}

@media (min-width: 901px) {
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* ============================
   HAMBURGER PREMIUM
============================ */

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: #e6eef1;
    border-radius: 3px;
    transition: 0.35s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ============================
   OVERLAY PREMIUM
============================ */

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: 0.35s ease;
    z-index: 900;
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ============================
   MOBILE MENU FULLSCREEN PREMIUM — TEMA AUTO + ICONE
============================ */

/* ===== DARK MODE (default) ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(53, 88, 102, 0.97);
    backdrop-filter: blur(10px);
    padding: 16px;
    z-index: 99999;
    transform: translateY(-100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
}

.mobile-menu.open {
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mobile-home-icon {
    width: 26px;
    margin-right: 6px;
}

.mobile-logo {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.mobile-close {
    font-size: 32px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* LISTA MOBILE */
.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* SEZIONI CON ICONA */
.mobile-section {
    margin-top: 10px;
    margin-bottom: 2px;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-section i {
    font-size: 17px;
    opacity: 0.9;
}

/* SOTTOVOCI ULTRA COMPATTE + PALLINO MINIMAL */
.mobile-menu-list li a {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 400;
    color: #e3edf0;
    opacity: 0.9;
    padding: 2px 0;
    margin-left: 14px;
    border-left: 2px solid transparent;
    transition: 0.25s ease;
    line-height: 1.2;
    transform: translateX(-4px);
}

/* Pallino minimal */
.mobile-menu-list li a::before {
    content: "•";
    font-size: 14px;
    color: #e3edf0;
    opacity: 0.8;
}

/* Hover elegante */
.mobile-menu-list li a:hover {
    color: #ffffff;
    border-left: 2px solid #ffffff;
    padding-left: 8px;
    transform: translateX(0);
}

/* ============================
   LIGHT MODE AUTOMATICO
============================ */

@media (prefers-color-scheme: light) {

    .mobile-menu {
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(8px);
    }

    .mobile-logo,
    .mobile-close {
        color: #355866;
    }

    .mobile-section {
        color: #355866;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .mobile-section i {
        color: #355866;
        opacity: 0.8;
    }

    .mobile-menu-list li a {
        color: #355866;
        opacity: 0.85;
    }

    .mobile-menu-list li a::before {
        color: #355866;
        opacity: 0.7;
    }

    .mobile-menu-list li a:hover {
        color: #000;
        border-left: 2px solid #355866;
    }
}

/* ============================
   NASCONDI MENU DESKTOP SOTTO 900PX
============================ */

@media (max-width: 900px) {
    .main-nav {
        display: none !important;
    }

    .nav-toggle {
        display: flex !important;
    }
}