/* ── Navbar — global CSS ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* Push body content below top bar */
.main-body {
    padding-top: 0;
}

/* ═══════════════════════════════════════════════════
   DESKTOP — top sticky header
═══════════════════════════════════════════════════ */
.nb-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(4, 10, 24, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04),
                0 4px 24px rgba(0, 0, 0, 0.3);
    font-family: 'Vazirmatn', sans-serif;
}

.nb-inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 58px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

/* Logo */
.nb-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.nb-logo:hover { opacity: 0.85; }

.nb-logo svg { display: block; }

/* Nav links — centered column */
.nb-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.nb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    transition: color 0.18s, background 0.18s;
    white-space: nowrap;
    border: 1px solid transparent;
}

.nb-link:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

.nb-link.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.18);
}

/* Live badge */
.nb-live-badge {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 50px;
    padding: 0.25rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #4ade80;
    justify-self: end;
}

.nb-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
    animation: nb-pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes nb-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Hide bottom bar on desktop */
.nb-bottom { display: none; }


/* ═══════════════════════════════════════════════════
   MOBILE — hide top bar, show bottom bar
═══════════════════════════════════════════════════ */
@media (max-width: 767px) {

    .nb-header { display: none; }

    .main-body { padding-bottom: 72px; }

    /* ── Bottom bar ────────────────────────────────── */
    .nb-bottom {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 64px;
        background: rgba(4, 10, 24, 0.88);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border-top: 1px solid rgba(255, 255, 255, 0.07);
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
        font-family: 'Vazirmatn', sans-serif;
        padding: 0 0.25rem;
        /* safe area for notched phones */
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .nb-bot-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: #475569;
        font-size: 0.62rem;
        font-weight: 600;
        padding: 0.3rem 0.25rem;
        border-radius: 14px;
        transition: color 0.18s, background 0.18s;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }

    .nb-bot-item svg {
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .nb-bot-item:active svg {
        transform: scale(0.88);
    }

    .nb-bot-item.active {
        color: #38bdf8;
    }

    .nb-bot-item.active svg {
        filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
    }

    /* Active indicator pill above icon */
    .nb-bot-item.active::before {
        content: '';
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%);
        width: 24px;
        height: 3px;
        background: #38bdf8;
        border-radius: 0 0 3px 3px;
        top: 0;
    }
}

/* ═══════════════════════════════════════════════════
   TABLET — show both logo + links, hide bottom
═══════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1024px) {
    .nb-inner {
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .nb-link {
        font-size: 0.78rem;
        padding: 0.35rem 0.6rem;
    }
}
