/* -----------------------------------------------------------------------
 * News / blog index — /news/
 *
 * Loaded only on the posts index (home.php). Depends on home-sections.css for
 * the .bpc-hs-post card component; everything here is either page furniture
 * the front page has no equivalent of, or a deliberate override of the
 * front-page 4-across grid, which is too tight for a page whose whole job is
 * the listing.
 *
 * All colour, radius, timing and width values come from the --bpc-* tokens
 * declared in header-footer.css. No new palette is introduced.
 * -------------------------------------------------------------------- */

.bpc-news__in {
  max-width: var(--bpc-container-max);
  margin: 0 auto;
  padding-left: var(--bpc-container-px);
  padding-right: var(--bpc-container-px);
}

/* ---------- page head ---------- */

.bpc-news-head {
  background: linear-gradient(180deg, var(--bpc-navy) 0%, var(--bpc-navy-dark) 100%);
  color: var(--bpc-white);
  padding: 56px 0 60px;
}

.bpc-news-head__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: var(--bpc-radius-pill);
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.bpc-news-head__h {
  margin: 0;
  font-family: var(--bpc-font);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--bpc-white);
  max-width: 20ch;
}

.bpc-news-head__intro {
  margin-top: 18px;
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
}

.bpc-news-head__intro p { margin: 0 0 12px; }
.bpc-news-head__intro p:last-child { margin-bottom: 0; }
.bpc-news-head__intro a { color: var(--bpc-white); text-decoration: underline; text-underline-offset: 3px; }
.bpc-news-head__intro a:hover { color: var(--bpc-accent-light); }

/* ---------- listing ---------- */

.bpc-news-list { padding: 56px 0 8px; }

/* The front page runs 4 across as a teaser band. Here the listing is the
   content, so cards get room to breathe and reflow by available width. */
.bpc-news-posts.bpc-hs-posts {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.bpc-news-list .bpc-hs-post__title { font-size: 18px; }
.bpc-news-list .bpc-hs-post__excerpt { font-size: 14.5px; }

.bpc-news-empty {
  margin: 0;
  padding: 28px 0 8px;
  font-size: 16px;
  color: var(--bpc-text-muted);
}

/* ---------- pagination ---------- */

.bpc-news-pagination { margin: 40px 0 8px; }

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

.bpc-news-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--bpc-border);
  border-radius: var(--bpc-radius-sm);
  background: var(--bpc-white);
  color: var(--bpc-navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--bpc-duration-sm) var(--bpc-ease),
              color var(--bpc-duration-sm) var(--bpc-ease),
              background var(--bpc-duration-sm) var(--bpc-ease);
}

.bpc-news-pagination .page-numbers:hover {
  border-color: var(--bpc-accent);
  color: var(--bpc-accent);
}

.bpc-news-pagination .page-numbers.current {
  background: var(--bpc-navy);
  border-color: var(--bpc-navy);
  color: var(--bpc-white);
}

.bpc-news-pagination .page-numbers:focus-visible {
  outline: 3px solid var(--bpc-accent);
  outline-offset: 2px;
}

.bpc-news-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

/* ---------- reference guides ---------- */

.bpc-news-hubs { padding: 56px 0 60px; }

.bpc-news-hubs__head { margin-bottom: 26px; }

.bpc-news-hubs__h {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  color: var(--bpc-navy);
}

.bpc-news-hubs__sub {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bpc-text-muted);
  max-width: 62ch;
}

.bpc-news-hubs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Five reference pages. Four across strands the fifth on its own row; three
   across reads as a deliberate 3 + 2 and gives the descriptions more room. */
@media (min-width: 1024px) {
  .bpc-news-hubs__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.bpc-news-hub { margin: 0; }

.bpc-news-hub__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 20px 22px;
  border: 1px solid var(--bpc-border);
  border-left: 3px solid var(--bpc-accent);
  border-radius: var(--bpc-radius-lg);
  background: var(--bpc-white);
  text-decoration: none;
  transition: transform var(--bpc-duration-sm) var(--bpc-ease),
              box-shadow var(--bpc-duration-sm) var(--bpc-ease);
}

.bpc-news-hub__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 41, 108, 0.1);
}

.bpc-news-hub__link:focus-visible {
  outline: 3px solid var(--bpc-accent);
  outline-offset: 2px;
}

.bpc-news-hub__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--bpc-navy);
}

.bpc-news-hub__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--bpc-text-muted);
}

/* ---------- closing CTA ---------- */

.bpc-news-cta {
  background: var(--bpc-offwhite);
  border-top: 1px solid var(--bpc-border);
  padding: 44px 0 48px;
}

.bpc-news-cta__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.bpc-news-cta__h {
  margin: 0 0 6px;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  color: var(--bpc-navy);
}

.bpc-news-cta__sub {
  margin: 0;
  max-width: 60ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--bpc-text-muted);
}

.bpc-news-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.bpc-news-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: var(--bpc-radius-pill);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--bpc-duration-sm) var(--bpc-ease),
              color var(--bpc-duration-sm) var(--bpc-ease),
              border-color var(--bpc-duration-sm) var(--bpc-ease);
}

.bpc-news-btn:focus-visible {
  outline: 3px solid var(--bpc-accent);
  outline-offset: 2px;
}

.bpc-news-btn--primary {
  background: var(--bpc-accent);
  color: var(--bpc-on-accent);
  border: 1px solid var(--bpc-accent);
}

.bpc-news-btn--primary:hover {
  background: var(--bpc-accent-dark);
  border-color: var(--bpc-accent-dark);
  color: var(--bpc-on-accent);
}

.bpc-news-btn--ghost {
  background: transparent;
  color: var(--bpc-navy);
  border: 1px solid var(--bpc-navy);
}

.bpc-news-btn--ghost:hover {
  background: var(--bpc-navy);
  color: var(--bpc-white);
}

/* ---------- narrow screens ---------- */

@media (max-width: 782px) {
  .bpc-news-head { padding: 40px 0 44px; }
  .bpc-news-list { padding: 40px 0 4px; }
  .bpc-news-hubs { padding: 44px 0 48px; }
  .bpc-news-posts.bpc-hs-posts { gap: 20px; }
  .bpc-news-cta__in { flex-direction: column; align-items: flex-start; }
  .bpc-news-cta__actions { width: 100%; }
  .bpc-news-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .bpc-news-hub__link,
  .bpc-news-btn,
  .bpc-news-pagination .page-numbers {
    transition: none;
  }
  .bpc-news-hub__link:hover { transform: none; }
}
