/**
 * HMB FITNESS ZOOM
 * Mobile Navigation & Floating Quick Actions Styling
 */

:root {
    --mobile-bottom-nav-height: 72px;
    --karate-red: #e31b23;
    --karate-navy: #071b2f;
    --karate-navy-light: #102a43;
}

/* ==========================================
   DESKTOP STYLING (HIDDEN BY DEFAULT)
   ========================================== */
@media (min-width: 769px) {
    .mobile-bottom-nav,
    .mobile-contact-actions {
        display: none !important;
    }
}

/* ==========================================
   MOBILE & TABLET STYLING
   ========================================== */
@media (max-width: 768px) {
    /* Safe layout padding to prevent bottom navigation overlaps */
    body {
        padding-bottom: calc(var(--mobile-bottom-nav-height) + 12px + env(safe-area-inset-bottom)) !important;
    }
    
    .footer-site {
        padding-bottom: calc(var(--mobile-bottom-nav-height) + 30px + env(safe-area-inset-bottom)) !important;
    }
    
    /* 1. Mobile Bottom Sticky Navigation */
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: var(--mobile-bottom-nav-height);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 2px solid rgba(227, 27, 35, 0.20);
        box-shadow: 0 -8px 30px rgba(7, 27, 47, 0.12);
        border-radius: 20px 20px 0 0;
        z-index: 9998;
        padding-bottom: env(safe-area-inset-bottom);
        display: block;
        box-sizing: border-box;
    }
    
    .mobile-bottom-nav-container {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 100%;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        padding: 0 10px;
        position: relative;
    }
    
    /* Nav Items */
    .mobile-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        min-height: 56px;
        color: var(--karate-navy);
        text-decoration: none;
        position: relative;
        font-family: 'Montserrat', sans-serif;
        font-weight: 600;
        transition: color 0.25s ease, transform 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-bottom-nav-item i {
        font-size: 20px;
        margin-bottom: 5px;
        transition: transform 0.2s ease;
    }
    
    .mobile-nav-label {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Tapping tactile feedback */
    .mobile-bottom-nav-item:active {
        transform: scale(0.94);
    }
    
    /* 2. Active State Styling */
    .mobile-bottom-nav-item.active {
        color: var(--karate-red);
    }
    
    .mobile-bottom-nav-item.active::before {
        content: "";
        position: absolute;
        top: 0;
        width: 20px;
        height: 3px;
        background: var(--karate-red);
        border-radius: 0 0 2px 2px;
    }
    
    /* 3. Center Highlighted Button (Raised Circle) */
    .mobile-bottom-nav-item.mobile-nav-highlighted {
        overflow: visible;
        margin-top: -14px;
        height: auto;
    }
    
    .mobile-bottom-nav-item.mobile-nav-highlighted .highlight-circle {
        width: 62px;
        height: 62px;
        border-radius: 50%;
        background: linear-gradient(135deg, #e31b23, #b5121b);
        border: 3px solid #ffffff;
        box-shadow: 0 8px 22px rgba(227, 27, 35, 0.35);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        margin-bottom: 4px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        animation: joinPulse 3s infinite ease-in-out;
    }
    
    .mobile-bottom-nav-item.mobile-nav-highlighted .highlight-circle i {
        font-size: 24px;
        margin-bottom: 0;
        color: #ffffff;
    }
    
    .mobile-bottom-nav-item.mobile-nav-highlighted .mobile-nav-label {
        color: var(--karate-navy);
        font-weight: 700;
        font-size: 9px;
    }
    
    .mobile-bottom-nav-item.mobile-nav-highlighted:active .highlight-circle {
        transform: scale(0.92);
        box-shadow: 0 4px 10px rgba(227, 27, 35, 0.2);
    }
    
    /* 4. Floating Contact Actions */
    .mobile-contact-actions {
        position: fixed;
        right: 16px;
        bottom: calc(var(--mobile-bottom-nav-height) + 20px + env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
        gap: 12px;
        z-index: 9000;
        align-items: flex-end;
    }
    
    .mobile-contact-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        color: #ffffff;
        font-size: 24px;
        text-decoration: none;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-contact-btn:active {
        transform: scale(0.92);
    }
    
    /* WhatsApp Color */
    .mobile-contact-btn.btn-whatsapp {
        background: #25D366;
    }
    
    /* Call Button Color */
    .mobile-contact-btn.btn-call {
        background: var(--karate-red);
    }
    
    /* Pill Labels */
    .contact-btn-label {
        position: absolute;
        right: 64px;
        background: rgba(7, 27, 47, 0.9);
        color: #ffffff;
        font-family: 'Montserrat', sans-serif;
        font-size: 11px;
        font-weight: 600;
        padding: 6px 12px;
        border-radius: 6px;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
        transform: translateX(10px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    }
    
    /* Show labels briefly on hover/active touch */
    .mobile-contact-btn:hover .contact-btn-label,
    .mobile-contact-btn:focus .contact-btn-label {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
}

/* ==========================================
   EXTREME SMALL MOBILE SCREEN FIXES
   ========================================== */
@media (max-width: 380px) {
    :root {
        --mobile-bottom-nav-height: 64px;
    }
    
    .mobile-nav-label {
        font-size: 9px;
    }
    
    .mobile-bottom-nav-item i {
        font-size: 18px;
    }
    
    .mobile-bottom-nav-item.mobile-nav-highlighted {
        margin-top: -10px;
    }
    
    .mobile-bottom-nav-item.mobile-nav-highlighted .highlight-circle {
        width: 52px;
        height: 52px;
        border: 2px solid #ffffff;
    }
    
    .mobile-bottom-nav-item.mobile-nav-highlighted .highlight-circle i {
        font-size: 20px;
    }
    
    .mobile-contact-btn {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }
}

/* ==========================================
   PULSE & ANIMATIONS
   ========================================== */
@keyframes joinPulse {
    0%, 100% {
        box-shadow: 0 8px 22px rgba(227, 27, 35, 0.35);
    }
    50% {
        box-shadow: 0 10px 30px rgba(227, 27, 35, 0.55);
    }
}

/* ==========================================
   REDUCED MOTION ACCESSIBILITY
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    .mobile-bottom-nav *,
    .mobile-contact-actions *,
    .highlight-circle {
        animation: none !important;
        transition: none !important;
    }
}
