/* --- STILE HEADER --- */
#main-header {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

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

/* Menu Hamburger (nascosto su desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #000000;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: #4D5766;
    font-weight: 400; 
    text-transform: uppercase;
    font-size: 0.9rem;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.main-nav a:hover {
    color: #0272FB;
}

/* Header fisso solo su desktop */
@media (min-width: 992px) {
    #main-header {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        max-width: 1280px;
    }

    .main-wrapper {
        padding-top: 60px;
    }
}

/* --- MENU MOBILE --- */
@media (max-width: 991px) {
    /* Mostra hamburger */
    .hamburger {
        display: flex;
        z-index: 1001;
    }
    
    /* Menu mobile */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background-color: #ffffff;
        transform: translateX(100%);
        transition: transform 0.4s ease;
        z-index: 1002;
        padding: 100px 0 2rem 0;
        overflow-y: auto;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    }
    
    .main-nav.active {
        transform: translateX(0);
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
        width: 100%;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        display: block;
        padding: 1.2rem 2rem;
        font-size: 1rem;
        border-bottom: none;
        color: #4D5766;
        text-align: left;
        width: 100%;
    }
    
    .main-nav a:hover {
        background-color: rgba(2, 114, 251, 0.05);
        color: #0272FB;
    }
    
    /* Overlay per chiudere il menu */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
    }
}
