/* ==================================================
   SHMI — Responsive
   Covers: phones (320+) → tablets → laptops → large desktops
   ================================================== */

/* ==================================================
   Very large desktops (≥1600px)
   ================================================== */
@media (min-width: 1600px) {
    .container-xxl {
        max-width: 1540px;
    }

    .mega-inner {
        max-width: 1480px;
    }

    body {
        font-size: 17px;
    }

    .hero-title {
        font-size: clamp(46px, 4.2vw, 66px);
    }
}

/* ==================================================
   Large desktops (1440–1599px)
   ================================================== */
@media (min-width: 1440px) and (max-width: 1599.98px) {
    .container-xxl {
        max-width: 1420px;
    }

    .mega-inner {
        max-width: 1360px;
    }
}

/* ==================================================
   Large desktops (1200–1439px)
   ================================================== */
@media (min-width: 1200px) and (max-width: 1439.98px) {
    .nav-menu > li > a {
        padding: 10px 13px;
        font-size: 14.5px;
    }

    .hero-title {
        font-size: clamp(40px, 4.4vw, 56px);
    }
}

/* ==================================================
   Laptops / small desktops (1024–1199px)
   ================================================== */
@media (min-width: 1024px) and (max-width: 1199.98px) {
    .nav-menu > li > a {
        padding: 10px 9px;
        font-size: 13.5px;
        margin: 14px 1px;
    }

    .nav-cta {
        padding: 10px 16px;
        font-size: 13.5px;
    }

    .nav-inner {
        padding: 0 18px;
    }

    .mega-inner {
        gap: 40px;
        padding: 40px 22px;
    }

    .section-title {
        font-size: 34px;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-wrap {
        gap: 36px;
    }
}

/* ==================================================
   Tablet landscape / nav → drawer (993–1023px)
   ================================================== */
@media (min-width: 992px) and (max-width: 1023.98px) {
    :root {
        --header-total-height: 70px;
    }

    .nav-toggler { display: flex; }
    .nav-menu { display: none; }
    .smi-navbar:not(.scrolled) { top: 14px; }
    .smi-navbar.scrolled {
        top: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-radius: 0 0 20px 20px !important;
        width: calc(100% - 40px) !important;
        max-width: 1400px !important;
    }
    .nav-inner { min-height: 62px; padding: 0 20px; }

    .hero-wrap { grid-template-columns: 1fr; gap: 40px; padding-bottom: 56px; }
    .hero-title { font-size: 42px; }
    .hero-sub { max-width: 100%; }
}

/* ==================================================
   Tablets (768–991px)
   ================================================== */
@media (max-width: 991.98px) {
    :root {
        --header-total-height: 70px;
    }

    .nav-toggler { display: flex; }
    .nav-menu { display: none; }
    .smi-navbar:not(.scrolled) { top: 12px; }
    .smi-navbar.scrolled {
        top: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-radius: 0 0 18px 18px !important;
        width: calc(100% - 32px) !important;
        max-width: 1400px !important;
    }
    .nav-inner { min-height: 62px; padding: 0 20px; }

    .hero-wrap { grid-template-columns: 1fr; gap: 40px; padding-bottom: 56px; }
    .hero-title { font-size: 42px; }
    .hero-sub { max-width: 100%; }

    .mega-inner.mega-2col,
    .mega-inner.mega-products-layout { grid-template-columns: 1fr; gap: 32px; }

    .timeline-track { overflow-x: auto; }
    .timeline-points { min-width: 820px; }

    .cta-band { padding: 40px 30px; }
    .sec-pad { padding: 72px 0; }
    .sec-pad-sm { padding: 56px 0; }

    .section-title { font-size: 32px; }
    .hero-stats { gap: 32px; }

    .pack-exp { padding: 72px 0; }
}

/* ==================================================
   Small tablets / large phones (576–767px)
   ================================================== */
@media (max-width: 767.98px) {
    :root {
        --header-total-height: 64px;
    }

    body { font-size: 15px; }

    .nav-inner { min-height: 64px; padding: 0 16px; }
    .smi-brand .brand-text strong { font-size: 16px; }
    .smi-brand .brand-logo { height: 40px; }

    .hero-title { font-size: 34px; }
    .hero-sub { font-size: 16px; }
    .hero-stats { gap: 20px; flex-wrap: wrap; }
    .hero-stats .hs-num { font-size: 26px; }
    .hero-badge-card { right: 8px; bottom: -30px; max-width: 220px; padding: 14px 16px; }
    .hero-badge-card .hbc-ico { width: 40px; height: 40px; font-size: 17px; }
    .hero-video-wrap { aspect-ratio: 16 / 10; }

    .section-title { font-size: 28px; }
    .section-eyebrow { font-size: 11.5px; }

    .statement-band { padding: 64px 16px; }
    .statement-line { font-size: 28px; }

    .tl-end .tl-year-big { font-size: 64px; }

    .page-header { padding: 104px 0 56px; }
    .page-header h1 { font-size: 32px; }

    .sec-pad { padding: 56px 0; }
    .sec-pad-sm { padding: 44px 0; }

    .mega-cols { grid-template-columns: 1fr; gap: 24px; }
    .mega-solutions { grid-template-columns: 1fr; }

    .fact-box::after { display: none; }
    .fact-box .fb-num { font-size: 38px; }

    .cta-band { flex-direction: column; align-items: flex-start; padding: 34px 24px; }
    .cta-band h3 { font-size: 24px; }

    .pack-layer { flex-wrap: wrap; }
    .pack-layer .pl-icon { display: none; }

    .footer-bottom { text-align: center; }
    .footer-bottom .text-lg-end { text-align: center !important; margin-top: 6px; }

    .hero-cta { flex-wrap: wrap; }
    .hero-cta .btn { flex: 1 1 auto; text-align: center; }

    .spec-table { font-size: 13.5px; }
    .spec-table th,
    .spec-table td { padding: 11px 12px; }

    .info-card { padding: 20px; }

    .mob-header { padding: 14px 18px; }
}

/* ==================================================
   Standard phones (≤575px)
   ================================================== */
@media (max-width: 575.98px) {
    .container-xxl,
    .container-smi { padding: 0 16px; }

    .hero-eyebrow { font-size: 12px; padding: 7px 13px; }
    .hero-title { font-size: 30px; line-height: 1.12; }
    .hero-cta { gap: 12px; }
    .hero-cta .btn { width: 100%; justify-content: center; }
    .hero-video-wrap { aspect-ratio: 16 / 11; }

    .section-title { font-size: 26px; }

    .cta-band .btn { width: 100%; text-align: center; }

    .product-card .pc-body,
    .feature-card { padding: 20px; }

    .form-control-smi {
        font-size: 15px;
        padding: 12px 14px;
    }

    .info-card { flex-direction: column; text-align: center; }

    .page-header .breadcrumb-smi { font-size: 12.5px; gap: 7px; }
    .page-header h1 { font-size: 28px; }

    .smi-footer { padding-top: 60px; }
}

/* ==================================================
   Very small phones (≤420px)
   ================================================== */
@media (max-width: 420px) {
    .nav-inner { padding: 0 12px; }
    .smi-brand { gap: 8px; }
    .smi-brand .brand-logo { height: 34px; }
    .smi-brand .brand-text strong { font-size: 14px; }
    .smi-brand .brand-text small { font-size: 9px; letter-spacing: 1px; }

    .nav-toggler { width: 40px; height: 40px; }

    .hero-title { font-size: 27px; }
    .hero-badge-card { bottom: -24px; max-width: 200px; padding: 12px 14px; }
    .hero-badge-card strong { font-size: 13px; }
    .hero-badge-card .hbc-ico { width: 36px; height: 36px; font-size: 15px; }

    .page-header h1 { font-size: 26px; }
    .page-header .ph-eyebrow { font-size: 11px; }

    .statement-line { font-size: 24px; }

    .cta-band { padding: 28px 18px; }
    .cta-band h3 { font-size: 22px; }

    .section-title { font-size: 24px; }
    .section-eyebrow { font-size: 11px; }

    .mob-header { padding: 12px 14px; }
    .mob-body > a.mob-link { padding: 13px 18px; }
    .mob-acc-btn { padding: 13px 18px; }
    .mob-acc-panel a { padding: 11px 26px; }

    .footer-links li a { font-size: 13.5px; }
}

/* ==================================================
   Tiny phones (≤360px, e.g. iPhone SE 1st gen)
   ================================================== */
@media (max-width: 360px) {
    .hero-title { font-size: 25px; }
    .hero-stats .hs-num { font-size: 24px; }
    .hero-stats { gap: 16px; }

    .page-header h1 { font-size: 24px; }

    .section-title { font-size: 22px; }

    .hero-badge-card { position: static; margin-top: 16px; max-width: 100%; }

    .footer-social a { width: 34px; height: 34px; }
}

/* ==================================================
   Baseline safety: prevent horizontal overflow / drift
   ================================================== */
html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: clip;
}

/* ==================================================
   Phones (≤600px): small intentional side padding
   ================================================== */
@media (max-width: 600px) {
    .container-xxl,
    .container-smi,
    .nav-inner,
    .mega-inner {
        width: 100%;
        padding-left: 14px;
        padding-right: 14px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==================================================
   TEAM CARDS (mobile / touch)
   ================================================== */
@media (max-width: 991.98px) {
    .team-notes {
        justify-content: flex-start;
        gap: 16px 24px;
    }
}

@media (max-width: 767.98px) {
    .team-card {
        transform: none !important;
        box-shadow: none;
    }

    .team-card:hover {
        transform: none !important;
        box-shadow: none;
    }

    .team-photo img,
    .team-body {
        transform: none !important;
    }

    .team-body {
        padding: 18px 18px 20px;
    }

    .team-linkedin {
        transform: translateY(0);
        opacity: 1;
    }

    .team-notes {
        margin-top: 32px;
    }
}

/* Touch devices: no hover, keep LinkedIn visible */
@media (hover: none) {
    .team-card,
    .team-photo img,
    .team-body {
        transform: none !important;
    }

    .team-overlay {
        opacity: 0 !important;
    }

    .team-linkedin {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }
}

/* ==================================================
   SOLUTION CARDS (mobile)
   ================================================== */
@media (max-width: 767px) {
    .solution-card {
        min-height: auto;
        padding: 22px;
        display: flex;
        align-items: flex-start;
    }
}

/* ==================================================
   FOOTER (mobile)
   ================================================== */
@media (max-width: 767px) {
    .smi-footer {
        margin-top: 0 !important;
    }

    .footer-brand {
        display: flex;
        align-items: center;
    }

    .footer-bottom {
        text-align: center;
    }
}

/* ==================================================
   PREVENT RANDOM WIDTHS FROM BREAKING THE PAGE
   ================================================== */
section,
header,
footer,
nav,
main {
    max-width: 100%;
}

[class*="col-"] {
    min-width: 0;
}

.text-nowrap {
    white-space: normal;
}

/* ==================================================
   MOBILE: NO SIDE GAP / NO HORIZONTAL SCROLL
   ================================================== */
@media (max-width: 991px) {
    .smi-navbar,
    .smi-hero,
    .statement-band,
    .timeline-section,
    .sec-pad,
    .pack-exp,
    .facts-section,
    .smi-footer {
        max-width: 100vw;
    }

    .hero-wrap,
    .hero-content,
    .hero-media {
        min-width: 0;
    }
}

/* ==================================================
   FLOATING NAVBAR + FULL-BLEED HERO (phone)
   ================================================== */
@media (max-width: 767.98px) {
    .smi-navbar:not(.scrolled) {
        top: 12px;
        width: calc(100% - 24px);
        border-radius: 0 0 20px 20px;
        padding: 4px 8px;
    }

    .smi-navbar.scrolled {
        top: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        width: calc(100% - 24px) !important;
        max-width: 100% !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-radius: 0 0 16px 16px !important;
        padding: 0 8px 4px !important;
    }

    .smi-navbar .brand-text strong {
        font-size: 13px;
    }

    .smi-navbar .brand-text small {
        font-size: 7px;
    }

    .smi-hero {
        width: calc(100% - 1rem) !important;
        min-height: calc(100svh - 0.5rem);
        min-height: calc(100dvh - 0.5rem);
        margin: 0 0.5rem 0.5rem 0.5rem !important;
        border-radius: 0 0 28px 28px;
        justify-content: center;
        align-items: center;
        text-align: center;
        box-sizing: border-box;
    }

    .smi-hero .hero-content-center,
    .smi-hero .hero-content-left,
    .smi-hero .hero-content-right {
        padding: 70px 16px 40px;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .smi-hero .hero-title {
        font-size: clamp(22px, 6.5vw, 29px);
        line-height: 1.2;
        letter-spacing: -0.4px;
        margin-bottom: 12px;
        text-align: center;
    }

    .smi-hero .hero-desc {
        font-size: clamp(12.5px, 3.5vw, 14px);
        line-height: 1.55;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
        text-align: center;
    }

    .smi-hero .hero-main-btn,
    .hero-slide .hero-main-btn {
        margin-top: 20px;
        bottom: auto;
        padding: 10px 22px;
        font-size: 13px;
    }

    .smi-footer {
        border-radius: 26px 26px 0 0;
    }
}
