/* ==========================================================================
   Pathway cards
   --------------------------------------------------------------------------
   Equal-height cards on a white ground with a soft shadow, matching the
   mock-up. The grid takes its column count from data-count so two cards do not
   sit in a three-column grid with a hole on the right.
   ========================================================================== */

/* --fs-h3, not --fs-h2. The global h2 step tops out at 2.875rem, which is
   right for a heading that opens a long article but roughly half again as
   large as the mock-up's section headings, and it made this band shout next
   to the team band and the article row — both of which already use h3. */
.pathways__heading {
  text-align: center;
  color: var(--color-heading);
  font-size: var(--fs-h3);
  margin-block: 0 var(--sp-5);
  text-wrap: balance;
}

.pathways__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
}

@media (min-width: 45rem) {
  .pathways__grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pathways__grid[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 62rem) {
  .pathways__grid[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pathways__grid[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.pcard-pathway {
  position: relative;          /* anchor for the whole-card click overlay */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  background: var(--color-tile-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: clamp(var(--sp-4), 2.2vw, var(--sp-5));
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.pcard-pathway:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pcard-pathway__icon {
  display: grid;
  place-items: center;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-warm);
  color: var(--color-heading);
}

.pcard-pathway__icon svg { stroke-width: 1.6; }

.pcard-pathway__title {
  color: var(--color-heading);
  font-size: var(--fs-h5);
  margin: 0;
  text-wrap: balance;
}

.pcard-pathway__text {
  color: var(--color-text);
  font-size: var(--fs-base);
  margin: 0;
  flex: 1;                     /* pushes the button to the bottom edge */
}

.pcard-pathway__btn { margin-block-start: var(--sp-2); }

/* The whole card is clickable, but only the button is a link. The overlay is
   what makes the rest of the card respond, without giving assistive technology
   a link whose name is the entire card. */
.pcard-pathway__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* With the overlay in place the focus ring would otherwise be drawn around the
   invisible rectangle rather than the button. Put it back on the button. */
.pcard-pathway__btn:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* --- Phones ---------------------------------------------------------------
   Icon beside the heading instead of above it, and a little less padding:
   the three cards were each about 250px tall, three screens of scrolling for
   three choices. */
@media (max-width: 44.99rem) {
  .pcard-pathway {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4);
  }
  .pcard-pathway__icon { inline-size: 2.5rem; block-size: 2.5rem; }
  .pcard-pathway__text,
  .pcard-pathway__btn { grid-column: 1 / -1; }
  .pcard-pathway__btn { justify-self: start; margin-block-start: 0; }
}
