/* ============================================
   NAVBAR DESKTOP
   ============================================ */
.navbar {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand {
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-links a:hover {
    color: var(--primary);
}
.nav-links a.active {
    font-weight: 700;
}
.nav-btn {
    background: var(--dark);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius);
}
.nav-btn:hover {
    background: #000;
    color: #fff;
}

/* Language Dropdown */
.lang-switch {
    position: relative;
    cursor: pointer;
    font-weight: bold;
}
.lang-dropdown {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 150px;
}
.lang-switch:hover .lang-dropdown {
    display: flex;
}

/* ============================================
   BURGER BUTTON
   ============================================ */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
    transition: background 0.2s;
    z-index: 200;
    position: relative;
}
.burger:hover {
    background: #f5f5f5;
}
.burger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                opacity   0.25s ease,
                width     0.3s ease;
}

/* Burger → X animation */
.burger.is-open .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger.is-open .burger-line:nth-child(2) {
    opacity: 0;
    width: 0;
}
.burger.is-open .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
.mobile-menu {
    display: none; /* hidden on desktop */
    position: fixed;
    inset: 0;
    top: 0;
    background: #fff;
    z-index: 99;
    overflow-y: auto;
    /* Slide down */
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
                opacity   0.3s ease;
    padding-top: 80px; /* below sticky navbar */
}
.mobile-menu.is-open {
    transform: translateY(0);
    opacity: 1;
}
/* Prevent body scroll when open */
body.menu-open {
    overflow: hidden;
}

/* Inner layout */
.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 80px);
    padding: 2rem 1.5rem 3rem;
}

/* ---- Nav links ---- */
.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1rem;
}

.mobile-link {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 1.1rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: var(--dark);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: color 0.25s;
}
.mobile-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.mobile-link:hover::after,
.mobile-link.active::after {
    width: 100%;
}
.mobile-link:hover,
.mobile-link.active {
    color: var(--primary);
}
.mobile-link.active .mobile-link-number {
    color: var(--primary);
}

.mobile-link-number {
    font-size: 0.7rem;
    font-weight: 700;
    color: #ccc;
    letter-spacing: 0.05em;
    min-width: 20px;
    transition: color 0.25s;
    font-variant-numeric: tabular-nums;
}
.mobile-link-text {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Staggered entrance for each link */
.mobile-menu.is-open .mobile-link:nth-child(1) { animation: linkIn 0.4s 0.15s both; }
.mobile-menu.is-open .mobile-link:nth-child(2) { animation: linkIn 0.4s 0.22s both; }
.mobile-menu.is-open .mobile-link:nth-child(3) { animation: linkIn 0.4s 0.29s both; }
.mobile-menu.is-open .mobile-link:nth-child(4) { animation: linkIn 0.4s 0.36s both; }

@keyframes linkIn {
    from { opacity: 0; transform: translateX(-18px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---- Footer / Language ---- */
.mobile-menu-footer {
    padding-top: 2.5rem;
    animation: fadeUp 0.45s 0.4s both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mobile-lang-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #aaa;
    margin-bottom: 0.75rem;
}
.mobile-lang-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mobile-lang-btn {
    padding: 6px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.mobile-lang-btn:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

/* ============================================
   MOBILE BREAKPOINT
   ============================================ */
@media (max-width: 768px) {
    /* Hide desktop links, show burger */
    .nav-links {
        display: none;
    }
    .burger {
        display: flex;
    }

    /* Show the overlay on mobile */
    .mobile-menu {
        display: block;
    }
}