/* Header Styles */
header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px; /* Altezza fissa per l'header */
}

nav {
    display: flex;
    align-items: center;
    padding: calc(var(--space-md) + 5px) 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    height: 100%;
}

.logo {
    position: absolute;
    left: 5%;
    display: flex;
    align-items: center;
}

.logo a {
    text-decoration: none;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo h1 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-lg);
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--color-primary);
    line-height: 1.2;
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 114, 187, 0.2));
    transition: transform 0.3s ease;
}

.logo a:hover .logo-image {
    transform: scale(1.05);
}

.logo a:hover h1 {
    color: var(--color-primary-dark);
}

.nav-links {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    margin: 0;
    padding: 0;
    list-style: none;
}

nav ul li a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: var(--text-sm);
    transition: all 0.3s ease;
    padding: var(--space-sm) 0;
    position: relative;
    font-family: var(--font-heading);
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover:after {
    width: 100%;
}

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        position: absolute;
        right: var(--space-md);
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 45%;
        height: 100vh;
        background-color: var(--color-white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 100px var(--space-md) 20px;
        transition: right 0.3s ease;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        z-index: 1001;
    }

    .nav-links.active {
        right: 0;
    }

    .logo {
        position: absolute;
        top: 15px;
        left: var(--space-md);
        display: flex;
        align-items: center;
        padding: var(--space-sm) 0;
    }

    .logo h1 {
        margin-top: 5px;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        gap: var(--space-sm);
        margin-top: 70px;
    }

    nav ul li {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(0, 114, 187, 0.1);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul li a {
        display: block;
        padding: var(--space-sm) 0;
        font-size: 0.95rem;
        color: var(--color-primary);
    }

    .language-switcher {
        position: absolute;
        top: 100px;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        display: flex;
        gap: var(--space-md);
        justify-content: center;
        width: auto;
    }

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

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

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

    body.menu-open {
        overflow: hidden;
    }
}

.language-switcher {
    position: absolute;
    right: 5%;
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.lang-btn:hover {
    transform: scale(1.1);
}

.lang-btn img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    width: 24px;
    height: auto;
}

/* Responsive navigation */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: var(--space-md);
    }
    
    .logo {
        position: absolute;
        top: var(--space-md);
        left: var(--space-md);
        flex: initial;
    }
    
    .language-switcher {
        position: absolute;
        top: var(--space-md);
        right: var(--space-md);
        flex: initial;
    }
    
    nav ul {
        flex-direction: column;
        margin-top: 70px;
        width: 100%;
    }
    
    nav ul li {
        margin: var(--space-sm) 0;
        width: 100%;
        text-align: center;
    }
    
    .logo-image {
        height: 40px;
    }
}

/* Aggiungiamo uno stile specifico per la home page */
body.home-page {
    padding-top: 70px; /* Stesso valore dell'altezza dell'header */
}