/* ============================================================
   BRK Portal — Global Navigation Styles
   Loaded by includes/modern-header.php
   ============================================================ */

/* ---- Fixed nav bar ---- */
.modern-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: var(--nav-bg);
    backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    z-index: 9999;
    border-bottom: 1px solid var(--nav-border);
    transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
}

/* ---- Logo ---- */
.nav-logo {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    transition: opacity 0.2s var(--ease-out);
}

.nav-logo:hover { opacity: 0.75; }

/* ---- Desktop links ---- */
.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.65;
    transition: opacity 0.2s var(--ease-out);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.nav-links a:hover { opacity: 1; }

.nav-links a.nav-active {
    opacity: 1;
    font-weight: 500;
}

/* ---- User actions area ---- */
.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-user-name {
    font-size: 12px;
    color: var(--text);
    opacity: 0.65;
    letter-spacing: -0.01em;
}

/* ---- Button styles ---- */
.nav-cta {
    background: var(--red);
    color: white !important;
    padding: 5px 13px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    opacity: 1 !important;
    text-decoration: none;
    transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.nav-cta:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text) !important;
    padding: 5px 13px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8 !important;
    transition: opacity 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
    text-decoration: none;
}

.nav-btn:hover {
    opacity: 1 !important;
    border-color: var(--text-2);
    background: var(--surface-2);
}

/* ---- Dark mode toggle button ---- */
.nav-theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    opacity: 0.65;
    padding: 5px 7px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s var(--ease-out), background 0.2s var(--ease-out);
    line-height: 1;
    flex-shrink: 0;
}

.nav-theme-toggle:hover {
    opacity: 1;
    background: var(--surface-2);
}

/* Show moon in light mode, sun in dark mode */
.nav-theme-toggle .icon-sun  { display: none; }
.nav-theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .nav-theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .nav-theme-toggle .icon-moon { display: none; }

/* ---- Hamburger button (mobile only) ---- */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    color: var(--text);
    line-height: 1;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-hamburger:hover { background: var(--surface-2); }

/* ---- Mobile drawer overlay ---- */
.nav-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-mobile-backdrop.open { display: block; }

/* ---- Mobile drawer ---- */
.nav-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 290px;
    background: var(--surface);
    z-index: 9999;
    padding: 64px 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s var(--ease-out);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
}

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

.nav-drawer-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: var(--surface-2);
    border: none;
    cursor: pointer;
    color: var(--text);
    opacity: 0.7;
    line-height: 1;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, background 0.2s;
}

.nav-drawer-close:hover { opacity: 1; background: var(--border); }

.nav-drawer-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.nav-drawer-section:last-child { border-bottom: none; }

.nav-drawer-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-2);
    padding: 8px 0 6px;
}

.nav-mobile-drawer a {
    display: block;
    padding: 11px 0;
    font-size: 15px;
    font-weight: 400;
    color: var(--text);
    text-decoration: none;
    opacity: 0.85;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.2s, color 0.2s;
    letter-spacing: -0.01em;
}

.nav-mobile-drawer a:last-child { border-bottom: none; }
.nav-mobile-drawer a:hover { opacity: 1; color: var(--red); }

.nav-mobile-drawer a.nav-active {
    opacity: 1;
    font-weight: 600;
    color: var(--red);
}

.nav-drawer-cta {
    display: block;
    text-align: center;
    background: var(--red);
    color: white !important;
    padding: 11px 16px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    margin-top: 16px;
    text-decoration: none;
    opacity: 1 !important;
    transition: background 0.2s;
}

.nav-drawer-cta:hover { background: var(--red-dark); }

/* ---- Drawer theme toggle button ---- */
.nav-drawer-section--theme {
    border-bottom: none;
    margin-top: auto;
    padding-top: 16px;
}

.nav-drawer-theme-btn {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    cursor: pointer;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    transition: background 0.2s, border-color 0.2s;
}

.nav-drawer-theme-btn:hover { background: var(--border); }

.nav-drawer-theme-btn .icon-sun  { display: none; }
.nav-drawer-theme-btn .icon-moon { display: block; }

[data-theme="dark"] .nav-drawer-theme-btn .icon-sun  { display: block; }
[data-theme="dark"] .nav-drawer-theme-btn .icon-moon { display: none; }

/* ---- Page body spacing ---- */
body { padding-top: var(--nav-h, 44px); }

/* ---- Page hero banner (replaces old red headers) ---- */
.page-hero {
    background: linear-gradient(135deg, #E30613 0%, #b8000f 100%);
    color: white;
    padding: 24px 32px;
    margin-bottom: 24px;
}

.page-hero h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    letter-spacing: -0.03em;
}

.page-hero p {
    opacity: 0.85;
    font-size: 0.875rem;
    margin: 0;
}

/* ---- Mobile responsive ---- */
@media (max-width: 768px) {
    .nav-links     { display: none; }
    .nav-user-name { display: none; }
    .nav-btn       { display: none; }
    .nav-hamburger { display: block; }

    /* Keep theme toggle visible on mobile in the nav bar */
    .nav-theme-toggle { display: flex; }

    .page-hero { padding: 16px 20px; }
    .page-hero h1 { font-size: 1.25rem; }
}
