/* =========================================================
   Best Ever Medical — Events & News Hub Page
   Loads ONLY on the Page containing [bem_events_news_hub] (see
   functions.php). Depends on custom.css for :root variables, header,
   footer, .inner-hero (this page's own hero — no unique hero CSS
   needed here), and the shared .article-card family (base rules
   shared with the single Event template's "Further Reading" grid —
   only this page's featured/regular grid context values live here).

   ARCHITECTURE NOTE: the static reference filters/shows articles
   entirely client-side (all articles pre-rendered in the DOM, JS
   toggles visibility) with decorative, non-functional pagination
   links. That doesn't scale once the client is regularly publishing
   real articles — eventually every single one would load on every
   visit regardless of filter or page. This build uses real
   server-side pagination and taxonomy filtering instead (via
   ?category=slug&paged=N query args on the same Page), so filter tabs
   and page numbers are real links, not JS state. See
   bem_events_news_hub_shortcode() in functions.php.
   ========================================================= */

.editorial-news-section { padding: 80px 5vw 120px 5vw; background-color: var(--bg-cream); position: relative; z-index: 10; }
.news-container { max-width: 1400px; margin: 0 auto; }

/* --- Filters (real links now, not client-side JS toggles — see
   architecture note above) --- */
.news-filters { display: flex; gap: 15px; justify-content: center; margin-bottom: 80px; flex-wrap: wrap; border-bottom: 1px solid rgba(0,0,0,0.08); padding-bottom: 30px; }
/* .filter-btn reused here as an <a> tag (not the <button> the
   Products catalogue uses this same class name for) — safe, since
   products.css and events-hub.css are never enqueued on the same
   page, same reasoning as every other cross-page class-name reuse in
   this build. */
.filter-btn { background: transparent; border: none; color: #64748b; padding: 10px 20px; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; position: relative; text-decoration: none; display: inline-block; }
.filter-btn:hover { color: var(--primary-dark); }
.filter-btn.active { color: var(--primary-dark); font-weight: 700; }
.filter-btn.active::after { content: ''; position: absolute; bottom: -31px; left: 0; width: 100%; height: 2px; background-color: var(--primary-dark); }

/* --- Article Card entrance state (this page's own scroll-reveal,
   not the shared .rv-up system — matches the static reference's own
   dedicated per-card stagger reveal in events-hub.js). --- */
.article-card { opacity: 0; transform: translateY(30px); will-change: opacity, transform; }

/* --- Featured Grid (top 2 posts, page 1 / unfiltered only) --- */
.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6vw; margin-bottom: 100px; }
.featured-card .article-img-wrap { height: 420px; border-radius: 24px; }
.featured-card .article-title { font-size: clamp(32px, 4vw, 48px); margin-bottom: 20px; line-height: 1.1; }
.featured-card .article-excerpt { font-size: 18px; line-height: 1.6; -webkit-line-clamp: 3; }

/* --- Regular Grid (3-column) --- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 70px 3vw; }
.article-grid .article-img-wrap { height: 260px; }
.article-grid .article-title { font-size: clamp(22px, 2vw, 28px); margin-bottom: 12px; }
.article-grid .article-excerpt { font-size: 15px; -webkit-line-clamp: 3; margin-bottom: 15px; }

.no-articles-msg { text-align: center; padding: 80px 0; color: #64748b; font-size: 18px; }

/* --- Pagination (real links to ?paged=N) --- */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 100px; }
.page-num { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(0,0,0,0.08); font-weight: 600; font-size: 14px; color: var(--text-dark); text-decoration: none; transition: all 0.3s ease; }
.page-num:hover, .page-num.active { background: var(--primary-dark); color: var(--white); border-color: var(--primary-dark); }

@media (max-width: 1024px) {
    .editorial-news-section { padding: 60px 5vw; }
    .featured-grid { grid-template-columns: 1fr; gap: 60px; margin-bottom: 60px; }
    .article-grid { grid-template-columns: repeat(2, 1fr); gap: 60px 4vw; }
}

@media (max-width: 768px) {
    .news-filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 20px; margin-bottom: 60px; }
    .news-filters::-webkit-scrollbar { display: none; }
    .filter-btn { flex-shrink: 0; white-space: nowrap; }
    .article-grid { grid-template-columns: 1fr; gap: 50px; }
    .featured-card .article-img-wrap { height: 300px; }
    .article-grid .article-img-wrap { height: 260px; }
}
