/* AMAZING MOBILE MENU STYLES */

/* Hamburger Button - Hidden by default */
.mobile-menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    align-items: center;
    justify-content: center;
    /* Reset button styles */
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: inherit;
    text-decoration: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
}

button.mobile-menu-toggle {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Show on mobile, hide desktop menu */
@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .nav-menu {
        display: none !important;
    }
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Hamburger Lines */
.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: white;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger span:nth-child(1) {
    top: 0px;
}

.hamburger span:nth-child(2) {
    top: 9px;
}

.hamburger span:nth-child(3) {
    top: 18px;
}

/* Hamburger Animation to X */
.mobile-menu-toggle.active .hamburger span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998 !important;
}

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

/* Mobile Menu Panel */
.mobile-nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh !important;
    background-color: #0a0e27 !important;
    background-image: linear-gradient(135deg, #1a1f3a 0%, #0f1629 100%) !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999 !important;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex !important;
    flex-direction: column !important;
    color: white !important;
}

.mobile-nav-menu.active {
    right: 0 !important;
    display: flex !important;
}

/* Mobile Menu Header */
.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(139, 92, 246, 0.1);
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

.mobile-menu-logo svg {
    width: 40px;
    height: 40px;
    fill: #8b5cf6;
}

.mobile-menu-logo span {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

/* Mobile Menu Content */
.mobile-menu-content {
    padding: 20px;
    flex: 1;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
    transition: left 0.5s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: rgba(139, 92, 246, 0.15);
    color: white;
    transform: translateX(5px);
}

.mobile-nav-link:hover::before {
    left: 100%;
}

/* Mobile Menu CTA Buttons */
.mobile-menu-cta {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-btn {
    display: block;
    padding: 14px 24px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.mobile-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

.mobile-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Slide-in Animation for Links */
.mobile-nav-menu.active .mobile-nav-link {
    animation: slideInRight 0.4s ease forwards;
    opacity: 0;
}

.mobile-nav-menu.active .mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav-menu.active .mobile-nav-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-nav-menu.active .mobile-nav-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav-menu.active .mobile-nav-link:nth-child(4) { animation-delay: 0.25s; }
.mobile-nav-menu.active .mobile-nav-link:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Small Mobile Adjustments */
@media screen and (max-width: 480px) {
    .mobile-nav-menu {
        width: 90%;
    }
    
    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
    }
    
    .mobile-nav-link {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .mobile-menu-header {
        padding: 16px;
    }
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Ensure all mobile menu text is visible and dark background */
.mobile-nav-menu,
.mobile-nav-menu * {
    color: white !important;
    background-color: transparent !important;
}

.mobile-nav-menu {
    background-color: #0a0e27 !important;
}

.mobile-nav-menu a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    background: transparent !important;
}

.mobile-nav-menu a:hover {
    color: white !important;
    background: rgba(139, 92, 246, 0.15) !important;
}

/* Prevent any white backgrounds */
.mobile-menu-header,
.mobile-menu-content,
.mobile-menu-cta,
.mobile-menu-nav {
    background: transparent !important;
    color: white !important;
}

/* Mobile header positioning */
@media screen and (max-width: 768px) {
    .navbar {
        position: relative !important;
        top: auto !important;
        width: 100% !important;
        z-index: 1000 !important;
    }
    
    body {
        padding-top: 0 !important;
    }
}