/* =========================
   Base Navbar
========================= */

body {
    background-color: var(--bg);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

.navbar {
    position: sticky;
    top: 0;
    height: 50px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    background-color: var(--bg);
}

/* --- Logos --- */

.nav-logo {
    width: 25px;
    height: 25px;
    cursor: pointer;
    flex-shrink: 0;
}

/* PR logo: shown on md+ */
.nav-logo-pr { display: flex; }

/* PRIMIT wordmark: hidden on md+, shown on xs/sm */
.nav-logo-primit {
    display: none;
    height: 100%;
    width: auto;
    cursor: pointer;
}

/* --- Nav --- */

.nav {
    width: 100%;
    margin-left: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 400;
    font-size: 14px;
    white-space: nowrap;
}

/* --- Hamburger button --- */

.nav-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    color: var(--text-primary);
    margin-left: auto;
}

/* SVG icon inside hamburger inherits currentColor */
.nav-hamburger svg,
.nav-hamburger img {
    width: 20px;
    height: 20px;
    /* If using an SVG img tag, use a CSS filter trick below */
    filter: var(--icon-filter, none);
}

/* =========================
   Drawer (mobile menu)
========================= */

.nav-drawer {
    position: fixed;
    top: 50px; /* sit flush under the navbar */
    right: 0;
    width: 260px;
    height: calc(100vh - 50px);
    background-color: var(--bg);
    border-left: 1px solid var(--border);
    z-index: 99;
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
}

.nav-drawer.open {
    transform: translateX(0);
}

.nav-drawer-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-drawer-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin: 0 0 8px;
}

.nav-drawer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-drawer-links li a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.nav-drawer-links li:first-child a {
    border-top: 1px solid var(--border);
}

/* Overlay behind drawer */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 50px 0 0 0;
    background: transparent;
    z-index: 98;
}

.nav-overlay.open {
    display: block;
}

/* =========================
   Medium: 768px – 1199px
   (social links → hamburger)
========================= */

@media (max-width: 1199px) {
    /* Hide social links from navbar */
    .social-links {
        display: none;
    }

    /* Show hamburger */
    .nav-hamburger {
        display: flex;
    }
}

/* =========================
   Extra Small & Small: ≤ 767px
   (swap logo, hide nav-options, all links in drawer)
========================= */

@media (max-width: 767px) {
    /* Swap logos */
    .nav-logo-pr      { display: none; }
    .nav-logo-primit  { display: flex; }

    /* Hide inline nav links */
    .nav-options {
        display: none;
    }
}