/* NMG Latest News v1.52
   Isolated from the legacy .news-page holding layout. */

.latest-news-page {
  --news-edge: min(4.2vw, 70px);
  --work-image: url("/assets/img/news/latest-news-background-v1.52.webp");
  --work-position: center top;
  min-height: 100svh;
  background: var(--ink);
}

.latest-news-page .work-shell {
  min-height: 100svh;
  overflow: visible;
  background: var(--ink);
}

.latest-news-page .work-shell::before {
  position: fixed;
  z-index: -3;
  inset: 0;
  background-image: var(--work-image);
  background-position: var(--work-position);
  background-size: cover;
  content: "";
  filter: brightness(0.62) saturate(0.86) contrast(1.04);
  transform: scale(1.008);
}

.latest-news-page .work-shell::after {
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 10, 0.34) 0%, rgba(5, 7, 10, 0.58) 54%, rgba(5, 7, 10, 0.96) 100%),
    linear-gradient(90deg, rgba(5, 7, 10, 0.97) 0%, rgba(5, 7, 10, 0.88) 42%, rgba(5, 7, 10, 0.38) 72%, rgba(5, 7, 10, 0.5) 100%);
  content: "";
}

body.latest-news-page main.latest-news-main {
  display: block !important;
  width: min(1480px, calc(100% - 8.4vw)) !important;
  min-height: 0 !important;
  max-width: none !important;
  align-items: initial !important;
  justify-content: initial !important;
  margin: 0 auto !important;
  padding: clamp(118px, 13vh, 154px) 0 clamp(70px, 8vw, 112px) !important;
}

.latest-news-heading {
  display: block;
  width: 100%;
  max-width: 1050px;
}

.latest-news-heading h1 {
  max-width: 100%;
  margin: 24px 0 0;
  font-size: clamp(50px, 5.3vw, 82px);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.94;
}

.latest-news-heading > p:last-child {
  max-width: 700px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(11px, 0.96vw, 15px);
  line-height: 1.7;
}

.latest-news-filters,
.latest-news-filters input,
.latest-news-filters select,
.latest-news-filters option,
.latest-news-filters button {
  font-family: "Unbounded", Arial, sans-serif;
}

.latest-news-filters {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  margin: clamp(48px, 5.2vw, 72px) 0 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(5, 7, 10, 0.72);
  grid-template-columns: minmax(250px, 1.65fr) repeat(3, minmax(142px, 0.78fr)) auto minmax(150px, auto);
  -webkit-backdrop-filter: blur(18px) saturate(0.88);
  backdrop-filter: blur(18px) saturate(0.88);
}

.latest-news-filter {
  min-width: 0;
}

.latest-news-filter > label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.latest-news-filter--search {
  display: grid;
  min-width: 0;
  align-items: center;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
}

.latest-news-filter--search > label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  color: rgba(255, 255, 255, 0.62);
  font-size: 6px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.latest-news-search-field {
  position: relative;
  display: block;
  min-width: 0;
}

.latest-news-search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  pointer-events: none;
  transform: translateY(-58%);
}

.latest-news-search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.58);
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.latest-news-filter input,
.latest-news-filter select {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  outline: 0;
  background-color: rgba(5, 7, 10, 0.72);
  color: var(--white);
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.latest-news-filter input {
  padding: 0 14px 0 39px;
  font-size: 8px;
  letter-spacing: 0;
}

.latest-news-filter input::placeholder {
  color: rgba(255, 255, 255, 0.46);
  opacity: 1;
}

.latest-news-filter select {
  padding: 0 34px 0 14px;
  cursor: pointer;
}

.latest-news-filter option {
  background: var(--ink);
  color: var(--white);
  font-weight: 400;
}

.latest-news-filter input:focus,
.latest-news-filter select:focus {
  border-color: rgba(20, 216, 208, 0.78);
  box-shadow: 0 0 0 2px rgba(20, 216, 208, 0.09);
}

.latest-news-reset {
  min-height: 46px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 6px;
  letter-spacing: 0.18em;
  cursor: pointer;
}

.latest-news-reset:hover,
.latest-news-reset:focus-visible {
  color: var(--cyan);
  outline: 0;
}

.latest-news-result-count {
  min-width: 0;
  margin: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.62);
  font-size: 6px;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
}

.latest-news-results {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 24px 0 0;
}

.latest-news-feature {
  position: relative;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: clamp(310px, 31vw, 430px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: var(--panel);
  isolation: isolate;
}

.latest-news-feature::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  padding: 1.25px;
  border-radius: inherit;
  background: var(--gradient);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.latest-news-feature:hover::after,
.latest-news-feature:focus-within::after {
  opacity: 1;
}

.latest-news-feature:hover,
.latest-news-feature:focus-within {
  box-shadow: 0 0 26px rgba(20, 216, 208, 0.1), 0 0 30px rgba(237, 80, 233, 0.08);
}

.latest-news-feature > a {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
}

.latest-news-feature > a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -5px;
}

.latest-news-feature img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 650ms var(--ease-out), filter 450ms ease;
}

.latest-news-feature:hover img,
.latest-news-feature:focus-within img {
  filter: brightness(1.04);
  transform: scale(1.018);
}

.latest-news-feature-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.99) 0%, rgba(5, 7, 10, 0.91) 31%, rgba(5, 7, 10, 0.32) 62%, rgba(5, 7, 10, 0.08) 100%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.1), rgba(5, 7, 10, 0.4));
}

.latest-news-feature-copy {
  display: flex;
  width: min(560px, 46%);
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(34px, 4.2vw, 64px);
}

.latest-news-story-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--white);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.latest-news-story-meta > span:last-child {
  background: var(--gradient);
  background-clip: text;
  color: transparent;
  font-weight: 700;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.latest-news-feature-copy > strong {
  margin-top: 27px;
  font-size: clamp(29px, 3.15vw, 50px);
  letter-spacing: -0.064em;
  line-height: 0.98;
}

.latest-news-story-deck {
  max-width: 410px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(9px, 0.78vw, 12px);
  line-height: 1.65;
}

.latest-news-story-arrow {
  position: relative;
  display: block;
  width: 34px;
  height: 18px;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.84);
  transition: color 180ms ease, transform 220ms var(--ease-out);
}

.latest-news-story-arrow::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: currentColor;
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 18'%3E%3Cpath d='M1 9h30M24 2l7 7-7 7' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 18'%3E%3Cpath d='M1 9h30M24 2l7 7-7 7' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.latest-news-feature:hover .latest-news-story-arrow,
.latest-news-feature:focus-within .latest-news-story-arrow {
  color: var(--cyan);
  transform: translateX(5px);
}

.latest-news-no-results {
  padding: clamp(48px, 7vw, 90px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(5, 7, 10, 0.78);
  text-align: center;
}

.latest-news-no-results h2 {
  margin: 20px 0 0;
  font-size: clamp(28px, 4vw, 52px);
  letter-spacing: -0.06em;
}

.latest-news-no-results > p:not(.work-kicker) {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
}

.latest-news-no-results button {
  margin-top: 24px;
  padding: 12px 18px;
  border: 1px solid rgba(20, 216, 208, 0.5);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-family: "Unbounded", Arial, sans-serif;
  font-size: 7px;
  letter-spacing: 0.17em;
  cursor: pointer;
}

/* Article */

.latest-news-article-page {
  --work-image: none;
  background: var(--ink);
}

.latest-news-article-page .work-shell::before,
.latest-news-article-page .work-shell::after {
  content: none;
}

body.latest-news-article-page main.latest-news-main {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  max-width: none !important;
  align-items: initial !important;
  justify-content: initial !important;
  margin: 0 !important;
  padding: clamp(60px, 6vw, 84px) 0 0 !important;
}

.latest-news-article-hero {
  position: relative;
  min-height: clamp(590px, 69vw, 800px);
  overflow: hidden;
  background: var(--ink);
}

.latest-news-article-hero > img {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.latest-news-article-hero::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.99) 0%, rgba(5, 7, 10, 0.88) 32%, rgba(5, 7, 10, 0.25) 62%, rgba(5, 7, 10, 0.08) 100%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.18) 0%, rgba(5, 7, 10, 0.02) 68%, var(--ink) 100%);
  content: "";
}

.latest-news-article-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(1480px, calc(100% - 8.4vw));
  min-height: inherit;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  margin: 0 auto;
  padding: clamp(80px, 9vw, 132px) 0 clamp(72px, 8vw, 116px);
}

.latest-news-article-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  background: var(--gradient);
  background-clip: text;
  color: transparent;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.21em;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.latest-news-article-hero h1 {
  max-width: 670px;
  margin: 32px 0 0;
  font-size: clamp(52px, 6.3vw, 96px);
  letter-spacing: -0.078em;
  line-height: 0.92;
}

.latest-news-article-standfirst {
  max-width: 555px;
  margin: 32px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(12px, 1.2vw, 18px);
  line-height: 1.7;
}

.latest-news-article-rule {
  width: min(480px, 100%);
  height: 2px;
  margin-top: 36px;
  background: var(--gradient);
}

.latest-news-article-layout {
  display: grid;
  width: min(1180px, calc(100% - 8.4vw));
  gap: clamp(44px, 7vw, 100px);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 112px) 0 clamp(80px, 10vw, 140px);
  grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
}

.latest-news-article-aside {
  position: sticky;
  top: 118px;
  align-self: start;
  padding-right: 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.latest-news-article-aside p {
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 7px;
  letter-spacing: 0.18em;
  line-height: 1.8;
}

.latest-news-article-aside p + p {
  margin-top: 18px;
}

.latest-news-article-aside p:first-child {
  color: var(--white);
  font-weight: 700;
}

.latest-news-article-copy {
  max-width: 760px;
}

.latest-news-article-copy p {
  margin: 0 0 29px;
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(13px, 1.14vw, 17px);
  letter-spacing: -0.026em;
  line-height: 1.9;
}

.latest-news-article-copy .latest-news-article-opening {
  color: var(--white);
  font-size: clamp(18px, 1.7vw, 25px);
  line-height: 1.58;
}

.latest-news-article-copy .latest-news-article-closing {
  margin-top: 45px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-weight: 700;
}

.latest-news-back-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 7px;
  letter-spacing: 0.15em;
  text-decoration: none;
}

.latest-news-back-link::before {
  width: 22px;
  height: 12px;
  background: currentColor;
  content: "";
  transform: rotate(180deg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M1 8h20M15 2l6 6-6 6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M1 8h20M15 2l6 6-6 6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.latest-news-back-link:hover,
.latest-news-back-link:focus-visible {
  color: var(--cyan);
  outline: 0;
}

@media (max-width: 1280px) and (min-width: 981px) {
  .latest-news-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .latest-news-filter--search {
    grid-column: span 2;
  }

  .latest-news-filter--production {
    grid-column: span 2;
  }

  .latest-news-reset {
    justify-self: start;
  }

  .latest-news-result-count {
    grid-column: span 3;
  }
}

@media (max-width: 980px) and (min-width: 761px) {
  body.latest-news-page main.latest-news-main {
    padding-top: 112px !important;
  }

  .latest-news-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .latest-news-filter--search {
    grid-column: 1 / -1;
  }

  .latest-news-filter--production {
    grid-column: span 1;
  }

  .latest-news-reset {
    justify-self: start;
  }

  .latest-news-result-count {
    grid-column: 1 / -1;
    padding: 5px 0 0;
    border: 0;
    text-align: left;
  }

  .latest-news-feature-copy {
    width: 56%;
  }

  .latest-news-article-hero {
    min-height: 640px;
  }
}

@media (max-width: 760px) {
  .latest-news-page .work-shell::before {
    position: absolute;
    height: 650px;
    min-height: 0;
    background-position: 72% top;
    filter: brightness(0.52) saturate(0.82);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
  }

  .latest-news-page .work-shell::after {
    position: absolute;
    height: 720px;
    min-height: 0;
    background:
      linear-gradient(180deg, rgba(5, 7, 10, 0.24), rgba(5, 7, 10, 0.82) 48%, var(--ink) 100%),
      linear-gradient(90deg, rgba(5, 7, 10, 0.88), rgba(5, 7, 10, 0.38));
  }

  body.latest-news-page main.latest-news-main {
    width: calc(100% - max(40px, env(safe-area-inset-left) + env(safe-area-inset-right) + 24px)) !important;
    padding: max(148px, calc(env(safe-area-inset-top) + 132px)) 0 64px !important;
  }

  .latest-news-heading h1 {
    font-size: clamp(40px, 11.2vw, 58px);
  }

  .latest-news-heading > p:last-child {
    max-width: 520px;
  }

  .latest-news-filters {
    gap: 10px;
    margin-top: 44px;
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .latest-news-filter--search,
  .latest-news-filter--production,
  .latest-news-result-count {
    grid-column: auto;
  }

  .latest-news-filter--search {
    grid-template-columns: 1fr;
  }

  .latest-news-filter--search > label {
    margin-bottom: 2px;
  }

  .latest-news-reset {
    justify-self: start;
  }

  .latest-news-result-count {
    padding: 5px 0 0;
    border: 0;
    text-align: left;
  }

  .latest-news-feature {
    min-height: 520px;
  }

  .latest-news-feature img {
    object-position: 67% center;
  }

  .latest-news-feature-shade {
    background:
      linear-gradient(180deg, rgba(5, 7, 10, 0.2) 0%, rgba(5, 7, 10, 0.42) 36%, rgba(5, 7, 10, 0.98) 100%),
      linear-gradient(90deg, rgba(5, 7, 10, 0.58), rgba(5, 7, 10, 0.08));
  }

  .latest-news-feature-copy {
    width: 100%;
    justify-content: flex-end;
    padding: 28px 24px 34px;
  }

  .latest-news-feature-copy > strong {
    font-size: clamp(30px, 9vw, 43px);
  }

  body.latest-news-article-page main.latest-news-main {
    width: 100% !important;
    padding: max(76px, calc(env(safe-area-inset-top) + 60px)) 0 0 !important;
  }

  .latest-news-article-hero {
    min-height: 690px;
  }

  .latest-news-article-hero > img {
    object-position: 68% center;
  }

  .latest-news-article-hero::after {
    background:
      linear-gradient(180deg, rgba(5, 7, 10, 0.14), rgba(5, 7, 10, 0.46) 40%, var(--ink) 100%),
      linear-gradient(90deg, rgba(5, 7, 10, 0.58), rgba(5, 7, 10, 0.08));
  }

  .latest-news-article-hero-inner {
    width: calc(100% - 40px);
    justify-content: flex-end;
    padding-bottom: 68px;
  }

  .latest-news-article-hero h1 {
    margin-top: 24px;
    font-size: clamp(44px, 13vw, 64px);
  }

  .latest-news-article-standfirst {
    margin-top: 24px;
    font-size: 12px;
  }

  .latest-news-article-layout {
    width: calc(100% - 40px);
    gap: 38px;
    padding-top: 52px;
    grid-template-columns: 1fr;
  }

  .latest-news-article-aside {
    position: static;
    display: flex;
    padding: 0 0 24px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    flex-wrap: wrap;
    gap: 8px 22px;
  }

  .latest-news-article-aside p + p {
    margin-top: 0;
  }

  .latest-news-back-link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .latest-news-feature img,
  .latest-news-story-arrow {
    transition: none;
  }
}
