/* Responsive refinements for the shared Sahana shell and Elementor content. */
@media (max-width: 1024px) {
  .hero .hero__title { font-size: clamp(2.75rem, 6.2vw, 4rem); letter-spacing: -0.035em; }
  #journey-section .journey-main-heading { font-size: clamp(2.25rem, 4.8vw, 3.25rem); }
  #impact-section .impact-stories-title { font-size: clamp(2.5rem, 6vw, 4.25rem); }
  #capabilities-section .colossal-title-stack span { font-size: clamp(2.8rem, 7vw, 5.5rem); overflow-wrap: anywhere; }
  .sahana-global .fh-h1 { font-size: clamp(2.4rem, 5vw, 3.25rem); }
  .sahana-global .aic-h1, .sahana-global .mu-h1 { font-size: clamp(2.5rem, 5.2vw, 3.5rem); }
  .sahana-global .elementor-heading-title { overflow-wrap: break-word; }
  .sahana-global .elementor-widget-image img { max-width: 100%; height: auto; }
}
@media (max-width: 992px) {
  .hero .hero__title { font-size: clamp(2.2rem, 9vw, 3.5rem); line-height: 1.08; letter-spacing: -0.035em; }
  #journey-section .journey-main-heading { font-size: clamp(2rem, 8vw, 2.7rem); line-height: 1.12; }
  #impact-section .impact-stories-title { font-size: clamp(2.25rem, 9vw, 3.4rem); line-height: 1.06; }
  #capabilities-section .colossal-title-stack span { font-size: clamp(2.25rem, 9vw, 3.8rem); line-height: 1; }
  .sahana-global .fh-section,
  .sahana-global .aic-section,
  .sahana-global .mu-section { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sahana-global .fh-section-frame,
  .sahana-global .aic-section-frame,
  .sahana-global .mu-section-frame { inset-inline: 0.75rem; }
  .sahana-global .fh-h1,
  .sahana-global .aic-h1,
  .sahana-global .mu-h1 { font-size: clamp(2.1rem, 8.5vw, 2.75rem); line-height: 1.12; overflow-wrap: break-word; }
  .sahana-global .fh-h2,
  .sahana-global .aic-h2,
  .sahana-global .mu-h2 { font-size: clamp(1.7rem, 6.5vw, 2.2rem); line-height: 1.18; }
  .sahana-inner-page .breadcrumb-section { padding-inline: 1.25rem; }
  .sahana-global .elementor-widget-heading h1.elementor-heading-title { font-size: clamp(2rem, 8vw, 2.75rem); line-height: 1.12; }
  .sahana-global .elementor-widget-heading h2.elementor-heading-title { font-size: clamp(1.65rem, 6.5vw, 2.25rem); line-height: 1.2; }
  .sahana-global .elementor-widget-heading h3.elementor-heading-title { font-size: clamp(1.35rem, 5.5vw, 1.8rem); line-height: 1.25; }
  .sahana-global .elementor-widget-container { max-width: 100%; }
  /* Home section titles that retained desktop sizes on phones. */
  #key-facts-section h2.kf-title,
  .why-us-mega-title,
  .work-intro-title,
  .final-cta-v2-headline { font-size: clamp(2rem, 8vw, 2.65rem); line-height: 1.12; overflow-wrap: break-word; }
  .sec-comp-title { font-size: clamp(1.75rem, 7vw, 2.25rem); line-height: 1.15; }
  .hero .hero__title { font-size: clamp(2rem, 8vw, 2.75rem); }
  #journey-section .journey-main-heading { font-size: clamp(1.9rem, 7.5vw, 2.5rem); }
  #impact-section .impact-stories-title { font-size: clamp(2rem, 8vw, 2.8rem); }
}
/* Tablet/mobile: retain the transition marquee, but remove the desktop 200vh shutter runway. */
@media (max-width: 991px) {
  #transition-keyfacts-section.section-slats-transition { min-height: 0; height: auto !important; padding: 0 !important; overflow: hidden; }
  #transition-keyfacts-section .slats-sticky-viewport { position: relative !important; height: clamp(180px, 32vw, 300px) !important; min-height: 0; overflow: hidden; }
  #transition-keyfacts-section .slats-dark-backdrop { display: flex !important; }
  #transition-keyfacts-section .shutter-slats-container { display: none !important; }
  #transition-keyfacts-section .slats-marquee-content { font-size: clamp(2.75rem, 8vw, 5.5rem); gap: clamp(1rem, 3vw, 2rem); }
  #transition-keyfacts-section .slats-marquee-track { gap: clamp(1rem, 3vw, 2rem); }
  #transition-keyfacts-section .slats-metallic-monolith { width: clamp(64px, 12vw, 105px); height: clamp(64px, 12vw, 105px); }
}
/* Key Facts Trust Factors: prevent the market-cap counter clipping on phones. */
@media (max-width: 992px) {
  #key-facts-section .kf-card-featured .kf-card-inner { padding: clamp(1.15rem, 5vw, 1.75rem); }
  #key-facts-section .kf-card-featured .kf-card-bottom-row { min-width: 0; gap: 1rem; }
  #key-facts-section .kf-card-featured .kf-card-metric-col {
    width: 100%; min-width: 0; display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    column-gap: clamp(.5rem, 2vw, 1rem);
  }
  #key-facts-section .kf-card-featured .kf-card-metric-market { min-width: 0; padding-left: clamp(.5rem, 2vw, .85rem); }
  #key-facts-section .kf-card-featured .kf-card-metric-market .card-metric-wrapper { min-width: 0; gap: .04em; white-space: nowrap; }
  #key-facts-section .kf-card-featured .kf-card-metric-market .card-number { font-size: clamp(1.15rem, 5.6vw, 2rem); letter-spacing: -.055em; }
  #key-facts-section .kf-card-featured .kf-market-currency,
  #key-facts-section .kf-card-featured .kf-market-unit { font-size: clamp(.85rem, 3.8vw, 1.3rem); }
  #key-facts-section .kf-card-featured .kf-card-metric-label { font-size: clamp(.48rem, 1.9vw, .66rem); letter-spacing: .07em; }
}
/* Key Facts mobile: fit the heading and all cards to the actual viewport width. */
@media (max-width: 767px) {
  #key-facts-section.section-keyfacts { padding: clamp(2.5rem, 8vw, 3.5rem) 1rem; }
  #key-facts-section .kf-title-block { margin-bottom: clamp(1.25rem, 5vw, 2rem); gap: .65rem; }
  #key-facts-section h2.kf-title { font-size: clamp(1.65rem, 7vw, 2.5rem); line-height: 1.15; overflow-wrap: normal; }
  #key-facts-section .kf-subtitle { font-size: clamp(.9rem, 3.8vw, 1rem); line-height: 1.5; }
  #key-facts-section .key-card-list { width: 100%; min-width: 0; gap: 1.25rem; }
  #key-facts-section .key-card-list > .kf-card {
    flex: 0 0 auto; width: 100%; max-width: 100%; min-width: 0;
    height: auto; min-height: 420px;
  }
  #key-facts-section .kf-card-inner { min-width: 0; }
}
/* Journey / Our Capabilities: remove the desktop side-by-side heading on phones and tablets. */
@media (max-width: 991px) {
  #journey-section .journey-pin-viewport { width: 100%; max-width: 100%; overflow: visible; }
  #journey-section .journey-main-container { width: 100%; min-width: 0; max-width: 100%; }
  #journey-section .journey-header-row { display: flex; flex-direction: column; align-items: stretch; gap: .8rem; width: 100%; min-width: 0; margin-bottom: 2rem; }
  #journey-section .journey-category-tag { min-width: 0; width: 100%; padding-top: 0; }
  #journey-section .journey-title-wrap { flex: 0 1 auto; min-width: 0; width: 100%; max-width: 100%; }
  #journey-section h2.journey-main-heading { width: 100%; max-width: 100%; font-size: clamp(1.75rem, 5.4vw, 2.7rem); line-height: 1.16; overflow-wrap: normal; margin: 0 0 1rem; }
  #journey-section .journey-main-sub { width: 100%; max-width: 100%; font-size: clamp(.95rem, 2vw, 1.05rem); line-height: 1.55; }
}
@media (max-width: 992px) {
  #journey-section .journey-pin-viewport { padding: 0 !important; }
  #journey-section h2.journey-main-heading { font-size: clamp(1.65rem, 7vw, 2.15rem); }
.domain-visual-tag { bottom: 5.5rem;
    left: 20px;
    right: 20px; }

}
/* Industries: compact mobile heading, accessible tabs, no large empty gap. */
@media (max-width: 992px) {
  #industries-section.section-industries-v2 {  overflow: hidden; }
  #industries-section .sahana-capabilities-heading { width: 100%; min-width: 0; }
  #industries-section h2.sahana-capabilities-heading-title {
    font-size: clamp(1.7rem, 7vw, 2.45rem);
    line-height: 1.15;
    letter-spacing: -.035em;
    margin: 0;
    max-width: 100%;
    overflow-wrap: normal;
  }
  #industries-section .domain-showcase { margin-top: 1.75rem; gap: 1.25rem; min-width: 0; }
  #industries-section .domain-tabs-list { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: .65rem; }
  #industries-section .domain-tab-btn { width: 100%; min-height: 52px; padding: .8rem 1rem; }
  #industries-section .domain-visual-card { min-width: 0; }
 .shc__wrap .shc__layout .shc__item  {  white-space: normal !important;}
.shwb-proof__container, .sahana-service-results { padding-left:0; padding-right:0;}
.domain-showcase.tm-container.sahana-domain-media-mode { width:100%; }
.oem-partner-card { height: auto; min-width: inherit;
    width: 100px; padding: 5px; }
.oem-partners-grid { gap: .75rem; }
.oem-partner-card .oem-partner-img {
    max-width: 100%;
}
}
/* Trust Factors: on narrow phones give each counter its own full-width row.
   The previous two-column layout clipped the Market Cap suffix. */
@media (max-width: 480px) {
  #key-facts-section .kf-card-featured .kf-card-metric-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: .15rem;
    width: 100%;
    min-width: 0;
  }
  #key-facts-section .kf-card-featured .kf-card-metric-col > .card-metric-wrapper {
    grid-column: 1; grid-row: 1;
  }
  #key-facts-section .kf-card-featured .kf-card-metric-col > .kf-card-metric-label {
    grid-column: 1; grid-row: 2;
  }
  #key-facts-section .kf-card-featured .kf-card-metric-market {
    grid-column: 1; grid-row: 3;
    min-width: 0;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.28);
    padding: .7rem 0 0;
    margin-top: .6rem;
  }
  #key-facts-section .kf-card-featured .kf-card-metric-market .card-metric-wrapper {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: .08em;
    max-width: 100%;
    white-space: nowrap;
  }
  #key-facts-section .kf-card-featured .kf-card-metric-market .card-number {
    font-size: clamp(1.7rem, 8vw, 2.6rem);
    letter-spacing: -.04em;
  }
  #key-facts-section .kf-card-featured .kf-market-currency,
  #key-facts-section .kf-card-featured .kf-market-unit {
    font-size: clamp(1rem, 4.4vw, 1.4rem);
  }
}
@media (max-width: 390px) {
  .hero .hero__title { font-size: 2.15rem; }
  .sahana-global .fh-section,
  .sahana-global .aic-section,
  .sahana-global .mu-section { padding-left: 1.1rem; padding-right: 1.1rem; }
}

/* Consistent fluid gutters and content sizing across phone, foldable and tablet widths. */
@media (max-width: 1100px) {
  :root { --ctm-container-gutter: clamp(16px, 3vw, 32px); }
  .ctm-container { min-width: 0; max-width: 100%; }
  .sahana-inner-page :is(img, video, iframe),
  .sahana-global :is(img, video, iframe) { max-width: 100%; }
  .sahana-inner-page :is(.elementor-container, .elementor-widget-wrap, .elementor-column),
  .sahana-global :is(.elementor-container, .elementor-widget-wrap, .elementor-column) { min-width: 0; }
}
@media (max-width: 767px) {
  :root { --ctm-container-gutter: clamp(16px, 4.5vw, 20px); }
  .sahana-inner-page .ctm-container,
  .sahana-global .ctm-container { max-width: 100%; }
  .sahana-inner-page :is(h1, h2, h3, p),
  .sahana-global :is(h1, h2, h3, p) { overflow-wrap: break-word; }
}

/* Tablet layout: retain two Industry tab columns instead of phone-style stacking. */
@media (min-width: 768px) and (max-width: 992px) {
  #industries-section .domain-tabs-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: clamp(10px, 1.5vw, 18px);
  }
  #industries-section .domain-tab-btn {
    min-width: 0;
    width: 100%;
  }
  #industries-section .domain-showcase {
    min-width: 0;
    width: 100%;
  }
}

/* Shared tablet and foldable header refinements; keep desktop mega navigation unchanged. */
@media (min-width: 768px) and (max-width: 1100px) {
  body #main-header.vectr-header {
    box-sizing: border-box;
    padding-inline: clamp(14px, 2.5vw, 24px) !important;
  }
  body #main-header .brand-logo-img {
    display: block;
    width: auto;
    max-width: clamp(125px, 17vw, 165px) !important;
    max-height: 40px !important;
    height: auto !important;
    object-fit: contain;
  }
  body #main-header .header-mobile-hamburger { flex: 0 0 auto; }
}
@media (max-width: 767px) {
  body #main-header.vectr-header { box-sizing: border-box; }
  body #main-header .brand-logo-img {
    display: block;
    width: auto;
    max-width: min(135px, 42vw) !important;
    max-height: 36px !important;
    height: auto !important;
    object-fit: contain;
  }
  body #main-header .header-mobile-hamburger { flex: 0 0 auto; }
}

/* Home 3D hero: mobile-only visual framing. Keep the renderer and desktop camera unchanged. */
@media (max-width: 820px) {
  #hero-flow-top #app {
    width: 100%;
    height: 100svh;
    overflow: visible;
    pointer-events: none;
  }
  #hero-flow-top #app canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    transform: translate3d(0, -12svh, 0) scale(1.12);
    transform-origin: center center;
  }
}



