/* =================================================================
   XEKERA HEADER & NAVIGATION STYLES
   ================================================================= */

:root {
    --x-dark: #111827;       /* Main Header Background */
    --x-dark-light: #1F2937; /* Dropdown Background */
    --x-hover: #374151;      /* Hover Gray */
    --x-blue: #2563EB;       /* Brand Blue */
    --x-blue-hover: #1d4ed8;
    --x-text: #F3F4F6;
    --x-text-muted: #9CA3AF;
    --x-border: #374151;
}

/* --- MAIN HEADER CONTAINER --- */
.xekera-header {
    background-color: var(--x-dark);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    height: 80px;
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease;
}

.xekera-header .container-fluid {
    padding-left: 40px;
    padding-right: 40px;
}

.xekera-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 60px;
}

/* --- LOGO --- */
.logo-wrapper {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    color: var(--x-blue);
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo-sub {
    color: var(--x-text-muted);
    font-size: 14px;
    font-weight: 400;
    padding-left: 12px;
    border-left: 1px solid var(--x-border);
    line-height: 1.2;
    white-space: nowrap;
}

/* --- DESKTOP MENU LINKS --- */
.desktop-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    height: 80px;
}

.menu-item {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.menu-link {
    color: var(--x-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: 0.3s;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.menu-item:hover .menu-link {
    color: var(--x-blue);
}

.menu-link i {
    font-size: 10px;
    margin-top: 1px;
}

/* --- RIGHT SIDE BUTTONS --- */
.btn-quote {
    background-color: var(--x-blue);
    color: #fff;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
    border: none;
}

.btn-quote:hover {
    background-color: var(--x-blue-hover);
    color: #fff;
}


/* =================================================================
   MEGA MENUS (GENERAL)
   ================================================================= */
.mega-menu, .dropdown-menu-custom {
    position: absolute;
    top: 80px;
    left: 0;
    background-color: var(--x-dark-light);
    border: 1px solid var(--x-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    border-radius: 0 0 8px 8px;
    cursor: default;
}

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


/* =================================================================
   1. SERVICES MEGA MENU (GRID)
   ================================================================= */
.services-mega {
    width: 700px;
    padding: 25px;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.service-box {
    background: rgba(255,255,255,0.03);
    padding: 15px 20px;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid transparent;
    display: block;
}

.service-box:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--x-blue);
}

.service-box h3 {
    font-size: 15px;
    color: #fff;
    margin: 0;
    font-weight: 500;
}


/* =================================================================
   2. CAPABILITIES MEGA MENU (SIDEBAR + NEWSLETTER LOGIC)
   ================================================================= */
/* =================================================================
   2. CAPABILITIES MEGA MENU (FIXED)
   ================================================================= */
/* =================================================================
   2. CAPABILITIES MEGA MENU (FIXED HEIGHT & HOVER)
   ================================================================= */
.capabilities-mega {
    width: 1000px;
    left: -100px;
    padding: 0;
    overflow: hidden;
}

.cap-wrapper {
    display: flex;
    min-height: 450px; /* Ensures the box is tall enough */
    position: relative; /* This is the anchor for height calculation */
    background-color: var(--x-dark-light);
}

/* --- SIDEBAR --- */
/* IMPORTANT: position: static allows children (.cap-content)
   to reference .cap-wrapper for height, ignoring the sidebar height. */
.cap-sidebar {
    position: static;
    z-index: 20;
    width: 260px;
    background-color: #161e2b;
    border-right: 1px solid var(--x-border);
    flex-shrink: 0;
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

/* Ensure LIs don't trap the absolute positioning */
.cap-tab {
    position: static;
}

.tab-link, .tab-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 25px;
    color: var(--x-text-muted);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s;
    position: relative; /* Keep link interactions contained */
    z-index: 25;
}

.tab-link:hover, .tab-simple:hover,
.cap-tab:hover > .tab-link {
    background-color: var(--x-hover);
    color: #fff;
}

.tab-link i { font-size: 10px; }


/* --- NESTED CONTENT PANELS --- */
.cap-content {
    position: absolute;
    /* Now aligns to .cap-wrapper because sidebar/tabs are static */
    top: 0;
    left: 260px;
    right: 0;
    bottom: 0; /* Stretches to the very bottom */
    padding: 40px 50px;
    display: none;
    background-color: #1F2937; /* Solid background covers newsletter */
    z-index: 30; /* Highest Z-Index */
}

/* Keep content open when hovering the tab OR the content itself */
.cap-tab:hover .cap-content {
    display: block;
    animation: fadeIn 0.2s;
}


/* --- NEWSLETTER / DEFAULT --- */
.cap-default {
    position: absolute;
    top: 0;
    left: 260px;
    right: 0;
    bottom: 0;
    padding: 40px;
    z-index: 10; /* Lowest Z-Index */
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1f2937 0%, #111827 100%);
    transition: opacity 0.2s;
}

/* LOGIC: Hide newsletter when ANY content panel is open/hovered */
.cap-wrapper:has(.cap-tab:hover .cap-content) .cap-default {
    opacity: 0;
    visibility: hidden;
}


/* --- GRID & TYPOGRAPHY --- */
.cap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    width: 100%;
}

.cap-column {
    display: flex;
    flex-direction: column;
}

.cap-title {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--x-border);
    padding-bottom: 10px;
    width: 100%;
    white-space: nowrap;
}

.cap-content a {
    display: block;
    color: var(--x-text-muted);
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 12px;
    transition: 0.2s;
    white-space: nowrap;
}

.cap-content a:hover {
    color: var(--x-blue);
    transform: translateX(5px);
}

/* --- NEWSLETTER FORM STYLE --- */
.newsletter-box {
    max-width: 400px;
    width: 100%;
    text-align: left;
}

.newsletter-box h4 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.newsletter-box p {
    font-size: 14px;
    color: #9CA3AF;
    line-height: 1.5;
    margin-bottom: 0;
}

.newsletter-group {
    display: flex;
    width: 100%;
}

.newsletter-input {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--x-border);
    color: #fff;
    font-size: 14px;
    padding: 12px 15px;
    border-radius: 6px 0 0 6px;
    border-right: none;
    outline: none;
    transition: 0.3s;
}

.newsletter-input::placeholder {
    color: #6B7280;
}

.newsletter-input:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: var(--x-blue);
}

.newsletter-btn {
    background-color: var(--x-blue);
    color: #fff;
    padding: 0 25px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: 0.3s;
}

.newsletter-btn:hover {
    background-color: var(--x-blue-hover);
}

.form-check-input {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--x-border);
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--x-blue);
    border-color: var(--x-blue);
}
.form-check-label {
    font-size: 12px;
    color: #9CA3AF;
    margin-left: 5px;
    cursor: pointer;
}
.form-check-label a {
    color: #D1D5DB;
    text-decoration: underline;
}
.form-check-label a:hover {
    color: #fff;
}


/* =================================================================
   3. ABOUT US (NESTED DROPDOWN)
   ================================================================= */
.dropdown-menu-custom {
    width: 260px;
    padding: 10px 0;
}

.dropdown-menu-custom li {
    list-style: none;
    position: relative;
}

.dropdown-menu-custom a {
    display: block;
    padding: 10px 20px;
    color: var(--x-text-muted);
    text-decoration: none;
    font-size: 14px;
}

.dropdown-menu-custom a:hover {
    background-color: var(--x-hover);
    color: #fff;
}

.nested-dropdown {
    position: absolute;
    left: 100%;
    top: -10px;
    width: 260px;
    background-color: var(--x-dark-light);
    border: 1px solid var(--x-border);
    list-style: none;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: 0.3s;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.5);
    border-radius: 6px;
}

.has-nested:hover .nested-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}


/* =================================================================
   MOBILE NAVIGATION (NEW FULL SCREEN STYLE)
   ================================================================= */

/* The Hamburger Trigger in Main Navbar */
.mobile-toggle {
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    padding: 5px;
}

/* The Full Screen Overlay */
.mobile-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--x-dark);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 10000; /* Above everything */
    display: flex;
    flex-direction: column;
}

.mobile-menu-container.active {
    transform: translateX(0);
}

/* Mobile Header (Logo + Close X) */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 80px; /* Match main header height */
    border-bottom: 1px solid var(--x-border);
    flex-shrink: 0;
}

.close-btn {
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    transition: 0.2s;
}
.close-btn:hover {
    color: var(--x-text-muted);
}

/* Scrollable Area */
.mobile-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

/* Menu Items */
.mobile-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-item > a, .mobile-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
}

/* Simple Submenu */
.mobile-sub {
    list-style: none;
    background-color: #0f151f;
    padding: 0;
}

.mobile-sub li a {
    display: block;
    padding: 15px 30px;
    color: var(--x-text-muted);
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

/* Grouped Submenu (Capabilities) */
.mobile-sub-scroll {
    background-color: #0f151f;
    padding: 20px 30px;
}

.mobile-group {
    margin-bottom: 25px;
}

.mobile-group:last-child {
    margin-bottom: 0;
}

.mobile-group-title {
    font-size: 12px;
    text-transform: uppercase;
    color: #6B7280;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.mobile-group ul {
    list-style: none;
    padding: 0;
}

.mobile-group ul li a {
    display: block;
    padding: 8px 0;
    color: #D1D5DB;
    font-size: 14px;
    text-decoration: none;
}

.mobile-group ul li a:hover {
    color: var(--x-blue);
    padding-left: 5px;
}


/* =================================================================
   UTILITIES / MEDIA QUERIES
   ================================================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 991px) {
    .logo-sub {
        display: none;
    }
    .xekera-header .container-fluid {
        padding-left: 20px;
        padding-right: 20px;
    }
    .nav-left {
        gap: 0;
    }
}
