/* ==============================================================================
   CARDS BLOCK
   ============================================================================== */

.cards__grid {
  display: grid;
  gap: var(--spacing-lg);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  background: var(--paper-bg);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* A small lift on hover says the card is one unit; the global
   prefers-reduced-motion guard in main.css cancels the transition. */
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Every card image fills the same 16:9 box, cropped to the centre, so a
   vertical photo no longer stretches its card and the four titles line
   up (Juan, 13 October 2026). */
.card__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* The block's own heading («Cómo nos organizamos», «Los grupos») is on
   Juan's list of serious headings (ADR-034): Source Serif 4 at its one
   served weight, no capitals. The titles inside each card stay hand-lettered. The
   body:not(.admin) prefix outweighs main.css's uppercase rule. */
body:not(.admin) .block-cards > h2 {
  font-family: var(--font-title-serious);
  font-weight: 600;
  line-height: 1.15;
  text-transform: none;
  letter-spacing: 0;
}

/* Lettered like the poster (ADR-034): capitals at the hand font's one
   weight, breaking anywhere if a long word would overflow a narrow card. */
.card__title {
  margin: 0;
  color: var(--text-primary);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.card__text {
  color: var(--text-muted);
  line-height: 1.6;
  /* Keeps a card's link pinned to the bottom even when a neighbour's text
     runs longer and stretches the row. */
  flex-grow: 1;
}

/* The optional icon above a card's title (content.Card.Icon), in the
   accent so it reads as a badge of the card, not as content. Sized in em
   so it follows the visitor's font size like the title next to it. */
.card__icon {
  width: 2.75em;
  height: 2.75em;
  color: var(--accent-blue);
}
