/* ===== MOBILE MENU FIXES ===== */

/* Fix for mobile menu positioning */
@media (max-width: 992px) {
    /* Ensure proper stacking */
    body {
        position: relative;
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix navbar for mobile */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(10, 25, 47, 0.98);
        backdrop-filter: blur(20px);
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Add padding to body to account for fixed navbar */
    body::before {
        content: '';
        display: block;
        height: 70px; /* Height of navbar */
    }
    
    /* Fix menu toggle button */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 1002;
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: var(--white);
        font-size: 22px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .menu-toggle:hover {
        background: rgba(255, 255, 255, 0.15);
    }
    
    /* Fix nav links container */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        background: rgba(10, 25, 47, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 30px 40px 30px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    /* Fix individual nav links */
    .nav-links a {
        width: 100%;
        padding: 16px 0;
        font-size: 16px;
        color: var(--gray-200);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    /* Remove hover effects on mobile */
    .nav-links a::after {
        display: none;
    }
    
    /* Fix dropdown on mobile */
    .dropdown {
        width: 100%;
    }
    
    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 20px;
        margin-top: 10px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-content {
        max-height: 500px;
    }
    
    .dropdown-content a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .dropdown-content a:last-child {
        border-bottom: none;
    }
    
    /* Dropdown arrow animation */
    .dropdown-toggle i {
        transition: transform 0.3s ease;
    }
    
    .dropdown.active .dropdown-toggle i {
        transform: rotate(180deg);
    }
    
    /* Fix CTA button on mobile */
    .nav-links .cta-button {
        margin-top: 20px;
        padding: 14px 28px !important;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Fix overlay */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        z-index: 1000;
    }
    
    .overlay.active {
        display: block;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    /* Fix section padding for mobile */
    .section-padding {
        padding: 60px 0;
    }
    
    .hero {
        padding: 120px 0 60px;
        min-height: auto;
    }
    
    /* Adjust container for mobile */
    .container {
        padding: 0 15px;
    }
}

/* Extra small mobile fixes */
@media (max-width: 576px) {
    .nav-links {
        max-width: 280px;
        padding: 90px 20px 30px 20px;
    }
    
    .menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    /* Smaller text on very small screens */
    .nav-links a {
        font-size: 15px;
        padding: 14px 0;
    }
    
    /* Adjust hero for very small screens */
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 992px) {
        .nav-links {
            height: -webkit-fill-available;
            padding-bottom: env(safe-area-inset-bottom, 40px);
        }
        
        .menu-toggle {
            margin-right: env(safe-area-inset-right, 0);
        }
    }
}

/* Fix for Android Chrome */
@supports not (-webkit-touch-callout: none) {
    @media (max-width: 992px) {
        .nav-links {
            height: 100vh;
        }
    }
}

/* ===== NAVBAR CORRECTIONS ===== */

/* Fix for all nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--gray-200);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all var(--transition-fast);
    position: relative;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover {
    color: var(--secondary-main);
}

.nav-link.active {
    color: var(--secondary-main);
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-secondary);
    transition: width var(--transition-normal);
    border-radius: var(--radius-full);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown specific styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-icon {
    font-size: 12px;
    margin-left: 4px;
    transition: transform var(--transition-normal);
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 220px;
    background: rgba(26, 54, 93, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-2xl);
    z-index: 100;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 24px;
    color: var(--gray-300);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(0, 180, 216, 0.1);
    color: var(--secondary-main);
    padding-left: 28px;
}

/* CTA Button specific */
.nav-link.cta-button {
    background: var(--gradient-secondary);
    color: var(--white) !important;
    padding: 12px 28px !important;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-link.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.nav-link.cta-button::after {
    display: none;
}

