/*
==================================================
MOBILE BOTTOM STICKY NAVIGATION STYLES
==================================================
*/

/* Hide bottom nav on desktop and larger tablets */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 820px) {
    .mobile-bottom-nav {
        display: block;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 10px;
        z-index: 80; /* Higher than sticky header (50) and content (1), lower than overlays (100) */
        pointer-events: none; /* Allow click-throughs to content behind the margin gaps */
    }

    .mobile-bottom-nav-container {
        pointer-events: auto; /* Re-enable mouse/touch pointer events for footer */
        display: flex;
        align-items: center;
        justify-content: space-around;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(11, 60, 93, 0.10); /* rgba(11,60,93,0.10) as requested */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        border-radius: 40px; /* Fully rounded floating container style */
        padding: 6px 12px;
        padding-bottom: calc(6px + env(safe-area-inset-bottom)); /* iPhone Safe Area Support */
        height: 64px;
        box-sizing: content-box;
    }

    .mobile-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 48px;
        min-width: 44px; /* Accessible 44px touch width */
        color: #7c8ba1;
        text-decoration: none;
        transition: transform 0.15s ease, color 0.15s ease;
        position: relative;
    }

    /* Inactive style */
    .mobile-bottom-nav-item .mobile-nav-icon {
        width: 22px;
        height: 22px;
        fill: #7c8ba1;
        transition: fill 0.15s ease;
    }

    .mobile-bottom-nav-item .mobile-nav-label {
        font-size: 10px;
        font-family: 'Montserrat', sans-serif;
        font-weight: 600;
        margin-top: 3px;
        line-height: 1;
    }

    /* Active state styling */
    .mobile-bottom-nav-item.active {
        color: #0B3C5D; /* Dark Navy active state text */
    }

    .mobile-bottom-nav-item.active .mobile-nav-icon {
        fill: #0B3C5D; /* Dark Navy active state icon */
    }

    /* Small dot below active item */
    .mobile-bottom-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        width: 4px;
        height: 4px;
        background-color: #FFC107; /* Safety Yellow active indicator dot */
        border-radius: 50%;
    }

    /* WhatsApp Item Hover/Active styling */
    .mobile-bottom-nav-item.whatsapp-item:hover,
    .mobile-bottom-nav-item.whatsapp-item:active {
        color: #25D366 !important;
    }

    .mobile-bottom-nav-item.whatsapp-item:hover .mobile-nav-icon,
    .mobile-bottom-nav-item.whatsapp-item:active .mobile-nav-icon {
        fill: #25D366 !important;
    }

    /* Touch Feedback (Scale Press) */
    .mobile-bottom-nav-item:active,
    .mobile-bottom-nav-call-btn:active {
        transform: scale(0.96);
    }

    /* Center Call Button wrapper & positioning */
    .mobile-bottom-nav-call-wrapper {
        position: relative;
        width: 64px;
        height: 64px;
        flex-shrink: 0;
        margin-top: -24px; /* Rise above the footer */
        z-index: 85;
    }

    .mobile-bottom-nav-call-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px; /* 56px x 56px target as recommended */
        background-color: #FFC107; /* Safety Yellow */
        border-radius: 50%;
        color: #0B3C5D; /* Dark Navy phone icon */
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
        margin: 4px auto;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
        border: 2px solid #FFFFFF;
    }

    .mobile-bottom-nav-call-btn svg {
        width: 24px;
        height: 24px;
        fill: #0B3C5D;
    }

    .mobile-bottom-nav-call-btn .mobile-call-label {
        font-size: 8px;
        font-family: 'Montserrat', sans-serif;
        font-weight: 800;
        letter-spacing: 0.5px;
        margin-top: 1px;
    }

    /* Subtle pulsing micro-animation for Call Button */
    @keyframes callPulse {
        0% {
            box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4), 0 0 0 0px rgba(211, 47, 47, 0.7);
        }
        70% {
            box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4), 0 0 0 12px rgba(211, 47, 47, 0);
        }
        100% {
            box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4), 0 0 0 0px rgba(211, 47, 47, 0);
        }
    }

    .mobile-bottom-nav-call-btn {
        animation: callPulse 1.8s infinite;
    }

    /* Disable animations if reduced motion is preferred */
    @media (prefers-reduced-motion: reduce) {
        .mobile-bottom-nav-call-btn {
            animation: none !important;
        }
        .mobile-bottom-nav-item,
        .mobile-bottom-nav-call-btn {
            transition: none !important;
        }
    }

    /* Spacing adjustments for very small screens (<= 360px) */
    @media (max-width: 360px) {
        .mobile-bottom-nav-item .mobile-nav-label {
            font-size: 9px !important;
        }
        .mobile-bottom-nav-item .mobile-nav-icon {
            width: 20px;
            height: 20px;
        }
        .mobile-bottom-nav-container {
            padding: 6px 6px;
        }
    }
}

/* Page bottom spacing to prevent overlapping page content */
@media (max-width: 820px) {
    body {
        padding-bottom: 96px !important; /* Dynamic offset height of the mobile footer */
    }
}
