/**
 * Home & Borrowing — shared section layout (body uses checking-page + hb-borrowing-page).
 * Load after /banking/checking-account.css so hero tokens align with public Banking pages.
 */

.checking-page.hb-borrowing-page .hb-main {
  padding-bottom: clamp(2.35rem, 4vw, 3.15rem);
}

.hb-container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.hb-hero {
  position: relative;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  background: radial-gradient(
      120% 80% at 100% 0%,
      rgba(42, 111, 168, 0.12),
      transparent 55%
    ),
    var(--color-white);
  border-bottom: 1px solid rgba(45, 66, 96, 0.1);
}

.hb-hero__grid {
  display: grid;
  grid-template-columns: 1fr min(38%, 320px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

@media (max-width: 880px) {
  .hb-hero__grid {
    grid-template-columns: 1fr;
  }
}

.hb-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 0.5rem;
}

.hb-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.5vw, 2.45rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-navy-950);
  margin: 0 0 1rem;
}

.hb-hero__lede {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(11, 27, 58, 0.82);
  max-width: 40rem;
  margin: 0 0 1.35rem;
}

.hb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.25rem;
}

.hb-hero__figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(45, 66, 96, 0.1);
}

.hb-hero__figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hb-hero__caption {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(11, 27, 58, 0.65);
  padding: 0.5rem 0.75rem 0.65rem;
  background: var(--color-cream);
}

.hb-breadcrumb {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  color: rgba(11, 27, 58, 0.72);
}

.hb-breadcrumb a {
  color: var(--color-accent);
  text-decoration: none;
}

.hb-breadcrumb a:hover {
  text-decoration: underline;
}

.hb-section {
  padding: clamp(2.25rem, 5vw, 3.25rem) 0;
}

.hb-section--alt {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid rgba(45, 66, 96, 0.08);
}

.hb-section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: var(--color-navy-950);
  margin: 0 0 0.65rem;
}

.hb-section__intro {
  max-width: 46rem;
  margin: 0 0 1.75rem;
  color: rgba(11, 27, 58, 0.82);
  line-height: 1.62;
}

.hb-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

@media (max-width: 820px) {
  .hb-split {
    grid-template-columns: 1fr;
  }
}

.hb-split__prose h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--color-navy-900);
}

.hb-split__prose h3:first-child {
  margin-top: 0;
}

.hb-split__prose p,
.hb-split__prose li {
  color: rgba(11, 27, 58, 0.84);
  line-height: 1.62;
}

.hb-split__prose ul {
  padding-left: 1.2rem;
}

.hb-figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(45, 66, 96, 0.12);
  background: var(--color-white);
}

.hb-figure img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.hb-figure figcaption {
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
  color: rgba(11, 27, 58, 0.68);
  background: var(--color-cream);
}

.hb-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.15rem;
}

.hb-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(45, 66, 96, 0.12);
  box-shadow: 0 1px 0 rgba(45, 66, 96, 0.06);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

a.hb-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 10px 28px rgba(36, 54, 82, 0.1);
}

.hb-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.hb-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hb-card__body {
  padding: 1.1rem 1.05rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hb-card__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 0.35rem;
}

.hb-card__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
  color: var(--color-navy-950);
}

.hb-card__text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(11, 27, 58, 0.78);
  margin: 0 0 0.75rem;
  flex: 1;
}

.hb-card__cta {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-accent);
}

.hb-steps {
  counter-reset: hbstep;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.hb-steps li {
  position: relative;
  padding: 1.1rem 1.1rem 1.1rem 3.25rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(45, 66, 96, 0.1);
}

.hb-steps li::before {
  counter-increment: hbstep;
  content: counter(hbstep);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hb-steps strong {
  display: block;
  font-family: var(--font-serif);
  margin-bottom: 0.25rem;
  color: var(--color-navy-950);
}

.hb-callout {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--color-cream);
  border: 1px solid rgba(45, 66, 96, 0.12);
  margin: 1.5rem 0;
}

.hb-callout__title {
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--color-navy-950);
}

.hb-callout p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(11, 27, 58, 0.8);
}

.hb-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(45, 66, 96, 0.12);
  background: var(--color-white);
}

.hb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.hb-table th,
.hb-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(45, 66, 96, 0.1);
  vertical-align: top;
}

.hb-table th {
  background: rgba(245, 247, 250, 0.95);
  font-weight: 700;
  color: var(--color-navy-950);
}

.hb-table tr:last-child td {
  border-bottom: none;
}

.hb-faq details {
  border-bottom: 1px solid rgba(45, 66, 96, 0.1);
  padding: 0.85rem 0;
}

.hb-faq summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--color-navy-950);
}

.hb-faq p {
  margin: 0.55rem 0 0;
  color: rgba(11, 27, 58, 0.8);
  line-height: 1.55;
}

.hb-related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1.5rem;
}

.hb-related a {
  font-weight: 600;
  font-size: 0.9375rem;
}

.hb-footnote {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(11, 27, 58, 0.68);
  max-width: 52rem;
  margin-top: 2rem;
}

.hb-media-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .hb-media-band {
    grid-template-columns: 1fr;
  }
}

.hb-media-band figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(45, 66, 96, 0.1);
}

.hb-media-band img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hb-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 1rem;
}

.hb-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(42, 111, 168, 0.1);
  color: var(--color-navy-900);
}

.page-anchor {
  scroll-margin-top: calc(var(--fdic-h) + var(--header-h) + 1rem);
}

/* ----- Banking-style dark hero (matches .checking-hero on product pages) ----- */
.checking-page.hb-borrowing-page .hb-hero {
  padding: 0 0 clamp(2.35rem, 4vw, 3.15rem);
  background: var(--hero-background);
  color: var(--color-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.checking-page.hb-borrowing-page .hb-hero .hb-container.hb-hero__grid {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  padding-top: 1rem;
}

.checking-page.hb-borrowing-page .hb-breadcrumb {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.5rem;
}

.checking-page.hb-borrowing-page .hb-breadcrumb a {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.checking-page.hb-borrowing-page .hb-breadcrumb a:hover {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checking-page.hb-borrowing-page .hb-eyebrow {
  color: var(--color-gold);
}

.checking-page.hb-borrowing-page .hb-hero__title {
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-white);
}

.checking-page.hb-borrowing-page .hb-hero__lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  max-width: 36rem;
}

.checking-page.hb-borrowing-page .hb-hero__figure {
  border-radius: clamp(14px, 2.4vw, 22px);
  border: 6px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.35),
    0 12px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.checking-page.hb-borrowing-page .hb-hero__figure img {
  aspect-ratio: 4 / 3;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.2));
}

.checking-page.hb-borrowing-page .hb-hero__caption {
  background: rgba(10, 22, 40, 0.55);
  color: rgba(255, 255, 255, 0.85);
}

.checking-page.hb-borrowing-page .hb-hero__actions .btn--outline.btn--header {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

.checking-page.hb-borrowing-page .hb-hero__actions .btn--outline.btn--header:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
  color: var(--color-white);
}
