/* =========================================================
   ARTICLES HUB STYLES
   ========================================================= */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Page header ---------- */
.articles-hero {
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2.5rem);
  max-width: 760px;
}
.articles-hero__lede { color: var(--text-muted); }

/* ---------- Filter bar ---------- */
.filter-bar {
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.filter-search {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
}
.filter-search input[type="search"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: var(--step--1);
  color: var(--text);
}
.filter-search input[type="search"]:focus-visible { outline-offset: 0; }

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.pill {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text);
  background: var(--bg-card);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.pill:hover { border-color: var(--navy); }
.pill.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.tag-chip {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--blue);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.08);
}
.tag-chip:hover { background: rgba(37, 99, 235, 0.16); }
.tag-chip.is-active {
  background: var(--blue);
  color: #fff;
}
.tag-chip--clear {
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed var(--border);
}
.tag-chip--clear:hover { color: var(--navy); border-color: var(--navy); }

/* ---------- Results meta ---------- */
.results-meta {
  color: var(--text-muted);
  font-size: var(--step--1);
  margin-bottom: 1.75rem;
}
.results-meta p { margin: 0; max-width: none; }

/* ---------- Article grid ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.14);
}
.article-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.article-card__media {
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  overflow: hidden;
}
.article-card__media img { width: 100%; height: 100%; object-fit: cover; }
.article-card__body {
  padding: 1.4rem 1.6rem 1.1rem;
  flex: 1;
}
.article-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.article-card__badge {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--amber);
}
.article-card__meta {
  font-size: var(--step--1);
  color: var(--text-muted);
}
.article-card h3 {
  font-size: var(--step-1);
  margin-bottom: 0.6rem;
}
.article-card__summary {
  font-size: var(--step--1);
  color: var(--text);
  margin: 0;
}
.article-card__footer {
  padding: 0 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.25rem;
}
.article-card__author {
  font-size: var(--step--1);
  color: var(--text-muted);
}
.article-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.article-card__tag {
  font-size: 0.78rem;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}
.article-card__tag:hover { background: rgba(37, 99, 235, 0.16); }

@media (max-width: 960px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .article-grid { grid-template-columns: 1fr; }
  .filter-search { max-width: none; }
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  flex-wrap: wrap;
}
.pagination__nav {
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--navy);
}
.pagination__nav:hover { color: var(--blue); }
.pagination__nav.is-disabled {
  color: var(--text-muted);
  pointer-events: none;
}
.pagination__pages {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.pagination__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text);
}
.pagination__num:hover { background: var(--bg-alt); }
.pagination__num.is-active {
  background: var(--navy);
  color: #fff;
}
.pagination__ellipsis {
  color: var(--text-muted);
  padding-inline: 0.25rem;
}
