/* ==========================================================================
   News page — Figma node 1097:682 (mod 2)
   Layout reuses posts-archive.css (.posts-archive__inner / __grid);
   modal reuses the home video modal (.video-slider__modal*, section-social-proof.css).
   ========================================================================== */

.news-archive {
  --news-card-radius: 57px 57px 9px 57px;
  --news-card-media-bg: var(--color-brand-sage);
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  min-height: 646px;
  border-radius: var(--news-card-radius);
  overflow: hidden;
  background-color: var(--section-bg-dark);
  color: var(--section-bg-light);
}

/* Whole card opens the item (one focus stop, no nested links) */
.news-card__hitarea {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
  appearance: none;
}

.news-card__hitarea:focus-visible {
  outline: 2px solid var(--section-bg-light);
  outline-offset: -6px;
}

/* Media: story image + 70% dark green overlay + centred outlet logo */
.news-card__media {
  position: relative;
  flex-shrink: 0;
  height: 250px;
  overflow: hidden;
  background-color: var(--news-card-media-bg);
}

.news-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card__overlay {
  position: absolute;
  inset: 0;
  background-color: var(--section-bg-dark);
  opacity: 0.7;
  transition: opacity 0.35s ease;
}

.news-card__logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--logo-w, 250px);
  height: var(--logo-h, 40px);
  max-width: calc(100% - 60px);
  object-fit: contain;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Copy */
.news-card__body {
  position: relative;
  z-index: 2;
  pointer-events: none;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 32px;
}

.news-card__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.news-card__title {
  margin: 0;
  font-family: "Avantt", "Poppins", sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: normal;
  color: var(--section-bg-light);
  transition: color 0.25s ease;
}

.news-card__description {
  margin: 0;
  font-size: 16px;
  line-height: 20px;
  color: var(--color-brand-neutral);
}

.news-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 16px;
  line-height: 20px;
}

.news-card__outlet {
  color: var(--section-bg-green);
}

.news-card__date {
  color: var(--color-brand-neutral);
}

.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  line-height: normal;
  color: var(--section-bg-light);
  transition: color 0.25s ease;
}

/* Figma icons used as masks so they follow the text colour on hover */
.news-card__link-icon {
  display: block;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background-color: currentColor;
  -webkit-mask: var(--news-icon) center / contain no-repeat;
  mask: var(--news-icon) center / contain no-repeat;
  transition: transform 0.25s ease;
}

.news-card__link-icon--circle-plus {
  --news-icon: url("../../img/news/circle-plus.svg");
}

.news-card__link-icon--circle-play {
  --news-icon: url("../../img/news/circle-play.svg");
}

.news-card__link-icon--circle-document {
  --news-icon: url("../../img/news/circle-document.svg");
}

/* Hover / focus — same pattern as the Knowledge Hub cards */
.news-card:hover .news-card__title,
.news-card:has(.news-card__hitarea:focus-visible) .news-card__title,
.news-card:hover .news-card__link,
.news-card:has(.news-card__hitarea:focus-visible) .news-card__link {
  color: var(--section-bg-green);
}

.news-card:hover .news-card__link-icon,
.news-card:has(.news-card__hitarea:focus-visible) .news-card__link-icon {
  transform: translateX(5px);
}

.news-card:hover .news-card__logo,
.news-card:has(.news-card__hitarea:focus-visible) .news-card__logo {
  transform: translate(-50%, -50%) scale(0.94);
}

.news-card:hover .news-card__overlay,
.news-card:has(.news-card__hitarea:focus-visible) .news-card__overlay {
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .news-card__overlay,
  .news-card__logo,
  .news-card__title,
  .news-card__link,
  .news-card__link-icon {
    transition: none;
  }
}

/* ── Modal (video / document) ──────────────────────────────────────────── */
.news-modal .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.news-modal__wrap {
  max-height: 90vh;
}

.news-modal__wrap--document {
  overflow: hidden;
  background-color: var(--section-bg-light);
}

/* Image clipping: fit the viewport height, no scroll; panel shrinks to the image */
.news-modal__panel:has(.news-modal__image) {
  width: auto;
  max-width: min(960px, 100%);
}

.news-modal__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 85vh;
  margin-inline: auto;
}

.news-modal__pdf {
  display: block;
  width: 100%;
  height: 85vh;
  border: 0;
}

/* ── Mobile / tablet (same breakpoint as posts-archive) ────────────────── */
@media (max-width: 1024px) {
  .news-card {
    min-height: 0;
    border-radius: 44px 44px 9px 44px;
  }

  .news-card__media {
    height: 220px;
  }

  .news-card__logo {
    width: calc(var(--logo-w, 250px) * 0.8);
    height: calc(var(--logo-h, 40px) * 0.8);
  }

  .news-card__body {
    padding: 24px 24px 28px;
  }

  .news-card__title {
    font-size: 22px;
  }

  .news-card__description,
  .news-card__meta,
  .news-card__link {
    font-size: 14px;
    line-height: 18px;
  }
}
