/* Elexus responsive stability overrides */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

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

img,
video,
iframe,
svg {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
a,
span,
li,
label,
summary {
  overflow-wrap: break-word;
}

.site-header > *,
.inner-header > *,
.section-head > *,
.hero-content > *,
.project-copy > *,
.about-copy > *,
.quote > *,
.quote-form > *,
footer > * {
  min-width: 0;
}

.button,
.header-cta,
.inner-cta,
.inner-actions a,
.quote-form button,
.lead-form button {
  white-space: normal;
  text-align: center;
}

.form-row,
.form-grid,
.form-section,
.link-grid,
.contact-cards,
.reference-grid,
.sector-grid,
.blog-grid,
.form-row > *,
.form-grid > *,
.form-section > *,
.link-grid > *,
.contact-cards > *,
.reference-grid > *,
.sector-grid > *,
.blog-grid > * {
  min-width: 0;
}

.hero {
  height: auto !important;
  min-height: max(650px, calc(100svh - 140px));
}

.hero-content {
  padding-bottom: clamp(56px, 7vh, 90px);
}

@media (max-width: 950px) {
  .site-header .header-cta {
    width: auto !important;
    min-width: 138px !important;
    height: 46px !important;
    padding: 0 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    font-size: 9px !important;
    line-height: 1.25 !important;
  }

  .site-header .header-cta span {
    margin: 0 !important;
    font-size: 14px !important;
  }

  .trust-strip {
    height: auto !important;
    min-height: 86px;
    padding: 16px 22px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-align: center;
    line-height: 1.4;
  }

  .trust-strip span {
    min-width: 0;
  }
}

@media (max-width: 620px) {
  .site-header {
    gap: 12px;
  }

  .site-header .header-cta {
    min-width: 122px !important;
    height: 44px !important;
    padding: 0 10px !important;
    font-size: 8.5px !important;
  }

  .hero {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .hero-image {
    width: 100% !important;
    inset: 0 !important;
    transform: none !important;
  }

  .hero-content {
    width: 100%;
    max-width: none;
    padding: 76px 24px 58px !important;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(38px, 12vw, 47px) !important;
    line-height: 0.94 !important;
    letter-spacing: -0.04em !important;
  }

  .hero h1 em {
    display: inline;
    max-width: 100%;
  }

  .hero-copy {
    max-width: 100%;
    font-size: 14px !important;
    line-height: 1.72 !important;
  }

  .hero-actions,
  .hero-actions .button {
    max-width: 100%;
  }

  .hero-actions .button {
    min-height: 52px;
    height: auto;
    padding: 15px 16px;
  }

  .hero-stats {
    padding-bottom: 4px;
  }

  .trust-strip {
    height: auto !important;
    min-height: 86px;
    padding: 16px 18px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-align: center;
    line-height: 1.4;
  }

  .trust-strip span {
    min-width: 0;
  }

  .section {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }

  .section-head,
  .section-head > div,
  .section-head h2,
  .project-copy h2,
  .about-copy h2,
  .quote h2 {
    max-width: 100%;
  }

  .section-head h2,
  .project-copy h2,
  .about-copy h2,
  .quote h2 {
    font-size: clamp(34px, 10.5vw, 42px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.035em !important;
  }

  .faq-list,
  .faq-list details,
  .faq-list summary {
    max-width: 100%;
    min-width: 0;
  }

  .faq-list summary {
    grid-template-columns: 34px minmax(0, 1fr) 20px !important;
    gap: 6px;
    font-size: 17px !important;
  }

  .faq-list summary b {
    text-align: right;
  }

  .quote-form,
  .lead-form {
    width: 100%;
    max-width: 100%;
  }

  .quote-form input,
  .quote-form select,
  .quote-form textarea,
  .lead-form input,
  .lead-form select,
  .lead-form textarea {
    min-width: 0;
    max-width: 100%;
  }

  .inner-hero h1,
  .article-page h1,
  .thanks-page h1,
  .form-section > div h2 {
    max-width: 100%;
    font-size: clamp(34px, 11vw, 46px) !important;
    line-height: 1.04 !important;
    overflow-wrap: anywhere;
  }

  .inner-split > img {
    width: 100%;
    height: auto;
    min-height: 0 !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .inner-actions,
  .article-links {
    max-width: 100%;
  }

  .inner-actions a,
  .article-links a {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  footer,
  .inner-footer {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
}

@media (max-width: 360px) {
  .site-header {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .site-header .brand > img {
    width: 58px !important;
    height: 58px !important;
  }

  .site-header .header-cta {
    min-width: 112px !important;
    font-size: 8px !important;
  }

  .category-nav {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .category-nav::before {
    font-size: 0.64rem !important;
    letter-spacing: 0.08em !important;
  }

  .hero-content {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .hero h1 {
    font-size: clamp(36px, 12vw, 43px) !important;
  }

  .section {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .project-copy,
  .about-copy,
  .quote-intro,
  .quote-form {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .trust-strip {
    grid-template-columns: 1fr;
    gap: 8px !important;
  }

  .inner-footer {
    grid-template-columns: 1fr !important;
  }
}
