/* cs-resources-cards — blog/resources section: header + 4 article cards.
   All rem values follow BB Theme's html { font-size: 10px } base — 1.6rem = 16px.
   Selectors are doubled-up where they must survive BB Global Styles. */

/* Strip BB's default row padding / module margins around the section. */
.fl-row-content-wrap:has(.cs-resources-cards) {
  padding-block: 0;
}
.fl-module-content:has(.cs-resources-cards) {
  margin-block: 0;
}

.cs-resources-cards {
  /* Full-bleed white band per Figma (page bg is off-white) */
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-block: var(--cs-space-2xl);
  background: var(--cs-white);
  font-family: var(--cs-font-body);
  color: var(--cs-ink);
}

.cs-resources-cards__inner {
  position: relative;
  z-index: 1;
  max-width: var(--cs-container);
  margin: 0 auto;
  padding-inline: var(--cs-gutter);
}

/* ---------- Header ---------- */
.cs-resources-cards__header {
  text-align: center;
  margin-bottom: var(--cs-space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cs-space-xs);
}

.cs-resources-cards__eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  font-family: var(--cs-font-display);
  font-weight: 500;
  font-size: 2rem; /* 20px */
  line-height: 1.212;
  color: var(--cs-blue);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.cs-resources-cards__eyebrow-line {
  display: inline-block;
  width: 4.9rem;
  height: 2px;
  background: currentColor;
}

/* Doubled-up so it survives BB Global Styles' h2/h2 span rules. */
.cs-resources-cards .cs-resources-cards__heading {
  margin: 0;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 2vw + 1.6rem, 4rem); /* 28px → 40px */
  font-style: normal;
  line-height: 1.5;
  letter-spacing: var(--cs-tracking-tight);
  text-wrap: balance;
}

.cs-resources-cards .cs-resources-cards__heading-main {
  color: var(--cs-ink);
}

.cs-resources-cards .cs-resources-cards__heading-accent {
  color: var(--cs-blue-dark);
  margin-left: 0.5ch;
}

.cs-resources-cards__subtitle {
  margin: 0;
  font-family: var(--cs-font-display);
  font-weight: 500;
  font-size: 1.5rem; /* 15px */
  line-height: 1.5;
  color: var(--cs-blue-dark);
}

/* ---------- Cards grid ---------- */
.cs-resources-cards__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--cs-space-md);
}

.cs-resources-cards__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--cs-blue);
  border-radius: 3.7rem; /* 37px */
  padding: 2.6rem;
  min-height: 52.6rem; /* 526px per Figma */
  text-align: center;
}

.cs-resources-cards__card-photo {
  width: 100%;
  border-radius: 4.9rem; /* 49px */
  overflow: hidden;
}

.cs-resources-cards__card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 258 / 290;
  object-fit: cover;
}

/* Title — underlined white link, centered in the space below the photo.
   Doubled-up (+ :link/:visited) so BB Global Styles can't repaint it. */
.cs-resources-cards .cs-resources-cards__card-title {
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 2rem; /* 20px */
  font-style: normal;
  line-height: 1.5;
  letter-spacing: var(--cs-tracking-tight);
  color: var(--cs-white);
  padding-block: var(--cs-space-sm);
}

.cs-resources-cards .cs-resources-cards__card-title a,
.cs-resources-cards .cs-resources-cards__card-title a:link,
.cs-resources-cards .cs-resources-cards__card-title a:visited {
  color: var(--cs-white);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 200ms ease;
}

.cs-resources-cards .cs-resources-cards__card-title a:hover,
.cs-resources-cards .cs-resources-cards__card-title a:focus-visible {
  color: var(--cs-white);
  opacity: 0.85;
}

.cs-resources-cards__card-meta {
  margin: 0;
  align-self: center;
  text-align: center;
  font-family: var(--cs-font-display);
  font-weight: 500;
  font-size: 1.4rem; /* 14px */
  line-height: 1.5;
  /* Ink gives 4.2:1 on the card blue — the best the palette allows here
     (orange is 1.5:1, white 3.9:1; nothing reaches AA's 4.5 on this bg). */
  color: var(--cs-ink);
  text-transform: uppercase;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cs-resources-cards__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cs-resources-cards__card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .cs-resources-cards {
    padding-block: var(--cs-space-xl);
  }
  .cs-resources-cards__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 34rem;
    margin-inline: auto;
  }
}
