/* Aftermath Investigations — global responsive overrides */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.site-page,
.site-page * {
  min-width: 0;
}

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

/* Hamburger (shown on small screens) */
.site-header__toggle {
  display: none;
  background: none;
  border: 1px solid rgba(26, 22, 34, 0.12);
  border-radius: 2px;
  width: 42px;
  height: 42px;
  padding: 10px 9px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}

.site-header__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #1a1622;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-open .site-header__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-open .site-header__toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .site-header__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1100px) {
  .site-header__phone {
    display: none !important;
  }

  .site-page [style*="grid-template-columns:repeat(4,1fr)"],
  .site-page [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

}


@media (max-width: 900px) {
  .site-header__inner {
    padding: 0 16px !important;
    min-height: 64px !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
  }

  .site-header__logo {
    order: 1 !important;
    margin-right: auto !important;
  }

  .site-header__actions {
    display: none !important;
  }

  .site-header__toggle {
    display: flex !important;
    order: 2 !important;
    margin-left: auto !important;
    z-index: 2 !important;
  }

  .site-header__nav {
    display: none !important;
    width: 100% !important;
    flex-basis: 100% !important;
    order: 5 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 8px 0 14px !important;
    margin: 0 !important;
    border-top: 1px solid rgba(26, 22, 34, 0.08) !important;
    flex-wrap: nowrap !important;
    background: #ffffff !important;
  }

  .site-header.is-open .site-header__nav {
    display: flex !important;
  }

  .site-header__link {
    display: block !important;
    padding: 14px 4px !important;
    border-bottom: 1px solid rgba(26, 22, 34, 0.06) !important;
    white-space: normal !important;
    width: 100% !important;
  }

  .site-header__portal {
    padding: 9px 12px !important;
    font-size: 10px !important;
  }


  /* Force every multi-column grid to stack */
  .site-page [style*="display:grid"][style*="grid-template-columns"],
  .site-page-hero__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }

  .site-page-hero__media {
    min-height: 220px !important;
    border-left: none !important;
    border-top: 1px solid rgba(26, 22, 34, 0.08) !important;
  }

  .site-page-hero__copy,
  .site-page-hero__inner,
  .site-hero-band__inner {
    padding: 32px 16px !important;
  }

  .site-service-hero {
    min-height: 280px !important;
  }

  .site-service-hero > div[style*="max-width:1200px"] {
    padding: 40px 16px 36px !important;
  }

  .site-footer__inner {
    padding: 32px 16px !important;
    gap: 24px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .site-footer__brand {
    max-width: 100% !important;
  }

  /* Horizontal padding */
  .site-page [style*="padding-left:32px"],
  .site-page [style*="padding-right:32px"],
  .site-page [style*="padding-left:48px"],
  .site-page [style*="padding-right:48px"],
  .site-page [style*="padding-left:56px"],
  .site-page [style*="padding-right:56px"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .site-page [style*="padding:64px"],
  .site-page [style*="padding:72px"],
  .site-page [style*="padding:56px"],
  .site-page [style*="padding:54px"],
  .site-page [style*="padding:48px"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Vertical section padding */
  .site-page [style*="padding-top:80px"] {
    padding-top: 40px !important;
  }

  .site-page [style*="padding-bottom:80px"] {
    padding-bottom: 40px !important;
  }

  .site-page [style*="padding-top:64px"] {
    padding-top: 32px !important;
  }

  .site-page [style*="padding-bottom:64px"] {
    padding-bottom: 32px !important;
  }

  .site-page [style*="padding:72px 32px 80px"] {
    padding: 40px 16px 48px !important;
  }

  .site-page [style*="border-right:1px solid"] {
    border-right: none !important;
    border-bottom: 1px solid rgba(26, 22, 34, 0.08) !important;
  }

  .site-page h1 {
    font-size: clamp(28px, 8vw, 40px) !important;
    line-height: 1.1 !important;
  }

  .site-page h2 {
    font-size: clamp(24px, 6.5vw, 34px) !important;
    line-height: 1.15 !important;
  }

  /* Hero media blocks */
  .site-page [style*="min-height:360px"],
  .site-page [style*="min-height:420px"],
  .site-page [style*="min-height:440px"] {
    min-height: 220px !important;
  }

  .site-page [style*="height:clamp(340px"] {
    height: 220px !important;
    min-height: 220px !important;
  }

  form [style*="display:grid"][style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .site-page form button[type="submit"],
  .site-page button[type="submit"] {
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .site-header__logo img {
    height: 28px !important;
  }

  .site-header__portal {
    display: none !important;
  }

  .site-page [style*="gap:28px"],
  .site-page [style*="gap:32px"],
  .site-page [style*="gap:40px"],
  .site-page [style*="gap:48px"] {
    gap: 16px !important;
  }

  .site-page [style*="margin-bottom:42px"],
  .site-page [style*="margin-bottom:44px"],
  .site-page [style*="margin-bottom:46px"] {
    margin-bottom: 24px !important;
  }

  .site-page [style*="height:300px"] {
    height: 200px !important;
  }

  .site-page [style*="padding:48px 44px 52px"],
  .site-page [style*="padding:40px 36px"],
  .site-page [style*="padding:64px 0 64px 56px"],
  .site-page [style*="padding:64px 48px 64px 0"] {
    padding: 28px 16px !important;
  }

  .site-page [style*="font:400 62px"],
  .site-page [style*="font:400 52px"],
  .site-page [style*="font:400 46px"],
  .site-page [style*="font:400 44px"],
  .site-page [style*="font:400 40px"],
  .site-page [style*="font:400 36px"],
  .site-page [style*="font:400 34px"] {
    font-size: 28px !important;
    line-height: 1.12 !important;
  }

  /* Trust strip cards */
  .site-page [style*="min-width:240px"] {
    min-width: 100% !important;
  }

  .site-page [style*="margin-left:auto"] {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .site-page a[href="/contact/"][style*="padding:13px"],
  .site-page a[href^="tel:"][style*="padding:12px"] {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
