/* ----------------------------------------------------
   NAVIGATION — modern, clean, design-system aligned
---------------------------------------------------- */

/* ------------------------------
   Header + container
------------------------------ */

.site-header {
    position: relative;
    z-index: 9999;
    width: 100%;
    background: var(--color-white);
    box-shadow: var(--shadow-soft);
}


.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    width: 100%;
    padding: var(--space-3) 0;
}


/* ------------------------------
   Branding
------------------------------ */

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-title:hover {
    color: var(--color-primary);
}


/* ------------------------------
   Desktop Menu
------------------------------ */

.desktop-menu {
    display: flex;
    gap: var(--space-5);
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-menu a,
.dropdown-toggle {
    text-decoration: none;
    color: var(--color-text);
    font-size: var(--fs-base);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

/* Hover + active */
.desktop-menu a:hover,
.desktop-menu a.active,
.has-dropdown.active > a {
    background: var(--color-bg);
    color: var(--color-primary);
}

/* Underline animation */
.desktop-menu a {
    position: relative;
}

.desktop-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.25s ease;
}

.desktop-menu a:hover::after,
.desktop-menu a.active::after {
    width: 100%;
}


/* ------------------------------
   Desktop Dropdown
------------------------------ */

.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-2) 0;
    list-style: none;
    min-width: 180px;
    display: none;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    z-index: 99999; /* <-- add this */
}


.dropdown-menu li a {
    display: block;
    padding: var(--space-3) var(--space-4);
    white-space: nowrap;
    color: var(--color-text);
}

.dropdown-menu li a:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

/* Desktop hover behaviour */
@media (min-width: 701px) {
    .has-dropdown:hover .dropdown-menu {
        display: flex;
    }
}


/* ------------------------------
   Mobile Hamburger
------------------------------ */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}


/* ------------------------------
   Mobile Menu
------------------------------ */

.mobile-menu {
    display: none;
    flex-direction: column;
    list-style: none;
    padding: var(--space-4) 0;
    gap: var(--space-2);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    will-change: opacity, transform;
}

.mobile-menu.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu a {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    text-decoration: none;
}

.mobile-menu a:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.mobile-menu a.active {
    background: var(--color-bg);
    color: var(--color-primary);
    font-weight: 600;
}

/* Mobile dropdown */
.mobile-dropdown {
    display: none;
    flex-direction: column;
    padding-left: var(--space-4);
    gap: var(--space-2);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.25s ease;
}

.mobile-dropdown.open {
    display: flex;
    opacity: 1;
    max-height: 500px;
}


/* ------------------------------
   Responsive Behaviour
------------------------------ */

@media (max-width: 700px) {

    /* Hide desktop menu */
    .desktop-menu {
        display: none;
    }

    /* Show hamburger */
    .mobile-menu-toggle {
        display: block;
    }

    /* Smaller branding text */
    .site-title {
        font-size: var(--fs-base);
    }
}

@media (min-width: 701px) {
    .mobile-menu {
        display: none !important;
    }
    .mobile-menu-toggle {
        display: none;
    }
}


/* ------------------------------
   Hamburger ? X animation
------------------------------ */

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
/* Layout for branding + language switcher + hamburger */
.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Left side: logo/title */
.nav-left {
    display: flex;
    align-items: center;
}

/* Right side: language + hamburger */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
/* Language switcher (desktop) */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding-left: 6px;
    margin-left: 6px;
    border-left: 1px solid #ddd;
}

.language-switcher a {
    color: #0066cc;              /* clean blue */
    text-decoration: none;
    padding: 0 3px;
    transition: color 0.15s ease;
}

.language-switcher a:hover {
    color: #004999;              /* darker hover */
}

.language-switcher a.active-lang {
    font-weight: 600;
    text-decoration: underline;
    color: #004999;              /* stronger blue */
}



/* Mobile */
@media (max-width: 768px) {
    .nav-right {
        gap: 10px;
    }

    .language-switcher {
        font-size: 8px;
    }
}
/* Mobile language dropdown */
.mobile-lang {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    .mobile-lang {
        display: block;
        margin-top: 10px;
    }

    .mobile-lang-toggle {
        width: 100%;
        background: #f5f5f5;
        border: 1px solid #ddd;
        padding: 10px;
        font-size: 14px;
        text-align: left;
        cursor: pointer;
    }

    .mobile-lang-dropdown {
        display: none;
        flex-direction: column;
        background: #fff;
        border: 1px solid #ddd;
        margin-top: 4px;
    }

    .mobile-lang-dropdown a {
        padding: 10px;
        display: block;
        color: #0066cc;
        text-decoration: none;
    }

    .mobile-lang-dropdown a:hover {
        background: #f0f0f0;
    }

    .mobile-lang.open .mobile-lang-dropdown {
        display: flex;
    }
}
