/* ============================================================
   News list — the filter bar, the section pills and the story grid.

   Ported from the mockup's `.nfilterbar` / `.npills` / `.ngrid` / `.ncard`
   (styles/news.css). Deltas, deliberate:
     · the column count is a setting (`columns`), so the same block serves a
       three-up newsroom and a two-up "related stories" band;
     · the mockup's `.ngrid--capped` nth-child cap is gone. Hiding cards with
       CSS means every story is in the markup on every visit — 71 pictures for
       nine cards — so the cap is the SERVER's (`perPage`) and "Load more" is a
       real link to a real page;
     · the mockup's magnifier is a real submit button, because with JavaScript
       off it is the only thing that applies the year;
     · the folds are container queries on the section (true in the editor
       canvas), not the mockup's viewport media queries.
   ============================================================ */
.vt-news {
  /* A flex item in the section stack — claim the band rather than shrink to
     the widest card. */
  width: 100%;
}

/* ---- the filter bar ---- */
.vt-news__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.vt-news__search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 320px;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 11px 18px;
  transition: border-color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.vt-news__search:focus-within {
  border-color: var(--color-light-purple);
  box-shadow: var(--focus-ring);
}
.vt-news__search input {
  flex: 1;
  min-width: 0;
  order: 2;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--color-text);
}
/* The pill shows focus (:focus-within) — no second ring inside it. */
.vt-news__search input:focus,
.vt-news__search input:focus-visible { box-shadow: none; outline: none; }
.vt-news__search input::placeholder { color: var(--color-text-muted); }

.vt-news__submit {
  order: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--dur-base) var(--ease-standard);
}
.vt-news__submit:hover { color: var(--color-dark-purple); }
.vt-news__submit:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-pill); }
.vt-news__submit svg { width: 17px; height: 17px; display: block; fill: currentColor; }

.vt-news__year {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}
.vt-news__year label {
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
}
.vt-news__year select,
.vt-news__go {
  font: inherit;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color var(--dur-base) var(--ease-standard);
}
.vt-news__year select:hover,
.vt-news__go:hover { border-color: var(--color-light-purple-40); }
.vt-news__year select:focus-visible,
.vt-news__go:focus-visible {
  border-color: var(--color-light-purple);
  box-shadow: var(--focus-ring);
  outline: none;
}

/* ---- the section pills ---- */
.vt-news__pills { margin-bottom: clamp(28px, 3.5cqi, 40px); }
.vt-news__pills ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vt-news__pill {
  display: inline-block;
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard), background var(--dur-base) var(--ease-standard);
}
.vt-news__pill:hover { border-color: var(--color-light-purple-40); color: var(--color-text); }
.vt-news__pill.is-active {
  background: var(--color-dark-purple);
  border-color: var(--color-dark-purple);
  color: #fff;
}

/* ---- the count line ---- */
.vt-news__count {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--color-text-muted);
}
.vt-news__reset { margin-left: 10px; }

/* ---- the grid ----
   The column count lives on the ROOT as a custom property, not on the grid, so
   the folds below can lower it with a plain `.vt-news { --vt-news-cols: 1 }` at
   the same specificity and later in the file — no !important anywhere. */
.vt-news { --vt-news-cols: 3; }
.vt-news--cols-2 { --vt-news-cols: 2; }
.vt-news--cols-3 { --vt-news-cols: 3; }
.vt-news--cols-4 { --vt-news-cols: 4; }

.vt-news__grid {
  display: grid;
  grid-template-columns: repeat(var(--vt-news-cols, 3), 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vt-news__card { display: flex; }
/* ---- the card edge: the ROW decides, the card reads ----
   The `Card border` toggle (inc/card-border.php) lives on the row, so the edge
   travels down as an inherited custom property. The bare row states the CARD
   level as well as its own: a :hover — and on the product cards the flagship's
   own tint — sets the token ON the card, and a value set on an element always
   beats one inherited from its ancestor, whatever the specificity. */
.vt-news { --vt-card-edge: var(--color-border); }
.vt-news.vt-cards-bare,
.vt-news.vt-cards-bare .vt-news__link,
.vt-news.vt-cards-bare .vt-news__link:hover { --vt-card-edge: transparent; }

.vt-news__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--vt-card-edge, var(--color-border));
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-base) var(--ease-standard);
}
/* base.css `a:hover` (0,1,1) underlines every link on hover and outranks the
   plain class above, which drew a line under every text in the card. The card is
   ONE link, so the hover state restates it (launch list B32, 2026-09-30). */
.vt-news__link:hover { --vt-card-edge: var(--color-light-purple-40); text-decoration: none; }
.vt-news__link:hover .vt-news__title { color: var(--color-dark-purple); }
.vt-news__link:hover .vt-news__img { transform: scale(1.045); }
.vt-news__link:hover .vt-news__arrow { transform: translateX(3px); }
.vt-news__link:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.vt-news__media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-bg-subtle);
}
.vt-news__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s var(--ease-standard);
}

.vt-news__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 24px 22px;
}
.vt-news__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.vt-news__cat {
  font-size: max(11px, var(--fs-floor, 0px));
  font-weight: var(--fw-bold);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-dark-purple);
  background: var(--color-light-purple-10);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
}
.vt-news__date { font-size: 12.5px; color: var(--color-text-muted); }
.vt-news__title {
  font-family: var(--font-display);
  font-weight: var(--fw-light);
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0 0 10px;
  transition: color var(--dur-base) var(--ease-standard);
}
.vt-news__excerpt {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
}
.vt-news__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--color-dark-purple);
}
.vt-news__arrow { transition: transform var(--dur-base) var(--ease-standard); }

.vt-news__empty { margin: 0; font-size: 15px; color: var(--color-text-muted); }
.vt-news__more-row {
  display: flex;
  justify-content: center;
  margin: clamp(36px, 4cqi, 48px) 0 0;
}

/* ---- folds ---- */
@container vt-section (max-width: 900px) {
  .vt-news--cols-3,
  .vt-news--cols-4 { --vt-news-cols: 2; }
}
@container vt-section (max-width: 600px) {
  .vt-news { --vt-news-cols: 1; }
  .vt-news__search { flex-basis: 100%; }
}
