/* =====================================================
   HEADER CSS - AS GAMES (FULL-WIDTH MEGA MENU FIX)
===================================================== */

/* =====================================================
   HEADER 1 - MAIN HEADER WITH TOPBAR
===================================================== */
.header-one {
    position: relative;
    z-index: 999;
    background: var(--white);
}

/* =====================================================
   HEADER 2 - SCROLL STICKY HEADER
===================================================== */
.header-two {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: var(--white);
    transform: translateY(-110%);
    transition: transform 0.45s cubic-bezier(.4, 0, .2, 1), box-shadow 0.3s ease;
    box-shadow: var(--shadow-md);
}

.header-two.show {
    transform: translateY(0);
}

.header-two .header-main-inner {
    min-height: 75px;
}

/* =====================================================
   TOP BAR
===================================================== */
.header-top {
    height: 48px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.header-top .container {
    height: 100%;
}

.header-top-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    height: 100%;
    display: flex;
    align-items: center;
}

.header-action {
    width: 44px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-subtle);
    text-decoration: none;
    border-left: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.header-action:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

.dashboard-link {
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 14px;
    text-decoration: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.dashboard-link:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

/* =====================================================
   MAIN HEADER
===================================================== */
.header-main {
    background: var(--white);
    position: relative;
}

.header-main-inner {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* LOGO */
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo img {
    max-height: 65px;
    width: auto;
    object-fit: contain;
}

.header-two .site-logo img {
    max-height: 55px;
}

/* =====================================================
   DESKTOP NAVIGATION
===================================================== */
.desktop-nav {
    flex: 1;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: static;
}

.header-two .desktop-nav {
    height: 75px;
}

/* Rainbow Accent Line under Nav */
.desktop-nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--primary-color) 0%,
        var(--primary-color) 16%,
        var(--secondary-color) 16%,
        var(--secondary-color) 32%,
        var(--accent-red) 32%,
        var(--accent-red) 49%,
        var(--accent-green) 49%,
        var(--accent-green) 66%,
        var(--accent-cyan) 66%,
        var(--accent-cyan) 83%,
        var(--accent-pink) 83%,
        var(--accent-pink) 100%
    );
}


.header-main::before, .header-main-inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--primary-color) 0%,
        var(--primary-color) 16%,
        var(--secondary-color) 16%,
        var(--secondary-color) 32%,
        var(--accent-red) 32%,
        var(--accent-red) 49%,
        var(--accent-green) 49%,
        var(--accent-green) 66%,
        var(--accent-cyan) 66%,
        var(--accent-cyan) 83%,
        var(--accent-pink) 83%,
        var(--accent-pink) 100%
    );
}

.nav-item {
    height: 80px;
    display: flex;
    align-items: center;
    position: static;
}

.header-two .nav-item {
    height: 75px;
}

.has-mega-menu {
    position: static;
}

.nav-link {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 18px;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color 0.25s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Arrow indicator on hover for items with submenus */
.has-mega-menu > .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(100%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--white);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1001;
}

.has-mega-menu:hover > .nav-link::after {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   MEGA MENU DROPDOWN (FULL WIDTH CONTAINER)
===================================================== */
.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    width: 100%;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mega-menu-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    padding: 35px 0;
}

.mega-column {
    min-width: 200px;
    flex: 1;
    max-width: 320px;
}

.mega-column h5 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
}

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

.mega-column ul li {
    margin-bottom: 10px;
}

.mega-column ul li a {
    color: var(--text-body);
    font-size: 15px;
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-block;
}

.mega-column ul li a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* =====================================================
   MOBILE BUTTON & SIDEBAR
===================================================== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition-base);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--white);
    z-index: 99999;
    transition: right 0.35s cubic-bezier(.4, 0, .2, 1);
    padding: 20px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.mobile-logo img {
    max-height: 48px;
    width: auto;
}

.mobile-close {
    background: transparent;
    border: none;
    font-size: 26px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.mobile-navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-item {
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 0;
    cursor: pointer;
    text-align: left;
}

.mobile-menu-link i {
    font-size: 14px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.mobile-menu-item.has-submenu.active .mobile-menu-link i {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;
    padding-left: 12px;
    padding-top: 8px;
    padding-bottom: 5px;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-item.has-submenu.active .mobile-submenu {
    display: flex !important;
}

.mobile-submenu a {
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.mobile-submenu a:hover {
    color: var(--primary-color);
}

.mobile-sub-title {
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 10px;
    margin-bottom: 4px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Actions in Drawer */
.mobile-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.mobile-action-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
}

/* =====================================================
   RESPONSIVE MEDIA QUERIES
===================================================== */
@media (max-width: 991px) {
    .desktop-nav {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    .header-top {
        display: none;
    }

    .header-main-inner {
        min-height: 70px;
    }

    .site-logo img {
        max-height: 50px;
    }
}