/* ==========================================================================
   Article row
   --------------------------------------------------------------------------
   The card itself is styled in components.css (.article-card) and shared with
   the blog index, so this file only handles the row: the heading line and the
   column count.
   ========================================================================== */

.article-row__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-block-end: var(--sp-4);
}

.article-row__heading {
  color: var(--color-heading);
  font-size: var(--fs-h3);
  margin: 0;
}

.article-row__more {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: var(--fw-semi);
  font-size: var(--fs-sm);
}

.article-row__grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) {
  .article-row__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 62rem) {
  .article-row__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

/* Five only once there is genuinely room for it. Below this the row falls back
   to three, which is why the count is written onto the element rather than
   assumed by the stylesheet. */
@media (min-width: 82rem) {
  .article-row__grid[data-count="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* This row used to opt into the full-bleed width, because five cards inside
   the old 75rem container left each one about 210px wide and every card grew
   past 1300px tall. Two things changed on 18 Sep: the container went to 80rem,
   and the row went to four cards. Both are now comfortable at the standard
   width, and staying in the container means this section's left edge lines up
   with the header and every band above and below it — which matters more than
   the extra few pixels. */

/* NO EXCERPT IN THIS ROW
   ----------------------
   The card component carries an excerpt because the blog index wants one.
   The homepage row in the mock-up does not: each card is a category, a
   two-line headline and a Read More, and that is what keeps five of them
   scannable at a glance. The excerpt is hidden here rather than removed from
   the component, so the blog index is unaffected. */
.article-row .article-card__excerpt { display: none; }

/* With the excerpt gone the headline should still be allowed a sensible
   number of lines before it is cut, so a long title cannot drag one card
   taller than its neighbours. */
.article-row .article-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/* Phones: a swipe row (components.css), so four articles take one screen
   height instead of four. */
@media (max-width: 39.99rem) {
  .article-row .article-card__title { font-size: var(--fs-h6); }
  .article-row .article-card__body { padding: var(--sp-4); }
}
