/* ========================================================
   RIDEZIO MOBILE & RESPONSIVE DESIGN SYSTEM
   ======================================================== */

/* Prevent horizontal overflow across all viewports */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
    width: 100%;
}

/* ========================================================
   1. MOBILE HERO SECTION OPTIMIZATION (< 768px)
   ======================================================== */
@media (max-width: 767.98px) {
    .hero-section-wrapper {
        min-height: auto !important;
        padding-top: 3rem !important;
        padding-bottom: 2.5rem !important;
    }

    .hero-section-wrapper h1 {
        font-size: clamp(1.75rem, 6.5vw, 2.3rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }

    .hero-section-wrapper p.lead {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.25rem !important;
    }

    .hero-booking-widget {
        padding: 1.25rem !important;
        border-radius: 18px !important;
        margin-top: 0.5rem;
    }

    .hero-booking-widget .form-label {
        font-size: 0.8rem !important;
    }

    .hero-booking-widget .form-control-lg {
        padding: 0.6rem 0.85rem !important;
        font-size: 0.88rem !important;
    }

    /* Category pills horizontal scroll on mobile */
    .hero-category-pill {
        font-size: 0.78rem !important;
        padding: 0.4rem 0.8rem !important;
    }
}

/* ========================================================
   2. BUTTON & TOUCH TARGET FIXES
   ======================================================== */
@media (max-width: 767.98px) {
    .btn:not(.btn-sm):not(.btn-xs):not(.badge) {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-sm, .btn-xs {
        min-height: auto !important;
        height: auto !important;
    }

    /* Touch action manipulation for lag-free mobile taps */
    a, button, input, select {
        touch-action: manipulation;
    }
}

/* ========================================================
   3. MOBILE SECTION PADDING & CONTAINERS
   ======================================================== */
@media (max-width: 767.98px) {
    .container, .container-fluid {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    section {
        padding-top: 2.75rem !important;
        padding-bottom: 2.75rem !important;
    }

    h2, .h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    h3, .h3 {
        font-size: 1.25rem !important;
        line-height: 1.35 !important;
    }

    h5, .h5 {
        font-size: 1rem !important;
    }

    p {
        font-size: 0.88rem !important;
    }
}

/* ========================================================
   4. VEHICLE & CATEGORY CARDS MOBILE OPTIMIZATION
   ======================================================== */
@media (max-width: 575.98px) {
    .vehicle-card img {
        height: 165px !important;
    }

    .vehicle-card .p-4 {
        padding: 1rem !important;
    }

    .vehicle-card h5 {
        font-size: 0.95rem !important;
    }

    /* Category cards image adjustment */
    .card[href*="category"] .position-relative {
        height: 130px !important;
    }

    .card[href*="category"] .p-3, 
    .card[href*="category"] .p-md-4 {
        padding: 0.75rem !important;
    }

    .card[href*="category"] h5 {
        font-size: 0.9rem !important;
    }

    .card[href*="category"] p {
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* ========================================================
   5. MOBILE NAVBAR & BOTTOM TAB BAR
   ======================================================== */
@media (max-width: 991.98px) {
    .navbar-brand img {
        height: 28px !important;
    }
    
    .navbar-brand span {
        font-size: 1.15rem !important;
    }
}

/* Timeline & Process Steps Mobile */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 3rem !important;
        padding-right: 0 !important;
        text-align: left !important;
        left: 0 !important;
    }
    .process-step {
        width: 100%;
        left: 0 !important;
        padding-left: 4rem !important;
        padding-right: 1rem !important;
        text-align: left !important;
    }
}
