/**
 * ZEDEC Mobile Navigation - Complete Responsive System
 * Trust ID: 441110111613564144
 * Ensures ALL menu options are visible on mobile devices
 */

/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE NAVIGATION PANEL - Slide-out drawer
   ═══════════════════════════════════════════════════════════════════════════════ */

.mobile-nav-panel {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    background: linear-gradient(180deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
    border-right: 2px solid rgba(0, 255, 136, 0.4);
    z-index: 10001;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.8);
}

.mobile-nav-panel.active {
    left: 0;
}

/* Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

body.mobile-nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE NAV HEADER
   ═══════════════════════════════════════════════════════════════════════════════ */

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    background: rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00ff88;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.mobile-nav-logo img {
    height: 32px;
    width: auto;
}

.mobile-nav-close {
    width: 44px;
    height: 44px;
    background: rgba(255, 0, 100, 0.15);
    border: 1px solid rgba(255, 0, 100, 0.4);
    border-radius: 50%;
    color: #ff0066;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.mobile-nav-close:hover,
.mobile-nav-close:active {
    background: rgba(255, 0, 100, 0.3);
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE NAV LINKS - ALL OPTIONS VISIBLE
   ═══════════════════════════════════════════════════════════════════════════════ */

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    color: #e0e0e0;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active,
.mobile-nav-link.active {
    background: rgba(0, 255, 136, 0.1);
    border-left-color: #00ff88;
    color: #00ff88;
}

.mobile-nav-link-icon {
    font-size: 1.3rem;
    width: 28px;
    text-align: center;
}

/* Section dividers */
.mobile-nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    margin: 10px 20px;
}

.mobile-nav-section-title {
    padding: 12px 24px 8px;
    color: #606070;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Share Tech Mono', monospace;
}

/* Special buttons */
.mobile-nav-link.btn-donate {
    margin: 10px 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(0, 204, 255, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 8px;
    justify-content: center;
    border-left: 1px solid rgba(139, 92, 246, 0.5);
}

.mobile-nav-link.btn-donate:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(0, 204, 255, 0.3));
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE NAV FOOTER - Status info
   ═══════════════════════════════════════════════════════════════════════════════ */

.mobile-nav-footer {
    padding: 20px;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    margin-top: auto;
}

.mobile-nav-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mobile-nav-status-item {
    background: rgba(0, 255, 136, 0.05);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.mobile-nav-status-label {
    color: #606070;
    font-size: 0.7rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.mobile-nav-status-value {
    color: #00ff88;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE TOGGLE BUTTON
   ═══════════════════════════════════════════════════════════════════════════════ */

.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-radius: 10px;
    color: #00ff88;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:active {
    background: rgba(0, 255, 136, 0.25);
    border-color: #00ff88;
    transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
    /* Show mobile toggle, hide desktop nav */
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .nav-links,
    .desktop-nav-links {
        display: none !important;
    }
    
    .nav-status {
        display: none !important;
    }
    
    .header-ai-search {
        display: none !important;
    }
    
    /* Adjust header layout */
    .main-nav,
    .header-nav {
        justify-content: space-between;
    }
}

@media (min-width: 993px) {
    /* Hide mobile elements on desktop */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-nav-panel,
    .mobile-nav-overlay {
        display: none !important;
    }
    
    .nav-links,
    .desktop-nav-links {
        display: flex !important;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .mobile-nav-panel {
        width: 100%;
        max-width: none;
    }
    
    .mobile-nav-link {
        padding: 18px 20px;
        font-size: 1.15rem;
    }
}

/* Safe area insets for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
    .mobile-nav-panel {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .mobile-nav-header {
        padding-top: calc(20px + env(safe-area-inset-top));
    }
}

/* Animation for menu items */
.mobile-nav-panel.active .mobile-nav-link {
    animation: slideInLeft 0.3s ease forwards;
    opacity: 0;
}

.mobile-nav-panel.active .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-nav-panel.active .mobile-nav-link:nth-child(2) { animation-delay: 0.08s; }
.mobile-nav-panel.active .mobile-nav-link:nth-child(3) { animation-delay: 0.11s; }
.mobile-nav-panel.active .mobile-nav-link:nth-child(4) { animation-delay: 0.14s; }
.mobile-nav-panel.active .mobile-nav-link:nth-child(5) { animation-delay: 0.17s; }
.mobile-nav-panel.active .mobile-nav-link:nth-child(6) { animation-delay: 0.20s; }
.mobile-nav-panel.active .mobile-nav-link:nth-child(7) { animation-delay: 0.23s; }
.mobile-nav-panel.active .mobile-nav-link:nth-child(8) { animation-delay: 0.26s; }
.mobile-nav-panel.active .mobile-nav-link:nth-child(9) { animation-delay: 0.29s; }
.mobile-nav-panel.active .mobile-nav-link:nth-child(10) { animation-delay: 0.32s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .mobile-nav-panel,
    .mobile-nav-overlay,
    .mobile-nav-link {
        transition: none;
        animation: none;
    }
    
    .mobile-nav-panel.active .mobile-nav-link {
        opacity: 1;
    }
}
