/* =========================================================
   IBMS RESPONSIVE QA LAYER
   Breakpoint-only corrections. Approved desktop layouts are
   intentionally untouched.
========================================================= */

@media (max-width: 1050px) {
    .site-header { position: relative; }
    .desktop-nav.mobile-nav-open {
        z-index: 100;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .desktop-nav.mobile-nav-open a.active {
        color: #fff;
        background: rgba(18, 136, 255, .14);
        border-radius: 7px;
    }
}

@media (max-width: 850px) {
    :is(.product-hero-copy,.solutions-hero-copy,.industries-hero-copy,.features-hero-copy,.about-hero-copy,.pricing-hero-copy,.journey-hero-copy) {
        max-width: 610px;
    }
    :is(.product-cta,.solutions-cta,.industries-cta,.features-cta,.about-cta,.pricing-cta,.journey-cta) :is(.product-actions,.solutions-actions,.industries-actions,.features-actions,.about-actions,.pricing-actions,.journey-actions) {
        padding-right: 54px;
    }
}

@media (max-width: 760px) {
    html {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }
    body {
        height: auto;
        min-height: 100%;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
    }
    body > main,
    .conversion-page > main,
    :is(.product-page,.solutions-page,.industries-page,.features-page,.journey-page,.pricing-page,.about-page) > main,
    .business-demo > main {
        position: static;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
    }
    .conversion-page,
    .product-page,.solutions-page,.industries-page,.features-page,.journey-page,.pricing-page,.about-page,.business-demo {
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .hero-section {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
    }
    .hero-content {
        height: auto;
        min-height: 0;
        max-height: none;
        align-items: start;
    }
    :is(.product-hero,.solutions-hero,.industries-hero,.features-hero,.about-hero,.pricing-hero,.journey-hero) {
        height: auto;
        max-height: none;
    }
    :is(.product-hero-content,.solutions-hero-content,.industries-hero-content,.features-hero-content,.about-hero-content,.pricing-hero-content,.journey-hero-grid) {
        height: auto;
        max-height: none;
    }

    .site-header { min-height: 68px; }
    .nav-wrapper { gap: 10px; }
    .brand { min-width: 0; }
    .brand-name { min-width: 0; }
    .brand-name > span { display: none; }
    .nav-cta {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        padding: 0 13px;
        border-radius: 7px;
        font-size: 9px;
        white-space: nowrap;
    }
    .mobile-menu-button { flex: 0 0 40px; }
    .desktop-nav.mobile-nav-open { top: 68px; left: 12px; right: 12px; }

    :is(input,select,textarea,.form-control) { max-width: 100%; min-width: 0; }
    .form-field { min-width: 0; }
    input[type="date"],input[type="time"] { width: 100%; }

    .demo-notice { align-items: flex-start; }
    .demo-choice-card > div { min-height: 0; }
    .demo-choice-card a { min-height: 44px; display: inline-flex; align-items: center; }

    .workspace-layout,.workspace-main,.workspace-panel,.workspace-table-wrap { min-width: 0; }
    .workspace-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
    .page-container,
    .product-container,.solutions-container,.industries-container,.features-container,.about-container,.pricing-container,.journey-container,
    .conversion-container,.demo-container {
        width: min(100% - 28px, 1460px);
    }

    .ibms-logo-mark { flex: 0 0 38px; width: 38px; height: 38px; }
    .brand-name strong { font-size: 18px; }
    .nav-cta { padding: 0 11px; }

    /* Compact mobile heroes without changing their approved desktop system. */
    .hero-content {
        padding-top: 28px;
        padding-bottom: 26px;
    }
    .hero-copy h1 {
        font-size: clamp(34px, 9.2vw, 38px);
        line-height: 1.04;
    }
    .hero-description { margin-top: 16px; }
    .hero-actions { gap: 10px; margin-top: 20px; }
    .hero-actions .button {
        min-height: 48px;
        justify-content: center;
    }
    .hero-benefits { margin-top: 24px; gap: 12px; }

    :is(.about-hero-copy,.product-hero-copy,.solutions-hero-copy,.industries-hero-copy,.features-hero-copy,.pricing-hero-copy,.journey-hero-copy) {
        padding-top: 30px;
        padding-bottom: 28px;
    }

    :is(.product-hero,.solutions-hero,.industries-hero,.features-hero,.about-hero,.pricing-hero,.journey-hero) h1 {
        font-size: clamp(32px, 8.8vw, 37px);
        line-height: 1.04;
        overflow-wrap: normal;
    }
    :is(.product-hero-copy,.solutions-hero-copy,.industries-hero-copy,.features-hero-copy,.about-hero-copy,.pricing-hero-copy,.journey-hero-copy) > p {
        font-size: 12px;
        line-height: 1.58;
    }

    .about-industry-grid,.capability-grid,.purpose-points,
    .product-industry-grid,.benefit-list,.configure-items,
    .solution-industries,.flow-side > div,
    .foundation-grid,.feature-industries,.client-items {
        grid-template-columns: 1fr;
    }

    .capability-orbit { width: 100%; grid-template-columns: 1fr; }
    .factor-grid,.service-grid { grid-template-columns: 1fr; }

    :is(.product-actions,.solutions-actions,.industries-actions,.features-actions,.about-actions,.pricing-actions,.journey-actions) {
        width: 100%;
        gap: 10px;
        margin-top: 19px;
    }
    :is(.product-hero,.solutions-hero,.industries-hero,.features-hero,.about-hero,.pricing-hero,.journey-hero)
    :is(.product-button,.solutions-button,.industries-button,.features-button,.about-button,.pricing-button,.journey-button) {
        width: 100%;
        min-height: 48px;
    }

    .contact-method { min-width: 0; }
    .contact-method span { min-width: 0; }
    .contact-method strong { overflow-wrap: anywhere; }
    .enquiry-form-card { min-width: 0; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .enquiry-submit { min-height: 50px; }

    .conversion-intro h1,
    .book-demo-page .enquiry-intro h1,
    .contact-page .contact-hero h1 {
        font-size: clamp(32px, 8.8vw, 37px);
        line-height: 1.08;
    }
    .demo-intro { padding-top: 30px; padding-bottom: 18px; }
    .demo-selection { padding-top: 12px; }
    .demo-notice { padding: 12px; font-size: 10px; }
    .demo-choice-card > img {
        height: 138px;
        aspect-ratio: auto;
        object-fit: cover;
    }
    .demo-card-grid,
    .industry-grid,
    .industry-card-grid,
    .about-industry-grid {
        gap: 14px;
    }
    .demo-choice-card > div {
        padding: 15px 16px 16px;
    }
    .demo-choice-card h2 { margin: 6px 0 7px; }
    .demo-choice-card a { padding-top: 12px; }

    .industry-image { height: 128px; }
    .industry-card-grid > a > img,
    .industry-image-wrap {
        height: 128px;
    }
    .industry-card-grid > a > img,
    .industry-image-wrap img {
        object-fit: cover;
    }
    .industry-card-body,
    .industry-card-grid > a > div,
    .about-industry-copy {
        min-height: 0;
        padding: 15px 16px 16px;
    }

    .section-heading h2,
    :is(.product-heading,.solutions-heading,.industries-heading,.features-heading,.about-heading,.pricing-heading,.journey-heading) h2 {
        font-size: clamp(27px, 7.5vw, 32px);
        line-height: 1.1;
    }

    .whatsapp-contact-button,
    .about-page + .whatsapp-contact-button,
    .product-page + .whatsapp-contact-button,
    .solutions-page + .whatsapp-contact-button,
    .industries-page + .whatsapp-contact-button,
    .features-page + .whatsapp-contact-button,
    .pricing-page + .whatsapp-contact-button,
    .journey-page + .whatsapp-contact-button {
        right: 12px;
        bottom: max(62px, calc(10px + env(safe-area-inset-bottom)));
        width: 36px;
        height: 36px;
    }
    .whatsapp-contact-button i {
        font-size: 16px;
    }

    :is(.product-footer,.solutions-footer,.industries-footer,.features-footer,.about-footer,.pricing-footer,.journey-footer,.conversion-footer) p {
        padding-right: 48px;
    }
}

@media (max-width: 380px) {
    .page-container { width: min(100% - 20px, 1460px); }
    .brand-name strong { font-size: 17px; }
    .nav-cta { min-height: 36px; padding: 0 9px; font-size: 8px; }
    .mobile-menu-button { flex-basis: 36px; width: 36px; height: 36px; }
    .hero-copy h1 { font-size: 34px; }
    :is(.product-hero,.solutions-hero,.industries-hero,.features-hero,.about-hero,.pricing-hero,.journey-hero) h1 { font-size: 32px; }
    .conversion-intro h1,.book-demo-page .enquiry-intro h1 { font-size: 34px; }
}

/* Keep the site contact control clear of the injected assistant control. */
@media (max-width: 430px) {
    .whatsapp-contact-button,
    .about-page + .whatsapp-contact-button,
    .product-page + .whatsapp-contact-button,
    .solutions-page + .whatsapp-contact-button,
    .industries-page + .whatsapp-contact-button,
    .features-page + .whatsapp-contact-button,
    .pricing-page + .whatsapp-contact-button,
    .journey-page + .whatsapp-contact-button {
        right: 12px;
        bottom: max(76px, calc(76px + env(safe-area-inset-bottom)));
    }
}
