/* cs-focus-cards — heading, two wide paragraphs (second right-aligned with
   deep-blue bold runs), and a pair of photo cards with dark overlays.
   All rem values follow BB Theme's html { font-size: 10px } base. */

/* Strip BB's default row chrome. */
.fl-row-content-wrap:has(.cs-focus-cards) {
  padding-block: 0;
}
.fl-module-content:has(.cs-focus-cards) {
  margin-block: 0;
}

.cs-focus-cards {
  position: relative;
  padding-block: var(--cs-space-2xl);
  font-family: var(--cs-font-body);
  color: var(--cs-ink);
}

.cs-focus-cards__inner {
  max-width: var(--cs-container);
  margin: 0 auto;
  padding-inline: var(--cs-gutter);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--cs-space-lg);
}

/* Doubled classes + font-style so BB Global h2 rules lose. */
.cs-focus-cards .cs-focus-cards__heading {
  margin: 0;
  font-family: var(--cs-font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 3vw + 1rem, 4.8rem); /* 32px → 48px */
  font-style: normal;
  line-height: 1.212;
  letter-spacing: var(--cs-tracking-tight);
  color: var(--cs-ink);
  text-wrap: balance;
}

.cs-focus-cards .cs-focus-cards__heading .cs-focus-cards__heading-accent {
  color: var(--cs-orange);
}

/* Paragraphs — 20px, second one right-aligned with deep-blue bold runs */
.cs-focus-cards__intro {
  max-width: 98rem;
  font-family: var(--cs-font-display);
  font-weight: 400;
  font-size: 2rem; /* 20px */
  line-height: 1.6;
  color: var(--cs-ink);
  text-transform: none;
}

.cs-focus-cards__intro p {
  margin: 0 0 var(--cs-space-sm);
}
.cs-focus-cards__intro p:last-child {
  margin-bottom: 0;
}

.cs-focus-cards__intro strong,
.cs-focus-cards__intro b {
  font-weight: 700;
  color: #1b5386;
}

.cs-focus-cards__intro--right {
  /* was flex-end — the Figma staggered the second paragraph to the right
     edge; client asked for all paragraphs flush left (2026-09-09) */
  align-self: flex-start;
  text-align: left;
}

/* ---------- Photo cards ---------- */
.cs-focus-cards__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--cs-space-lg);
  margin-top: var(--cs-space-md);
}

/* A lone card takes the full row instead of sitting in the left half.
   Selector kept on ONE line — BB's CSS rewrite welds a newline after `)`
   into a compound selector and the rule silently stops matching. */
.cs-focus-cards__grid:has(> .cs-focus-cards__card:only-child) { grid-template-columns: minmax(0, 1fr); }

.cs-focus-cards__card {
  position: relative;
  border-radius: 3.5rem; /* 35px */
  overflow: hidden;
  min-height: 40rem; /* 400px */
  display: flex;
  align-items: stretch;
}

.cs-focus-cards__card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-focus-cards__card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 31, 0.55);
}

/* Lone full-width card: crop the photo from its top edge, and left-align the
   copy in a 70% measure so lines don't run the whole 1320px band. */
.cs-focus-cards__card:only-child .cs-focus-cards__card-photo { object-position: top; }
.cs-focus-cards__card:only-child .cs-focus-cards__card-content { max-width: 70%; margin-inline: auto; text-align: left; align-items: flex-start; gap: var(--cs-space-sm); }
/* ...and the text fills that box — the 53rem two-card measure would leave it
   hugging the box's left edge and read as off-center. margin 0 kills the
   base rule's `margin: auto 0` vertical push so the copy tucks under the
   title instead of drifting toward the card's middle. */
.cs-focus-cards__card:only-child .cs-focus-cards__card-text { max-width: none; margin: 0; }
/* Title centered over the left-aligned copy. The card keeps the base 40rem
   min-height on purpose — the photo background must stay visible below the
   copy (client request); don't collapse it to fit the content. */
.cs-focus-cards__card:only-child .cs-focus-cards__card-title { align-self: center; text-align: center; }

.cs-focus-cards__card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--cs-space-md);
  padding: 6rem 3.6rem 4rem;
  width: 100%;
  text-align: center;
}

/* Doubled classes so BB Global h3 rules lose. */
.cs-focus-cards .cs-focus-cards__card .cs-focus-cards__card-title {
  margin: 0;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 2.4rem; /* 24px */
  font-style: normal;
  line-height: 1.212;
  color: var(--cs-white);
}

.cs-focus-cards__card-text {
  font-family: var(--cs-font-display);
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 1.6;
  color: var(--cs-white);
  text-transform: none;
  max-width: 53rem;
  margin: auto 0;
}

.cs-focus-cards__card-text p {
  margin: 0 0 var(--cs-space-sm);
}
.cs-focus-cards__card-text p:last-child {
  margin-bottom: 0;
}

/* ---------- Layout: Text Cards + Photo ---------- */
/* Header: heading left, intro_right top-right (right-aligned, narrower). */
.cs-focus-cards--text-photo .cs-focus-cards__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--cs-space-lg);
}

.cs-focus-cards--text-photo .cs-focus-cards__intro--right {
  align-self: flex-start;
  max-width: 44rem;
  /* 20px, one step up from 18 — at 18 the paragraph read undersized next to
     the display heading ("Warm Support" on 5453; client, change request
     2026-09-13 T5.2). Width up 39→44rem so the taller type keeps its measure. */
  font-size: 2rem;
  text-transform: none;
}

/* Body split: left text cards ~58%, right photo ~42%. */
.cs-focus-cards__split {
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  gap: 3rem;
  align-items: stretch;
  margin-top: var(--cs-space-md);
}

/* No side photo set: collapse to one column and center the cards at 80%
   so the empty right half doesn't linger (e.g. "Warm Support" on 5453). */
.cs-focus-cards__split:not(:has(.cs-focus-cards__col-photo)) {
  grid-template-columns: minmax(0, 1fr);
  width: 80%;
  margin-inline: auto;
}

.cs-focus-cards__col-cards {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.cs-focus-cards__textcard {
  border-radius: 4.6rem; /* 46px */
  padding: 5rem; /* 50px */
  color: var(--cs-white);
  display: flex;
  flex-direction: column;
  gap: var(--cs-space-md);
}

/* Doubled classes so BB Global h3 rules lose. */
.cs-focus-cards .cs-focus-cards__textcard .cs-focus-cards__textcard-title {
  margin: 0;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 2.4rem; /* 24px */
  font-style: normal;
  line-height: 1.212;
  color: var(--cs-white);
  text-transform: none;
}

.cs-focus-cards__textcard-text {
  font-family: var(--cs-font-display);
  font-weight: 400;
  font-size: 1.8rem; /* 18px */
  line-height: 1.6;
  color: var(--cs-white);
  text-transform: none;
}

.cs-focus-cards__textcard-text p {
  margin: 0 0 var(--cs-space-md);
}
.cs-focus-cards__textcard-text p:last-child {
  margin-bottom: 0;
}

/* Inline links inherit the card's text color (white on blue cards) — the
   theme's global blue link color vanishes against the card backgrounds */
.cs-focus-cards .cs-focus-cards__textcard-text a,
.cs-focus-cards .cs-focus-cards__textcard-text a:link,
.cs-focus-cards .cs-focus-cards__textcard-text a:visited {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.cs-focus-cards__textcard-text strong,
.cs-focus-cards__textcard-text b {
  font-weight: 700;
  color: var(--cs-white);
}

/* Light-fill cards flip to dark blue text — matches the services grid's pale
   cards. The class is set in frontend.php from the bg color's luminance. */
.cs-focus-cards .cs-focus-cards__textcard--on-light .cs-focus-cards__textcard-title,
.cs-focus-cards .cs-focus-cards__textcard--on-light .cs-focus-cards__textcard-text,
.cs-focus-cards .cs-focus-cards__textcard--on-light .cs-focus-cards__textcard-text strong,
.cs-focus-cards .cs-focus-cards__textcard--on-light .cs-focus-cards__textcard-text b {
  color: var(--cs-blue-dark);
}

/* Right column photo — fills the full height of the stacked cards. */
.cs-focus-cards__col-photo {
  display: flex;
  min-height: 100%;
}

.cs-focus-cards__side-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4.6rem; /* 46px */
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cs-focus-cards {
    padding-block: var(--cs-space-section-sm);
  }
  .cs-focus-cards__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cs-focus-cards__intro--right {
    text-align: left;
    align-self: flex-start;
  }

  /* The lone-card 70% text measure is a wide-band device — on a ~300px
     card it squeezed the copy to two words a line (client 2026-09-15). */
  .cs-focus-cards__card:only-child .cs-focus-cards__card-content {
    max-width: none;
  }

  /* Text Cards + Photo: single column — cards, then photo below. */
  .cs-focus-cards--text-photo .cs-focus-cards__header {
    flex-direction: column;
  }
  .cs-focus-cards--text-photo .cs-focus-cards__intro--right {
    max-width: none;
    text-align: left;
  }
  .cs-focus-cards__split {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Match the no-photo rule's specificity or the 80% width survives the stack. */
  .cs-focus-cards__split:not(:has(.cs-focus-cards__col-photo)) {
    width: 100%;
  }
  .cs-focus-cards__textcard {
    padding: 3.6rem;
    border-radius: 3.5rem;
  }
  .cs-focus-cards__side-photo {
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 3.5rem;
  }
}
