/* ==========================================================================
   Block: Resource cards
   ========================================================================== */

.awx-resource-cards__grid {
  display: grid;
  gap: var(--awx-space-lg);
}

@media (min-width: 62rem) {
  /* 45/55 (figure/content) — 9fr/11fr divides the space left after the gap
     is subtracted into an exact 45/55 split regardless of viewport width. */
  .awx-resource-cards__grid {
    grid-template-columns: 9fr 11fr;
    align-items: center;
    gap: clamp(2rem, 6vw, 6rem);
  }

  .awx-resource-cards--image-right .awx-resource-cards__figure {
    order: 2;
  }

  .awx-resource-cards__figure {
    /* An explicit height, not aspect-ratio, at this breakpoint — the
       comp's ~480px is a target height, not a proportion, and aspect-ratio
       against a variable-width track would not reliably land on it. Clamp
       so it scales down before the desktop breakpoint's own lower bound. */
    height: clamp(22rem, 33vw, 30rem); /* ~480px at 1440 */
    aspect-ratio: auto;
  }
}

.awx-resource-cards__figure {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: var(--awx-rule) solid var(--surface-rule);
}

.awx-resource-cards__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.awx-resource-cards__header {
  margin-bottom: var(--awx-space-lg);
  max-width: var(--awx-measure);
}

.awx-resource-cards__list {
  display: grid;
  gap: var(--awx-space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Thumbnail and text sit side by side at every width — this is a card that
   reads as one unit, not a stack, so it is not gated behind a breakpoint
   the way most of this block's other rules are. */
.awx-resource-cards__item {
  display: flex;
  gap: var(--awx-space-sm);
}

.awx-resource-cards__thumb {
  flex: none;
  width: 7.5rem; /* ~120px */
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: var(--awx-rule) solid var(--surface-rule);
}

.awx-resource-cards__thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.awx-resource-cards__item-title {
  margin: 0 0 0.3em;
  color: var(--surface-heading);
  font-family: var(--awx-font-display);
  font-size: var(--awx-step-1); /* 20px */
  font-weight: 700;
  text-transform: uppercase;
}

.awx-resource-cards__item-body {
  margin: 0 0 var(--awx-space-2xs);
  color: var(--surface-muted);
  font-size: var(--awx-step-0); /* 16px */
}
