/* ==========================================================================
   Navbar Section
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. NAVBAR LAYOUT & STICKY BEHAVIOR
   -------------------------------------------------------------------------*/
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--navbar-height);
    background-color: var(--neutral-100);
    color: var(--color-primary);
    z-index: var(--z-navbar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
    transition: box-shadow 0.3s ease-in-out;
}

.navbar a {
    font-weight: 600;
    text-transform: uppercase;
}

.navbar.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand a {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
}

.navbar-brand a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0);
    pointer-events: none;
    transition: background-color 0.3s ease-in-out;
}

.navbar-brand a:hover::before {
    background-color: rgba(255, 255, 255, 0.4);
}

.navbar-brand .primary-brand {
    color: var(--color-accent);
}

.navbar-brand .secondary-brand {
    color: var(--color-primary);
}

/* -------------------------------------------------------------------------
   2. DESKTOP NAVIGATION LINKS
   -------------------------------------------------------------------------*/
.navbar-menu.desktop-menu {
    display: flex;
    gap: var(--spacing-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-menu.desktop-menu .navbar-item a {
    display: inline-block;
    color: var(--color-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease-in-out;
}

.navbar-menu.desktop-menu .navbar-item a:hover,
.navbar-menu.desktop-menu .navbar-item a:focus {
    color: var(--color-accent);
}

.navbar-menu.desktop-menu .navbar-item a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s ease, left 0.3s ease;
}

.navbar-menu.desktop-menu .navbar-item a:hover::after,
.navbar-menu.desktop-menu .navbar-item a:focus::after {
    width: 100%;
    left: 0;
}

/* ====== Language Selection Mobile ====== */
.lang-selector {
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--spacing-lg);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-selector button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-weight: 600;
}

/* ====== Language Selection Desktop ====== */
.navbar-item:has(.lang-btn) {
    position: relative;
}

.lang-btn      {
    background: none;
    border: none;
    color: inherit;
    display:flex;
    align-items:center;
    gap:0.3rem;
    cursor:pointer;
    margin-top: 0.5rem;
}

.lang-btn:hover {
    color: var(--color-accent);
}

.lang-btn i.fa-globe {
    font-size: 1.2em;
}

.lang-options  {
    position:absolute; right:0; top:100%; min-width:140px;
    list-style:none; margin:0; padding:0.5rem 0;
    background:#fff; border:1px solid #ddd; border-radius:0.75rem;
    box-shadow:0 4px 16px rgba(0,0,0,.12); display:none; z-index:1000;
    text-align:center;
}

.lang-options a {
    display:block;
    padding:0.75rem 1.25rem;
    text-decoration:none;
    color:var(--color-primary);
    text-align:center;
    font-weight:600;
    transition:color 0.2s ease;
}

.lang-options a:hover {
    color:var(--color-accent);
    background:none;
}


/* -------------------------------------------------------------------------
   3. BURGER BUTTON (HIDDEN ON DESKTOP, ACCENT COLOR)
   -------------------------------------------------------------------------*/
.navbar-burger {
    background: none;
    border: none;
    color: var(--text-600);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    transition: color 0.2s ease-in-out;
}

.navbar-burger:hover {
    color: var(--color-accent);
}

/* -------------------------------------------------------------------------
    4. MOBILE DROPDOWN CONTAINER (HIDDEN BY DEFAULT)
   -------------------------------------------------------------------------*/
.mobile-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: 100%;
    background-color: var(--neutral-200);
    z-index: calc(var(--z-navbar) + 1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.mobile-menu.expanded {
    overflow-y: auto;
    max-height: none;
}

.mobile-menu-inner {
    padding: 1rem 0;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.mobile-menu-list .navbar-item {
    display: flex;
    justify-content: center;
}

.mobile-menu-list .navbar-item a {
    display: inline-block;
    padding: var(--spacing-sm) 0;
    color: var(--color-primary);
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease-in-out;
}

.mobile-menu-list .navbar-item a:hover,
.mobile-menu-list .navbar-item a:focus {
    color: var(--color-accent);
}

.mobile-menu-list .navbar-item a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s ease, left 0.3s ease;
}

.mobile-menu-list .navbar-item a:hover::after,
.mobile-menu-list .navbar-item a:focus::after {
    width: 100%;
    left: 0;
}

/* -------------------------------------------------------------------------
   5. PAGE OVERLAY (GRAY BACKDROP WHEN MOBILE MENU IS OPEN)
   -------------------------------------------------------------------------*/
.page-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--text-600);
    z-index: var(--z-overlay);
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.page-overlay.is-active {
    display: block;
    opacity: 0.9;
    transition: opacity 1s ease-in-out;
}
