/* Silver Horizons Advisors - design upgrade overrides.
   Additive layer, loaded last in <head> on every page. */

/* --- 1. Footer navy ------------------------------------------------
   :last-of-type is excluded when it is also :first-of-type, because
   privacy-policy and terms-and-conditions hold a single .c-section
   that is their whole body content, not a footer. */
#section-kYAWmxQsVk,
.c-section:last-of-type:not(:first-of-type) {
  background-image: radial-gradient(circle, #0f2a44 0%, #071a2b 100%);
}

/* 1b. Footer map card - same hues as the footer it sits on. Alphas are
   left at their tuned values so only the hue moves; the iframe, the
   gold accents and the card shell are untouched. */
.footer-map-widget .footer-map-overlay {
  background: linear-gradient(to top, rgba(7, 26, 43, 0.82) 0%, rgba(7, 26, 43, 0.18) 44%, rgba(7, 26, 43, 0.04) 100%);
}

.footer-map-widget .footer-map-badge {
  background: rgba(13, 36, 57, 0.72);
}

.footer-map-widget .footer-map-info {
  background: rgba(7, 26, 43, 0.62);
}

/* --- 2. FAQ accordion cards ---------------------------------------
   border and the heading paint need !important: the page-level
   #faq-<id> rules outrank any class-only selector. The heading's
   colour only - its script-driven height, padding and opacity and the
   panel are left alone. */
.faq-separated-child {
  background-color: #ffffff;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 42, 68, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-separated-child:hover,
.faq-separated-child:focus-within {
  border-color: #2c7a7b !important;
  box-shadow: 0 4px 12px rgba(15, 42, 68, 0.08);
}

.hl-faq-child-heading {
  background-color: transparent !important;
}

/* --- 3 + 8. CTA buttons -------------------------------------------
   transform and transition stay with the page's own .btn-hv-* rules. */
a.btn-vp.btn-hp,
a[class*="cbutton-"] {
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(15, 42, 68, 0.18);
}

a.btn-vp.btn-hp:hover,
a[class*="cbutton-"]:hover {
  box-shadow: 0 10px 24px rgba(15, 42, 68, 0.28);
}

/* --- 4. Card accent line ------------------------------------------
   The accent sat at top:-1px, hazing outside the rounded corner.
   Moving it onto the edge fixes it on every card, including the ten
   form cards that hold overflow:visible !important for sticky.
   .c-wrapper lifts these past the page-level rules. */
.hero-card.c-wrapper,
.hero-card-2.c-wrapper {
  overflow: hidden;
}

.hero-card.c-wrapper::before,
.hero-card-2.c-wrapper::before {
  top: 0;
}

/* --- 5. Card consistency, contact page only ------------------------
   #section-SKrAwodb-v exists only on senior-living-advisor-contact and
   holds all four of its cards. The 20px family on other pages is
   deliberate and stays. */
#section-SKrAwodb-v .hero-card.c-wrapper,
#section-SKrAwodb-v .hero-card-2.c-wrapper {
  border-radius: 14px;
  box-shadow: rgba(15, 42, 68, 0.08) 0 6px 24px 0;
}

/* --- 6. H1 recipe --------------------------------------------------
   Every builder page also carries a .heading-<id> h1 weight rule, so
   the weight needs the .text-output form to reach it. */
h1 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.text-output h1 {
  font-weight: 600;
}

/* --- 9. Header hairline -------------------------------------------- */
#section-EBJADA87wi,
.c-section:first-of-type:not(:last-of-type) {
  border-bottom: 1px solid rgba(15, 42, 68, 0.08);
}

/* --- 10. Contact page form column, desktop -------------------------
   #row-z4ZCsTu8J50 carries position:sticky !important from the page.
   Its containing block (#col-hePqzw4zIsl > .vertical.inner) is 1104px
   and the row itself is 1059px, so sticky has 45px to travel and the
   card is ~159px taller than a 900px viewport - it can never hold the
   submit button in view. All the rule buys is a 46px drift that pulls
   the card out of line with the heading beside it. Held in normal flow
   instead; relative rather than static so the z-index still applies.
   Desktop only: at <=991px the page stacks and mobile is untouched. */
@media (min-width: 992px) {
  #row-z4ZCsTu8J50 {
    position: relative !important;
    top: auto;
  }
}

/* --- 11. Care-link cards, 2-up ------------------------------------
   .tulsa-care-links-grid is a flex column of full-width link cards.
   Four or more of them read as a stranded ladder, so those lists go
   two across from 768px up; the :has() gate keeps the three-card
   lists (assisted-living-tulsa, tulsa-senior-living-advisor) stacked
   without naming pages, and browsers without :has() keep the stack.
   Specificity 0,2,0 clears the page's own 0,1,0 rule, which needs
   beating on more than order - it lives in an in-body <style>.
   gap matches the 12px the flex column already used. An odd last
   card spans the full width so the final row closes. */
.tulsa-care-links-grid:has(> :nth-child(4)),
.oklahoma-city-care-links-grid:has(> :nth-child(4)) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tulsa-care-links-grid:has(> :nth-child(4)) > :last-child:nth-child(odd),
.oklahoma-city-care-links-grid:has(> :nth-child(4)) > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 767px) {
  .tulsa-care-links-grid:has(> :nth-child(4)),
  .oklahoma-city-care-links-grid:has(> :nth-child(4)) {
    display: flex;
  }
}

/* --- Reduced motion ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .faq-separated-child {
    transition: none;
  }
}
