/* =========================================
   Modern Header & Mega Menu Upgrades
   ========================================= */

/* Update Header Glass Effect */
header {
    background: rgba(5, 10, 15, 0.4) !important;
    /* Make it darker but translucent */
    backdrop-filter: blur(20px) !important;
    /* Stronger blur */
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    height: 90px !important;
    /* Ensure enough height */
}

/* Nav Link Hover Effects */
nav a {
    font-size: 0.9rem !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600 !important;
    opacity: 0.8;
}

nav a:hover,
nav a.active {
    opacity: 1;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(64, 128, 255, 0.7);
}

nav a::after {
    height: 2px !important;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent) !important;
    bottom: -8px !important;
}

/* =========================================
   MEGA MENU STYLES
   ========================================= */
/* =========================================
   MEGA MENU STYLES (Direct Centering)
   ========================================= */
.mega-menu {
    /* Positioning strategy: Center relative to viewport */
    position: fixed !important;
    top: 90px !important;
    left: 50% !important;
    transform: translateX(-50%);

    /* Box Model */
    width: 1000px !important;
    max-width: 94vw;
    height: auto;

    /* Reset Wrapper Logic */
    display: block !important;
    padding: 0 !important;

    /* Visibility */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 10000 !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.dropdown-parent:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 2. The Visual Card (Inner Content) */
.mega-grid {
    width: 100% !important;
    /* Fill the centered parent */

    /* Aesthetics */
    background: #0a0c10 !important;
    background: rgba(10, 15, 20, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--accent-cyan);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.9);
    /* Stronger shadow */
    padding: 40px;

    /* Grid Layout */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;

    /* Entry Animation */
    transform: translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 10002;
    position: relative;
}

.dropdown-parent:hover .mega-menu .mega-grid {
    transform: translateY(0);
}

/* Force Text Visibility */
.mega-col h4 {
    font-size: 1.1rem !important;
    color: #ffffff !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 1 !important;
    visibility: visible !important;
}

.mega-col h4 i {
    color: var(--accent-cyan);
    font-size: 1.1rem;
}

.mega-col a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 15px !important;
    color: #cccccc !important;
    /* Lighter grey for better contrast */
    font-size: 0.95rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-transform: none !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent;
    /* Reset */
    text-decoration: none !important;
}

.mega-col a i {
    width: 24px;
    text-align: center;
    color: var(--accent-cyan);
    /* Force color */
    font-size: 1rem;
}

.mega-col a:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    transform: translateX(5px);
    box-shadow: -2px 0 10px rgba(64, 128, 255, 0.1);
}

.mega-col a:hover i {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

/* =========================================
   MODERN HEADER BUTTONS
   ========================================= */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Call Button - Cyan Outline Style */
.btn-call-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: transparent;
    border: 2px solid #00c8ff;
    color: #00c8ff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-call-modern i {
    font-size: 0.9rem;
}

.btn-call-modern:hover {
    background: #00c8ff;
    color: #000;
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.5);
    transform: translateY(-2px);
}

/* Consultation Button - Blue → Cyan Gradient */
.btn-consult-modern {
    padding: 12px 28px;
    background: linear-gradient(90deg, #4080ff 0%, #00c8ff 100%);
    border: none;
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(64, 128, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-consult-modern:hover {
    box-shadow: 0 0 35px rgba(0, 200, 255, 0.5);
    transform: translateY(-2px) scale(1.05);
}

/* =========================================
   HOVER STABILITY BRIDGE
   ========================================= */
.dropdown-parent {
    position: relative;
    height: 100%;
    /* Fill header height */
    display: flex;
    align-items: center;
}

/* Create a massive invisible safe-zone to bridge gap to menu */
.dropdown-parent::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -50px;
    width: calc(100% + 100px);
    /* Wide catch area */
    height: 80px;
    /* Extends well below the header (90px) */
    background: transparent;
    /* background: rgba(255,0,0,0.2); Debug: Uncomment to see the safe zone */
    z-index: 2000;
}

/* Adjust Mega Menu Top to Ensure Overlap */
.mega-menu {
    top: 85px !important;
    /* Slight overlap with 90px header height */
    padding-top: 15px !important;
    /* Internal compensation */
}