/* ============================================================
   News landing (archive) + single article
   The .news grid/cards live in sections.css (global); this file adds the
   category filter bar, hover-dim state, and the editorial single-article layout.
   Loaded on the news archive + single via inc/enqueue.php.
   ============================================================ */

/* ---- No-hero landing (news archive + events page) ----
   These pages have no hero, so the global white .nav-spacer band sits above the
   cream section and reads as a white gap at the top. Drop it (as hero pages do)
   so the cream section fills to the very top and the nav floats over it; the
   section's own padding-top then clears the floating nav. */
.post-type-archive-rautomead_news .nav-spacer,
.page-template-template-events .nav-spacer {
  display: none;
}

.news--archive {
  border-radius: 0;
  padding-top: 7rem;
}

@media (min-width: 1024px) {
  .news--archive {
    padding-top: 9rem;
  }
}

.news__empty {
  color: #555;
  font-size: 1.0625rem;
}

/* ---- Category filter bar ---- */
.news__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.news__filter-btn {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.6rem 1.4rem;
  border-radius: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #3a3a3a;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.news__filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.news__filter-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ---- Hover dimming (set by news-filter.js) ---- */
.news__article {
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.news__article.is-dimmed {
  opacity: 0.45;
}

/* ============================================================
   SINGLE ARTICLE (editorial)
   ============================================================ */
.news-single__hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0A0A0A;
}

.news-single__hero--plain {
  min-height: 0;
  background: var(--color-cream);
  padding-top: 10rem;
}

.news-single__hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.news-single__hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.news-single__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.55) 45%, rgba(10, 10, 10, 0.2) 100%);
}

.news-single__hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 8rem;
  padding-bottom: 3.5rem;
}

.news-single__hero--plain .news-single__hero-inner {
  padding-top: 0;
  padding-bottom: 2.5rem;
}

.news-single__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  opacity: 0.8;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1.75rem;
  transition: gap 0.25s ease, opacity 0.25s ease;
}

.news-single__back:hover {
  gap: 0.85rem;
  opacity: 1;
}

.news-single__hero--plain .news-single__back {
  color: #1a1a1a;
}

.news-single__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.news-single__category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-primary);
  padding: 0.35rem 0.9rem;
  border-radius: 2rem;
}

.news-single__date {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.news-single__hero--plain .news-single__date {
  color: #666;
}

.news-single__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 900px;
  margin: 0;
}

.news-single__hero--plain .news-single__title {
  color: #1a1a1a;
}

/* ---- Body / prose ---- */
.news-single__body {
  background: var(--color-cream);
  padding: 4rem 0 5rem;
}

.news-single__prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
  font-size: 1.125rem;
  line-height: 1.85;
  color: #2a2a2a;
}

.news-single__prose p {
  margin: 0 0 1.5rem;
}

.news-single__prose > :first-child {
  margin-top: 0;
}

.news-single__prose h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 1rem;
}

.news-single__prose h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 2rem 0 0.75rem;
}

.news-single__prose a {
  color: var(--color-primary);
  text-decoration: underline;
}

.news-single__prose ul,
.news-single__prose ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

.news-single__prose li {
  margin-bottom: 0.5rem;
}

.news-single__prose blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #444;
}

.news-single__prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

/* Related articles sit directly below the body — drop the rounded corners. */
.news--related {
  border-radius: 0;
}
