/* Navigation Fix CSS */

/* Enhanced Navigation Styles */
#navbar, .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000; /* Increased z-index */
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

#navbar.scrolled, .navbar.scrolled {
    padding: 0.7rem 0;
    background: rgba(5, 5, 5, 0.98);
    box-shadow: 0 5px 30px rgba(0, 255, 136, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    width: 100%;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.8rem;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
}

.nav-item {
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    white-space: nowrap;
}

.nav-link i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.nav-link span {
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(0, 255, 136, 0.15);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link.active::after,
.nav-link:hover::after {
    width: calc(100% - 1rem);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    background: rgba(0, 255, 136, 0.1);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

/* Responsive Navigation */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 0.6rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .nav-link span {
        display: none;
    }
    
    .nav-link i {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        height: 70px;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 10001;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 100px 2rem 2rem;
        gap: 0;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 2px solid rgba(0, 255, 136, 0.2);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        width: 100%;
        padding: 1.2rem 1rem;
        font-size: 1rem;
        border-radius: 0;
        justify-content: flex-start;
    }
    
    .nav-link span {
        display: block;
        margin-left: 0.5rem;
    }
    
    .nav-link i {
        font-size: 1.1rem;
        width: 20px;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-link:hover {
        background: rgba(0, 255, 136, 0.15);
        transform: translateX(5px);
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .logo-subtitle {
        font-size: 0.6rem;
    }
    
    .nav-menu {
        width: 100vw;
        right: -100vw;
        padding: 90px 1rem 2rem;
    }
}

/* Animation for mobile menu overlay */
@media (max-width: 768px) {
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 280px;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        z-index: -1;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* Ensure navigation doesn't interfere with scroll */
body {
    padding-top: 80px;
}

@media (max-width: 768px) {
    body {
        padding-top: 90px;
    }
}

/* Fix for navigation z-index conflicts */
#navbar, .navbar {
    z-index: 10000 !important;
}

.nav-toggle {
    z-index: 10001 !important;
}

.nav-menu {
    z-index: 10000 !important;
}