/* Navigation - Light Theme - Fixed Scroll Behavior */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    /* Keep consistent light background - no darkening on scroll */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 5%;
    border-bottom: 1px solid rgba(21, 22, 68, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}

/* Enhanced scroll shadow instead of background change */
nav.scrolled {
    /* Keep same background - just enhance shadow */
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(21, 22, 68, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    z-index: 1001;
    transition: all 0.3s ease;
}

.logo-container {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid rgba(21, 22, 68, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    min-height: 50px;
}

.logo:hover .logo-container {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(21, 22, 68, 0.15);
    border-color: #151644;
    background: #f8fafc;
}

.logo-image {
    height: 35px;
    width: auto;
    object-fit: contain;
    max-width: 120px;
    transition: all 0.3s ease;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #151644, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.logo:hover .logo-text {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span:first-child {
    font-size: 1.4rem;
    color: #151644;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #1f2937;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    /* Ensure text remains visible on scroll */
    z-index: 10;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #151644;
    transition: width 0.3s ease;
}

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

.nav-links a.active {
    color: #151644;
    font-weight: 600;
}

.nav-links a:hover {
    color: #151644;
    transform: translateY(-1px);
}

.cta-button-i{
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    border: none;
    cursor: pointer;
    /* Maintain button visibility */
    position: relative;
    z-index: 10;
}

.cta-button-i:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

/* Theme Toggle Styles - Enhanced visibility */
.theme-toggle {
    background: #ffffff;
    border: 2px solid rgba(21, 22, 68, 0.15);
    border-radius: 50px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 60px;
    height: 40px;
    justify-content: center;
    /* Ensure toggle remains visible */
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
    border-color: #151644;
    background: #f8fafc;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.theme-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: absolute;
    transform: scale(1);
    color: #151644;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.theme-icon.sun-icon {
    opacity: 0;
}

.theme-icon.moon-icon {
    opacity: 1;
}

.mobile-theme-toggle {
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(21, 22, 68, 0.15);
}

.theme-toggle.mobile {
    width: 100%;
    justify-content: flex-start;
    border-radius: 8px;
    height: auto;
    padding: 1rem;
    gap: 1rem;
}

.theme-label {
    font-weight: 500;
    color: #1f2937;
}

/* Mobile Menu Toggle - Enhanced visibility */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    border: 2px solid rgba(21, 22, 68, 0.1);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(21, 22, 68, 0.2);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #151644;
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    backdrop-filter: blur(20px);
    transition: right 0.4s ease;
    z-index: 1000;
    padding-top: 5rem;
    border-left: 1px solid rgba(21, 22, 68, 0.15);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

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

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
}

.mobile-nav-links a {
    color: #1f2937;
    text-decoration: none;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(21, 22, 68, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.mobile-nav-links a::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(21, 22, 68, 0.05), transparent);
    transition: left 0.5s ease;
}

.mobile-nav-links a:hover::before {
    left: 100%;
}

.mobile-nav-links a.active {
    color: #151644;
    background: rgba(21, 22, 68, 0.05);
    border-left: 4px solid #151644;
    font-weight: 600;
}

.mobile-nav-links a:hover {
    color: #151644;
    background: rgba(21, 22, 68, 0.05);
    transform: translateX(5px);
}

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.mobile-cta {
    margin: 1rem 2rem;
    text-align: center;
    border-radius: 25px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    justify-content: center;
}

.mobile-cta:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    transform: translateX(0) translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 0.75rem 5%;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .logo {
        padding: 0.5rem 1rem;
        min-height: 45px;
        gap: 0.6rem;
    }

    .logo-text {
        font-size: 1.3rem;
    }

    .logo span:first-child {
        font-size: 1.2rem;
    }

    .logo-image {
        height: 30px;
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .mobile-nav {
        width: 100%;
        right: -100%;
    }

    nav {
        padding: 0.75rem 3%;
    }

    .logo {
        padding: 0.4rem 0.8rem;
        min-height: 40px;
        gap: 0.5rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo span:first-child {
        font-size: 1rem;
    }

    .logo-image {
        height: 25px;
        max-width: 80px;
    }
}

@media (max-width: 360px) {
    .logo {
        padding: 0.3rem 0.6rem;
        gap: 0.4rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-image {
        height: 22px;
        max-width: 70px;
    }
}

/* Enhanced animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mobile-nav.active .mobile-nav-links a {
    animation: slideInRight 0.3s ease forwards;
}

.mobile-nav.active .mobile-nav-links a:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav.active .mobile-nav-links a:nth-child(2) { animation-delay: 0.15s; }
.mobile-nav.active .mobile-nav-links a:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav.active .mobile-nav-links a:nth-child(4) { animation-delay: 0.25s; }
.mobile-nav.active .mobile-nav-links a:nth-child(5) { animation-delay: 0.3s; }
.mobile-nav.active .mobile-nav-links a:nth-child(6) { animation-delay: 0.35s; }
.mobile-nav.active .mobile-nav-links a:nth-child(7) { animation-delay: 0.4s; }

/* Light theme specific enhancements */
nav:hover {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-links a:hover {
    background: rgba(21, 22, 68, 0.05);
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .mobile-nav,
    .mobile-overlay,
    .mobile-menu-toggle span,
    .nav-links a,
    .mobile-nav-links a {
        transition: none;
        animation: none;
    }
}

/* Focus states for accessibility */
.mobile-menu-toggle:focus,
.nav-links a:focus,
.mobile-nav-links a:focus {
    outline: 2px solid #151644;
    outline-offset: 2px;
}

/* Loading state */
.nav-container.loading {
    opacity: 0.7;
    pointer-events: none;
}
