/* ==============================================================================
   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);
}

.card__image {
  width: 100%;
  border-radius: var(--radius-md);
}

.card__title {
  margin: 0;
  color: var(--text-primary);
}

.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;
}
