/* ===================================================================
   MRV INTERNATIONAL PRESCHOOL - MOBILE & RESPONSIVE STYLESHEET
   Mobile-First Optimizations, Font Scaling, Touch Targets
   =================================================================== */

/* Tablet Viewports (max-width: 991px) */
@media (max-width: 991.98px) {
    .header .logo img {
        max-height: 48px;
    }
    
    .desktop-image {
        display: none !important;
    }
    
    .mobile-image {
        display: block !important;
    }
    
    .as_form {
        margin-top: 30px;
        padding: 24px 20px;
    }
    
    .features-wrapper {
        padding: 58px 0 52px;
    }

    .feature-heading {
        margin-bottom: 28px;
    }

    .feature-visual-column {
        min-height: 360px;
        margin-top: 14px;
    }

    .feature-visual-column::before {
        inset: 0 8px 0 8px;
        background-size: 520px auto;
    }

    .baby-image-clean {
        max-height: 360px;
    }
    
    .location-commute-card {
        margin-top: 20px;
        padding: 22px 20px;
    }
    
    .arrow-steps .step {
        font-size: 12.5px;
        padding: 10px 10px;
    }
    
    .panel-container {
        padding: 22px 18px;
        margin-top: 20px;
    }
    
    .panel-container .right-panel-content {
        flex-direction: column !important;
    }
    
    .panel-container .right-panel-content img {
        width: 100% !important;
        margin-bottom: 20px;
    }
}

/* Mobile Viewports (max-width: 767.98px) */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 70px; /* Space for fixed bottom mobile bar */
    }
    
    /* Font Size Reductions & Legibility */
    h1, .hero-headline {
        font-size: 1.65rem !important;
        line-height: 1.3 !important;
    }
    
    h2, .section-heading .title, .features-wrapper .title2 {
        font-size: 1.55rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.35rem !important;
    }
    
    h4 {
        font-size: 1.15rem !important;
    }
    
    .section-heading {
        margin-bottom: 1.8rem;
    }
    
    .about-subtitle-badge {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .about-text {
        font-size: 14px;
        line-height: 1.65;
    }
    
    /* Form Inputs - Crucial 16px to prevent iOS auto-zoom */
    .apply-form {
        font-size: 16px !important;
        height: 48px;
        padding: 12px 14px;
    }
    
    .form-main-heading {
        font-size: 1.35rem;
    }
    
    .form-btn {
        height: 52px;
        font-size: 15px;
    }
    
    /* Feature cards grid on mobile - 2 side-by-side */
    .features-section-container {
        margin-top: 36px;
    }

    .features-wrapper {
        padding: 24px 0 20px;
    }

    .feature-heading {
        margin-bottom: 14px;
        padding: 0 10px;
    }

    .features-wrapper .title2 {
        white-space: normal;
        font-size: 1.35rem !important;
        margin-bottom: 4px;
    }

    .features-wrapper .title3 {
        font-size: 0.85rem;
    }

    .feature-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        row-gap: 16px !important;
        margin-left: -4px !important;
        margin-right: -4px !important;
    }

    .feature-grid > [class*="col-"] {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .feature-item-clean {
        padding: 4px 2px;
        text-align: center;
    }

    .feature-item-clean .circle {
        width: 54px !important;
        height: 54px !important;
        margin-bottom: 6px !important;
    }

    .feature-item-clean .circle svg {
        width: 26px !important;
        height: 26px !important;
    }

    .feature-title-white {
        font-size: 0.82rem !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
    }
    
    .floating-whale {
        width: 75px;
        top: -35px;
        left: 4%;
        right: auto;
    }

    .feature-visual-column {
        min-height: 290px;
        margin-top: 10px;
    }

    .feature-visual-column::before {
        inset: 0;
        background-size: 430px auto;
        opacity: 0.13;
    }

    .baby-image-clean {
        max-height: 280px;
    }
    
    /* Programme cards: 2 side-by-side on mobile */
    .programme-card-item {
        margin-bottom: 8px;
    }

    .programme-card-body {
        padding: 10px 8px;
    }

    .programme-card-title {
        font-size: 0.85rem;
        line-height: 1.25;
    }

    .programme-age-badge {
        font-size: 10.5px;
        padding: 2px 6px;
    }
    
    /* Programme tabs: scrollable horizontally */
    .vertical-card {
        margin-bottom: 8px;
    }
    
    .vertical-card .card-body {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* 6-step admissions on mobile: wrap into 2 columns or horizontal pills */
    .arrow-steps {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .arrow-steps .step {
        min-width: unset;
        font-size: 12px;
        padding: 10px 8px;
    }
    
    .step-process-desc {
        padding: 20px 16px;
    }
    
    .step-process-desc .row {
        display: flex;
        flex-direction: column-reverse;
    }
    
    .step-process-desc .col-9,
    .step-process-desc .col-3 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    .step-image {
        max-height: 180px;
        margin-bottom: 16px;
    }
    
    /* Accolade cards */
    .accolade-card {
        flex-direction: column;
        text-align: center;
        padding: 18px 14px;
        margin-bottom: 16px;
    }
    
    .accolade-thumb {
        width: 110px;
        height: auto;
        margin-bottom: 10px;
    }
    
    .accolade-text {
        font-size: 13.5px;
    }
    
    /* Testimonials */
    .testimonial-card-item {
        padding: 20px 16px;
    }
    
    /* Gallery Filter on Mobile: Horizontal scroll chips */
    .gallery-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .gallery-filter::-webkit-scrollbar {
        height: 4px;
    }
    
    .gallery-filter::-webkit-scrollbar-thumb {
        background: #CBD5E1;
        border-radius: 4px;
    }
    
    .gallery-filter .filter-item {
        white-space: nowrap;
        font-size: 12.5px;
        padding: 6px 14px;
        flex-shrink: 0;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .gallery-item img {
        height: 140px;
    }
    
    /* CTA */
    .cta-wrapper {
        padding: 32px 20px;
        margin: 40px 0;
    }
    
    .cta-text {
        font-size: 14px;
    }
    
    .cta-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* FAQ summary font */
    summary {
        padding: 14px 16px;
        font-size: 14.5px;
    }
    
    .summary-content {
        padding: 0 16px 16px;
        font-size: 13.5px;
    }
    
    /* Mobile Fixed Bottom Action Bar */
    .mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #FFFFFF;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
        display: flex;
        align-items: center;
        padding: 8px 12px;
        gap: 10px;
        z-index: 1050;
    }
    
    .mobile-bottom-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 46px;
        border-radius: var(--border-radius-pill);
        font-family: 'Nunito', sans-serif;
        font-weight: 800;
        font-size: 14px;
        text-align: center;
        text-decoration: none;
    }
    
    .btn-mobile-call {
        background: #F1F5F9;
        color: var(--primary-maroon) !important;
        border: 1px solid #E2E8F0;
    }
    
    .btn-mobile-tour {
        background: linear-gradient(135deg, var(--primary-coral) 0%, var(--primary-maroon) 100%);
        color: #FFFFFF !important;
        box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35);
    }
    
    /* Hide old float buttons */
    .float-btn, .float-btn-apply, .float-btn-call {
        display: none !important;
    }
}

/* Extra Small Screens (max-width: 480px) */
@media (max-width: 480px) {
    .arrow-steps {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item img {
        height: 190px;
    }
}
