/**
 * Mobile Navigation CSS - Premium Design
 * Impressive sidebar with animated hamburger
 */

/* ===== MOBILE NAV OVERLAY ===== */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(24, 0, 173, 0.3) 100%);
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ===== HAMBURGER BUTTON ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    padding: 12px;
    cursor: pointer;
    z-index: 10001;
    background: transparent;
    border: none;
    gap: 6px;
    position: relative;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, #FEB600 0%, #ffffff 100%);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

/* Hamburger hover effect */
.hamburger:hover span {
    background: #FEB600;
}

.hamburger:hover span:nth-child(1) {
    transform: translateX(4px);
}

.hamburger:hover span:nth-child(3) {
    transform: translateX(-4px);
}

/* Hamburger active state - X animation */
.hamburger.active span {
    background: #FEB600;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== MOBILE STYLES ===== */
@media screen and (max-width: 991px) {

    /* Force hamburger visible */
    .hamburger {
        display: flex !important;
    }

    .nav-cta,
    .hide-mobile {
        display: none !important;
    }

    /* ===== PREMIUM SIDEBAR ===== */
    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 300px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        background: linear-gradient(180deg, #0a0a1a 0%, #12122a 50%, #0a0a1a 100%) !important;
        display: flex !important;
        flex-direction: column !important;
        z-index: 9999 !important;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        overflow-y: auto !important;
        list-style: none !important;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5),
            -2px 0 10px rgba(24, 0, 173, 0.3) !important;
        border-left: 1px solid rgba(254, 182, 0, 0.2) !important;
    }

    .nav-links.active {
        right: 0 !important;
    }

    /* Sidebar header space */
    .nav-links::before {
        content: '';
        display: block;
        height: 80px;
        min-height: 80px;
        background: linear-gradient(135deg, rgba(24, 0, 173, 0.3) 0%, rgba(254, 182, 0, 0.1) 100%);
        border-bottom: 1px solid rgba(254, 182, 0, 0.2);
    }

    /* Nav items */
    .nav-links li {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        display: block !important;
        opacity: 0;
        transform: translateX(20px);
        animation: none;
    }

    .nav-links.active li {
        animation: slideInLink 0.4s forwards;
    }

    .nav-links.active li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        animation-delay: 0.15s;
    }

    .nav-links.active li:nth-child(3) {
        animation-delay: 0.2s;
    }

    .nav-links.active li:nth-child(4) {
        animation-delay: 0.25s;
    }

    .nav-links.active li:nth-child(5) {
        animation-delay: 0.3s;
    }

    .nav-links.active li:nth-child(6) {
        animation-delay: 0.35s;
    }

    .nav-links.active li:nth-child(7) {
        animation-delay: 0.4s;
    }

    @keyframes slideInLink {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Nav links styling */
    .nav-links li a,
    .nav-links a {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        padding: 18px 28px !important;
        font-size: 17px !important;
        font-weight: 500 !important;
        letter-spacing: 0.5px !important;
        color: #e0e0e0 !important;
        text-decoration: none !important;
        background: transparent !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        transition: all 0.3s ease !important;
        position: relative !important;
    }

    /* Hover indicator line */
    .nav-links li a::before {
        content: '' !important;
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 3px !important;
        height: 0 !important;
        background: linear-gradient(180deg, #FEB600 0%, #1800AD 100%) !important;
        border-radius: 0 3px 3px 0 !important;
        transition: height 0.3s ease !important;
    }

    .nav-links li a:hover::before,
    .nav-links li a:focus::before,
    .nav-links li a.active::before {
        height: 60% !important;
    }

    .nav-links li a:hover,
    .nav-links a:hover,
    .nav-links li a:focus,
    .nav-links a:focus {
        color: #FEB600 !important;
        background: rgba(254, 182, 0, 0.05) !important;
        padding-left: 36px !important;
    }

    /* Active page indicator */
    .nav-links li a.active {
        color: #FEB600 !important;
        background: rgba(254, 182, 0, 0.08) !important;
    }

    .nav-links a::after {
        display: none !important;
    }

    /* ===== MOBILE DROPDOWN SUBMENU ===== */
    .nav-dropdown {
        position: relative !important;
    }

    .nav-dropdown>a {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .nav-dropdown>a::after {
        content: '' !important;
        display: block !important;
        width: 8px !important;
        height: 8px !important;
        border: solid currentColor !important;
        border-width: 0 2px 2px 0 !important;
        transform: rotate(45deg) !important;
        margin-left: auto !important;
        margin-right: 10px !important;
        transition: transform 0.3s ease !important;
    }

    .nav-dropdown.open>a::after {
        transform: rotate(-135deg) !important;
    }

    .nav-dropdown .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        min-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease !important;
    }

    .nav-dropdown.open .dropdown-menu {
        max-height: 500px;
        padding: 0.5rem 0 !important;
    }

    .nav-dropdown .dropdown-menu li {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .nav-dropdown .dropdown-menu li a {
        padding: 14px 28px 14px 48px !important;
        font-size: 15px !important;
        color: #b0b0b0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    }

    .nav-dropdown .dropdown-menu li a::before {
        content: '→' !important;
        position: absolute !important;
        left: 28px !important;
        color: var(--secondary) !important;
        font-size: 12px !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .nav-dropdown .dropdown-menu li a:hover,
    .nav-dropdown .dropdown-menu li a.active {
        color: #FEB600 !important;
        background: rgba(254, 182, 0, 0.08) !important;
        padding-left: 54px !important;
    }

    /* Body scroll lock */
    body.nav-open {
        overflow: hidden !important;
    }
}

/* ===== EXTRA SMALL SCREENS ===== */
@media screen and (max-width: 480px) {
    .nav-links {
        width: 100% !important;
        max-width: 100% !important;
    }
}