/* ============================================================
   NAVBAR.CSS — Clean, simple, fully responsive navbar
   ============================================================ */

/* ===== KILL OLD STYLES ===== */
.theme-switcher {
    display: none !important;
}

.logo i {
    animation: none !important;
}

.logo-icon i {
    animation: none !important;
}

/* ===== BASE NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: auto;
    min-height: 84px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, background 0.3s ease;
    padding: 0.5rem 0;
}

[data-theme="dark"] .navbar {
    background: rgba(12, 12, 12, 0.96);
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

/* ===== CONTAINER INSIDE NAV ===== */
.navbar .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ===== NAV-WRAPPER ===== */
.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
}

/* Center nav links on desktop only */
@media (min-width: 901px) {
    .nav-wrapper .nav-menu {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

.nav-wrapper .nav-right {
    margin-left: auto;
}

/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
    user-select: none;
}

.logo-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.25);
}

.logo-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.logo-name strong {
    color: var(--primary-color);
    font-weight: 800;
}

@media (max-width: 900px) {
    .logo-img {
        width: 56px;
        height: 56px;
    }
    .logo-name {
        font-size: 1.05rem;
    }
}

/* ===== NAV LINKS (desktop) ===== */
.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2px;
    margin: 0;
    padding: 0;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    flex-direction: row;
}



.nav-menu a {
    display: flex;
    align-items: center;
    padding: 0.48rem 1rem;
    border-radius: 7px;
    font-size: 0.91rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    position: relative;
    white-space: nowrap;
}

/* Remove old shimmer */
.nav-menu a::before {
    display: none;
}

/* Hover */
.nav-menu a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: none;
}

/* Active indicator — red text + underline dash */
.nav-menu a.active {
    color: var(--primary-color);
    font-weight: 700;
    background: rgba(230, 57, 70, 0.07);
    transform: none;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2.5px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* CRM Login Button */
.nav-menu a.nav-crm-btn {
    display: none; /* Hidden on desktop, shown on mobile */
}

.nav-menu a.nav-crm-btn:hover {
    background: linear-gradient(135deg, #0d47a1, #0a3d91);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

.nav-menu a.nav-crm-btn::after {
    display: none;
}

/* Hide "Call Now" nav link — it lives in FAB cluster */
.nav-cta {
    display: none !important;
}

/* ===== NAV RIGHT ===== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* CRM Button in nav-right */
.nav-right .nav-crm-btn {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-right .nav-crm-btn:hover {
    background: linear-gradient(135deg, #0d47a1, #0a3d91);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

/* ===== THEME TOGGLE PILL ===== */
.nav-theme-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 3px;
}

.nav-theme-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 0.84rem;
    background: transparent;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}

.nav-theme-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

.nav-theme-btn:hover:not(.active) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transition: background 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.hamburger:hover {
    background: var(--bg-tertiary);
}

.hamburger span {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.28s ease, opacity 0.28s ease;
    pointer-events: none;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== MOBILE OVERLAY ===== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ===== RESPONSIVE — collapse at 900px ===== */
@media (max-width: 900px) {
    .navbar {
        min-height: 50px;
        padding: 0.3rem 0;
    }

    .hamburger {
        display: flex;
    }

    /* Hide CRM button in nav-right on mobile */
    .nav-right .nav-crm-btn {
        display: none;
    }

    .nav-menu {
        /* Slide-in drawer from LEFT */
        position: fixed;
        top: 63px;
        left: -100%;
        width: 100%;
        height: fit-content;
        min-height: 200px;
        max-height: calc(100vh - 50px);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 16px;
        background: var(--card-bg);
        border-right: none;
        box-shadow: none;
        z-index: 999;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        list-style: none;
        transform: none !important;
        display: flex !important;
    }

    [data-theme="dark"] .nav-menu {
        box-shadow: none;
    }

    .nav-menu.open {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        display: block;
        margin: 0;
    }

    /* Remove underline indicator in drawer */
    .nav-menu a::after {
        display: none !important;
    }

    .nav-menu a {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        font-weight: 500;
        border-radius: 8px;
        color: var(--text-primary);
        margin-bottom: 4px;
        line-height: 1.2;
        display: block;
        text-align: left;
    }

    .nav-menu a:hover {
        background: var(--bg-secondary);
        color: var(--primary-color);
    }

    /* Active in drawer — left border + red tint */
    .nav-menu a.active {
        background: rgba(230, 57, 70, 0.07);
        color: var(--primary-color);
        font-weight: 700;
        border-left: 3px solid var(--primary-color);
        padding-left: calc(1rem - 3px);
    }

    /* Show CRM button in mobile menu */
    .nav-menu a.nav-crm-btn {
        display: block;
        background: linear-gradient(135deg, #1a73e8, #0d47a1);
        color: white !important;
        font-weight: 600;
        padding: 0.65rem 1rem;
        border-radius: 8px;
        text-align: center;
        margin-top: 8px;
    }

    .nav-menu a.nav-crm-btn:hover {
        background: linear-gradient(135deg, #0d47a1, #0a3d91);
        color: white !important;
    }

    /* Section divider label above links */
    .nav-menu::before {
        content: 'Navigate';
        display: block;
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: var(--text-muted);
        padding: 0 0.5rem 6px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 6px;
    }
}

/* Phones ≤ 600px */
@media (max-width: 600px) {
    .navbar .container {
        padding: 0 16px;
    }

    .logo span {
        font-size: 1.05rem;
    }

    .nav-theme-btn {
        width: 27px;
        height: 27px;
        font-size: 0.78rem;
    }

    .hamburger {
        width: 33px;
        height: 33px;
    }
}

/* Very small ≤ 360px */
@media (max-width: 360px) {
    .logo-img {
        width: 46px;
        height: 46px;
    }
    .logo-name {
        font-size: 0.95rem;
    }
}

/* ===== PAGE CONTENT OFFSET (below fixed nav) ===== */
/* Index hero */
.hero-v2 {
    margin-top: 84px;
}

/* Mobile adjustment */
@media (max-width: 900px) {
    .hero-v2 {
        margin-top: 72px;
    }
    
    .page-header {
        margin-top: 72px !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Inner page headers — tighter */
.page-header {
    margin-top: 84px !important;
    padding: 3.5rem 0 3rem !important;
}