/* ============================================================
   news.css — News listing page styles
   Shared base: ../styles.css (never modified here)
   Only CSS custom properties from the design system are used.
   ============================================================ */

/* ----------------------------------------------------------
   Site header — dark on blue background, scrolled goes white
   ---------------------------------------------------------- */
.site-header {
  color: var(--white);
}

.site-header .brand,
.site-header .main-nav > a:not(.button) {
  color: var(--white);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(7, 23, 95, 0.08);
  color: var(--blue-dark);
}

.site-header.is-scrolled .brand {
  color: var(--blue-dark);
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

/* ----------------------------------------------------------
   1. Page header
   ---------------------------------------------------------- */

.news-header {
  min-height: clamp(320px, 44svh, 560px);
  overflow: hidden;
  color: var(--white);
  background: var(--blue-dark);
  display: flex;
  align-items: flex-end;
}

.news-header-inner {
  position: relative;
  z-index: 2;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 64px 20px 72px;
}

.news-kicker {
  margin: 0 0 24px;
  display: inline-block;
}

.news-header h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(48px, 13vw, 96px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.96;
  text-transform: uppercase;
}

.news-header-sub {
  max-width: 560px;
  margin: 22px 0 0;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

@media (min-width: 720px) {
  .news-header-inner {
    padding: 80px 64px 88px;
  }
}

@media (min-width: 1100px) {
  .news-header {
    min-height: clamp(380px, 48svh, 600px);
  }

  .news-header-inner {
    padding: 96px 64px 104px;
  }

  .news-header h1 {
    font-size: clamp(72px, 6.5vw, 96px);
  }
}

/* ----------------------------------------------------------
   2. Category filter strip
   ---------------------------------------------------------- */

.news-filter {
  padding: 0 20px;
  border-bottom: 1px solid rgba(7, 23, 95, 0.08);
  background: var(--white);
}

.news-filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 18px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.news-filter-inner::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 16px;
  border: 2px solid rgba(7, 23, 95, 0.15);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.filter-pill:hover {
  border-color: var(--aqua);
  color: var(--blue-dark);
}

.filter-pill:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
}

.filter-pill.is-active {
  border-color: var(--aqua);
  background: var(--aqua);
  color: var(--blue-dark);
}

[data-news-item][hidden] {
  display: none;
}

/* ----------------------------------------------------------
   3. Featured article
   ---------------------------------------------------------- */

.news-featured {
  padding: 52px 20px 0;
  background: var(--white);
}

.news-featured-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.news-featured-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--blue-dark);
  box-shadow: 0 24px 60px rgba(7, 23, 95, 0.16);
}

.news-featured-card > a {
  display: block;
}

.news-featured-img-wrap {
  position: relative;
  height: clamp(300px, 52vw, 560px);
  overflow: hidden;
}

.news-featured-img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transition: transform 600ms ease;
}

.news-featured-card:hover .news-featured-img-wrap img {
  transform: scale(1.03);
}

.news-featured-img-wrap::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(7, 23, 95, 0.55) 70%,
    rgba(7, 23, 95, 0.88) 100%
  );
  content: "";
  pointer-events: none;
}

.news-featured-body {
  position: relative;
  z-index: 2;
  padding: 28px 28px 32px;
  background: var(--white);
}

/* Overlap the text up over the image on larger screens */
@media (min-width: 720px) {
  .news-featured-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 44px 40px;
    background: transparent;
    color: var(--white);
  }

  .news-featured-body .news-featured-excerpt {
    color: rgba(255, 255, 255, 0.88);
  }

  .news-featured-body .news-featured-headline {
    color: var(--white);
  }

  .news-featured-body .news-featured-meta {
    color: rgba(255, 255, 255, 0.72);
  }

  .news-featured-body .news-featured-cta {
    color: var(--aqua);
    border-color: var(--aqua);
  }

  .news-featured-body .news-featured-cta:hover {
    background: var(--aqua);
    color: var(--blue-dark);
  }
}

.news-featured-badge-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.news-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Category badge colours — using only allowed tokens */
.badge-gala       { background: var(--aqua);    color: var(--blue-dark); }
.badge-achievement { background: var(--orange);  color: var(--white); }
.badge-community  { background: var(--blue);     color: var(--white); }
.badge-club       { background: var(--soft);     color: var(--blue-dark); border: 1px solid rgba(7,23,95,0.15); }
.badge-partners   { background: var(--blue-dark); color: var(--white); }

.news-featured-date {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.72;
}

.news-featured-headline {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: clamp(26px, 5.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.news-featured-excerpt {
  margin: 0 0 22px;
  max-width: 680px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(20, 20, 20, 0.82);
}

.news-featured-cta {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 20px;
  border: 2px solid var(--blue);
  border-radius: 7px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  gap: 10px;
  transition: background-color 180ms ease, color 180ms ease;
}

.news-featured-cta:hover {
  background: var(--blue);
  color: var(--white);
}

.news-featured-cta:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
}

/* ----------------------------------------------------------
   4. Article grid
   ---------------------------------------------------------- */

.news-grid-section {
  padding: 52px 20px 64px;
  background: var(--white);
}

.news-grid-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.news-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

/* Article card */
.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(7, 23, 95, 0.08);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 28px rgba(7, 23, 95, 0.07);
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.article-card:hover {
  box-shadow: 0 18px 48px rgba(7, 23, 95, 0.14);
  transform: translateY(-3px);
}

.article-card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;
  flex-shrink: 0;
  background: var(--soft);
}

.article-card-img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  transition: transform 500ms ease;
}

.article-card:hover .article-card-img-wrap img {
  transform: scale(1.04);
}

.article-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.article-card-date {
  font-size: 12px;
  font-weight: 600;
  color: rgba(20, 20, 20, 0.58);
}

.article-card h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: clamp(19px, 3.5vw, 24px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.article-card-excerpt {
  margin: 0;
  flex: 1;
  color: rgba(20, 20, 20, 0.72);
  font-size: 14px;
  line-height: 1.65;
}

.article-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 180ms ease, color 180ms ease;
  align-self: flex-start;
}

.article-card-link:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}

.article-card-link:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
  border-radius: 4px;
}

.news-empty {
  margin: 0;
  padding: 40px 20px;
  border: 1px solid rgba(7, 23, 95, 0.08);
  border-radius: 8px;
  background: var(--soft);
  color: var(--blue-dark);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

/* ----------------------------------------------------------
   5. Load more
   ---------------------------------------------------------- */

.news-load-more {
  display: flex;
  justify-content: center;
  padding: 8px 20px 0;
  background: var(--white);
}

.news-load-more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(26, 31, 219, 0.3);
  padding-bottom: 3px;
  transition: border-color 180ms ease, color 180ms ease;
}

.news-load-more-link:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}

.news-load-more-link:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ----------------------------------------------------------
   6. Join CTA band
   ---------------------------------------------------------- */

.news-join-cta {
  padding: 72px 20px 80px;
  margin-top: 72px;
  background: var(--blue-dark);
  text-align: center;
}

.news-join-cta-inner {
  max-width: 660px;
  margin: 0 auto;
}

.news-join-kicker {
  display: inline-block;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--aqua);
  color: var(--aqua);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.news-join-cta h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: clamp(30px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.news-join-cta p {
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.65;
}

/* ----------------------------------------------------------
   Responsive breakpoints
   ---------------------------------------------------------- */

@media (min-width: 720px) {
  .news-header {
    padding: 68px 64px 60px;
  }

  .news-filter {
    padding-left: 64px;
    padding-right: 64px;
  }

  .news-featured {
    padding: 64px 64px 0;
  }

  .news-grid-section {
    padding: 60px 64px 80px;
  }

  .news-load-more {
    padding-left: 64px;
    padding-right: 64px;
  }

  .news-join-cta {
    padding: 88px 64px 96px;
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  .article-card-img-wrap {
    height: 240px;
  }
}

@media (min-width: 1100px) {
  .news-header {
    padding: 72px 64px 64px;
  }

  .news-featured-img-wrap {
    height: clamp(440px, 40vw, 600px);
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .article-card-img-wrap {
    height: 260px;
  }

  .article-card h3 {
    font-size: 22px;
  }
}

/* Prevent overflow at small screens */
@media (max-width: 374px) {
  .news-header h1 {
    font-size: 32px;
  }

  .filter-pill {
    height: 34px;
    font-size: 11px;
    padding: 0 12px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .article-card,
  .article-card-img-wrap img,
  .news-featured-card:hover .news-featured-img-wrap img,
  .news-featured-cta,
  .filter-pill {
    transition: none;
  }

  .article-card:hover {
    transform: none;
  }
}
