/* === NON-STICKY HEADER STYLES === */

.main-header {
    position: relative; /* Changed from fixed to relative */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar {
    padding: 1rem 0;
    background: transparent !important;
}

.navbar-logo {
    width: 100%;
    height: 54px;
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white !important;
    font-weight: 700;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.header-logo:hover {
    color: white !important;
    opacity: 0.8;
}

.navbar-nav {
    gap: 0.5rem;
}

.navbar-nav .nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.08);
}

.navbar-nav .nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.12);
}

/* Standard Bootstrap Dropdown */
.dropdown-menu {
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 0.5rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    margin-top: 0.25rem !important;
}

.dropdown-item {
    color: #cbd5e1 !important;
    transition: all 0.2s ease;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    font-weight: 500;
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(0, 82, 255, 0.1) !important;
    color: white !important;
}

.dropdown-item i {
    width: 18px;
    color: #64748b;
    transition: color 0.2s ease;
}

.dropdown-item:hover i {
    color: #0052FF;
}

/* Mega Menu Specific Styles */
.mega-menu-item {
    position: static !important;
}

.dropdown-menu.mega-menu-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    max-height: 70vh !important; /* Limit height to 70% of viewport */
    overflow-y: auto !important; /* Enable vertical scrolling */
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
    padding: 2rem 0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    margin-top: 0 !important;
    margin-left: calc(-50vw + 50%) !important;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Show mega menu on hover */
.mega-menu-item:hover .mega-menu-dropdown,
.mega-menu-dropdown:hover {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Custom scrollbar for mega menu */
.mega-menu-dropdown::-webkit-scrollbar {
    width: 8px;
}

.mega-menu-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.mega-menu-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0, 82, 255, 0.5);
    border-radius: 4px;
}

.mega-menu-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 82, 255, 0.7);
}

.mega-menu-title {
    color: white !important;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.mega-menu-title i {
    color: #0052FF;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-list li {
    margin-bottom: 0.5rem;
}

.mega-menu-list a {
    color: #cbd5e1 !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.2s ease;
    display: block;
    padding: 0.25rem 0;
    border-radius: 4px;
}

.mega-menu-list a:hover {
    color: white !important;
    padding-left: 0.5rem;
    background: rgba(0, 82, 255, 0.1);
}

.header-cta {
    background: #ff001d;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-cta:hover {
    background: #e6001a;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 29, 0.3);
}

.header-cta i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.header-cta:hover i {
    transform: translateX(2px);
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .navbar-nav {
        margin-top: 1rem;
        gap: 0.25rem;
    }

    .header-actions {
        margin-top: 1rem;
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        background: rgba(255, 255, 255, 0.05) !important;
        margin-top: 0.5rem !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        width: 100% !important;
        max-height: none !important;
        overflow-y: visible !important;
    }

    .dropdown-menu.mega-menu-dropdown {
        position: static !important;
        width: 100% !important;
        margin-left: 0 !important;
        border-radius: 12px !important;
        padding: 1rem !important;
        max-height: 400px !important; /* Limit height on mobile */
        overflow-y: auto !important; /* Enable scrolling on mobile */
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .mega-menu-title {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        margin-top: 1rem;
    }
    
    .mega-menu-title:first-child {
        margin-top: 0;
    }
    
    .mega-menu-list a {
        font-size: 0.8rem;
        padding: 0.4rem 0;
    }
    
    .row.border-top {
        margin-top: 1.5rem !important;
        padding-top: 1.5rem !important;
    }
}

@media (max-width: 767.98px) {
    .dropdown-menu.mega-menu-dropdown {
        max-height: 350px !important; /* Smaller height on smaller screens */
    }
    
    .mega-menu-dropdown .row > div {
        margin-bottom: 1rem;
    }
    
    .mega-menu-title {
        font-size: 0.85rem;
    }
    
    .mega-menu-list a {
        font-size: 0.75rem;
    }
}

/* Remove any scrolled state styles since header is no longer sticky */
/* .main-header.scrolled styles removed */