/*
 * Mobile-first responsive layer — loads AFTER skeleton/site-header/site-layout.
 * Focus: overflow control, readable type, flexible grids/tap targets, footer resilience.
 */

/* ------------------------------------------------------------------
   Root + global overflow guard (avoid horizontal scrolling)
------------------------------------------------------------------ */
html {
  overflow-x: clip;
  max-width: 100%;
}

body {
  overflow-x: clip;
  max-width: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

/* Flex children shrinking (prevents min-content overflow) */
.page-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* ------------------------------------------------------------------
   Fluid type (long-form + headings) — works with Skeleton html 62.5%
------------------------------------------------------------------ */
body {
  font-size: clamp(1.45rem, 0.5vw + 1.35rem, 1.6rem);
  line-height: 1.65;
}

.container h3,
.container.content_jus h3,
.content_jus h3 {
  font-size: clamp(2rem, 1.55rem + 1.65vw, 3.2rem);
  line-height: 1.2;
}

.container h4,
.container.content_jus h4 {
  font-size: clamp(1.55rem, 1.35rem + 0.95vw, 2.35rem);
  line-height: 1.3;
}

#inner_pages h1.title {
  font-size: clamp(2rem, 1.6rem + 2.75vw, 3.35rem);
  line-height: 1.18 !important;
  word-break: break-word;
}

/* ------------------------------------------------------------------
   Rows / gutters — tame Bootstrap negative gutters on narrow viewports
------------------------------------------------------------------ */
.page-wrap section .container,
.page-wrap > .container.content_jus {
  width: min(100%, var(--mf-page-max, 1200px));
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(14px, 4vw, 28px);
  padding-right: clamp(14px, 4vw, 28px);
}

.page-wrap section .container .row,
.page-wrap > .container .row,
.page-wrap > .container-fluid .row {
  margin-left: clamp(-10px, -2vw + 10px, 0px);
  margin-right: clamp(-10px, -2vw + 10px, 0px);
  min-width: 0;
}

.page-wrap section .container .row > [class*="col-"],
.page-wrap > .container .row > [class*="col-"],
.page-wrap > .container-fluid .row > [class*="col-"] {
  min-width: 0;
}

@media (max-width: 991px) {
  .page-wrap section.testimonials.text-center .row > .col-md-6,
  .page-wrap section.testimonials .row > .col-md-6 {
    flex: 0 0 100%;
    width: 100% !important;
    max-width: 100%;
  }

  /* Contact form wrapper */
  #contact-form_contactForm__2Ztl1 {
    flex: none !important;
    width: 100%;
    max-width: 100%;
    padding-inline: clamp(0px, 1vw + 10px, 24px);
  }

  section.testimonials .col-md-6[style*="text-align:left"] {
    text-align: left !important;
  }
}

@media (max-width: 767px) {
  #contact-form_contactForm__2Ztl1 form .col-md-6 {
    float: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #contact_us {
    float: none !important;
    margin-left: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }
}

.research main .btn,
.page-wrap section .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem !important;
  line-height: 1.3 !important;
}

/* Checkbox row */
#privacy {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

#privacy #privacypolicy.form-control {
  float: none;
  flex: 0 0 auto;
  width: 22px !important;
  height: auto;
  margin-top: 6px;
}

#privacy label {
  flex: 1 1 auto;
}

/* ------------------------------------------------------------------
   Homepage hero + secondary image strip
------------------------------------------------------------------ */
body .page-wrap .container-fluid section.header h1 {
  font-size: clamp(1.3rem, 3.2vw + 1rem, 2rem) !important;
  line-height: 1.45 !important;
  padding-inline: clamp(10px, 3vw, 16px);
  box-sizing: border-box;
}

#img_outer {
  padding-inline: clamp(12px, 6vw, 100px);
  box-sizing: border-box;
}

/* ------------------------------------------------------------------
   Value proposition grid (index)
------------------------------------------------------------------ */
.value-props.row {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 1.5rem clamp(14px, 4vw, 22px);
  padding-inline: clamp(12px, 4vw, 24px);
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  justify-content: stretch !important;
  align-items: start;
}

.value-props .four.columns.value-prop {
  float: none !important;
  width: 100% !important;
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (min-width: 620px) {
  .value-props.row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .value-props.row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-inline: clamp(18px, 3vw, 48px);
  }

  /* Restore outer breathing room on large screens without fixed % margins dominating */
  .value-props {
    margin-inline: clamp(4%, 5vw, 8%) !important;
  }
}

.value-prop-box h4 {
  font-size: clamp(1.35rem, 1rem + 1.1vw, 1.6rem);
}

.value-prop-box p {
  font-size: clamp(1.25rem, 0.9rem + 0.95vw, 1.42rem);
  line-height: 1.62;
}

/* ------------------------------------------------------------------
   Footer (injected markup — see js/site-footer.js)
------------------------------------------------------------------ */
#site-footer {
  overflow-x: clip;
  max-width: 100%;
}

#site-footer footer.footer {
  margin-top: 0 !important;
}

#site-footer .footer-container.footer-container {
  width: min(1180px, 100%);
  max-width: 100%;
  margin-inline: auto;
  padding-inline: clamp(14px, 4vw, 26px);
  box-sizing: border-box;
}

#site-footer .footer-inner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem clamp(14px, 3vw, 22px);
  align-items: start;
}

@media (min-width: 900px) {
  #site-footer .footer-inner-grid {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 2.4fr);
    align-items: center;
    gap: 1.35rem clamp(14px, 2.5vw, 22px);
  }
}

#site-footer .footer-col-copy,
#site-footer .footer-col-nav {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#site-footer .footer-col-nav {
  order: 1;
}

#site-footer .footer-col-copy {
  order: 2;
  text-align: center;
}

@media (min-width: 900px) {
  #site-footer .footer-col-copy {
    order: 1;
    text-align: left;
    justify-self: start;
  }

  #site-footer .footer-col-nav {
    order: 2;
    text-align: center;
    justify-self: stretch;
  }
}

#site-footer .footer .text-muted {
  float: none !important;
  padding-left: 0 !important;
  margin-top: 0 !important;
  display: inline-block;
  max-width: 100%;
}

#site-footer .footer ul.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem clamp(12px, 3vw, 18px);
  max-width: 100%;
}

#site-footer .footer ul.footer-links li {
  display: inline-block;
}

#site-footer .footer ul.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.55rem;
  text-decoration: none;
}

#site-footer .footer-location {
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: inherit;
  flex-basis: 100%;
}
