/* ============================================
   MOBILE NAVIGATION - Bottom Fixed Bar
   
   Purpose: Mobile-specific navigation bar
   - Fixed bottom positioning
   - Text-based navigation links
   - Liquid glass styling matching header
   - Active state indicators
   
   Dependencies: core.css, layout.css
   Activation: max-width: 768px
   Updated: 2025
   ============================================ */


/* ============================================
   MOBILE BOTTOM NAVIGATION BAR
   Only visible on mobile devices
   ============================================ */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        /* Fixed positioning at bottom */
        position: fixed;
        bottom: 4mm;
        left: 50%;
        transform: translateX(-50%);
        z-index: 101; /* Above header */
        
        /* Flexbox layout */
        display: flex;
        align-items: center;
        justify-content: center;
        
        /* Responsive sizing */
        width: auto;
        max-width: calc(100vw - 16mm);
        padding: 12px 18px;
        border-radius: 30px;
        box-sizing: border-box;
        
        /* LIQUID GLASS EFFECT - Matches header styling */
        background-color: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(45px);
        -webkit-backdrop-filter: blur(45px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 12px 60px rgba(0, 0, 0, 0.35), 
                    inset 0 0 0 0 rgba(255, 255, 255, 0.1);
    }

    /* Navigation container */
    .mobile-bottom-nav nav {
        display: flex;
        gap: 5px;
        padding: 0;
        margin: 0;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        max-width: 100%;
    }

    /* Individual navigation links */
    .mobile-bottom-nav nav a {
        /* Typography */
        font-size: 2.8vw;
        font-weight: 500;
        color: var(--text-color-dark);
        white-space: nowrap;
        letter-spacing: 0.02em;
        line-height: 1.3;
        
        /* Layout */
        padding: 7px 11px;
        border-radius: 18px;
        display: inline-block;
        
        /* Smooth transitions */
        transition: color 0.3s ease, 
                    background-color 0.3s ease;
    }

    /* Hover and active states */
    .mobile-bottom-nav nav a:hover,
    .mobile-bottom-nav nav a:active,
    .mobile-bottom-nav nav a.active {
        color: var(--accent-color);
        background-color: rgba(255, 255, 255, 0.15);
    }
}


/* ============================================
   RESPONSIVE MOBILE NAV SIZING
   Adjust for different mobile screen sizes
   ============================================ */

/* Small phones (320px - 480px) */
@media (max-width: 480px) {
    .mobile-bottom-nav {
        max-width: calc(100vw - 12mm);
        padding: 10px 14px;
    }
    
    .mobile-bottom-nav nav a {
        font-size: 3vw;
        padding: 6px 9px;
    }
}

/* Extra small phones (320px and below) */
@media (max-width: 320px) {
    .mobile-bottom-nav {
        max-width: calc(100vw - 8mm);
        padding: 8px 12px;
    }
    
    .mobile-bottom-nav nav a {
        font-size: 3.2vw;
        padding: 5px 8px;
    }
}


/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   Special handling for mobile landscape mode
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-bottom-nav {
        bottom: 2mm; /* Closer to bottom in landscape */
        padding: 8px 14px;
    }
    
    .mobile-bottom-nav nav a {
        font-size: 2.5vw;
        padding: 5px 9px;
    }
}


/* ============================================
   MOBILE NAV Z-INDEX MANAGEMENT
   Ensure proper layering
   ============================================ */
@media (max-width: 768px) {
    /* Bottom nav above most content */
    .mobile-bottom-nav {
        z-index: 101;
    }
    
    /* Top header below bottom nav */
    .main-header {
        z-index: 100;
    }
    
    /* Navigation circles at same level as header */
    .nav-circles {
        z-index: 100;
    }
}


/* ============================================
   TOUCH OPTIMIZATION
   Better tap targets for mobile
   ============================================ */
@media (max-width: 768px) {
    .mobile-bottom-nav nav a {
        /* Minimum tap target size (WCAG 2.1) */
        min-width: 44px;
        min-height: 36px;
        
        /* Center text in tap area */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Active/touch feedback */
    .mobile-bottom-nav nav a:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}


/* ============================================
   SAFE AREA INSETS
   Handle iPhone notch and home indicator
   ============================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .mobile-bottom-nav {
            /* Add safe area padding */
            padding-bottom: calc(12px + env(safe-area-inset-bottom));
            bottom: 0;
        }
        
        /* Adjust content wrapper for safe area */
        .content-wrapper {
            padding-bottom: calc(70px + 4mm + env(safe-area-inset-bottom));
        }
    }
}


/* ============================================
   ACCESSIBILITY - MOBILE NAV
   Screen reader and keyboard support
   ============================================ */
@media (max-width: 768px) {
    /* Focus indicator for keyboard navigation */
    .mobile-bottom-nav nav a:focus-visible {
        outline: 3px solid var(--accent-color);
        outline-offset: 2px;
    }
    
    /* Hide focus outline on touch */
    .mobile-bottom-nav nav a:focus:not(:focus-visible) {
        outline: none;
    }
}


/* ============================================
   END OF MOBILE NAVIGATION
   This file is only active on mobile devices
   ============================================ */
