/* ============================================================
 *  Main site navigation — includes/main-navigation.php
 *
 *  Values are a verbatim port of the landing-page navbar
 *  (.pb-lp__navbar in pb-landing-page/assets/css/pb-landing.css) so the
 *  shared header renders identically to /  — a floating pill inset from the
 *  viewport edges, not a full-bleed bar.
 *
 *  Two deliberate differences from the source:
 *
 *  1. The row is `width: 100%` with a fixed 12px gutter instead of Bootstrap's
 *     .container. On the landing page Tailwind's CDN build overrides
 *     .container's max-width, so the pill renders near-full-width there; every
 *     other page would have capped it at 1320px and looked narrower. Pinning
 *     the gutter here makes the nav look the same everywhere.
 *  2. Position is static by default (the landing navbar is fixed and overlays
 *     its hero). Pass 'sticky' => true for the fixed-to-top behaviour.
 *
 *  Self-contained — no dependency on pb-landing.css variables. Bootstrap 5.3
 *  is assumed for the offcanvas mobile menu (enqueued site-wide in
 *  functions.php).
 * ============================================================ */

.pb-nav {
    --pb-nav-text: #ffffff;
    --pb-nav-accent: #00b4ff;
    --pb-nav-transition: .3s ease;

    position: relative;
    z-index: 1030;
    padding: 14px 0;
}

/* Sticks to the top of the viewport when rendered with 'sticky' => true. */
.pb-nav--sticky {
    position: sticky;
    top: 0;
}

.admin-bar .pb-nav--sticky {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .pb-nav--sticky {
        top: 46px;
    }
}

/* Matches Bootstrap's .container gutter without inheriting its max-width. */
.pb-nav__container {
    width: 100%;
    padding: 0 12px;
}

/* ---------- Floating pill bar ---------- */
.pb-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px 10px 20px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(90deg,
        rgba(12, 58, 129, 0.25) 0%,
        rgba(12, 58, 129, 0.55) 20%,
        rgba(12, 58, 129, 0.55) 80%,
        rgba(12, 58, 129, 0.25) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ---------- Logo ---------- */
.pb-nav__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.pb-nav__logo img {
    display: block;
    height: 30px;
    width: auto;
}

/* ---------- Links ---------- */
.pb-nav__links {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.pb-nav__link {
    font-size: .875rem;
    font-weight: 500;
    color: var(--pb-nav-text);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--pb-nav-transition);
}

.pb-nav__link:hover,
.pb-nav__link:focus-visible,
.pb-nav__link.is-active {
    color: var(--pb-nav-accent);
}

/* ---------- Actions ---------- */
.pb-nav__actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-shrink: 0;
}

.pb-nav__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    border-radius: 12px;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--pb-nav-transition);
}

/* Join Discord — outlined */
.pb-nav__btn--discord {
    background: transparent;
    border: 1px solid #298dff;
    color: var(--pb-nav-text);
    padding: 8px 20px 8px 8px;
    font-weight: 700;
}

.pb-nav__btn--discord:hover,
.pb-nav__btn--discord:focus-visible {
    border-color: #298dff;
    box-shadow: 0 0 16px rgba(0, 179, 255, .3);
    color: #fff;
}

.pb-nav__btn-discord-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #5865f2;
    color: #fff;
}

/* Sign Up / Dashboard — solid */
.pb-nav__btn--signup {
    background: #3287ff;
    border: 3px solid #00b4ff;
    color: #fff;
    padding: 6px 18px;
    font-weight: 700;
    gap: 6px;
}

.pb-nav__btn--signup:hover,
.pb-nav__btn--signup:focus-visible {
    opacity: .92;
    transform: translateY(-1px);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 179, 255, .3);
}

.pb-nav__btn--signup svg {
    transition: transform var(--pb-nav-transition);
}

.pb-nav__btn--signup:hover svg {
    transform: translateX(3px);
}

/* ---------- Mobile toggle ---------- */
.pb-nav__toggle {
    display: none;
    padding: 4px;
    background: none;
    border: none;
    color: var(--pb-nav-text);
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .pb-nav__links,
    .pb-nav__actions {
        display: none;
    }

    .pb-nav__toggle {
        display: inline-flex;
    }
}

/* ---------- Offcanvas mobile menu ---------- */
.pb-nav__mobile {
    max-width: 300px;
    background: #01061a !important;
    border-left: 1px solid #1e293b !important;
    z-index: 1060 !important;
}

.pb-nav__mobile .offcanvas-header {
    border-bottom: 1px solid #1e293b;
}

.pb-nav__mobile .btn-close {
    filter: invert(1);
}

.pb-nav__mobile-logo {
    display: block;
    height: 28px;
    width: auto;
}

.pb-nav__mobile-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pb-nav__mobile-links a {
    display: block;
    padding: 14px 0;
    font-size: 1.15rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
}

.pb-nav__mobile-links a:hover {
    color: #3b82f6;
}

.pb-nav__mobile-cta {
    margin: 0 -16px -16px;
    padding: 24px 20px;
    background: #0f172a;
}

.pb-nav__mobile-cta .pb-nav__btn {
    justify-content: center;
    color: #fff !important;
}
