/**
 * RefreshBalance — Global Navigation CSS
 * Applied to ALL pages (PHP templates + FSE pages) via header.php get_header()
 * This file is enqueued so LiteSpeed UCSS correctly captures and serves it.
 */

/* ─── PREMIUM NAVBAR ───────────────────────────────────────────── */
.rb-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.rb-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.1);
}

.rb-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 68px;
}

/* Logo */
.rb-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

/* Fix: prevent global svg reset from breaking nav logo */
.rb-nav-logo svg {
    display: inline-block !important;
    width: 34px !important;
    height: 34px !important;
    max-width: none !important;
    flex-shrink: 0;
}

.rb-nav-brand {
    font-size: 1.15rem;
    font-weight: 500;
    color: #0d0f1a;
    letter-spacing: -0.03em;
}

.rb-nav-brand strong {
    font-weight: 800;
}

.rb-nav-brand-grad {
    background: linear-gradient(135deg, #7c3aed, #0d9488);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Nav links */
.rb-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rb-nav-link {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5168;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.18s ease, color 0.18s ease;
    white-space: nowrap;
}

.rb-nav-link:hover {
    background: rgba(124, 58, 237, 0.07);
    color: #7c3aed;
}

.rb-nav-link.current,
.rb-nav-link[aria-current="page"] {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

/* Actions */
.rb-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rb-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.3rem;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 14px -2px rgba(124, 58, 237, 0.4);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}

.rb-nav-cta svg {
    transition: transform 0.18s ease;
}

.rb-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(124, 58, 237, 0.5);
}

.rb-nav-cta:hover svg {
    transform: translateX(3px);
}

/* Hamburger button */
.rb-nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.rb-nav-hamburger:hover {
    background: rgba(0, 0, 0, 0.04);
}

.rb-nav-hamburger span {
    display: block;
    height: 2px;
    background: #0d0f1a;
    border-radius: 2px;
    width: 18px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.rb-nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.rb-nav-hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.rb-nav-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile dropdown */
.rb-nav-mobile {
    display: none;
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.98);
    gap: 0.25rem;
}

.rb-nav-mobile.is-open {
    display: flex;
}

.rb-nav-mobile nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 1rem;
}

.rb-nav-mobile nav a {
    display: block;
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5168;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.rb-nav-mobile nav a:hover {
    background: rgba(124, 58, 237, 0.06);
    color: #7c3aed;
}

.rb-nav-cta-mobile {
    border-radius: 10px !important;
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* ECG Line strip */
.rb-header-divider {
    width: 100%;
    line-height: 0;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.rb-header-divider svg {
    display: block !important;
    width: 100% !important;
    height: 45px !important;
    max-width: none !important;
}

.rb-ecg-line {
    filter: drop-shadow(0 0 4px rgba(124, 58, 237, 0.4));
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .rb-nav-links {
        display: none;
    }

    .rb-nav-hamburger {
        display: flex;
    }
}

@media (max-width: 480px) {
    .rb-nav-inner {
        padding: 0 1.25rem;
    }

    .rb-nav-cta:not(.rb-nav-cta-mobile) {
        display: none;
    }
}