/* ─── Blog listings (posts page, archive, search, index, related posts) —
   category chips, featured lead card, pagination, empty state. Loaded only
   on blog views (es_is_blog_view()). The card + grid live in card-news.css. */

.posts-band {
  padding: 0 0 var(--section-y);

  .prose-band + & {
    background: var(--cream);
  }

  & .sec-head {
    margin-bottom: 40px;
  }
}

/* Category chips — the design's pill language: cream pills, cocoa when
   current. Scrolls sideways on phones instead of wrapping into a wall. */
.cat-chips {
  margin: 0 calc(var(--gutter) * -1) 36px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--clay-light) transparent;

  @media (min-width: 768px) {
    margin: 0 0 44px;
    overflow: visible;
  }
}

.cat-chips__list {
  display: flex;
  gap: 8px;
  width: max-content;
  padding: 2px var(--gutter) 8px;

  @media (min-width: 768px) {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    padding: 0;
  }
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--cocoa-2);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;

  &:hover {
    border-color: var(--clay);
    color: var(--clay-d);
  }

  &.is-current {
    background: var(--cocoa);
    border-color: var(--cocoa);
    color: var(--cream);
  }
}

/* Featured lead card (page 1) — sits above the grid */
.posts-featured {
  margin-bottom: 22px;
}

/* Pagination — pill row */
.pagination {
  margin-top: 48px;
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 16px;
  border-radius: var(--pill);
  background: var(--cream);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--cocoa-2);
  transition: background-color 0.2s, color 0.2s;

  &:hover {
    background: var(--sand);
  }

  &.current {
    background: var(--cocoa);
    border-color: var(--cocoa);
    color: var(--cream);
  }

  &.dots {
    background: none;
    border: 0;
  }
}

.screen-reader-text + .nav-links {
  margin: 0;
}

/* Empty state */
.no-results {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px;
  border-radius: var(--r-lg);
  background: var(--cream);
  text-align: center;

  & .search-pill {
    margin-top: 26px;
  }
}

.no-results__title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.no-results__text {
  margin-top: 12px;
  color: var(--muted);
}
