/* ==========================================================================
   ENHANCED MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS
   ========================================================================== */

/* Universal Mobile Resets */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-tap-highlight-color: transparent;
}

img, svg, video, canvas, iframe {
    max-width: 100%;
    height: auto;
}

/* Prevent auto zoom on iOS / Android touch focus for input fields */
@media (max-width: 768px) {
    input, select, textarea, button {
        font-size: 16px !important;
    }
}

/* Mobile Drawer Mandatory Overrides */
.mobile-drawer .drawer-body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow-y: auto !important;
    margin-bottom: 15px !important;
    padding-right: 4px !important;
}

.mobile-drawer .mobile-nav-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    opacity: 1 !important;
    visibility: visible !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mobile-drawer .mobile-nav-item {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: 100% !important;
}

.mobile-drawer .mobile-nav-link {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    transition: all 0.25s ease !important;
}

.mobile-drawer button.mobile-nav-link {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: inherit !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.mobile-drawer .mobile-nav-link.active,
.mobile-drawer .mobile-nav-link:hover,
.mobile-drawer .mobile-nav-link:active {
    color: var(--clr-gold) !important;
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: rgba(212, 175, 55, 0.4) !important;
}

.mobile-drawer .mobile-submenu {
    padding-left: 12px !important;
    margin-top: 4px !important;
    list-style: none !important;
}

.mobile-drawer .mobile-submenu li a {
    display: block !important;
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 8px !important;
    margin-top: 4px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.mobile-drawer .mobile-submenu li a:hover,
.mobile-drawer .mobile-submenu li a:active {
    color: var(--clr-gold) !important;
    background: rgba(212, 175, 55, 0.1) !important;
    padding-left: 18px !important;
}

@media (max-width: 992px) {
    .nav-menu {
        display: none !important;
    }
    .hamburger-btn {
        display: flex !important;
    }
    .main-header {
        top: 0 !important;
        padding: 10px 0 !important;
        background: rgba(10, 11, 13, 0.95) !important;
    }
    .top-bar {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Reduce global section padding to save screen space */
    .section-padding, section {
        padding: 40px 15px !important;
    }

    /* Fluid Typography for Headers */
    h1, .hero h1 {
        font-size: clamp(1.8rem, 5vw, 2.5rem) !important;
        line-height: 1.25 !important;
    }
    h2, .section-title {
        font-size: clamp(1.5rem, 4vw, 2rem) !important;
    }
    h3 {
        font-size: clamp(1.2rem, 3vw, 1.5rem) !important;
    }
    p {
        font-size: 0.92rem !important;
    }

    /* Force all major grids to stack vertically on tablets/mobile */
    .value-grid, 
    .contact-grid, 
    .call-options-grid,
    .review-form .form-group-row,
    .admin-grid,
    .outstation-grid,
    .why-ride-layout,
    .testimonials-compact-layout {
        grid-template-columns: 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
    .footer-col {
        margin-bottom: 20px;
    }
    .footer-socials {
        justify-content: center !important;
    }
    .footer-contact-item {
        justify-content: center;
    }
    
    /* Hero Section specific fixes */
    .hero {
        padding-top: 100px !important;
        min-height: auto !important;
    }
    .hero-content {
        text-align: center;
        align-items: center;
    }
    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 12px !important;
    }
    .hero-btn, .primary-btn, .secondary-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        box-sizing: border-box;
    }

    /* Filter Tabs Horizontal Scroll on Mobile */
    .tab-container, .package-tabs, .gallery-tabs, .tabs-wrapper {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px !important;
        scrollbar-width: none; /* Firefox */
        justify-content: flex-start !important;
    }
    .tab-container::-webkit-scrollbar, .package-tabs::-webkit-scrollbar, .gallery-tabs::-webkit-scrollbar {
        display: none; /* Safari/Chrome */
    }
    .tab-btn {
        flex-shrink: 0 !important;
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
    }
    
    /* Table horizontal touch scroll */
    .table-responsive-wrapper, .admin-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px;
    }
}

@media (max-width: 576px) {
    /* Header logo and CTA sizing for small mobile screens */
    .brand-logo .logo-title {
        font-size: 1rem !important;
        letter-spacing: 1px !important;
    }
    .brand-logo .logo-subtitle {
        font-size: 0.5rem !important;
        letter-spacing: 2px !important;
    }
    .logo-icon-wrapper.animated-logo {
        width: 40px !important;
        height: 40px !important;
    }
    
    .nav-actions {
        gap: 6px !important;
    }
    .whatsapp-badge {
        width: 32px !important;
        height: 32px !important;
        font-size: 1.05rem !important;
    }
    .booking-cta {
        padding: 6px 10px !important;
        font-size: 0.72rem !important;
        letter-spacing: 0.5px !important;
    }

    /* Force grids that were 2 columns on tablet to 1 column on mobile */
    .packages-grid, 
    .fleet-grid,
    .gallery-grid,
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Reduce card padding */
    .package-card, .vehicle-card, .value-card, .info-details-card, .review-card {
        padding: 16px !important;
    }
    
    .booking-buttons {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .booking-buttons a {
        width: 100% !important;
        text-align: center;
        justify-content: center;
    }

    /* Floating Social Sidebar compact adjustments */
    .floating-social-sidebar {
        right: 0 !important;
        top: 35% !important;
        transform: translateY(-50%) !important;
    }
}

/* ==========================================================================
   MOBILE BOTTOM STICKY CALL & WHATSAPP QUICK ACTION BAR
   ========================================================================== */
.mobile-bottom-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 62px !important;
        background: rgba(10, 11, 13, 0.96) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
        z-index: 2900 !important;
        padding: 8px 12px !important;
        gap: 10px !important;
        box-sizing: border-box !important;
        box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.7) !important;
    }

    .mobile-bar-btn {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        border-radius: 30px !important;
        text-decoration: none !important;
        font-weight: 800 !important;
        font-size: 0.88rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
        transition: transform 0.2s ease !important;
    }

    .mobile-bar-btn.bar-call {
        background: linear-gradient(135deg, #ff7300 0%, #d4af37 100%) !important;
        color: #ffffff !important;
        animation: callGlowPulse 2.5s infinite !important;
    }

    .mobile-bar-btn.bar-call i {
        font-size: 1.15rem !important;
        color: #ffffff !important;
        animation: phoneWiggle 1.8s infinite ease-in-out !important;
    }

    .mobile-bar-btn.bar-wa {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
        color: #ffffff !important;
        animation: waGlowPulse 2.5s infinite 1.2s !important;
    }

    .mobile-bar-btn.bar-wa i {
        font-size: 1.3rem !important;
        color: #ffffff !important;
    }

    body {
        padding-bottom: 65px !important;
    }
}

