/* =====================================================================
   Mayaa.in — Mobile Responsive Stylesheet
   Loaded LAST on every page (after main.css / loans.css) so these
   rules win over the theme + custom CSS without editing those files.
   Breakpoints:  <=991.98px  tablets & below (nav / big layout)
                 <=767.98px  phones (primary stacking)
                 <=480px     small phones (fine tuning)
   ===================================================================== */

/* ---------- 0. GLOBAL HYGIENE (all sizes) ---------- */
* { box-sizing: border-box; }

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

img, iframe, video, table, svg {
    max-width: 100%;
}

img { height: auto; }

/* Fixed-width helpers that can overflow small screens */
#loan-1 { width: 100% !important; max-width: 376px; }


/* =====================================================================
   1. TABLETS & BELOW  (<= 991.98px)
   ===================================================================== */
@media (max-width: 991.98px) {

    /* --- Sticky/transparent header: give it a solid backdrop so the
           menu icon & logo are always readable on mobile --- */
    .vl-header-area {
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
        padding: 8px 0;
    }

    /* header row: logo | (apply + burger) */
    .btn-signup {
        padding: 7px 14px;
        font-size: 13px;
    }
    .vl-header-action-item { padding: 2px 6px; }
    .vl-offcanvas-toggle {
        font-size: 22px;
        background: none;
        border: none;
        color: #e7720b;
    }

    /* --- OFF-CANVAS MOBILE MENU ---
       main.js clones the desktop mega-menu into the off-canvas <nav>.
       Flatten that complex mega layout into a simple vertical list. */
    .vl-offcanvas {
        width: 88%;
        max-width: 340px;
        overflow-y: auto;
    }
    .vl-offcanvas-menu nav ul { display: block; }
    .vl-offcanvas-menu nav > ul > li {
        border-bottom: 1px solid #eee;
        position: relative;
    }
    .vl-offcanvas-menu nav > ul > li > a {
        display: block;
        padding: 12px 0;
        font-size: 16px;
        font-weight: 600;
        color: #222;
    }

    /* collapse the mega-menu container to flow inline */
    .vl-offcanvas .sub-menu {
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 0 8px 10px !important;
        border-radius: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    .vl-offcanvas .sub-menu .row { display: block; margin: 0; }
    .vl-offcanvas .sub-menu [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: 0;
    }

    /* the tab-button column & promo box don't work when cloned – hide them
       and just reveal every product list so nothing is lost */
    .vl-offcanvas .tab,
    .vl-offcanvas .MuiBox-root,
    .vl-offcanvas .css-0 { display: none !important; }
    .vl-offcanvas .tabcontent,
    .vl-offcanvas .tabcontent_tools { display: block !important; }

    .vl-offcanvas .modalText {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 9px 4px;
        font-size: 14px;
        line-height: 1.35;
        border-bottom: 1px dashed #f0e0d0;
    }
    .vl-offcanvas .modalText img { width: 22px; height: 22px; }
    .vl-offcanvas .modalText a {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #333;
    }

    /* the expand/collapse chevron main.js injects */
    .vl-offcanvas-menu nav .vl-menu-close {
        position: absolute;
        right: 0;
        top: 8px;
        width: 34px;
        height: 34px;
        background: #f6f6f6;
        border: none;
        border-radius: 6px;
        color: #e7720b;
    }

    /* Desktop-only hover side rail of quick actions – not usable by touch */
    .social { display: none !important; }
}


/* =====================================================================
   2. PHONES  (<= 767.98px)
   ===================================================================== */
@media (max-width: 767.98px) {

    /* ---- generic section spacing trim ---- */
    section, .commercial_sec, .index-steps, .video-slider-section { }

    /* ---------- HERO ---------- */
    .hero-section { padding: 90px 0 30px; }
    .hero-section:before { display: none; }            /* floating rupee gif */

    .hero-content { margin: 10px 0 0; }
    .hero-content h1 { font-size: 26px; line-height: 1.3; }
    .hero-content p { font-size: 15px; margin: 12px 0 20px; }

    .hero-content h1 span { display: inline; }          /* keep "Get Instant" on one line */
    /* keep the rotating list a one-line ticker (height must match the item line-height) */
    .dynamic-text { width: 100%; max-width: 100%; height: 34px; }
    .dynamic-text .item { font-size: 22px !important; line-height: 34px !important; }

    .store-buttons {
        margin-top: 20px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .store-button { flex: 1 1 45%; }

    .hero-content .social-icons,
    .hero-section .social-icons {
        position: static;
        margin-top: 20px;
        bottom: auto;
    }

    /* right rail (instant approval etc.) + search */
    .banner_rightbr { margin: 20px 0 0; }
    .menu-item { margin-bottom: 18px; }
    .search-box { margin-top: 20px; position: static; max-width: 100%; }

    /* ---------- PRODUCTS ---------- */
    .product-section, .product-section.text-center { padding: 30px 0; }
    .product_heading h2 { font-size: 22px; }
    .product_heading p { font-size: 14px; margin-bottom: 20px; }
    .product-card { min-height: 180px; }
    .product-image { height: 150px; background-size: contain !important; }
    .product-title { font-size: 12px; }

    /* ---------- PARTNERS (absolute chips -> wrapping flex) ---------- */
    .partners-section {
        min-height: auto;
        padding: 25px 12px;
        margin: 24px auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }
    .partners-section .dot-grid { display: none; }
    .partners-section .center-text {
        position: static;
        transform: none;
        white-space: normal;
        flex: 0 0 100%;
        margin-bottom: 8px;
    }
    .center-text p { font-size: 16px; }
    .center-text h2 { font-size: 22px; }
    .partners-section .logo-chip {
        position: static !important;
        inset: auto !important;
        top: auto !important; left: auto !important;
        right: auto !important; bottom: auto !important;
        min-width: 0;
    }

    /* ---------- GET MONEY / STEPS ---------- */
    .getmoney_on { padding: 35px 0; }
    .money_heading h2 { font-size: 24px; margin-bottom: 22px; }
    .step-item { padding: 14px 14px 14px 16px; }
    .step-number { font-size: 52px; line-height: 52px; }
    .step-heading { font-size: 18px; }
    .step-desc { font-size: 14px; }
    .steps-section { margin-top: 25px; }

    /* ---------- WHY CHOOSE / COMMERCIAL ---------- */
    .commercial-insurance {
        margin-top: 90px;
        padding-bottom: 40px;
    }
    .commercial-insurance .stying-div:before,
    .commercial-insurance .stying-div:after { display: none; }  /* oversized deco gifs */
    .text-right, .img-right img { float: none; }
    .text-right .loan-name { font-size: 22px; }
    .commercial-insurance .text-right p { font-size: 14px; }

    /* ---------- 4-UP FEATURE LIST ---------- */
    .index-steps { padding: 30px 0 0; }
    .index-steps .multiple .list {
        width: 48%;
        min-height: auto;
        margin: 0 1% 15px;
        padding: 18px 12px;
    }

    /* ---------- VIDEO / FINANCIAL GYAAN ---------- */
    .video-slider-section { padding: 10px 0 30px; }
    .video-slider-section iframe { width: 100%; height: 320px; }

    /* ---------- LOAN PURPOSE ---------- */
    .loan-purpose-section { padding: 30px 15px 40px; }
    .loan-purpose-section h2 { font-size: 22px; }
    .loan-purpose-left, .loan-purpose-right { display: none; }

    /* ---------- POPUP MODAL (was min-width:600px) ---------- */
    .modal.show .modal-dialog { min-width: auto; }
    .modal-dialog { max-width: calc(100% - 20px); margin: 12px auto; }
    .custom-popup { max-width: 100%; }

    /* ---------- FLOATING VIDEO POPUP ---------- */
    .video-popup {
        width: 150px;
        height: 270px;
        bottom: 10px;
        right: 10px;
    }
    .footer_whatsapp_fixing a img { right: 12px; width: 120px; }

    /* ---------- FOOTER ---------- */
    .ftr_topdiv {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        text-align: center;
        padding: 20px 0;
    }
    .foot_links { gap: 8px 0; }
    .quicks_links { flex: 0 0 48%; max-width: 48%; margin-bottom: 12px; }
    .quicks_links ul li a { line-height: 26px; }
    .disclamiar_left { min-height: auto; justify-content: center; margin-bottom: 15px; }
    .disclamiar p, .disclamiar_two p { text-align: left; }
    .copyrights_cf { text-align: center; font-size: 13px; }


    /* =================================================================
       CONTENT PAGES
       ================================================================= */

    /* ---- loans.php ---- */
    .Loans_main_page > img,
    .Loans_main_page [class*="car-insurance"] img { max-width: 40%; }
    .loan_types ul { flex-wrap: wrap; gap: 8px; }
    .loan_types ul li { margin-right: 0; }
    .custom-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .custom-tabs .tab-link, .custom-tabs .tab-link2 {
        padding: 10px 14px;
        white-space: nowrap;
        font-size: 14px;
    }
    .bank_header { flex-wrap: wrap; gap: 8px; }
    .banks_details_main, .tab-content, .tab-pane, .tab-pane2 { overflow-x: auto; }
    .banks_details_main table { min-width: 520px; }

    /* ---- emi-calculater.php ---- */
    .calculater_banner { padding-top: 80px; }
    .main-grid { grid-template-columns: 1fr; }
    .amort-card, .chart-card { overflow-x: auto; }
    .amort-card table { min-width: 420px; }
    .emi-big { font-size: 30px; }

    /* ---- documents.php ---- */
    .seaTabs_switch { flex-wrap: wrap; }
    .checklist-inner { padding: 1rem; }

    /* ---- service-type.php ---- */
    .products_tabs .tab-list {
        width: 100% !important;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    .products_tabs .tab-item {
        width: 88px !important;
        height: 88px !important;
        font-size: 12px;
    }
    .products_tabs .tab-content { padding: 20px 15px !important; }
    .resid_property_type .custom-radio-group { flex-wrap: wrap; }
    .resid_property_type .custom-radio-group .radio-btn span {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* ---- all-service.php ---- */
    .all_service_tab ul li {
        width: 31% !important;
        margin: 0 1% 10px !important;
        min-height: auto !important;
    }

    /* ---- service.php ---- */
    .image-slider { margin-top: 70px; }
    .slider-wrapper, .image-slider .slide { height: 200px; }

    /* ---- property-search.php ---- */
    .mya-loan-grid .mya-loan-item { width: 33.33%; }
    .mya-bank-card { min-width: 0; padding: 1rem 1.1rem; }
    .mya-select-box { min-width: 0; width: 100%; }

    /* ---- pincode-search.php ---- */
    .mpc-table-outer { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .mpc-table { min-width: 460px; }
    .mpc-input-box input { width: 100% !important; }
    .mpc-input-row { flex-direction: column; align-items: stretch; }

    /* ---- login.php / login-info.php / otp-verification.php ---- */
    .login_main {
        position: relative !important;
        height: auto !important;
        min-height: 100vh;
        overflow-y: auto;
        padding: 20px 0;
    }
    .login_row_main { width: 100% !important; }
    .left_login { width: 100% !important; padding: 15px 0 !important; }
    .side_images { width: 65% !important; }
    .number_login,
    .verification_login {
        width: 100% !important;
        padding: 25px 20px !important;
        min-height: auto !important;
    }
    .otp_enter_input {
        width: 44px !important;
        height: 44px !important;
        margin: 0 5px 0 0 !important;
    }
    .popup-content { max-width: 95% !important; padding: 20px 15px !important; }
    .left_login { padding: 20px 18px !important; }

    /* ---- POLISH: loans.php hero (drop desktop fixed heights / floats /
            oversized decorative gifs that leave a big empty gap) ---- */
    .Loans_main_page .car-insurance-inner {
        margin-top: 0;
        height: auto;
        padding: 22px 0;
    }
    .Loans_main_page .car-insurance-inner:after,
    .Loans_main_page .car-insurance-inner .stying-div-inner:before,
    .Loans_main_page .car-insurance-inner .stying-div-inner:after { display: none; }
    .Loans_main_page .stying-div-inner { display: flex; flex-direction: column; }
    .Loans_main_page .text-inner { width: 100%; margin-top: 0; }
    .Loans_main_page .text-inner .page-link { float: none; display: inline-block; margin-bottom: 10px; }
    .Loans_main_page .car-insurance-inner .family-inner {
        float: none;
        position: static;
        top: auto;
        right: auto;
        height: auto;
        display: block;
        text-align: center;
        margin-top: 12px;
    }

    /* ---- POLISH: radio pill groups shouldn't overrun the edge ---- */
    .custom-radio-group { flex-wrap: wrap; justify-content: center; }
    .custom-radio-group .radio-btn span { max-width: 100%; }

    /* ---- POLISH: partner chips flush against edge ---- */
    .partners-section { overflow: visible; }
    .partners-section .logo-text { font-size: 12px; }
}


/* =====================================================================
   3. SMALL PHONES  (<= 480px)
   ===================================================================== */
@media (max-width: 480px) {
    .hero-content h1 { font-size: 22px; }
    .dynamic-text { height: 28px; }
    .dynamic-text .item { font-size: 19px !important; line-height: 28px !important; }
    .store-button { flex: 1 1 45%; }

    /* stack the 4-up feature list one per row */
    .index-steps .multiple .list { width: 100%; margin: 0 0 15px; }

    /* single-column metric tiles on the EMI page */
    .metrics-row { grid-template-columns: 1fr !important; }

    /* product cards & partner text tighter */
    .center-text h2 { font-size: 19px; }

    /* content pages */
    .products_tabs .tab-item { width: 78px !important; height: 78px !important; }
    .all_service_tab ul li { width: 48% !important; }
    .mya-loan-grid .mya-loan-item { width: 50%; }
    .quicks_links { flex: 0 0 100%; max-width: 100%; }
    .otp_enter_input { width: 38px !important; height: 38px !important; margin: 0 4px 0 0 !important; }
}
