/* ============================================================
   MOBILE OVERRIDE PATCH — appended last, highest priority
   ============================================================ */

/* ── ISO Badge Float (hero) ── */
.iso-badge-float {
    position: absolute;
    top: 28px; right: 28px;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 14px 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    border: 1px solid rgba(0,119,182,.1);
    animation: float 5s ease-in-out infinite;
    z-index: 3;
}


/* ── Global overflow prevention ── */
html, body { overflow-x: hidden; max-width: 100%; }
* { box-sizing: border-box; }
img, video, iframe, embed { max-width: 100%; }

/* ── Ensure form controls never overflow ── */
input, textarea, select, button {
    max-width: 100%;
    min-width: 0;
}
.form-control-3d {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* ── Solutions / Product Tabs ── */
.solutions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}
.tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Products grid ── */
#solutions .tab-pane {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}
#solutions .tab-pane.active { display: grid; }

/* ─────────────────────────────────────────
   TABLET  ≤ 900px
───────────────────────────────────────── */
@media (max-width: 900px) {
    /* Any hardcoded 2-col inline grid → single col */
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    [style*="grid-template-columns:repeat(auto-fit"],
    [style*="grid-template-columns:repeat(auto-fill"] {
        grid-template-columns: 1fr !important;
    }

    /* Contact grid */
    .contact-grid { grid-template-columns: 1fr !important; gap: 24px; }
}

/* ─────────────────────────────────────────
   MOBILE  ≤ 768px
───────────────────────────────────────── */
@media (max-width: 768px) {

    /* ── Container padding ── */
    .container { padding: 0 14px; }

    /* ── Sections ── */
    .section { padding: 60px 0; }
    .section-title { margin-bottom: 36px; }
    .section-title h2 { font-size: 1.75rem; }
    .section-title p  { font-size: .95rem; }

    /* ── Navbar ── */
    .navbar .container { height: 62px; }
    .nav-links {
        display: none; flex-direction: column;
        position: absolute; top: 100%; left: 0; width: 100%;
        background: #fff; padding: 16px 20px;
        box-shadow: 0 8px 30px rgba(3,4,94,.12);
        border-top: 2px solid rgba(0,119,182,.08);
        z-index: 9999;
    }
    .nav-links.open  { display: flex; }
    .mobile-toggle   { display: block; }
    .nav-links li a.btn-3d {
        width: 100%; justify-content: center;
        margin-top: 10px; padding: 13px 20px;
    }

    /* ── Top bar ── */
    .top-bar { display:none !important; }

    /* ── ISO badge — hide on mobile, it overflows ── */
    .iso-badge-float { display: none !important; }

    /* ── Hero ── */
    .hero-3d  { padding: 70px 0 50px; min-height: auto; }
    .hero-content { flex-direction: column; text-align: center; gap: 32px; }
    .hero-text h1 { font-size: 1.9rem; }
    .hero-text p  { font-size: .97rem; margin: 0 auto 24px; }
    .hero-btns    { flex-direction: column; align-items: center; gap: 12px; }
    .hero-btns .btn-3d { width: 100%; max-width: 300px; justify-content: center; }
    .hero-badge-float  { display: none; }
    .hero-stats  { flex-wrap: wrap; gap: 10px; margin-top: 24px; justify-content: center; }
    .hero-stat   { min-width: 130px; padding: 12px 14px; }
    .hero-stat .num { font-size: 1.7rem; }
    .hero-image-wrap { width: 100%; }
    .hero-image-wrap img { transform: none !important; border-radius: 16px; }

    /* ── Slider ── */
    .swiper { height: 300px; }
    .slide-overlay h1 { font-size: 1.5rem; line-height: 1.3; }
    .slide-overlay p  { font-size: .9rem; display: none; }
    .slide-overlay a  { display: inline-flex; }

    /* ── Counter strip ── */
    .counters-grid { flex-wrap: wrap; }
    .counter-item  {
        flex: 1 1 50%; min-width: 0;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }
    .counter-item:nth-child(odd)  { border-right: 1px solid rgba(255,255,255,.08) !important; }
    .counter-item:last-child       { border-bottom: none; }
    .counter-item .count { font-size: 2.2rem; }

    /* ── Product tabs ── */
    .solutions-tabs { gap: 6px; }
    .tab-btn { font-size: .8rem; padding: 8px 12px; }
    #solutions .tab-pane.active {
        grid-template-columns: 1fr !important;
    }

    /* ── Product cards ── */
    .product-card   { width: 100%; }
    .product-card .product-img { height: 200px; }

    /* ── Highlighted service cards ── */
    .hl-grid { grid-template-columns: 1fr !important; gap: 18px; }
    .hl-img-wrap { height: 190px; }

    /* ── Service page cards ── */
    .services-grid-3d { grid-template-columns: 1fr !important; gap: 18px; }

    /* ── Card 3D general ── */
    .card-3d { padding: 22px 18px; }

    /* ── Process steps ── */
    .process-steps::before { display: none; }
    .process-step { flex: 1 1 50%; min-width: 0; }
    .process-pipeline::before { display: none; }
    .pipeline-step { flex-direction: column; align-items: center; text-align: center; }
    .pipeline-num  { width: 52px; height: 52px; font-size: 1rem; }
    .pipeline-content { padding-top: 10px; }

    /* ── Why grid ── */
    .why-grid { grid-template-columns: 1fr !important; gap: 16px; }

    /* ── Cert grid ── */
    .cert-grid { grid-template-columns: 1fr 1fr !important; gap: 16px; }

    /* ── Blog page ── */
    .featured-post  { flex-direction: column !important; }
    .featured-img   { flex: none; min-height: 200px; width: 100%; }
    .featured-body  { padding: 22px 18px; }
    .blog-card-img  { height: 180px; }

    /* ── AMC card ── */
    .amc-card { padding: 32px 18px; }

    /* ── Contact form (inline grid override) ── */
    .form-row-2 { grid-template-columns: 1fr !important; gap: 0 !important; }
    .form-card  { padding: 22px 16px !important; border-radius: 16px; }
    .contact-grid { grid-template-columns: 1fr !important; gap: 22px; }
    .info-card  { padding: 16px 14px; gap: 12px; }
    .info-icon  { width: 42px; height: 42px; font-size: 1.1rem; }

    /* ── All hardcoded grids ── */
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:repeat(auto-fit"],
    [style*="grid-template-columns:repeat(auto-fill"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* ── Stat grid in admin ── */
    .stat-grid { grid-template-columns: 1fr !important; }

    /* ── Footer ── */
    .footer { padding: 50px 0 0; }
    .footer-grid { grid-template-columns: 1fr !important; gap: 24px; }
    .footer h4   { font-size: 1rem; margin-bottom: 14px; }
    .footer ul li { margin-bottom: 9px; }
    .footer-social { flex-wrap: wrap; gap: 8px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }

    /* ── CTA banner ── */
    .cta-banner { padding: 60px 0; }
    .cta-banner h2 { font-size: 1.7rem; }

    /* ── Buttons ── */
    .btn-3d  { padding: 12px 22px; font-size: .9rem; }
    .btn-lg  { padding: 14px 28px; font-size: 1rem; }

    /* ── FAQ ── */
    .faq-question { padding: 16px 18px; font-size: .93rem; }
    .faq-item.open .faq-answer { padding: 14px 18px; font-size: .9rem; }

    /* ── Coverage ── */
    .coverage-grid { gap: 8px; }
    .city-chip { padding: 9px 16px; font-size: .85rem; }

    /* ── Specs table ── */
    .specs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .specs-table { font-size: .82rem; min-width: 500px; }
    .specs-table th, .specs-table td { padding: 10px 10px; }

    /* ── WhatsApp/back-to-top ── */
    .whatsapp-float { width: 58px; height: 58px; font-size: 32px; bottom: 22px; right: 18px; }
    #backToTop { bottom: 92px; right: 18px; width: 42px; height: 42px; }
}

/* ─────────────────────────────────────────
   SMALL PHONE  ≤ 480px
───────────────────────────────────────── */
@media (max-width: 480px) {
    .hero-text h1 { font-size: 1.6rem; }
    .section-title h2 { font-size: 1.45rem; }
    .swiper { height: 250px; }
    .slide-overlay h1 { font-size: 1.2rem; }
    .hero-stat { min-width: calc(50% - 6px); }
    .counter-item { flex: 1 1 100%; border-right: none !important; }
    .counter-item:nth-child(odd) { border-right: none !important; }
    .process-step { flex: 1 1 100%; }
    .cert-grid { grid-template-columns: 1fr !important; }
    .tab-btn { font-size: .75rem; padding: 7px 10px; }
    .whatsapp-float { width: 52px; height: 52px; font-size: 28px; bottom: 16px; right: 14px; }
    #backToTop { bottom: 80px; right: 14px; }
}
