/*
 * Components — buttons, header, footer, section primitives
 * All values reference tokens.css — no one-off hex/spacing/radius values.
 */

/* ─── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.47rem 2rem;                    /* XD: 33px tall = 2×7.5px + 14px font + 2×2px border */
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-sm);
  font-weight: var(--hap-weight-bold);
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--hap-radius-pill);
  text-decoration: none;
  border: 2px solid transparent;
  transition: all var(--hap-transition);
  cursor: pointer;
}

.btn--primary {
  background-color: var(--hap-green);
  color: var(--hap-white);
  border-color: var(--hap-green);
  min-width: clamp(128px, 13.36vw, 214px);  /* XD: body CTA buttons are 171px wide */
}

.btn--primary:hover {
  opacity: 0.9;
  text-decoration: none;
  color: var(--hap-white);
}

.btn--outline {
  background-color: transparent;
  color: var(--hap-green);
  border-color: var(--hap-green);
}

.btn--outline:hover {
  background-color: var(--hap-green);
  color: var(--hap-white);
  text-decoration: none;
}

.btn--white {
  background-color: var(--hap-white);
  color: var(--hap-black);
  border: none;
  min-width: clamp(90px, 9.375vw, 150px);   /* XD: hero Let's Talk button is 120px */
}

.btn--white:hover {
  background-color: var(--hap-bg-light);
  color: var(--hap-black);
  text-decoration: none;
}

/* ─── Site Header ───────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--hap-white);
  transition: box-shadow var(--hap-transition);
}

.site-header--scrolled {
  box-shadow: var(--hap-shadow);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--hap-space-md);
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: var(--hap-space-sm) var(--hap-space-md);
}

.site-header__logo {
  flex-shrink: 0;
}

.site-header__logo img {
  height: clamp(36px, 3.75vw, 60px);
  width: auto;
}

.site-header__logo:hover {
  text-decoration: none;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--hap-space-md);
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--hap-space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  color: var(--hap-black);
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-sm);
  font-weight: var(--hap-weight-bold);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--hap-transition);
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a,
.site-nav__list .current-menu-parent > a,
.site-nav__list .current-menu-ancestor > a,
.site-nav__list .current_page_item > a,
.site-nav__list .current_page_parent > a,
.site-nav__list .current_page_ancestor > a {
  color: var(--hap-green);
}

/* Dropdown submenus */
.site-nav__list > li {
  position: relative;
}

.site-nav__list .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--hap-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: var(--hap-radius-sm);
  padding: var(--hap-space-xs) 0;
  list-style: none;
  margin: 0;
  z-index: 100;
}

@media (min-width: 901px) {
  .site-nav__list > li:hover > .sub-menu,
  .site-nav__list > li:focus-within > .sub-menu {
    display: block;
  }
}

.site-nav__list .sub-menu li {
  margin: 0;
}

.site-nav__list .sub-menu a {
  display: block;
  padding: 0.5rem var(--hap-space-sm);
  white-space: nowrap;
  font-size: var(--hap-text-sm);
}

.site-nav__list .sub-menu a:hover {
  background: var(--hap-bg-light);
  color: var(--hap-green);
}

/* Nested submenu (level 3) — flyout to the right on desktop.
   Mobile repositions submenus in responsive.css and opens them via .is-open. */
.site-nav__list .sub-menu .sub-menu {
  top: 0;
  left: 100%;
}

@media (min-width: 901px) {
  .site-nav__list .sub-menu li:hover > .sub-menu,
  .site-nav__list .sub-menu li:focus-within > .sub-menu {
    display: block;
  }
}

/* Caret indicator for submenu items that have a further flyout.
   Only applies inside .sub-menu (level 2+) so the top-level nav stays clean —
   the presence of a top-level dropdown is already obvious on hover. */
.site-nav__list .sub-menu .menu-item-has-children > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hap-space-sm);
}

.site-nav__list .sub-menu .menu-item-has-children > a::after {
  content: '›';
  font-size: 1.1em;
  line-height: 1;
  opacity: 0.7;
}

/* Header actions (search, CTA buttons) */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.25vw, 20px);  /* XD: ~20px between search/buttons at 1280 */
}

.site-header__actions .btn {
  padding: 0.47rem 1.75rem;         /* XD: header buttons are 120x33 */
  min-width: clamp(90px, 9.375vw, 150px);  /* XD: 120px — overrides --primary's 171px */
}

.site-header__search {
  background: none;
  border: none;
  padding: 0;
  width: 33px;
  height: 33px;
  color: var(--hap-black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger — mobile only */
.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.site-header__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--hap-black);
  transition: all var(--hap-transition);
}

/* Nav close button — hidden on desktop, shown at ≤900px */
.site-nav__close {
  display: none;
  position: absolute;
  top: var(--hap-space-sm);
  left: var(--hap-space-sm);
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hap-black);
  font-size: var(--hap-text-3xl);
  line-height: 1;
  z-index: 201;
  align-items: center;
  justify-content: center;
}

/* Nav overlay backdrop — dims page behind open drawer */
.site-nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, var(--hap-overlay-medium));
  z-index: 199;
  transition: opacity var(--hap-transition);
}

.site-nav__overlay.is-active {
  display: block;
}

/* Search overlay — desktop: drops down from header; mobile: full-height drawer */
.search-overlay {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  background: var(--hap-white);
  z-index: 150;
  overflow: hidden;
  transition: top var(--hap-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--hap-space-sm) var(--hap-space-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
}

.search-overlay.is-open {
  top: 100%;
  opacity: 1;
  pointer-events: auto;
}

.search-overlay__form {
  display: flex;
  gap: var(--hap-space-xs);
  align-items: center;
  width: 100%;
  max-width: 50%;
  white-space: nowrap;
}

.search-overlay__input {
  flex: 1;
  min-width: 0;
  padding: 0.47rem 1rem;
  height: 33px;
  box-sizing: border-box;
  border: 1px solid var(--hap-border);
  border-radius: var(--hap-radius-pill);
  font-size: var(--hap-text-sm);
  font-family: var(--hap-font-body);
}

.search-overlay__input:focus {
  border-color: var(--hap-navy);
  outline: none;
}

.search-overlay__input:focus-visible {
  outline: 2px solid var(--hap-navy);
  outline-offset: 2px;
}

.search-overlay__close {
  background: none;
  border: none;
  font-size: var(--hap-text-5xl);
  font-weight: var(--hap-weight-light);
  cursor: pointer;
  padding: var(--hap-space-xs);
  color: var(--hap-black);
  line-height: 1;
  flex-shrink: 0;
  position: absolute;
  right: var(--hap-space-md);
}

/* ─── Site Footer ───────────────────────────────────────────────────────── */

.site-footer {
  background-color: var(--hap-navy);
  color: var(--hap-white);
  padding: var(--hap-space-xl) 0 0;
}

.site-footer__inner {
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

.site-footer a {
  color: var(--hap-white);
}

.site-footer a:hover {
  color: var(--hap-green);
  text-decoration: none;
}

/* Column grid */
.site-footer__columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--hap-space-xl);
  padding-bottom: var(--hap-space-xl);
}

/* Column headings with green underline accent */
.site-footer__heading {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-lg);
  font-weight: var(--hap-weight-bold);
  color: var(--hap-white);
  margin-bottom: var(--hap-space-md);
  padding-bottom: var(--hap-space-xs);
  position: relative;
}

.site-footer__heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--hap-green);
}

/* Address blocks */
.site-footer__address {
  font-style: normal;
  font-size: var(--hap-text-sm);
  line-height: var(--hap-leading-relaxed);
  margin-bottom: var(--hap-space-sm);
}

.site-footer__address strong {
  display: block;
  text-transform: uppercase;
  font-size: var(--hap-text-xs);
  letter-spacing: 0.5px;
  margin-bottom: var(--hap-space-xs);
}

/* Contact line */
.site-footer__contact {
  font-size: var(--hap-text-sm);
  line-height: var(--hap-leading-relaxed);
}

.site-footer__contact strong {
  display: block;
  text-transform: uppercase;
  font-size: var(--hap-text-xs);
  letter-spacing: 0.5px;
  margin-bottom: var(--hap-space-xs);
}

/* Footer menu (Quick Links) */
.site-footer__menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer__menu li {
  margin-bottom: var(--hap-space-xs);
}

.site-footer__menu a {
  font-size: var(--hap-text-sm);
  transition: color var(--hap-transition);
}

/* Social icons */
.site-footer__social {
  display: flex;
  gap: var(--hap-space-sm);
  margin-bottom: var(--hap-space-md);
}

.site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all var(--hap-transition);
}

.site-footer__social a:hover {
  border-color: var(--hap-green);
  background-color: var(--hap-green);
}

.site-footer__social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Client Login button — outline on dark bg */
.site-footer__login.btn {
  color: var(--hap-white);
  border-color: var(--hap-white);
  background-color: transparent;
}

.site-footer__login.btn:hover {
  background-color: var(--hap-white);
  color: var(--hap-navy);
}

/* Bottom bar */
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--hap-space-md) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.site-footer__copy {
  font-size: var(--hap-text-sm);
  opacity: 0.7;
  margin: 0;
}

/* Legal links */
.site-footer__legal {
  display: flex;
  gap: var(--hap-space-sm);
  font-size: var(--hap-text-sm);
}

.site-footer__legal a {
  opacity: 0.7;
  transition: opacity var(--hap-transition), color var(--hap-transition);
}

.site-footer__legal a:hover {
  opacity: 1;
}

.site-footer__legal a + a::before {
  content: '|';
  margin-right: var(--hap-space-sm);
  opacity: 0.5;
  pointer-events: none;
}

/* ─── Section: Hero ─────────────────────────────────────────────────────── */

.section-hero {
  position: relative;
  min-height: clamp(150px, 15.625vw, 250px);      /* pages may override via inline style */
  display: flex;
  align-items: center;
  background-color: var(--hap-navy);
  overflow: hidden;
}

/* Real <img> element (not background-image) — enables srcset + per-breakpoint object-position. */
.section-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--obj-pos, center);
  z-index: 0;
}

.section-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #222121, rgba(0, 0, 0, 0.2));
  z-index: 1;
}

/* XD Medical Coding: solid black left → fast fade. Image has partial gradient baked in. */
.section-hero--dark-left::after {
  background: linear-gradient(to right, rgba(0, 0, 0, 1) 5%, rgba(0, 0, 0, 0) 45%);
}

/* No CSS overlay — for images with baked-in gradients */
.section-hero--no-overlay::after {
  display: none;
}

/* XD-exact gradient overlay — sampled from Rectangle 338 (Consulting, About) */
.section-hero--xd-gradient::after {
  background: linear-gradient(to right,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 28%,
    rgba(0,0,0,0.75) 38%,
    rgba(0,0,0,0.55) 48%,
    rgba(0,0,0,0.35) 58%,
    rgba(0,0,0,0.18) 68%,
    rgba(0,0,0,0.04) 80%,
    rgba(0,0,0,0) 90%
  );
}

/* XD-exact gradient — wider opaque zone (Why Outsource RCM, Medical Billing) */
.section-hero--xd-gradient-wide::after {
  background: linear-gradient(to right,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 40%,
    rgba(0,0,0,0.83) 50%,
    rgba(0,0,0,0.57) 60%,
    rgba(0,0,0,0.31) 70%,
    rgba(0,0,0,0.05) 80%,
    rgba(0,0,0,0) 90%
  );
}

/* Consulting — 42% black padding edge, fast fade */
.section-hero--xd-gradient-consulting::after {
  background: linear-gradient(to right,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 43%,
    rgba(0,0,0,0.5) 50%,
    rgba(0,0,0,0.2) 58%,
    rgba(0,0,0,0.05) 65%,
    rgba(0,0,0,0) 72%
  );
}

/* News — 45% black padding edge, slow fade (sampled from Rectangle 338) */
.section-hero--xd-gradient-news::after {
  background: linear-gradient(to right,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 45%,
    rgba(0,0,0,0.84) 55%,
    rgba(0,0,0,0.70) 65%,
    rgba(0,0,0,0.45) 75%,
    rgba(0,0,0,0.25) 85%,
    rgba(0,0,0,0.1) 95%,
    rgba(0,0,0,0) 100%
  );
}

/* Gradient for black-padded image — opaque to 25% (hides edge), light fade to 85% (Team) */
.section-hero--xd-gradient-smooth::after {
  background: linear-gradient(to right,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 25%,
    rgba(0,0,0,0.6) 35%,
    rgba(0,0,0,0.35) 45%,
    rgba(0,0,0,0.3) 55%,
    rgba(0,0,0,0.25) 65%,
    rgba(0,0,0,0.18) 75%,
    rgba(0,0,0,0.12) 85%,
    rgba(0,0,0,0.06) 95%,
    rgba(0,0,0,0) 100%
  );
}

/* Flat dark overlay — Clients sub-pages (Radiology, Hospital, Physician) */
.section-hero--dark-flat::after {
  background: rgba(0, 0, 0, 0.6);               /* XD: Rectangle 299 opacity 0.6 */
}

/* Light hero variant — white bg, dark text, no overlay (Clinical Specialties) */
.section-hero--light {
  background-color: var(--hap-bg-light);         /* XD: #f5f5f5 grey, not white */
  min-height: auto;
  padding: clamp(59px, 6.1719vw, 99px) 0;       /* XD: 79px top & bottom (tighter than dark heroes) */
}
.section-hero--light .section-hero__content {
  padding-top: 0;
  padding-bottom: 0;
}
.section-hero--light::after {
  display: none;
}
.section-hero--light .section-hero__title {
  color: var(--hap-black);
}
.section-hero--light .section-hero__subtitle {
  color: var(--hap-black);
  font-weight: var(--hap-weight-regular);
  max-width: clamp(670px, 69.8438vw, 1118px);   /* XD: 894px @ 1280 (wider than dark hero) */
}

/* ─── Soft overlay modifiers ─────────────────────────────────────────── */
/* Lighter treatment for in-scope hero pages. Preserves all above rules. */

/* Primary: flat ~30% wash. Default choice for dim/mid-tone backgrounds. */
.section-hero--soft-flat::after {
  background: rgba(0, 0, 0, var(--hap-overlay-light));  /* 0.30 */
}

/* Fallback: text-side dim for bright backgrounds where flat wash fails WCAG on subtitle. */
.section-hero--soft-left::after {
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.60) 0%,
    rgba(0, 0, 0, 0.40) 35%,
    rgba(0, 0, 0, 0.22) 70%,
    rgba(0, 0, 0, 0.18) 100%
  );
}

/* Fallback: bottom-weighted for images with subjects composed at top. */
.section-hero--soft-bottom::after {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.60) 0%,
    rgba(0, 0, 0, 0.30) 60%,
    rgba(0, 0, 0, 0.18) 100%
  );
}

.section-hero__content {
  position: relative;
  z-index: 2;   /* above ::after overlay (z:1) which is above __bg img (z:0) */
  width: 100%;
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: var(--hap-space-2xl) var(--hap-space-md) clamp(62px, 6.4063vw, 103px); /* XD: 82px bottom */
}

.section-hero__title {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-6xl);
  font-weight: var(--hap-weight-bold);
  color: var(--hap-white);
  margin-bottom: var(--hap-space-sm);
}

.section-hero__subtitle {
  font-size: var(--hap-text-lg);
  color: var(--hap-white);
  font-family: var(--hap-font-body);
  font-weight: var(--hap-weight-regular);          /* XD: 400 on all hero subtitles (not light/300) */
  margin-bottom: clamp(26px, 3.125vw, 50px); /* XD: 40px gap to CTA button */
  line-height: var(--hap-leading-relaxed);
  max-width: clamp(600px, 60.3vw, 960px);       /* XD: 772px @ 1280 — scales with font-size growth */
}

/* About keeps a full intro paragraph in the hero; fit it to the same desktop band as cousin pages. */
@media (min-width: 901px) {
  .section-hero--about-fit {
    height: var(--hap-hero-tall);
  }

  .section-hero--about-fit .section-hero__content {
    padding-top: clamp(36px, 3.75vw, 60px);
    padding-bottom: clamp(36px, 3.75vw, 60px);
  }

  .section-hero--about-fit .section-hero__title {
    margin-bottom: clamp(6px, 0.625vw, 10px);
  }

  .section-hero--about-fit .section-hero__subtitle {
    max-width: clamp(640px, 62vw, 980px);
    margin-bottom: clamp(16px, 1.5vw, 24px);
    line-height: 1.4;
  }
}

/* ─── Section: Content ──────────────────────────────────────────────────── */

.section-content {
  padding: var(--hap-section-pad) 0;
}

/* When content sections stack, previous section's bottom padding provides the gap */
.section-content + .section-content {
  padding-top: 0;
}

/* Background color transitions need top padding (visible change in both directions) */
.section-content + .section-content--alt,
.section-content--alt + .section-content:not(.section-content--alt) {
  padding-top: var(--hap-section-pad);
}

/* Extra bottom spacing before footer (per-page opt-in via pad_bottom param) */
.section-content--pad-bottom {
  padding-bottom: clamp(83px, 8.5938vw, 138px);  /* XD: ~110px gap to footer */
}

/* Inside sidebar layouts, content sections flow continuously */
.layout-with-sidebar__main .section-content {
  padding: 0 0 var(--hap-space-xl);
}

/* Sidebar inner pages use smaller headings + body than homepage — XD: 21px, 16px */
.layout-with-sidebar .section-content__heading {
  font-size: var(--hap-text-xl);               /* XD: 21px @ 1280 (inner-page sidebar context) */
}

.layout-with-sidebar .section-content__body {
  font-size: var(--hap-text-md);               /* 16px @ 1280, scales responsively (inner-page sidebar context) */
}

.layout-with-sidebar .section-content__bullets {
  font-size: var(--hap-text-md);               /* 16px @ 1280, scales responsively — bullets are siblings of __body */
}

/* Tighter spacing variant (Careers page) */
.layout-with-sidebar--tight .section-content {
  padding-bottom: var(--hap-space-md);
}

.section-content--italic .section-content__body {
  font-style: italic;                         /* XD: Mission Statement uses HelveticaNeue-Italic */
}

.section-content--sm-heading .section-content__heading {
  font-size: var(--hap-text-4xl);             /* XD: 38px @ 1280 (service detail pages) */
  margin-bottom: var(--hap-space-ml);         /* XD: 37px heading→body gap on service pages */
}

.section-dark--sm-heading .section-dark__heading {
  font-size: var(--hap-text-4xl);             /* XD: 38px @ 1280 (service detail pages) */
}

.section-content--md-heading .section-content__heading {
  font-size: var(--hap-text-3xl);             /* XD: 28px @ 1280 (Medical Coding lower sections) */
}

/* Continuous section flow — tighter stacking for pages with many short sections (Medical Coding) */
.sections-continuous .section-content {
  padding: clamp(52px, 6.25vw, 100px) 0;     /* XD: 80px @ 1280 */
}

.sections-continuous .section-content + .section-content {
  padding-top: 0;                             /* XD: gap comes from previous section's bottom only */
  padding-bottom: clamp(29px, 3.0469vw, 49px); /* XD: 39px @ 1280 (half-leading corrected from plugin data) */
}

/* Tight padding for decorative image-only sections (e.g. Medical Coding callout) */
.section-content.section-content--tight {
  padding: 0;
}

.section-content__callout-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.section-content--sm-body .section-content__body,
.section-content--sm-body .section-content__bullets {
  font-size: var(--hap-text-base);            /* XD: 16px (Clients sub-pages) */
}

.section-content--alt {
  background-color: var(--hap-bg-light);
}

/* Alt wrapper — "Looking for Specialized..." + overlay cards share a gray bg */
.section--alt {
  background-color: var(--hap-bg-light);
  padding: clamp(66px, 6.875vw, 110px) 0 clamp(92px, 9.6094vw, 154px); /* XD: 88px top, 123px bottom */
}

.section--alt > .section-content {
  padding: 0;
}

/* Gap between body text and card row in alt content section */
.section--alt > .section-cards {
  padding-top: var(--hap-space-lg);        /* XD: ~50-60px gap below body text */
}

.section-content__inner {
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

.section-content__heading {
  color: var(--hap-black);
  margin-bottom: var(--hap-space-sm);            /* XD: 15-27px heading→body gaps */
}

/* Alt wrapper sections (e.g. "Looking for Specialized...") — centered, matches other section headings */
.section--alt .section-content__heading {
  text-align: center;
  font-size: var(--hap-text-5xl);
  color: var(--hap-black);
  max-width: 1270px;                       /* Parent section caps at 1280; falls to container width on mobile */
  margin: 0 auto var(--hap-space-sm);      /* XD: 16px gap to body text */
}

.section--alt .section-content__body {
  text-align: center;
  max-width: clamp(600px, 80.4%, 1029px);  /* XD: 1029px at 1280 — clamped so text stays 4 lines at wider viewports */
  margin: 0 auto;
}

.section-content__body {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-lg);
  line-height: var(--hap-leading-relaxed);
  letter-spacing: 0.04px;
  color: var(--hap-black);
}

/* Intro body text — ~66% of container width, scales with viewport */
.home-intro-block .section-content__body {
  max-width: clamp(600px, 66vw, 1080px);   /* XD: 845px @ 1280 — scales with text-lg growth */
}

.section-content__body p {
  margin-bottom: var(--hap-space-md);            /* XD: 28px gap between paragraphs (56px tspan gap - 28px line-height) */
}

.sections-continuous .section-content__body p:last-child {
  margin-bottom: 0;                             /* Don't add to section padding gap */
}

/* ── WP Editor Content Typography ─────────────────────────────── */
.entry-content h2 {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-3xl);
  font-weight: 700;
  color: var(--hap-black);
  margin: 2rem 0 1rem;
}

.entry-content h3 {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-2xl);
  font-weight: 700;
  color: var(--hap-black);
  margin: 1.75rem 0 0.75rem;
}

.entry-content h4 {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-xl);
  font-weight: 700;
  color: var(--hap-black);
  margin: 1.5rem 0 0.5rem;
}

.entry-content p {
  font-size: var(--hap-text-md);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.5rem 1.5rem;
  line-height: 1.7;
}

/* <ul> in news/page bodies: green dot bullets matching the
   .section-content__bullets pattern used elsewhere on the site. */
.entry-content ul {
  list-style: none;
  padding-left: 0;
}

.entry-content ul li {
  position: relative;
  padding-left: var(--hap-space-sm);
  margin-bottom: 0.5rem;
}

.entry-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  /* Optical center with text x-height for line-height: 1.7. */
  top: 0.7em;
  width: 8px;
  height: 8px;
  background-color: var(--hap-green);
}

/* Numbered lists keep native markers. */
.entry-content ol {
  list-style: decimal;
}

.entry-content ol li {
  margin-bottom: 0.5rem;
}

.entry-content .mips-content ul {
  padding-left: 1.5em;
}

/* Right-floated aside images: the MIPS template renders an <img> with
   .content-with-aside__image before intro paragraphs + bullets so the text
   wraps around the image (matches live hapusa.com layout). The same rule
   drives any <img class="alignright"> embedded in seed HTML (e.g. the Tips
   page "Convenient and Straightforward Payments" section). Mobile falls
   back to a stacked/un-floated layout. */
.entry-content .content-with-aside__image,
.entry-content img.alignright {
  float: right;
  max-width: clamp(220px, 36%, 360px);
  height: auto;
  margin: 0.25rem 0 1rem 2rem;
  clear: right;
}

@media (max-width: 48rem) {
  .entry-content .content-with-aside__image,
  .entry-content img.alignright {
    float: none;
    display: block;
    max-width: 100%;
    margin: 1.5rem auto;
  }

  /* 5xl floors at 33px — too large for phone screens on these long-text headings.
     Drop to 3xl (23px floor) so "Looking for Specialized..." and
     "We're supporters by nature" wrap fewer lines on mobile. */
  .section--alt .section-content__heading,
  .section-badges__heading {
    font-size: var(--hap-text-3xl);
  }
}

.entry-content blockquote {
  border-left: 4px solid var(--hap-green);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--hap-bg-light);
  font-style: italic;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.entry-content .alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
}

.entry-content .alignright {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
}

.entry-content .aligncenter {
  display: block;
  margin: 1rem auto;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.entry-content th,
.entry-content td {
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
  text-align: left;
}

.entry-content th {
  background: var(--hap-navy);
  color: #fff;
  font-weight: 700;
}

.entry-content a:not(.btn) {
  color: var(--hap-green);
  text-decoration: underline;
}

.entry-content a:not(.btn):hover {
  color: var(--hap-navy);
}

/* Centered CTA button wrapper inside entry-content (set by sidebar-layout
   template when ACF CTA fields render). */
.entry-content .entry-cta {
  text-align: center;
  margin: 2.5rem 0;
}

/* Home intro block — intro + callout together fill viewport (1280×780 design) */
.home-intro-block {
  display: flex;
  flex-direction: column;
  gap: var(--hap-space-xl);
  padding: var(--hap-section-pad) 0;
}

.home-intro-block .section-content {
  padding: 0;
}

/* Callout variant — large-format text (e.g. "In healthcare, outcomes depend...") */
.section-content--callout .section-content__body {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-lg);              /* XD: 18px — callout uses same body size */
  font-weight: var(--hap-weight-regular);
  letter-spacing: 0.002em;
  line-height: 1.5;
  color: var(--hap-black);
  text-align: left;
  max-width: clamp(600px, 66vw, 1056px);   /* XD: 845px @ 1280 */
}

/* Green dot decorative pattern — right-aligned, fades from left (from XD SVG source) */
.section-content--callout .section-content__inner::before {
  content: '';
  display: block;
  width: clamp(300px, 49.22vw, 630px);
  height: 80px;
  margin-left: auto;
  margin-bottom: var(--hap-space-xl);
  background-image:
    linear-gradient(to right, var(--hap-white), transparent 40%),
    radial-gradient(circle, var(--hap-green) 5px, transparent 5px);
  background-size: 100% 100%, 20px 20px;
  background-position: left center, 5px 5px;
  pointer-events: none;
}

/* Green-dot bullets: applied via the explicit .section-content__bullets class
   anywhere it appears (designed sections + entry-content), and also as a
   default to any <ul> inside a body wrapper that ISN'T entry-content. The
   `:not(.entry-content)` guard preserves UA discs for plain <ul> in editor
   content (e.g. a Gutenberg-authored list without the brand class).
   A paired rule below (`.entry-content ul.section-content__bullets`) turns
   off the UA disc when the class appears inside entry-content so only the
   green ::before renders — otherwise list-style:disc wins on specificity and
   both markers show. */
.section-content__bullets,
.section-content__body:not(.entry-content) ul {
  list-style: none;
  padding: 0;
  margin: var(--hap-space-md) 0;                 /* XD: 28px gap before and after bullet list */
  font-size: var(--hap-text-lg);                 /* XD: 18px — same as .section-content__body */
  line-height: 1.56;                             /* XD: 28px / 18px ≈ 1.56 */
}

.section-content__bullets li,
.section-content__body:not(.entry-content) ul li {
  position: relative;
  padding-left: var(--hap-space-sm);               /* XD: ~18px (8px dot + 10px gap to text) */
  margin-bottom: 0.25rem;                        /* XD: tight single-spaced bullets */
  color: var(--hap-black);                       /* XD: #000, not grey */
}

.section-content__bullets li::before,
.section-content__body:not(.entry-content) ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.556em;                                  /* centered: (line-height 28px - dot 8px) / 2 = 10px */
  width: 8px;                                    /* XD: small filled green dot */
  height: 8px;
  background-color: var(--hap-green);
  border-radius: 50%;                            /* XD: circle, not checkmark */
}

/* Inside entry-content, suppress the UA disc that .entry-content ul would
   otherwise apply (list-style:disc at specificity 0,0,2,1 beats
   .section-content__bullets at 0,0,1,0). Paired with the ::before green dot
   above, this renders a single green-dot marker — matches the brand treatment
   on designed sections and avoids the double-marker glitch. */
.entry-content ul.section-content__bullets {
  list-style: none;
  padding-left: 0;
}

/* ─── Section: Dark ─────────────────────────────────────────────────────── */

.section-dark {
  position: relative;
  background-color: var(--hap-navy);
  color: var(--hap-white);
  padding: var(--hap-space-xl) 0;               /* XD: ~64px — tighter than section-content */
}

/* Compact variant — no body text, just heading + CTA button */
.section-dark--compact {
  padding: clamp(38px, 3.9063vw, 63px) 0;  /* XD: 50px/52px */
}

.section-dark--compact .section-dark__heading {
  font-size: var(--hap-text-5xl);
}

/* Background image variant */
.section-dark--has-bg {
  background-size: cover;
  background-position: center;
}

.section-dark--has-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.section-dark__inner {
  position: relative;
  z-index: 1;
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
  text-align: center;
}

.section-dark__heading {
  color: var(--hap-white);
  max-width: clamp(550px, 61.6vw, 985px);   /* XD: 788px @ 1280 — scales with text-5xl growth */
  margin: 0 auto var(--hap-space-sm);      /* XD: 3px SVG gap → 16px CSS (line-height eats ~9px, net visual ~25px) */
}

/* When heading is followed directly by CTA (no body text), widen the gap */
.section-dark__heading + .btn {
  margin-top: var(--hap-space-md);          /* XD: 34px total gap (24px margin + 8px heading-bottom ≈ 32px) */
}

.section-dark__body {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-lg);
  line-height: var(--hap-leading-relaxed);
  letter-spacing: 0.04px;
  max-width: clamp(600px, 64.4vw, 1054px); /* XD: 824px @ 1280 — scales with font-size growth */
  margin: 0 auto clamp(35px, 3.5938vw, 58px); /* XD: 46px gap to CTA button */
  opacity: 0.9;
}

/* Testimonial variant */
.section-dark__testimonial-layout {
  display: flex;
  align-items: flex-start;
  gap: var(--hap-space-lg);
}

.section-dark__testimonial-icon {
  width: 100px;
  flex-shrink: 0;
}

.section-dark__testimonial-icon > svg {
  width: 100%;
  height: auto;
}

.section-dark--testimonial .section-dark__inner {
  text-align: left;
}

.section-dark--testimonial .section-dark__quote {
  font-size: var(--hap-text-xl);
  font-style: italic;
  font-family: var(--hap-font-heading);
  font-weight: var(--hap-weight-bold);
  margin-bottom: var(--hap-space-xs);     /* XD: 8px gap to attribution */
  line-height: var(--hap-leading-relaxed);
}

.section-dark--testimonial .section-dark__attribution {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
  font-weight: var(--hap-weight-bold);
}

.section-dark--testimonial .section-dark__attribution span {
  display: block;
  font-weight: var(--hap-weight-regular);
  opacity: 0.7;
  font-size: var(--hap-text-xs);
  margin-top: var(--hap-space-xs);
}

/* Signup variant — dark strip with background image, fixed height */
.section-dark--signup {
  min-height: clamp(158px, 16.4063vw, 263px); /* XD: 210px @ 1280 */
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../images/blog-signup-bg.png');
  background-size: cover;
  background-position: center;
}

.section-dark--signup .section-dark__form {
  display: flex;
  gap: var(--hap-space-sm);
  max-width: 500px;
  margin: 0 auto;
}

.section-dark--signup .section-dark__heading {
  font-size: var(--hap-text-3xl);
  margin-bottom: var(--hap-space-md);
}

.section-dark--signup .section-dark__input {
  width: clamp(263px, 27.3438vw, 438px);     /* XD: 350px @ 1280 */
  height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--hap-gray);
  border-radius: var(--hap-radius-pill);     /* XD: rx=17 — full pill */
  font-size: var(--hap-text-base);
}

.section-dark--signup .btn {
  min-width: clamp(90px, 9.375vw, 150px);    /* XD: 120px @ 1280 */
  height: 44px;
}

/* ─── Section: Two-Column ───────────────────────────────────────────────── */

.section-two-col {
  padding: clamp(92px, 9.6094vw, 154px) 0 clamp(64px, 6.6406vw, 106px); /* XD: 123px top, 85px bottom */
}

.section-two-col__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--hap-space-xl);
  align-items: center;
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

.section-two-col--image-left .section-two-col__image {
  order: -1;
}

.section-two-col__heading {
  margin-bottom: var(--hap-space-md);
}

.section-two-col__body {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-lg);
  line-height: var(--hap-line-height);
  color: var(--hap-black);
}

.section-two-col__text .btn {
  margin-top: clamp(32px, 3.3594vw, 54px); /* XD: 43px gap body → CTA button */
}

.section-two-col__image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--hap-radius-sm);
}

/* ─── Section: Cards ────────────────────────────────────────────────────── */

.section-cards {
  padding: var(--hap-space-2xl) 0;
}

.section-cards__inner {
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

/* Full-width overlay cards (Clinical Specialties — cols-1 only) */
.section-cards--overlay:has(.section-cards__grid--cols-1) {
  padding: 0;
}
.section-cards--overlay:has(.section-cards__grid--cols-1) .section-cards__inner {
  max-width: none;
  padding: 0;
}
.section-cards--overlay .section-cards__grid--cols-1 {
  gap: 10px;                                     /* XD: 10px between full-width overlay cards */
}

/* Contained overlay cards (About Us — cols-2) */
.section-cards--overlay .section-cards__grid--cols-2 {
  gap: clamp(15px, 1.5625vw, 25px);              /* XD: 20px @ 1280 */
}

.section-cards__heading {
  text-align: center;
  margin-bottom: var(--hap-space-xl);
}

.section-cards__grid {
  display: grid;
  gap: var(--hap-space-lg);
}

.section-cards__grid--cols-1 { grid-template-columns: 1fr; }
.section-cards__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.section-cards__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.section-cards__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  padding: var(--hap-space-md);
  background-color: var(--hap-white);
  border: 1px solid var(--hap-border);     /* XD: stroke #d0d0d0 on card rects */
  border-radius: var(--hap-radius-lg);
}

/* Service cards (3-col) have no border in XD */
.section-cards__grid--cols-3 .card {
  border: none;
}

.card__icon {
  width: clamp(48px, 5vw, 80px);
  height: clamp(48px, 5vw, 80px);
  margin-bottom: var(--hap-space-sm);
  color: var(--hap-green);
}

.card__icon svg {
  width: 100%;
  height: 100%;
}

.card__title {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-xl);
  font-weight: var(--hap-weight-bold);
  margin-bottom: var(--hap-space-xs);
}

.card__text {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-lg);
  color: var(--hap-gray-dark);
  line-height: var(--hap-line-height);
}

/* ─── Section: Badges ───────────────────────────────────────────────────── */

.section-badges {
  padding: var(--hap-space-xl) 0;
  text-align: center;
}

.section-badges__heading {
  font-size: var(--hap-text-5xl);
  max-width: 1400px;                       /* Falls to container width on mobile (no sub-viewport floor) */
  margin: 0 auto var(--hap-space-lg);
}

.section-badges .section-content__body {
  max-width: clamp(600px, 66.9vw, 1094px); /* XD: 856px @ 1280 — scales with text-lg growth */
  margin: 0 auto var(--hap-space-md);
}

.section-badges__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--hap-space-2xl);
  flex-wrap: wrap;
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

.section-badges__row img {
  /* Fixed-aspect slot so logos with different aspect ratios (wide RBMA vs
     square-ish ACR) scale to equal visual presence, not just equal height. */
  width:  clamp(180px, 18.75vw, 300px);
  height: clamp( 80px,  8.33vw, 133px);
  object-fit: contain;
}

/* ─── Section: Form ─────────────────────────────────────────────────────── */

.section-form {
  padding: var(--hap-space-2xl) 0;
  background-color: var(--hap-bg-light);
}

.section-form__inner {
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

.section-form__heading {
  margin-bottom: var(--hap-space-lg);
}

/* Intro text spacing above contact form */
.section-form__body {
  font-size: var(--hap-text-lg);
  line-height: var(--hap-leading-relaxed);
  margin-bottom: var(--hap-space-lg);
}

/* Placeholder form styling (HubSpot will replace) */
.form-placeholder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--hap-space-sm);
  max-width: 700px;
}

.form-placeholder__field {
  padding: 0.75rem 1rem;
  border: 1px solid var(--hap-border);
  border-radius: var(--hap-radius-md);
  font-size: var(--hap-text-base);
  font-family: var(--hap-font-body);
  transition: border-color var(--hap-transition);
}

.form-placeholder__field:focus {
  border-color: var(--hap-green);
  outline: none;
}

.form-placeholder__field:focus-visible {
  outline: 2px solid var(--hap-green);
  outline-offset: 2px;
}

.form-placeholder__field--full {
  grid-column: 1 / -1;
}

.form-placeholder__field--textarea {
  min-height: 120px;
  resize: vertical;
}

/* ─── Section: Posts ────────────────────────────────────────────────────── */

.section-posts {
  padding: clamp(52px, 6.4063vw, 105px) 0;  /* XD: ~82px @ 1280 — between xl and 2xl */
}

.section-posts__inner {
  display: grid;
  grid-template-columns: 1.8fr 1fr;         /* XD: ~730px : 410px ≈ 64:36 */
  gap: var(--hap-space-ml);                  /* XD: 30px gap between columns */
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

.section-posts__inner--full {
  grid-template-columns: 1fr;
}

.post-card {
  display: flex;
  gap: var(--hap-space-md);
  border-bottom: 1px solid var(--hap-border-light);
  padding-bottom: var(--hap-space-ml);              /* 30px above divider (50/50 split) */
  margin-bottom: var(--hap-space-ml);               /* 30px below divider (50/50 split) */
}

.post-card__image {
  width: 200px;
  height: 200px;                              /* fixed box so object-fit can crop */
  flex-shrink: 0;
}

.post-card__image img {
  width: 100%;
  height: 100%;                               /* fill the box; object-fit crops to ratio */
  border-radius: var(--hap-radius-sm);
  object-fit: cover;
}

.post-card__content {
  flex: 1;
  min-width: 0;
}

.post-card__title {
  font-size: var(--hap-text-2xl);
  margin-bottom: var(--hap-space-xs);
}

.post-card__title a {
  color: var(--hap-black);                   /* XD: inherit (black), not navy */
}

.post-card__title a:hover {
  color: var(--hap-green);
}

.post-card__excerpt {
  color: var(--hap-black);                   /* XD: inherit (black) */
  font-size: var(--hap-text-sm);
  margin-bottom: var(--hap-space-lg);        /* XD: ~40px gap before Read More button */
}

.post-card .btn {
  min-width: clamp(90px, 9.375vw, 150px);   /* XD: 120px @ 1280 */
  padding: 0.47rem 1.5rem;                   /* XD: tighter than global btn */
}

/* ─── Single Post ───────────────────────────────────────────────────────── */

.single-post__inner {
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: var(--hap-space-2xl) var(--hap-space-md);
}

.single-post__meta {
  font-size: var(--hap-text-sm);
  color: var(--hap-gray-dark);
  margin-bottom: var(--hap-space-lg);
  display: flex;
  gap: var(--hap-space-md);
}

.single-post__categories a {
  color: var(--hap-green);
}

.single-post__content {
  font-size: var(--hap-text-base);
  line-height: var(--hap-line-height);
  max-width: 800px;
}

.single-post__content h2,
.single-post__content h3 {
  margin-top: var(--hap-space-lg);
  margin-bottom: var(--hap-space-sm);
}

.single-post__content p {
  margin-bottom: var(--hap-space-sm);
}

.single-post__content img {
  border-radius: var(--hap-radius-sm);
  margin: var(--hap-space-md) 0;
}

.single-post__tags {
  margin-top: var(--hap-space-lg);
  font-size: var(--hap-text-sm);
  color: var(--hap-gray-dark);
}

.single-post__nav {
  border-top: 1px solid var(--hap-border-light);
  margin-top: var(--hap-space-xl);
}

.single-post__nav-inner {
  display: flex;
  justify-content: space-between;
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: var(--hap-space-lg) var(--hap-space-md);
}

.single-post__nav-link {
  font-size: var(--hap-text-sm);
  color: var(--hap-black);
  max-width: 45%;
}

.single-post__nav-link span {
  display: block;
  color: var(--hap-green);
  font-weight: var(--hap-weight-bold);
  margin-bottom: var(--hap-space-xs);
}

/* ─── Blog Sidebar ──────────────────────────────────────────────────────── */

.blog-signup {
  background-color: var(--hap-blue);         /* XD: #4d6c91 */
  border-radius: var(--hap-radius-pill);     /* XD: rx=22 */
  padding: var(--hap-space-md);              /* XD: compact card */
  color: var(--hap-white);
}

.blog-signup__title {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-xl);             /* XD: 21px */
  font-weight: var(--hap-weight-bold);
  color: var(--hap-white);
  margin-bottom: var(--hap-space-sm);
  line-height: 1.3;
}

.blog-signup__form {
  display: flex;
  flex-direction: column;
  gap: var(--hap-space-xs);                  /* XD: tight spacing */
}

.blog-signup__input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;                              /* XD: no visible border */
  border-radius: var(--hap-radius-pill);     /* XD: rx=16.5 */
  background: var(--hap-white);              /* XD: white filled */
  color: var(--hap-black);
  font-size: var(--hap-text-sm);             /* XD: 14px */
}

.blog-signup__input::placeholder {
  color: var(--hap-gray);                    /* dark placeholder on white bg */
}

.blog-signup__frequency {
  margin-bottom: var(--hap-space-xs);
}

.blog-signup__label {
  display: block;
  font-size: var(--hap-text-sm);
  font-weight: var(--hap-weight-light);      /* XD: 300 */
  margin-bottom: var(--hap-space-xs);
  opacity: 0.8;
}

.blog-signup__radio {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--hap-text-sm);
  font-weight: var(--hap-weight-bold);       /* XD: 700 */
  margin-right: var(--hap-space-sm);
  cursor: pointer;
}

.blog-signup__radio input[type="radio"] {
  accent-color: var(--hap-white);
}

.blog-signup .btn {
  align-self: flex-start;                    /* XD: left-aligned, not full-width */
  background: transparent;                   /* XD: white outline on blue card */
  color: var(--hap-white);
  border-color: var(--hap-white);
}

.sidebar-search {
  margin-bottom: var(--hap-space-lg);
}

/* ─── Section: Blog Preview ─────────────────────────────────────────────── */

.section-blog-preview {
  padding: var(--hap-space-2xl) 0;
}

.section-blog-preview__inner {
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

.section-blog-preview__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--hap-space-lg);
}

.section-blog-preview__view-all {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-xl);
  font-weight: var(--hap-weight-bold);
  color: var(--hap-green);
}

.section-blog-preview__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hap-space-lg);
}

.blog-card__image {
  border-radius: var(--hap-radius-sm);
  overflow: hidden;
  margin-bottom: var(--hap-space-sm);
}

.blog-card__image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.blog-card__date {
  display: block;
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
  color: var(--hap-gray-dark);
  margin-bottom: var(--hap-space-xs);
}

.blog-card__title {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-xl);
  font-weight: var(--hap-weight-bold);
  margin-bottom: var(--hap-space-md);      /* XD: 22px gap to Read More link */
  line-height: 1.3;
}

.blog-card__title a {
  color: var(--hap-black);
}

.blog-card__title a:hover {
  color: var(--hap-green);
}

.blog-card__link {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-lg);
  font-weight: var(--hap-weight-bold);
  font-style: italic;
  color: var(--hap-green);
}

/* ─── Section: Events ───────────────────────────────────────────────────── */

.section-events {
  padding: clamp(106px, 11.0156vw, 176px) 0 var(--hap-space-2xl); /* XD: 141px top */
}

/* Grey background variant */
.section-events--alt {
  background-color: var(--hap-bg-light);
}

.section-events__inner {
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

.section-events__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--hap-space-lg);
}

.section-events__view-all {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-xl);
  font-weight: var(--hap-weight-bold);
  color: var(--hap-green);
}

.section-events__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hap-space-lg);
}

.event-card {
  position: relative;
  border-radius: var(--hap-radius-sm);
  overflow: hidden;
}

.event-card__image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.event-card__label {
  display: block;
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
  font-weight: var(--hap-weight-bold);
  color: var(--hap-green);
  margin-top: var(--hap-space-sm);
  margin-bottom: var(--hap-space-sm);      /* XD: 16px gap to city name */
}

.event-card__city {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-3xl);
  font-weight: var(--hap-weight-bold);
  margin-top: var(--hap-space-xs);
}

.event-card__desc {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
  color: var(--hap-gray-dark);
  margin-top: var(--hap-space-xs);
}

/* ─── Responsive rules moved to responsive.css ────────────────────────── */


/* ─── Layout with Sidebar ────────────────────────────────────────────────── */

.layout-with-sidebar {
  display: flex;
  gap: clamp(37px, 3.828vw, 61px);                 /* XD: 49px @ 1280 */
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: var(--hap-space-xl) clamp(30px, 3.125vw, 50px) var(--hap-space-xl) clamp(38px, 3.906vw, 63px); /* XD: R=40px L=50px @ 1280 */
}

.layout-with-sidebar__main {
  flex: 1;
  min-width: 0;
}

.layout-with-sidebar__sidebar {
  width: clamp(308px, 32.031vw, 513px);            /* XD: 410px @ 1280 */
  flex-shrink: 0;
  position: sticky;
  top: clamp(80px, 8vw, 120px);
  align-self: flex-start;
}


/* ─── Sidebar Search + Popular Posts ─────────────────────────────────────── */

.sidebar-search__form {
  display: flex;
  gap: var(--hap-space-xs);                  /* XD: ~10px gap between input and button */
  margin-bottom: var(--hap-space-lg);
}

.sidebar-search__input {
  flex: 1;
  padding: 0.47rem 1rem;                    /* XD: 33px tall to match buttons */
  border: 1px solid var(--hap-border);
  border-radius: var(--hap-radius-pill);     /* XD: rx=16.5, full pill */
  font-size: var(--hap-text-sm);             /* XD: 14px */
  line-height: 1;
}

.sidebar-search__btn {
  border-radius: var(--hap-radius-pill);     /* XD: separate pill button */
  min-width: clamp(90px, 9.375vw, 150px);   /* XD: 120px @ 1280 */
  padding: 0.47rem 1.25rem;                 /* XD: 33px tall */
}

.sidebar-popular__title {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-xl);                   /* XD: 21px */
  font-weight: var(--hap-weight-bold);
  margin-bottom: var(--hap-space-sm);
}

.sidebar-popular__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-popular__list li {
  padding: var(--hap-space-xs) 0;
  border-bottom: 1px solid var(--hap-border-light);
}

.sidebar-popular__list a {
  color: var(--hap-green);
  text-decoration: none;
  font-size: var(--hap-text-xs);                    /* XD: 12px */
}

.sidebar-popular__list a:hover {
  text-decoration: underline;
}


/* ─── Team Grid ──────────────────────────────────────────────────────────── */

.section-team-grid {
  padding: 0;                                    /* parent layout-with-sidebar provides top spacing */
}

.section-team-grid__inner {
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

.section-team-grid__heading {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-5xl);               /* XD: 40px @ 1280 */
  font-weight: var(--hap-weight-bold);
  margin-bottom: var(--hap-space-sm);
}

.section-team-grid__intro {
  font-size: var(--hap-text-md);
  color: var(--hap-black);
  margin-bottom: var(--hap-space-xl);
  max-width: 800px;
}

.team-card {
  display: flex;
  gap: var(--hap-space-lg);
  padding: var(--hap-space-lg) 0;
  border-bottom: 1px solid var(--hap-border-light);
}

.team-card:last-child {
  border-bottom: none;
}

.team-card__photo {
  width: 200px;
  height: 267px;
  object-fit: cover;
  border-radius: var(--hap-radius-sm);
  flex-shrink: 0;
}

.team-card__info {
  flex: 1;
}

.team-card__name {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-3xl);
  font-weight: var(--hap-weight-bold);
  margin-bottom: 0.25rem;
}

.team-card__title {
  font-family: var(--hap-font-heading);          /* XD: Montserrat-Medium */
  font-size: var(--hap-text-sm);                 /* XD: 14px @ 1280 */
  font-weight: var(--hap-weight-medium);         /* XD: 500 */
  color: var(--hap-gray-dark);
  margin-bottom: var(--hap-space-sm);
}

.team-card__bio p {
  font-size: var(--hap-text-md);                 /* matches sidebar body standard */
  line-height: 1.6;
  margin-bottom: var(--hap-space-xs);
}


/* ─── Overlay Card Variant ───────────────────────────────────────────────── */

.card--overlay {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: clamp(250px, 50vh, 600px);
  border-radius: var(--hap-radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 2-col overlay cards (About Us bottom) — compact per XD: 560×233, rx:20 */
.section-cards__grid--cols-2 .card--overlay {
  min-height: 233px;                         /* XD: 233px fixed height */
  border-radius: 20px;                       /* XD: rx=20 */
}

/* Specialty cards in 2-col grid use 24px titles per XD (.ao class) */
.section-cards__grid--cols-2 .card__title {
  font-size: var(--hap-text-2xl);
}

.card--overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);              /* XD: Rectangle 306 opacity 0.65 (Specialties) */
}
.section-cards__grid--cols-2 .card--overlay::after {
  background: rgba(0, 0, 0, 0.4);               /* XD: Rectangle 328 opacity 0.4 (About) */
}

.card--overlay__content {
  position: relative;
  z-index: 1;
  padding: var(--hap-space-lg);
  color: var(--hap-white);
  text-align: center;
  width: 100%;
}

.card--overlay__icon {
  width: auto;
  height: clamp(40px, 4.5vw, 72px);             /* XD: ~52px @ 1280 */
  margin: 0 auto var(--hap-space-md);
  display: block;
}

.card--overlay .card__title {
  color: var(--hap-white);
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-2xl);
  font-weight: var(--hap-weight-bold);
  font-style: italic;
  margin-bottom: var(--hap-space-sm);
}

.section-cards__grid--cols-1 .card--overlay .card__title {
  font-size: var(--hap-text-6xl);          /* XD: 44px — full-width overlay cards (Specialties) */
  margin-bottom: clamp(37px, 3.8281vw, 61px); /* XD: 49px title→button gap */
}
.section-cards__grid--cols-1 .card--overlay .btn {
  min-width: 120px;                        /* XD: 120×33 pill button */
  height: 33px;
  padding: 0 var(--hap-space-md);
  font-size: var(--hap-text-sm);           /* XD: 14px */
  border-radius: var(--hap-radius-lg);     /* XD: 17px */
  line-height: 33px;
}

.card--overlay .card__text {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
  color: rgba(255, 255, 255, 0.9);
}


/* ─── Form Grid (section-form) ───────────────────────────────────────────── */

.section-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(15px, 1.5625vw, 25px);             /* XD: 20px @ 1280 between form fields */
}

.section-form__field--full {
  grid-column: span 2;
}

.section-form__field input,
.section-form__field select,
.section-form__field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--hap-border);
  border-radius: var(--hap-radius-lg);            /* XD: 17px corner radius on all form fields */
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);                 /* XD: 14px @ 1280 */
  background: var(--hap-white);
  color: var(--hap-black);
  transition: border-color var(--hap-transition);
}

.section-form__field input:focus,
.section-form__field select:focus,
.section-form__field textarea:focus {
  outline: none;
  border-color: var(--hap-green);
}

.section-form__field input:focus-visible,
.section-form__field select:focus-visible,
.section-form__field textarea:focus-visible {
  outline: 2px solid var(--hap-green);
  outline-offset: 2px;
}

.section-form__field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23707070' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.section-form__field textarea {
  resize: vertical;
  min-height: 120px;
}


/* ─── Sidebar Nav Links ──────────────────────────────────────────────────── */

.sidebar-nav {
  margin-top: var(--hap-space-lg);
  background: var(--hap-bg-light);             /* XD: #f5f5f5 grey container */
  border-radius: var(--hap-radius-pill);       /* XD: rx=22 */
  padding: var(--hap-space-sm);               /* XD: compact inner padding */
}

.sidebar-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav__item {
  border-bottom: 1px solid var(--hap-border-light);
}

.sidebar-nav__item:last-child {
  border-bottom: none;
}

.sidebar-nav__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem var(--hap-space-sm);        /* XD: inside grey rounded container */
  color: var(--hap-black);
  text-decoration: none;
  font-size: var(--hap-text-sm);               /* XD: 14px */
  font-weight: var(--hap-weight-bold);         /* XD: bold */
  transition: color var(--hap-transition);
}

.sidebar-nav__link::after {
  content: '';
  width: 8px;
  height: 14px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='14' fill='none'%3E%3Cpath d='M1.5 1l5.5 6-5.5 6' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.sidebar-nav__link:hover {
  color: var(--hap-green);
}


/* ─── CSR Section (About page) ───────────────────────────────────────────── */

.csr-org {
  margin-bottom: var(--hap-space-lg);
}

.csr-org__logo {
  margin-bottom: var(--hap-space-md);
}

.csr-org__logo img {
  width: 180px;                              /* XD Inspect: W:180 H:161 */
  height: auto;
}

.csr-org__details {
  flex: 1;
}

.csr-org__name {
  font-family: var(--hap-font-body);             /* XD: HelveticaNeue-Bold */
  font-size: var(--hap-text-lg);                 /* XD: 18px */
  font-weight: var(--hap-weight-bold);
  color: var(--hap-green);                       /* XD: #129f4b */
  margin-bottom: var(--hap-space-xs);             /* XD: ~10px name→location gap */
}

.csr-org__location {
  font-size: var(--hap-text-sm);
  color: var(--hap-gray-dark);
  margin-bottom: var(--hap-space-sm);             /* XD: 16px location→description gap */
}


/* ─── Recent / Popular Posts Sidebar ─────────────────────────────────────── */

.sidebar-recent {
  margin-bottom: var(--hap-space-lg);
}

.sidebar-recent__title {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-xl);             /* XD: 21px */
  font-weight: var(--hap-weight-bold);
  margin-bottom: var(--hap-space-sm);
}

.sidebar-recent__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-recent__list li {
  padding: var(--hap-space-xs) 0;            /* XD: ~11px between links */
  border-bottom: 1px solid var(--hap-border-light);
  display: flex;
  align-items: baseline;
  gap: var(--hap-space-xs);
}

.sidebar-recent__list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hap-green);              /* XD: green bullet dot */
  flex-shrink: 0;
  margin-top: 0.4em;
}

.sidebar-recent__list li:last-child {
  border-bottom: none;
}

.sidebar-recent__list a {
  color: var(--hap-green);                   /* XD: #129f4b green links */
  text-decoration: none;
  font-size: var(--hap-text-sm);
  font-weight: normal;                       /* XD: normal weight */
  line-height: 1.4;
}

.sidebar-recent__list a:hover {
  text-decoration: underline;
}


/* ─── Categories Sidebar ─────────────────────────────────────────────────── */

.sidebar-categories {
  margin-bottom: var(--hap-space-lg);
}

.sidebar-categories__title {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-xl);             /* XD: 21px */
  font-weight: var(--hap-weight-bold);
  margin-bottom: var(--hap-space-sm);
}

.sidebar-categories__list {
  list-style: none;
  padding: var(--hap-space-sm);              /* XD: inside grey box */
  margin: 0;
  background: var(--hap-bg-light);           /* XD: #f5f5f5 — Categories ONLY */
  border-radius: var(--hap-radius-pill);     /* XD: rx=22 */
}

.sidebar-categories__item {
  border-bottom: 1px solid var(--hap-border-light);
}

.sidebar-categories__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem var(--hap-space-sm);       /* XD: inside grey rounded container */
  color: var(--hap-black);
  font-weight: var(--hap-weight-bold);       /* XD: 700 */
  text-decoration: none;
  font-size: var(--hap-text-sm);             /* XD: 14px */
  transition: color var(--hap-transition);
}

.sidebar-categories__link::after {
  content: '›';
  font-size: var(--hap-text-lg);
  color: var(--hap-gray);
}

.sidebar-categories__link:hover {
  color: var(--hap-green);
}


/* ─── News Archives Dropdown ─────────────────────────────────────────────── */

/* ─── Footer Login Icon ──────────────────────────────────────────────────── */

.site-footer__login-icon {
  vertical-align: -2px;
  margin-right: 4px;
}

/* ─── Section Dark Rounded Variant ───────────────────────────────────────── */

.section-dark--rounded {
  border-radius: var(--hap-radius-md);
}

/* ─── News Archives Dropdown ─────────────────────────────────────────────── */

.news-archives {
  margin-bottom: var(--hap-space-lg);
}

.news-archives__select {
  width: clamp(170px, 20.39vw, 326px);       /* XD: 261px @ 1280 */
  padding: 0.47rem 1rem;                    /* XD: 33px tall */
  border: 1px solid var(--hap-border);
  border-radius: var(--hap-radius-pill);     /* XD: rx=16.5, full pill */
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);             /* XD: 14px */
  line-height: 1;
  background: var(--hap-white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23707070' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ─── Page-Specific Spacing Overrides (from XD plugin data) ─────────────── */

/* Medical Coding — sm-heading sections need more padding + tighter heading gap */
.page-medical-coding .section-content--sm-heading {
  padding: clamp(61px, 6.3281vw, 101px) 0;  /* XD: 81px top / 76px bottom @ 1280 */
}
.page-medical-coding .section-content--sm-heading .section-content__heading {
  margin-bottom: var(--hap-space-md);        /* XD: 22px corrected — 24px token, +2px */
}

/* Why Outsource RCM — heading→body gap wider than default */
.page-revenue-cycle-management .section-content__heading {
  margin-bottom: clamp(15px, 1.5625vw, 25px); /* XD: 20px @ 1280 (default 16px is 4px short) */
}


/* Consulting — dark body→button gap wider than default */
.page-medical-admin-consulting .section-dark__body {
  margin-bottom: clamp(26px, 2.7344vw, 44px); /* XD: 35px @ 1280 (default 30px is 5px short) */
}

/* Clients sub-pages (Radiology, Hospital, Physician) — shared spacing */
.page-radiology .section-content__heading,
.page-employed-physicians .section-content__heading,
.page-physician-practices .section-content__heading {
  margin-bottom: clamp(17px, 1.7188vw, 28px); /* XD: 22px @ 1280 (default 16px is 6px short) */
}
.page-radiology .section-content,
.page-employed-physicians .section-content,
.page-physician-practices .section-content {
  padding: clamp(51px, 5.3125vw, 85px) 0 clamp(60px, 6.25vw, 100px); /* XD: 68px top, 80px bottom */
}


/* ─── Search Results: breadcrumbs + sidebar ──────────────────────────────── */

.breadcrumbs {
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
  color: var(--hap-gray-dark);
  margin-bottom: var(--hap-space-md);
}

.breadcrumbs__link {
  color: var(--hap-green);
  text-decoration: none;
}

.breadcrumbs__link:hover {
  text-decoration: underline;
}

.breadcrumbs__sep {
  margin: 0 0.4em;
  color: var(--hap-gray);
}

.breadcrumbs__current {
  color: var(--hap-gray-dark);
}

.sidebar-search-results {
  display: flex;
  flex-direction: column;
  gap: var(--hap-space-lg);                      /* match .sidebar-nav margin used on leadership */
}

.sidebar-search-results__cta {
  width: 100%;
  min-width: 0;                                  /* override .btn--primary min-width */
  white-space: normal;                           /* allow wrapping on narrow widths */
  text-align: center;
  line-height: 1.3;
}

/* In search context the wrapper is flex with its own gap; .sidebar-nav's
   built-in margin-top would double the spacing. Zero it out here. */
.sidebar-search-results .sidebar-nav {
  margin-top: 0;
}

/* Search empty state */
.search-empty {
  padding: var(--hap-space-md) 0;
}

.search-empty__title {
  font-family: var(--hap-font-heading);
  font-size: var(--hap-text-2xl);
  font-weight: var(--hap-weight-bold);
  margin-bottom: var(--hap-space-sm);
}

.search-empty__message {
  font-size: var(--hap-text-md);
  color: var(--hap-gray-dark);
  margin-bottom: var(--hap-space-lg);
  max-width: 60ch;
}

.search-empty__form {
  margin-bottom: 0;                              /* override default sidebar-search__form margin */
}


/* ─── HubSpot form embeds — match placeholder styling ───────────────────── */
/* HubSpot's hbspt.forms.create() injects .hbspt-form > .hs-form with its own
 * fields, labels, inputs, and submit button. These rules style HubSpot's
 * output to match the placeholder visual we had before wiring the embeds. */

.hubspot-form-embed .hbspt-form,
.hubspot-form-embed .hs-form {
  width: 100%;
  margin: 0;
}

.hubspot-form-embed .hs-form fieldset {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.hubspot-form-embed .hs-form .form-columns-1 .hs-form-field,
.hubspot-form-embed .hs-form .form-columns-2 .hs-form-field {
  width: 100%;
  padding: 0;
  float: none;
}

/* ─── Sidebar dark navy card (.blog-signup) ─────────────────────────────── */

.blog-signup .hubspot-form-embed .hs-form-field {
  margin-bottom: var(--hap-space-xs);
}

.blog-signup .hubspot-form-embed label {
  display: block;
  color: var(--hap-white);
  font-size: var(--hap-text-sm);
  font-weight: var(--hap-weight-light);
  margin-bottom: var(--hap-space-xs);
  opacity: 0.8;
}

.blog-signup .hubspot-form-embed .hs-form-required {
  color: var(--hap-white);
}

.blog-signup .hubspot-form-embed input.hs-input,
.blog-signup .hubspot-form-embed select.hs-input,
.blog-signup .hubspot-form-embed textarea.hs-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--hap-radius-pill);
  background: var(--hap-white);
  color: var(--hap-black);
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
}

.blog-signup .hubspot-form-embed input.hs-input::placeholder {
  color: var(--hap-gray);
}

.blog-signup .hubspot-form-embed .hs-button.primary {
  align-self: flex-start;
  background: transparent;
  color: var(--hap-white);
  border: 1px solid var(--hap-white);
  border-radius: var(--hap-radius-pill);
  padding: 0.5rem 1.25rem;
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
  font-weight: var(--hap-weight-bold);
  cursor: pointer;
  margin-top: var(--hap-space-sm);
}

.blog-signup .hubspot-form-embed .hs-button.primary:hover {
  background: var(--hap-white);
  color: var(--hap-blue);
}


/* ─── Section dark signup variant (.section-dark--signup) ──────────────── */

.section-dark--signup .hubspot-form-embed .hs-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hap-space-sm);
  align-items: flex-end;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.section-dark--signup .hubspot-form-embed .hs-form-field {
  margin: 0;
  flex: 0 1 auto;
}

.section-dark--signup .hubspot-form-embed label {
  color: var(--hap-white);
  font-size: var(--hap-text-sm);
  margin-bottom: 0.25rem;
}

.section-dark--signup .hubspot-form-embed input.hs-input {
  width: clamp(263px, 27.3438vw, 438px);
  height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--hap-gray);
  border-radius: var(--hap-radius-pill);
  font-size: var(--hap-text-base);
  background: var(--hap-white);
  color: var(--hap-black);
}

.section-dark--signup .hubspot-form-embed .hs-button.primary {
  min-width: clamp(90px, 9.375vw, 150px);
  height: 44px;
  padding: 0 1.5rem;
  background: var(--hap-green);
  color: var(--hap-white);
  border: none;
  border-radius: var(--hap-radius-pill);
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
  font-weight: var(--hap-weight-bold);
  cursor: pointer;
}

.section-dark--signup .hubspot-form-embed .hs-button.primary:hover {
  opacity: 0.9;
}

/* ─── Contact form (.section-form) ──────────────────────────────────────── */

.section-form .hubspot-form-embed .form-columns-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(15px, 1.5625vw, 25px);
}

.section-form .hubspot-form-embed .form-columns-2 .hs-form-field {
  width: 100%;
}

.section-form .hubspot-form-embed .hs-form-field {
  margin-bottom: clamp(15px, 1.5625vw, 25px);
}

.section-form .hubspot-form-embed label {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
  color: var(--hap-black);
}

.section-form .hubspot-form-embed input.hs-input,
.section-form .hubspot-form-embed select.hs-input,
.section-form .hubspot-form-embed textarea.hs-input {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--hap-border);
  border-radius: var(--hap-radius-lg);
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-sm);
  background: var(--hap-white);
  color: var(--hap-black);
  transition: border-color var(--hap-transition);
  box-sizing: border-box;
}

/* HubSpot injects a per-form rule `fieldset.form-columns-1 .hs-input { width: 95% }`
   at runtime that has same specificity as our rule above but loads later in the
   cascade, leaving full-width inputs ~5% short of the wrapper while half-width
   inputs (in form-columns-2) fill correctly. That visual mismatch makes State /
   Last Name "stick out" past the right edge of full-width fields below them.
   Bump specificity by adding fieldset.form-columns-1 explicitly so we win without
   needing !important. */
.section-form .hubspot-form-embed fieldset.form-columns-1 input.hs-input,
.section-form .hubspot-form-embed fieldset.form-columns-1 select.hs-input,
.section-form .hubspot-form-embed fieldset.form-columns-1 textarea.hs-input {
  width: 100%;
}

.section-form .hubspot-form-embed input.hs-input:focus,
.section-form .hubspot-form-embed select.hs-input:focus,
.section-form .hubspot-form-embed textarea.hs-input:focus {
  outline: none;
  border-color: var(--hap-green);
}

.section-form .hubspot-form-embed select.hs-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23707070' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.section-form .hubspot-form-embed textarea.hs-input {
  resize: vertical;
  min-height: 120px;
}

.section-form .hubspot-form-embed .hs-button.primary {
  background: var(--hap-green);
  color: var(--hap-white);
  border: none;
  border-radius: var(--hap-radius-pill);
  padding: 0.75rem 2rem;
  font-family: var(--hap-font-body);
  font-size: var(--hap-text-base);
  font-weight: var(--hap-weight-bold);
  cursor: pointer;
  margin-top: var(--hap-space-sm);
}

.section-form .hubspot-form-embed .hs-button.primary:hover {
  opacity: 0.9;
}

/* HubSpot validation error messages */
.hubspot-form-embed .hs-error-msgs {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
}

.hubspot-form-embed .hs-error-msg,
.hubspot-form-embed .hs-error-msgs label {
  font-size: var(--hap-text-sm);
  color: #d33;
}

/* HubSpot post-submit success message */
.hubspot-form-embed .submitted-message {
  color: inherit;
  font-size: var(--hap-text-base);
}
