/* ============================================
   MOBILE RESPONSIVE OVERRIDES
   Fixes inline-style grids and layouts
   ============================================ */

/* ---- Tablet (max 1024px) ---- */
@media (max-width: 1024px) {

    /* Services page - 4-col to 2-col */
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Contact page - 2-col form+info */
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Car rental intro */
    .car-rental-intro {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Form rows - 3-col to 2-col */
    .form-row[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* CTA section headings */
    .section[style*="background: linear-gradient"] h2 {
        font-size: 2rem !important;
    }
}

/* ---- Mobile (max 768px) ---- */
@media (max-width: 768px) {

    /* ---- Hero sections ---- */
    .hero[style*="height: 60vh"] {
        height: 45vh !important;
        min-height: 280px !important;
    }

    .hero-content h1 {
        font-size: 1.8rem !important;
    }

    .hero-content p {
        font-size: 0.95rem !important;
    }

    /* ---- Services page grid ---- */
    .services-grid {
        grid-template-columns: 1fr !important;
    }

    /* ---- Contact page ---- */
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* All form rows collapse to 1 col */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* ---- Car rental page ---- */
    .car-rental-intro {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Vehicle fleet carousel - make cards full width on mobile */
    .vehicle-fleet-carousel {
        padding: 1rem 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .vehicle-fleet-track {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
        scroll-snap-type: x mandatory;
    }

    .vehicle-card[style*="min-width: 300px"] {
        min-width: 260px !important;
        width: 260px !important;
        scroll-snap-align: start;
    }

    /* Hide carousel arrows on mobile - swipe instead */
    .carousel-arrow {
        display: none !important;
    }

    /* ---- About page ---- */
    .team-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ---- Gallery tabs - wrap nicely ---- */
    .gallery-tabs {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    .tab-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
        margin: 0 !important;
    }

    /* ---- CTA sections ---- */
    .section[style*="background: linear-gradient"] h2 {
        font-size: 1.6rem !important;
    }

    .section[style*="background: linear-gradient"] p {
        font-size: 1rem !important;
    }

    .cta-buttons {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .cta-buttons .btn,
    .cta-buttons a {
        width: 100% !important;
        max-width: 280px !important;
        text-align: center !important;
        margin-right: 0 !important;
    }

    /* ---- Contact info cards ---- */
    .contact-info-cards {
        gap: 1rem !important;
    }

    .info-card {
        padding: 1.2rem !important;
    }

    /* ---- Social links ---- */
    .social-links {
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
    }

    /* ---- Process steps ---- */
    .process-steps {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ---- Additional services ---- */
    .additional-services {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ---- Features grid ---- */
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ---- Section padding ---- */
    .section {
        padding: 2.5rem 0 !important;
    }

    /* ---- Section title ---- */
    .section-title h2 {
        font-size: 1.7rem !important;
        letter-spacing: 0.5px !important;
    }

    /* ---- Booking form submit button ---- */
    #carBookingForm button[type="submit"],
    #contactForm button[type="submit"] {
        width: 100% !important;
        padding: 1rem !important;
    }

    /* ---- Story image - remove 3D tilt ---- */
    .story-image {
        transform: none !important;
    }

    /* ---- Carousel item padding ---- */
    .carousel-item {
        padding: 1.5rem !important;
    }
}

/* ---- Small mobile (max 480px) ---- */
@media (max-width: 480px) {

    /* ---- Hero ---- */
    .hero[style*="height: 60vh"] {
        height: 40vh !important;
        min-height: 240px !important;
    }

    .hero-content h1 {
        font-size: 1.5rem !important;
    }

    /* ---- Team grid ---- */
    .team-grid {
        grid-template-columns: 1fr !important;
    }

    /* ---- Process steps ---- */
    .process-steps {
        grid-template-columns: 1fr !important;
    }

    /* ---- Additional services ---- */
    .additional-services {
        grid-template-columns: 1fr !important;
    }

    /* ---- Features grid ---- */
    .features-grid {
        grid-template-columns: 1fr !important;
    }

    /* ---- Section title ---- */
    .section-title h2 {
        font-size: 1.4rem !important;
    }

    /* ---- CTA headings ---- */
    .section[style*="background: linear-gradient"] h2 {
        font-size: 1.4rem !important;
    }

    /* ---- Gallery tabs ---- */
    .tab-btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }

    /* ---- Contact form ---- */
    .form-3d {
        padding: 1.2rem !important;
    }

    /* ---- Vehicle cards ---- */
    .vehicle-card[style*="min-width: 300px"] {
        min-width: 240px !important;
        width: 240px !important;
    }

    /* ---- FAQ questions ---- */
    .faq-question {
        font-size: 0.95rem !important;
        padding: 1rem !important;
    }

    /* ---- Container padding ---- */
    .container {
        padding: 0 15px !important;
    }
}

/* ============================================
   SERVICE SUB-PAGE SPECIFIC OVERRIDES
   ============================================ */

@media (max-width: 768px) {

    /* Rail ticket, hotel, customized tour, package tour intro sections */
    .rail-booking-intro,
    .hotel-booking-intro,
    .custom-tour-intro {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Guidelines content */
    .guidelines-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Package cards - minmax too wide for mobile */
    .packages-grid {
        grid-template-columns: 1fr !important;
    }

    /* Featured hotels */
    .featured-hotels {
        grid-template-columns: 1fr !important;
    }

    /* Tour themes */
    .tour-themes {
        grid-template-columns: 1fr !important;
    }

    /* Train search result cards */
    .train-result-card,
    [class*="train-card"] {
        overflow-x: auto !important;
    }

    /* Train result inner grids */
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Amenities / interests checkbox grids */
    [style*="grid-template-columns: repeat(auto-fit, minmax(150px, 1fr))"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Package card images */
    .package-card img,
    .hotel-card img {
        height: 180px !important;
        object-fit: cover !important;
    }

    /* Booking modal */
    .booking-modal .modal-content,
    #bookingModal .modal-content {
        margin: 2% 1rem !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 480px) {

    /* Amenities / interests - single col */
    [style*="grid-template-columns: repeat(auto-fit, minmax(150px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    /* Train result inner grids */
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    /* Package cards */
    .packages-grid {
        grid-template-columns: 1fr !important;
    }

    /* Hotel categories */
    .hotel-categories {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Benefits grid */
    .benefits-grid {
        grid-template-columns: 1fr !important;
    }

    /* Included grid */
    .included-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}
