/* ========================================
   Mobile Menu Styles
   ======================================== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    width: 20px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 1002;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Ensure hamburger is visible on white background when scrolled */
    .navbar.scrolled .mobile-menu-toggle span {
        background-color: #1a1a1a !important;
    }
    
    /* Add slight shadow for better visibility */
    .navbar.scrolled .mobile-menu-toggle {
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    }
}

.mobile-menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.mobile-menu-toggle span:nth-child(1) {
    top: 0;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle span:nth-child(3) {
    bottom: 0;
}

/* Active state (X) */
.mobile-menu-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Scrolled navbar toggle */
.navbar.scrolled .mobile-menu-toggle span {
    background-color: #333333 !important;
}

/* When menu is active and navbar is scrolled */
.navbar.scrolled .mobile-menu-toggle.active span {
    background-color: #333333 !important;
}

/* Mobile Menu Container */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a3e 0%, #0d0d2b 100%);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

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

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

/* Mobile Menu Header */
.mobile-menu-header {
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-logo img {
    height: 30px;
    filter: brightness(0) invert(1);
}

.mobile-menu-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--white);
    font-size: 24px;
    transition: transform 0.3s ease;
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
}

/* Mobile Menu Navigation */
.mobile-menu-nav {
    flex: 1;
    padding: 30px;
}

.mobile-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-nav > ul > li {
    margin-bottom: 10px;
}

.mobile-menu-nav a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-menu-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

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

.mobile-menu-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Mobile Submenu */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu.active {
    max-height: 500px;
}

.mobile-submenu ul {
    padding-left: 20px;
    padding-top: 10px;
}

.mobile-submenu a {
    font-size: 16px;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.8);
}

.mobile-submenu a:hover {
    color: var(--accent-fuchsia);
    background: rgba(255, 0, 128, 0.1);
}

/* Dropdown Arrow */
.has-submenu > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.has-submenu.active > a::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-cta {
    display: block;
    text-align: center;
    padding: 15px 30px;
    background: var(--gradient);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 0, 128, 0.3);
}

.mobile-menu-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 0, 128, 0.4);
}

.mobile-menu-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.mobile-menu-phone i {
    color: var(--accent-fuchsia);
}

.mobile-menu-phone:hover {
    color: var(--accent-fuchsia);
}

/* Mobile Menu Social Links */
.mobile-menu-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.mobile-menu-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-menu-social a:hover {
    background: var(--accent-fuchsia);
    transform: translateY(-3px);
}

/* Animations */
@keyframes slideInMenu {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Menu item stagger animation */
.mobile-menu.active .mobile-menu-nav > ul > li {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .mobile-menu {
        width: 90%;
    }
    
    .mobile-menu-nav a {
        font-size: 16px;
        padding: 2px 5px;
    }
    
    .mobile-menu-header,
    .mobile-menu-nav,
    .mobile-menu-footer {
        padding: 20px;
    }
    .has-submenu {
        padding: 2px 5px 2px 0;
    }
}
