/* =====================================================
   navbar.css — Top Navigation (Light Professional)
   ===================================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 64px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.navbar.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 1px 12px rgba(0,0,0,0.07);
}

.nav-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 64px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0;
}

/* ---- Logo ---- */
.nav-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 40px;
}

.nav-logo-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    object-fit: cover;
}

.nav-logo-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.03em;
    line-height: 1;
}

.nav-logo-tagline {
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--green);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
    padding-left: 2px;
}

/* ---- Nav Links ---- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    flex: 1;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--t);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-1);
    background: var(--bg-subtle);
}

.nav-links a.active {
    color: var(--text-1);
}

/* ---- Token Savings Highlights ---- */
.nav-link-savings {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green) !important;
    font-weight: 500 !important;
}

.nav-link-savings:hover {
    background: rgba(22,163,74,0.07) !important;
}

.nav-savings-badge {
    background: rgba(22,163,74,0.1);
    border: 1px solid rgba(22,163,74,0.2);
    color: var(--green);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: -0.01em;
}

/* ---- Resources Dropdown Button ---- */
.nav-resources-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--t);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
}
.nav-resources-btn:hover { color: var(--text-1); background: var(--bg-subtle); }

.nav-resources-chevron {
    transition: transform 0.2s var(--ease);
    color: var(--text-3);
}
#nav-resources-item:has(#nav-resources-dropdown.open) .nav-resources-chevron {
    transform: rotate(180deg);
}

#nav-resources-item { position: relative; }

.nav-resources-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.18s var(--ease);
    z-index: 100;
}
.nav-resources-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-resources-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 4px 10px 8px;
}

.nav-resources-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: var(--t);
    cursor: pointer;
}
.nav-resources-item:hover { background: var(--bg-1); }

.nav-resources-item-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-1);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.nav-resources-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 2px;
}
.nav-resources-item-sub {
    font-size: 0.78rem;
    color: var(--text-2);
    line-height: 1.4;
}

.nav-resources-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 8px;
}

/* ---- Nav Right CTAs ---- */
.nav-ctas {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-contact-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--t);
}
.nav-contact-link:hover { color: var(--text-1); }

.nav-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--green);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    transition: var(--t);
    border: none;
    cursor: pointer;
    font-family: var(--font);
}
.nav-btn-download:hover {
    background: var(--green-dark);
    box-shadow: 0 4px 14px rgba(22,163,74,0.25);
    color: #fff;
    transform: translateY(-1px);
}

/* ---- User Pill (post sign-in) ---- */
.nav-user-pill {
    position: relative;
    display: flex;
    align-items: center;
}
.nav-user-avatar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--t);
    font-family: var(--font);
    color: var(--text-1);
}
.nav-user-avatar:hover { border-color: var(--border-mid); background: var(--bg-1); }

.nav-avatar-initials {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-user-name { font-size: 0.82rem; font-weight: 500; color: var(--text-1); }
.nav-user-chevron { color: var(--text-3); transition: transform 0.2s var(--ease); }
.nav-user-avatar[aria-expanded="true"] .nav-user-chevron { transform: rotate(180deg); }

.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.18s var(--ease);
    z-index: 200;
}
.nav-user-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 12px;
}
.nav-dropdown-initials {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-dropdown-name { font-size: 0.875rem; font-weight: 600; color: var(--text-1); }
.nav-dropdown-email { font-size: 0.75rem; color: var(--text-3); }
.nav-dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-1);
    transition: var(--t);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    text-align: left;
}
.nav-dropdown-item:hover { background: var(--bg-1); }
.nav-dropdown-item svg { color: var(--text-3); flex-shrink: 0; }

/* ---- Mobile Hamburger ---- */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    margin-left: auto;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-2);
    border-radius: 2px;
    transition: var(--t);
}

/* ---- Mobile Menu ---- */
.nav-mobile {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 20px 24px 28px;
    z-index: 999;
    flex-direction: column;
    gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--text-1); }

.nav-mobile-savings {
    color: var(--green) !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}
.nav-mobile-savings span {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(22,163,74,0.1);
    border: 1px solid rgba(22,163,74,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--green);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .nav-inner { padding: 0 24px; }
    .nav-links { display: none; }
    .nav-contact-link { display: none; }
    .nav-hamburger { display: flex; }
    .nav-btn-download { padding: 7px 14px; font-size: 0.78rem; }
}
