/* Public /nieuws news index. Reuses the shared .news-card component from
 * _cards.css; this file only lays out the page (featured-first + grid +
 * pagination). All colours come from _tokens.css. */

.posts-section {
  padding-block: 3rem;
  background: var(--stone);
}

@media (min-width: 48rem) {
  .posts-section {
    padding-block: 3.5rem;
  }
}

/* The featured (newest) post spans the full width above the grid. On wider
 * screens its card lays out side-by-side via the .news-card internals. */
.posts-featured {
  max-width: 64rem;
  margin-inline: auto;
  margin-block-end: 2rem;
}

@media (min-width: 48rem) {
  .posts-featured .news-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.posts-grid {
  max-width: 64rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.posts-empty {
  max-width: 64rem;
  margin-inline: auto;
  color: var(--muted);
  font-style: italic;
}

/* Pagination. Pagy 43's series_nav emits a flat run of <a> tags directly in
 * the nav: real links carry href, the current page carries aria-current="page",
 * gaps use role="separator", and disabled prev/next carry aria-disabled. Style
 * them as pill controls using design tokens. */
.posts-pagination {
  max-width: 64rem;
  margin-inline: auto;
  margin-block-start: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
  align-items: center;
}

.posts-pagination a {
  display: inline-flex;
  align-items: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding-inline: .65rem;
  justify-content: center;
  border-radius: var(--r);
  text-decoration: none;
  color: var(--ink);
  background: white;
  border: 1px solid var(--sand);
}

.posts-pagination a[href]:hover,
.posts-pagination a[href]:focus {
  border-color: var(--forest);
  color: var(--forest);
}

.posts-pagination a[aria-current="page"] {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.posts-pagination a[role="separator"] {
  border: 0;
  background: transparent;
}

.posts-pagination a[aria-disabled="true"]:not([aria-current="page"]) {
  color: var(--muted);
}

/* ---- Article show page ------------------------------------------- */

.post-body-section {
  padding-block: 2.5rem 3rem;
}

.post-hero-image {
  max-width: 64rem;
  margin-inline: auto;
  margin-block: 0 2rem;
  border-radius: var(--r-lg);
  overflow: hidden;
}

.post-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-body {
  max-width: 44rem;
  margin-inline: auto;
}

.post-back {
  max-width: 44rem;
  margin-inline: auto;
  margin-block-start: 2.5rem;
}

.posts-related-title {
  max-width: 64rem;
  margin-inline: auto;
  font-family: "Playfair Display", Georgia, serif;
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--ink);
  margin-block-end: 1.5rem;
}
