/* ═══════════════════════════════════════════════════════════════
   MOBILE NAVIGATION MENU - Custom Hamburger Menu
   Beautiful mobile menu with three-line hamburger icon
   ═══════════════════════════════════════════════════════════════ */

/* Mobile Hamburger Menu Button - Top Left Corner */
.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10001;
    width: 50px;
    height: 50px;
    background: rgba(16, 53, 136, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mobile-menu-toggle:hover {
    background: rgba(16, 53, 136, 1);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.mobile-menu-toggle.active {
    background: rgba(255, 215, 0, 0.95);
    border-color: rgba(255, 215, 0, 0.8);
}

/* Three Lines Hamburger Icon */
.mobile-menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 28px;
    background: #ffffff;
    border-radius: 3px;
    opacity: 1;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

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

.mobile-menu-toggle span:nth-child(2) {
    top: 23px;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 32px;
}

/* Transform to X when active */
.mobile-menu-toggle.active span:nth-child(1) {
    top: 23px;
    transform: translateX(-50%) rotate(45deg);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    top: 23px;
    transform: translateX(-50%) rotate(-45deg);
}

/* Mobile Navigation Drawer - Slides from Right */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    left: auto;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(11, 58, 102, 0.98) 0%, rgba(16, 53, 136, 0.98) 100%);
    backdrop-filter: blur(20px);
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-nav-drawer.active {
    right: 0;
    left: auto;
}

@media (max-width: 991px) {
    .mobile-nav-drawer {
        top: 65px; /* Below mobile navbar */
        height: calc(100vh - 65px);
    }
}

/* Overlay when menu is open */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

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

.mobile-nav-logo {
    max-width: 120px;
    height: auto;
}

.mobile-nav-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-nav-close:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: rotate(90deg);
}

/* Mobile Menu List */
.mobile-nav-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.mobile-nav-menu li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-menu li:last-child {
    border-bottom: none;
}

.mobile-nav-menu a {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-nav-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ffd700 0%, #ffed4e 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a.active {
    background: rgba(255, 215, 0, 0.15);
    padding-left: 28px;
    color: #ffd700;
}

.mobile-nav-menu a:hover::before,
.mobile-nav-menu a.active::before {
    transform: scaleY(1);
}

/* Mobile Menu Icon */
.mobile-nav-menu a i {
    margin-right: 15px;
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* Theme Toggle in Mobile Menu */
.mobile-nav-theme-toggle {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
}

.mobile-nav-theme-toggle label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* Contact Info in Mobile Menu */
.mobile-nav-contact {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.mobile-nav-contact-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    color: #ffffff;
    font-size: 14px;
    text-decoration: none;
}

.mobile-nav-contact-item i {
    margin-right: 12px;
    font-size: 18px;
    color: #ffd700;
}

.mobile-nav-contact-item:hover {
    color: #ffd700;
}

/* Show mobile menu only on mobile devices */
@media (max-width: 991px) {
    /* Hamburger is now in mobile-top-navbar, so this is handled there */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide desktop navbar on mobile */
    .main-navbar {
        display: none !important;
    }
}

/* Extra small devices */
@media (max-width: 575px) {
    .mobile-menu-toggle {
        width: 45px;
        height: 45px;
        top: 12px;
        left: 12px;
    }
    
    .mobile-menu-toggle span {
        width: 24px;
    }
    
    .mobile-nav-drawer {
        width: 90%;
        max-width: 280px;
    }
    
    .mobile-nav-menu a {
        padding: 16px 18px;
        font-size: 15px;
    }
    
    .rotating-3d-logo {
        left: 65px !important;
    }
}

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

/* Smooth animations */
@keyframes slideInLeft {
    from {
        left: -100%;
    }
    to {
        left: 0;
    }
}

@keyframes slideOutLeft {
    from {
        left: 0;
    }
    to {
        left: -100%;
    }
}

/* Dark theme adjustments */
.theme-dark .mobile-nav-drawer {
    background: linear-gradient(135deg, rgba(11, 58, 102, 0.98) 0%, rgba(16, 53, 136, 0.98) 100%);
}

.theme-light .mobile-nav-drawer {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 247, 250, 0.98) 100%);
}

.theme-light .mobile-nav-menu a {
    color: #333333;
}

.theme-light .mobile-nav-menu a:hover,
.theme-light .mobile-nav-menu a.active {
    color: #103588;
    background: rgba(16, 53, 136, 0.1);
}

.theme-light .mobile-nav-close {
    color: #333333;
}

.theme-light .mobile-nav-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.theme-light .mobile-nav-contact-item {
    color: #333333;
}

.theme-light .mobile-nav-theme-toggle label {
    color: #333333;
}
