:root {
    --nav-bg: #0c1512;
    --nav-bg-soft: #111c18;
    --nav-fg: #e5e7eb;              /* main text */
    --nav-muted: #9ca3af;           /* subtle labels */
    --nav-border: rgba(255,255,255,0.08);
    --nav-hover: rgba(255,255,255,0.06);
    --nav-active: rgba(255,255,255,0.10);
    --nav-shadow: 0 20px 40px rgba(0,0,0,0.45);
    --radius: 14px;
}

.bb-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--nav-bg);              /* full width white */
    border-bottom: 1px solid var(--nav-border);
}

.bb-nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    position: relative;
    background: transparent;       /* IMPORTANT */
}

.bb-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--nav-fg);
    min-width: 0;
}

.bb-nav__logo {
    width: 28px;
    height: 28px;
    display: inline-block;
}

.bb-nav__name {
    font-weight: 800;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.bb-nav__center {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.bb-nav__right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.bb-nav__item {
    position: relative;
}

.bb-nav__trigger {
    border: 0;
    background: transparent;
    color: var(--nav-fg);
    padding: 10px 10px;
    border-radius: 10px;
    font-weight: 650;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bb-nav__trigger:hover {
    background: var(--nav-hover);
}

.bb-nav__trigger.is-active {
    background: var(--nav-active);
}

.bb-nav__caret {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.bb-nav__panel {
    position: absolute;
    top: calc(100% + 10px);

    /* Always center relative to the viewport width */
    left: 50%;
    transform: translateX(-50%);

    /* Never exceed viewport padding */
    width: min(980px, calc(100vw - 32px));

    /* Optional: keep it visually centered even if wide */
    margin: 0;

    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    border-radius: var(--radius);
    box-shadow: var(--nav-shadow);
    padding: 14px;
    display: none;
}

.bb-nav__item[data-open="true"] .bb-nav__panel {
    display: block;
}

.bb-nav__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.bb-nav__group {
    border-radius: 12px;
    padding: 10px;
}

.bb-nav__groupTitle {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--nav-muted);
    margin: 0 0 8px 0;
}

.bb-nav__link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--nav-fg);
}

.bb-nav__link:hover {
    background: var(--nav-hover);
}

.bb-nav__linkTitleRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bb-nav__linkTitle {
    font-weight: 700;
}

.bb-nav__linkDesc {
    font-size: 13px;
    color: var(--nav-muted);
    line-height: 1.25;
}

.bb-nav__badge {
    font-size: 11px;
    color: #111;
    background: #f1f1f1;
    border: 1px solid #e2e2e2;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.bb-nav__iconBtn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--nav-border);
    color: var(--nav-fg);          /* THIS fixes currentColor strokes */
    background: transparent;       /* looks cleaner in dark theme */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bb-nav__iconBtn:hover {
    background: var(--nav-hover);
}

.bb-nav__icon {
    width: 18px;
    height: 18px;
}

.bb-nav__hamburger {
    display: none;
}

.bb-mobile {
    display: none;
    border-top: 1px solid var(--nav-border);
    padding: 10px 16px 16px 16px;
    background: var(--nav-bg);
}

.bb-mobile__section {
    border: 1px solid var(--nav-border);
    border-radius: 14px;
    overflow: hidden;
    margin-top: 10px;
}

.bb-mobile__trigger {
    width: 100%;
    text-align: left;
    padding: 12px 12px;
    background: transparent;
    border: 0;
    font-weight: 750;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--nav-fg);
}

.bb-mobile__trigger:hover {
    background: var(--nav-hover);
}

.bb-mobile__content {
    border-top: 1px solid var(--nav-border);
    padding: 8px;
    display: none;
}

.bb-mobile__section[data-open="true"] .bb-mobile__content {
    display: block;
}

.bb-mobile__group {
    padding: 8px;
}

.bb-mobile__groupTitle {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--nav-muted);
    margin: 6px 0;
}

.bb-mobile__link {
    display: block;
    padding: 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--nav-fg);
}

.bb-mobile__link:hover {
    background: var(--nav-hover);
}

.bb-mobile__link.is-active {
    background: var(--nav-active);
}

.bb-nav__overlay {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 60px;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 40;
}

.bb-nav__overlay.is-on {
    display: block;
}

@media (max-width: 980px) {
    .bb-nav__inner {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand right";
    }

    .bb-nav__center {
        display: none;
    }

    .bb-nav__hamburger {
        display: inline-flex;
    }

    .bb-mobile {
        display: block;
    }
}

.bb-nav__linkTitle {
    display: inline-flex;
    align-items: center;
}

.bb-nav__linkIcon {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
    opacity: 0;
    margin-right: -16px;
    transform: translateX(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, margin-right 0.15s ease;
}

.bb-nav__link:hover .bb-nav__linkIcon,
.bb-nav__link:focus-visible .bb-nav__linkIcon {
    opacity: 1;
    margin-right: 8px;
    transform: translateX(0);
}