@charset "UTF-8";

/* =========================================================
   Navigation
   ========================================================= */

header {
    min-height: 72px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1200;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 29, 44, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(10, 29, 44, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.navbar-inner {
    width: min(var(--content-width), 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    list-style: none;
}

.nav-links li {
    position: relative;
}

.nav-links li > a,
.nav-links .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.55rem 0.8rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font: inherit;
    font-size: 0.96rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition), background-color var(--transition);
}

.nav-links li > a:hover,
.nav-links .dropdown-toggle:hover,
.nav-links .dropdown-toggle[aria-expanded="true"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-arrow {
    margin-left: 0.35rem;
    color: var(--color-sand-400);
    font-size: 0.68em;
    transition: transform 180ms ease;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.navbar .dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    margin: 0;
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(10, 29, 44, 0.98);
    box-shadow: var(--shadow-lg);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.navbar .dropdown.open > .dropdown-content,
.navbar .dropdown:hover > .dropdown-content,
.navbar .dropdown:focus-within > .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar .dropdown-content li a {
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.navbar .dropdown-content li a:hover {
    background: rgba(201, 155, 97, 0.14);
    color: #fff;
}

/* Animated mobile menu button */
.burger-button {
    display: none;
    align-items: center;
    gap: 0.65rem;
    min-height: 44px;
    padding: 0.55rem 0.8rem;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 750;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.burger-button:hover,
.burger-button.is-open {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
}

.burger-icon {
    position: relative;
    width: 21px;
    height: 16px;
    display: inline-block;
}

.burger-icon span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition: top 220ms ease, transform 220ms ease, opacity 160ms ease;
}

.burger-icon span:nth-child(1) { top: 0; }
.burger-icon span:nth-child(2) { top: 7px; }
.burger-icon span:nth-child(3) { top: 14px; }

.burger-button.is-open .burger-icon span:nth-child(1) {
    top: 7px;
    transform: rotate(45deg);
}

.burger-button.is-open .burger-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger-button.is-open .burger-icon span:nth-child(3) {
    top: 7px;
    transform: rotate(-45deg);
}

/* Mobile backdrop + floating menu card */
.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(3, 12, 20, 0.48);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 240ms ease, visibility 240ms ease;
}

.menu-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    z-index: 1150;
    top: 80px;
    left: 16px;
    right: 16px;
    max-height: calc(100dvh - 100px);
    padding: 18px;
    border: 1px solid rgba(120, 196, 228, 0.32);
    border-radius: 20px;
    background: rgba(13, 38, 58, 0.985);
    box-shadow: 0 24px 70px rgba(3, 12, 20, 0.32);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px) scale(0.985);
    transform-origin: top center;
    transition:
        opacity 240ms ease,
        transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 240ms ease;
}

.sidebar.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.sidebar > ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar > ul > li {
    margin-bottom: 0.35rem;
}

.sidebar > ul > li:last-child {
    margin-bottom: 0;
}

.sidebar a,
.sidebar .dropdown-toggle {
    width: 100%;
    min-height: 48px;
    padding: 0.78rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease;
}

.sidebar a:hover,
.sidebar .dropdown-toggle:hover,
.sidebar .dropdown-toggle[aria-expanded="true"] {
    background: rgba(87, 166, 201, 0.16);
    color: #fff;
}

.sidebar .dropdown-content {
    max-height: 0;
    margin: 0 0 0 0.75rem;
    padding: 0 0 0 0.65rem;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    list-style: none;
    overflow: hidden;
    opacity: 0;
    transition: max-height 260ms ease, opacity 200ms ease, margin 260ms ease;
}

.sidebar .dropdown.open > .dropdown-content {
    max-height: 220px;
    margin-top: 0.25rem;
    margin-bottom: 0.45rem;
    opacity: 1;
}

.sidebar .dropdown-content a {
    min-height: 42px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    header {
        min-height: 80px;
    }

    .navbar {
        min-height: 64px;
        padding: 0 16px;
        justify-content: flex-start;
    }

    .navbar-inner {
        display: none;
    }

    .burger-button {
        display: inline-flex;
    }
}

@media (max-width: 520px) {
    .sidebar {
        top: 76px;
        left: 10px;
        right: 10px;
        padding: 14px;
        border-radius: 18px;
    }
}
