/* ==========================================================================
   Navigation
   ========================================================================== */

/* Base Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    z-index: 1001;
}

.logo-icon {
    height: 2.5rem;
    width: auto;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(15deg);
}

.logo-dot {
    color: var(--primary);
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn):hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:not(.btn):hover,
.nav-links a.active {
    color: var(--primary);
}

/* Button Styles */
.nav-links .btn {
    margin-left: 1rem;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

/* Mobile Menu Toggle */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Menu Styles */
@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding: 100px 2rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.4s ease-in-out;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Prevent scrolling when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}
    width: 100%;
}

/* CTA Button in Navigation */
.nav-links .cta-button {
    margin-left: 1rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    background-color: var(--color-primary-500);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--color-primary-500);
}

.nav-links .cta-button:hover {
    transform: translateY(-2px);
    background-color: var(--color-primary-600);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: relative;
    margin-left: auto;
    color: #1a365d;
    font-size: 24px;
    transition: color 0.3s ease;
}

/* Change icon to X when menu is active */
.hamburger[aria-expanded="true"] i::before {
    content: "\f00d"; /* Font Awesome 'times' (X) icon */
    transition: all 0.3s ease;
}

/* Add hover effect */
.hamburger:hover {
    color: var(--primary-color);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.hamburger:focus {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
}

/* Debug Styles - Remove in production */
/* #hamburger {
    background: rgba(255, 0, 0, 0.2) !important;
    border: 2px solid red !important;
}

#navLinks {
    background: rgba(0, 0, 255, 0.1) !important;
    border: 2px solid blue !important;
}

#mobileNavOverlay {
    background: rgba(0, 255, 0, 0.1) !important;
    border: 2px solid green !important;
} */

/* Mobile Navigation Styles */
@media (max-width: 1024px) {
    /* Hide desktop nav items by default */
    .nav-links {
        display: none;
    }
    
    /* Show hamburger menu on mobile */
    .hamburger {
        display: flex;
    }
    /* Ensure proper stacking context */
    .header {
        position: relative;
        z-index: 1000;
    }
    
    .navbar {
        padding: 15px 0;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: white;
      
    }
    /* Ensure navbar has proper spacing */
    .navbar {
        padding: 15px 0;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    /* Style the hamburger button */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 40px;
        height: 30px;
        background: #f8fafc;
        border-radius: 4px;
        cursor: pointer;
        padding: 8px 6px;
        z-index: 1001;
        margin-left: 15px;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .hamburger-line {
        display: block;
        width: 100%;
        height: 3px;
        background: #1a365d;
        transition: all 0.3s ease;
        border-radius: 3px;
    }
    
    /* Animate hamburger to X when active */
    .hamburger[aria-expanded="true"] {
        background: #656565;
    }
    
    .hamburger[aria-expanded="true"] .hamburger-line {
        background: #656565;
    }
    
    .hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    
    .hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Style the nav links for mobile */
    .nav-links {
        position: fixed;
        top: 0;
        right: -320px;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 90px 25px 40px;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 999;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
    }
    
    /* Active state for mobile menu */
    .nav-links.active {
        right: 0;
        display: flex;
    }
    
    .nav-links a {
        display: block;
        width: 100%;
        padding: 12px 20px;
        margin: 5px 0;
        border-radius: 8px;
        font-size: 1.1rem;
        color: #1a365d;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .nav-links a:hover {
        background: #f1f5f9;
    }
    
    .nav-links .cta-button {
        background: #1d4ed8;
        color: white !important;
        text-align: center;
        justify-content: center;
        margin-top: 20px;
        padding: 14px 20px;
        border-radius: 8px;
        font-weight: 600;
        border: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }
    
    .nav-links .cta-button:hover {
        background: #1e40af;
        transform: translateX(5px) translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
    
    .nav-links .cta-button i {
        color: white !important;
        margin-right: 8px;
    }
    
    .nav-links .cta-button:hover {
        background: #2563eb;
    }
    .hamburger {
        display: flex !important; /* Ensure it's visible */
        position: relative;
        z-index: 1001;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        margin-left: auto; /* Push to the right */
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100%;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 100px 20px 30px;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        display: block;
        width: 100%;
        padding: 12px 20px;
        margin: 5px 0;
        border-radius: 8px;
        font-size: 1.1rem;
        color: #1a365d;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .nav-links a:hover {
        background: #f1f5f9;
    }
    
    .nav-links .cta-button {
        margin-top: 20px;
        text-align: center;
        width: 100%;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 20px 20px;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        margin: 10px 0;
        padding: 12px 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-links .cta-button {
        margin: 20px 0 0;
        width: 100%;
    }
    
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .nav-overlay.active {
        display: block;
    }
    
    body.menu-open {
        overflow: hidden;
    }
}

/* Active state for hamburger */
.hamburger.is-active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Navigation */
@media (max-width: 1024px) {
    /* Hide desktop nav items */
    .nav-links {
        display: none;
    }
    
    /* Show hamburger */
    .hamburger {
        display: flex !important;
        position: relative;
        z-index: 1001;
        background: #f8fafc;
        border-radius: 4px;
        cursor: pointer;
        padding: 8px 6px;
        width: 40px;
        height: 30px;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        margin-left: 15px;
        transition: all 0.3s ease;
    }
    
    .hamburger-line {
        display: block;
        width: 100%;
        height: 3px;
        background: #1a365d;
        transition: all 0.3s ease;
        border-radius: 3px;
    }
    
    /* Hamburger to X animation */
    .hamburger[aria-expanded="true"] {
        background: #656565;
    }
    
    .hamburger[aria-expanded="true"] .hamburger-line {
        background: #ffffff;
    }
    
    .hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    
    .hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Mobile menu */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 90px 20px 40px;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 14px 20px;
        margin: 6px 0;
        border-radius: 8px;
        font-size: 1.05rem;
        color: #1e293b;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-weight: 500;
        background: #f8fafc;
        border-left: 4px solid transparent;
    }
    
    .nav-links a i {
        margin-right: 12px;
        font-size: 1.2rem;
        color: #64748b;
        width: 24px;
        text-align: center;
    }
    
    .nav-links a span {
        flex: 1;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        background: #f1f5f9;
        color: #1d4ed8;
        transform: translateX(5px);
    }
    
    .nav-links a:hover i,
    .nav-links a.active i {
        color: #1d4ed8;
    }
    
    .nav-links a:active {
        transform: translateX(5px) scale(0.98);
    }
    
    /* CTA Button in mobile menu */
    .nav-links .cta-button {
        background: #1d4ed8;
        color: white !important;
        text-align: center;
        justify-content: center;
        margin-top: 20px;
        padding: 14px 20px;
        border-radius: 8px;
        font-weight: 600;
        border: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }
    
    .nav-links .cta-button:hover {
        background: #1e40af;
        transform: translateX(5px) translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
    
    .nav-links .cta-button i {
        color: white !important;
        margin-right: 8px;
    }
    
    /* Mobile overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .mobile-nav-overlay.active {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Prevent scrolling when menu is open */
    body.menu-open {
        overflow: hidden;
        height: 100vh;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-links {
        gap: 1.5rem;
    }
}
