/* =====================================================================
   Fluid layout - loaded LAST on every page.
   Containers, side gutters and the base text size now scale smoothly with the
   screen (320px phones up to 4K) instead of jumping at fixed breakpoints, so
   every section fills the screen in proportion with no manual tuning.

   Scale (CSS pixels):   375    768    1024   1366   1440   1920   2560+
   base text (px)        14     14.8   15.5   16.3   16.5   17.6   18
   side gutter (px)      16     29     37     48     50     65     72
   content width (px)    343    710    950    1257   1325   1766   2100
   ===================================================================== */

:root {
    /* space either side of the content */
    --fl-gutter: clamp(16px, 2.6vw + 6px, 72px);
    /* widest the content may get: grows with the screen, capped for 4K */
    --fl-max: clamp(1140px, 92vw, 2100px);
}

/* Smooth base size: every rem-based font, gap and padding scales with it */
html {
    font-size: clamp(14px, 13px + 0.24vw, 18px) !important;
}

/* One container rule for the whole site */
html body .container {
    width: min(100% - 2 * var(--fl-gutter), var(--fl-max)) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
/* a container inside another container doesn't add a second gutter */
html body .container .container { width: 100% !important; }

/* ---------- Sections that had a fixed inner width: let them fill the container ---------- */
#services-highlight.svc .service-grid,
#services-highlight .svc-cta,
.rx,
#latest-insights .isx-ticker,
#latest-insights .news-grid,
#eng-faq .efq-layout,
.news-grid,
.reasons-layout {
    max-width: 100% !important;
}

/* Hero and feature grids: wider on big screens, but still in proportion */
.sv-hero-inner,
.st-hero-grid {
    max-width: min(100%, calc(var(--fl-max) * 0.95)) !important;
}
.gr {
    max-width: min(100%, calc(var(--fl-max) * 0.9)) !important;
}
/* reading-width blocks scale gently so lines never get too long */
.hub-accordion {
    max-width: min(100%, clamp(1000px, 62vw, 1240px)) !important;
}
.section-desc {
    max-width: min(100%, clamp(640px, 46vw, 860px));
}

/* ---------- Big screens: more breathing room between sections ---------- */
@media (min-width: 1600px) {
    .section-padding { padding-top: clamp(3rem, 3.2vw, 5.5rem); padding-bottom: clamp(3rem, 3.2vw, 5.5rem); }
}

/* ---------- Safety net: nothing pokes out sideways ---------- */
img, video, canvas, svg, iframe { max-width: 100%; }
table { max-width: 100%; }
pre, code { overflow-wrap: anywhere; }
