/* Company navigation and the optional after-hero page shortcuts. */
.header {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.header .header-inner {
  display: grid;
  width: min(1500px, 100%);
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand main contact";
  align-items: center;
  gap: 5px 20px;
  margin-inline: auto;
  padding: 12px 32px;
}
.header .brand { grid-area: brand; align-self: center; flex: 0 0 auto; }
.header .brand img { width: 185px; height: auto; }
.header #main-navigation {
  display: flex;
  grid-area: main;
  align-items: stretch;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.header #main-navigation a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 10px;
  border-bottom: 2px solid transparent;
  border-radius: 2px 2px 0 0;
  color: #34465b;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.header #main-navigation a:hover { background: var(--color-surface-soft); color: var(--color-action); }
.header #main-navigation a:is([aria-current="page"], [aria-current="location"]) {
  border-bottom-color: var(--color-action);
  background: #eef3ff;
  color: var(--color-action);
  font-weight: 700;
}
.header .header-contact {
  display: flex;
  grid-area: contact;
  align-items: center;
  gap: 14px;
}
.header .header-phone {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--color-brand-navy);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
/* Page-specific CTA labels must not resize the centered navigation column. */
.header .button-small {
  display: inline-flex;
  width: 210px;
  flex-shrink: 0;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}
.header .menu-toggle {
  display: none;
  grid-area: toggle;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-brand-navy);
  font-size: 14px;
}

.page-navigation {
  position: relative;
  z-index: 4;
  display: block;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e4e8ee;
  border-bottom: 1px solid #e4e8ee;
  background: var(--color-surface-soft);
  transition: box-shadow .18s ease, background-color .18s ease;
}
.page-navigation-inner {
  display: flex;
  width: min(var(--content-width), calc(100% - 2 * var(--gutter)));
  min-height: 60px;
  align-items: center;
  gap: clamp(18px, 2.5vw, 36px);
  margin: 0 auto;
}
.page-navigation-label {
  flex: 0 0 auto;
  padding-right: clamp(18px, 2.5vw, 36px);
  border-right: 1px solid var(--color-border);
  color: #34465b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.page-navigation-links {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 24px;
}
.page-navigation-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: #536479;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
  transition: color .18s ease, box-shadow .18s ease;
}
.page-navigation-links a:hover { color: var(--color-action); box-shadow: inset 0 -2px #b7c9ed; }
.page-navigation-links a[aria-current="location"] { color: var(--color-action); box-shadow: inset 0 -2px var(--color-action); }
.page-navigation-links .page-navigation-request { margin-left: auto; color: var(--color-action); font-weight: 600; }
.page-navigation.is-stuck { background: var(--color-surface); box-shadow: var(--shadow-sticky); }
.page-navigation-summary {
  display: flex;
  width: calc(100% - 80px);
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-inline: auto;
  padding: 12px 0;
  color: #34465b;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}
.page-navigation-summary::-webkit-details-marker { display: none; }
.page-navigation-summary-title { color: #536479; font-weight: 400; }
.page-navigation-chevron {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.page-navigation[open] .page-navigation-chevron { transform: rotate(225deg); }
.page-navigation-summary:focus-visible { outline-offset: -3px; }

@media (min-width: 1101px) {
  .header { position: sticky; top: 0; box-shadow: 0 3px 14px #162b4608; }
  .header .header-contact { gap: 12px; }
  .header .header-phone { font-size: 14px; }
  .header .button-small { padding-inline: 12px; font-size: 14px; }
  .page-navigation {
    position: sticky;
    top: var(--site-header-height, 84px);
    z-index: 25;
  }
  .page-navigation-summary { display: none; }
  .header.contextual-cta:not(.hero-cta-passed) .button-small { visibility: hidden; opacity: 0; pointer-events: none; }
  .header.contextual-cta .button-small { transition: opacity .18s ease, background-color .18s ease; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .page-navigation-inner { width: calc(100% - 80px); }
}
/* Keep the expanded service names from colliding with contact actions. */
@media (min-width: 1101px) and (max-width: 1350px) {
  .header .header-inner { gap: 12px; padding-inline: 24px; }
  .header .brand img { width: 150px; }
  .header #main-navigation a { padding-inline: 6px; }
  .header .header-phone { display: none; }
}
@media (max-width: 1100px) {
  .header .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "brand toggle contact" "main main main";
    gap: 8px 14px;
    padding: 12px 30px 0;
  }
  .header .brand img { width: 185px; }
  .header .menu-toggle:not([hidden]) { display: inline-flex; }
  .header #main-navigation {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 6px 0 9px;
    border-top: 1px solid #edf0f3;
  }
  .header.menu-ready #main-navigation { display: none; }
  .header.menu-ready.menu-open #main-navigation { display: flex; }
  .header #main-navigation a {
    min-height: 48px;
    padding: 0 12px;
    border-bottom: 0;
    border-left: 3px solid transparent;
    border-radius: 2px;
  }
  .header #main-navigation a:is([aria-current="page"], [aria-current="location"]) { border-left-color: var(--color-action); }
  .header .header-contact { gap: 12px; }
  .page-navigation:not([open]) > .page-navigation-inner { display: none; }
  .page-navigation .page-navigation-label { display: none; }
  .page-navigation-inner {
    width: calc(100% - 80px);
    align-items: flex-start;
    gap: 12px;
    padding: 3px 0 10px;
  }
  .page-navigation-summary { width: calc(100% - 80px); }
  .page-navigation-links { gap: 0 20px; }
}
@media (max-width: 840px) {
  .header .button-small { display: none; }
}
@media (max-width: 760px) {
  .header .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand toggle" "contact contact" "main main";
    gap: 3px 12px;
    padding: 11px 22px 0;
  }
  .header .brand img { width: 170px; }
  .header .header-contact { min-height: 40px; justify-content: flex-end; }
  .header .header-phone { min-height: 44px; font-size: 14px; }
  .header #main-navigation { padding-top: 5px; }
  .page-navigation-inner {
    display: block;
    width: calc(100% - 48px);
    padding: 0 0 14px;
  }
  .page-navigation-label { display: block; padding: 0 0 4px 9px; border: 0; font-size: 12px; }
  .page-navigation-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
  .page-navigation-links a { min-height: 48px; padding-inline: 0; font-size: 14px; }
  .page-navigation-links .page-navigation-request { grid-column: 1 / -1; margin-left: 0; }
  .page-navigation-summary { width: calc(100% - 48px); }
}
@media (max-width: 420px) {
  .header .header-inner { row-gap: 4px; }
  .header .header-contact { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .header .header-inner { padding-inline: 18px; }
  .header .brand img { width: 158px; }
  .page-navigation-inner, .page-navigation-summary { width: calc(100% - 40px); }
  .page-navigation-links { gap: 2px 12px; }
  .page-navigation-links a { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .header #main-navigation a, .page-navigation, .page-navigation-links a, .page-navigation-chevron { transition: none; }
}
