/* ==========================================================================
   DP WORLD · LG200 — News
   Sections, in document order:
     1. Hero        .page-hero (shared, theme.css)
     2. Listing     .news-list  — bands of four, alternating tint
     3. View more   .news-more
     4. Single post .post-single

   The listing runs on light artwork, so it sets its own ink colour — the
   site's default type colour is white.
   ========================================================================== */

:root {
  --news-ink:      #1F174F;   /* indigo type on the light bands */
  --news-ink-soft: #3B3B4F;   /* body copy on the light bands */
  --news-tint:     rgba(231, 231, 231, 1);
}

/* Hero type runs to the same scale as the other interior pages. The measure is
   what folds this headline to three lines — see docs/NEWS.md. */
.page-hero--news {
  --hero-title-size: clamp(1.9rem, 5.885vw, 67px);
  --hero-title-measure: 44rem;
}

/* ==========================================================================
   2 · Listing — four cards to a band, the bands alternating tinted and white.
       The parity is set in PHP, since "view more" appends further bands.
   ========================================================================== */
.news-band {
  color: var(--news-ink);
  background: #FFFFFF;
  padding-block: clamp(2rem, 4.4vw, 3.5rem);
}
.news-band--tint {
  background: var(--news-tint);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- Card ---- */
.news-card {
  display: flex;
  flex-direction: column;
}
/* The plate holds its shape whether or not a featured image has been set, so a
   post without artwork leaves a grey frame rather than collapsing the card. */
.news-card__media {
  display: block;
  aspect-ratio: 298 / 200;
  border-radius: 10px;
  overflow: hidden;
  background: #BFBFBF;
  margin-bottom: clamp(0.9rem, 1.8vw, 1.35rem);
}
.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.news-card:hover .news-card__media img { transform: scale(1.04); }

.news-card__date {
  color: var(--news-ink-soft);
  font-weight: 300;
  font-size: clamp(0.7rem, 0.85vw, 0.8125rem);
  margin: 0 0 clamp(0.5rem, 1vw, 0.75rem);
}
.news-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.24;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0 0 clamp(0.6rem, 1.3vw, 1rem);
}
.news-card__title a { color: inherit; }
.news-card__title a:hover { text-decoration: underline; }

.news-card__excerpt {
  color: var(--news-ink-soft);
  font-weight: 300;
  font-size: clamp(0.8rem, 1vw, 0.9375rem);
  line-height: 1.4;
  margin: 0 0 clamp(1rem, 2.2vw, 1.75rem);
}
/* Pinned to the foot so the links line up across a row of uneven cards. */
.news-card__more {
  margin: auto 0 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.7rem, 0.85vw, 0.8125rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.news-card__more a { color: var(--news-ink); }
.news-card__more a:hover { text-decoration: underline; }

.news-empty {
  color: var(--news-ink-soft);
  text-align: center;
  margin: 0;
}

/* ==========================================================================
   3 · View more — the band it sits on continues the alternation.
   ========================================================================== */
.news-more {
  background: #FFFFFF;
  padding-block: 0 clamp(2.5rem, 5.5vw, 4.5rem);
  text-align: center;
}
.news-more--tint { background: var(--news-tint); }
.news-more__button { cursor: pointer; }
.news-more__button[disabled] { opacity: 0.55; cursor: default; }
/* The label is dark on the light band, unlike the hero buttons. */
.news-more .btn-pill__label { color: var(--news-ink); }

/* ==========================================================================
   4 · Single post — the date and headline, the picture, then the words.
   ========================================================================== */
.post-single {
  color: var(--news-ink);
  background: #FFFFFF;
}
/* The banded background is painted by a layer rather than by the header itself,
   so the picture can hang past its foot while the headline stays on the brand
   gradient. */
.post-single__head {
  position: relative;
  isolation: isolate;
  color: var(--c-white);
  /* Clears the fixed header, which the listing pages get from their hero. */
  padding-block: calc(var(--header-h) + clamp(1.5rem, 3.5vw, 3rem)) clamp(2rem, 4.4vw, 3.5rem);
}
.post-single__head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, var(--c-indigo-800) 0%, var(--c-purple-500) 100%);
}

/* Bottom-aligned: the date and headline sit on the foot of the band, and the
   picture finishes level with them. */
.post-single__head-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: end;
}
.post-single__head--has-media .post-single__head-inner {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.post-single__media {
  margin: 0;
}
.post-single__zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #BFBFBF;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  cursor: zoom-in;
}
.post-single__zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.post-single__zoom:hover img { transform: scale(1.03); }
.post-single__date {
  font-weight: 300;
  font-size: clamp(0.75rem, 0.95vw, 0.875rem);
  letter-spacing: 0.04em;
  margin: 0 0 clamp(0.75rem, 1.6vw, 1.25rem);
  opacity: 0.9;
}
.post-single__title {
  font-family: var(--font-heading);
  font-weight: 450;
  font-size: clamp(1.5rem, 3.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0;
  margin: 0;
  max-width: 26ch;
}


.post-single__body {
  padding-block: clamp(1.75rem, 4vw, 3.25rem) clamp(3rem, 6vw, 5rem);
}
/* Two columns, matching the header above: the article sits under the headline,
   and the other posts fill the column the picture leaves open. */
.post-single__body-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: start;
}
.post-single__related-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.75rem, 0.95vw, 0.875rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 clamp(1rem, 2.2vw, 1.75rem);
}
/* Two across, so four cards make the 2 x 2 block. */
.news-grid--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.news-card--compact .news-card__title {
  font-size: clamp(0.75rem, 0.95vw, 0.875rem);
}

.post-single__body .entry-content {
  color: var(--news-ink-soft);
  font-weight: 300;
  font-size: clamp(0.9rem, 1.15vw, 1.0625rem);
  line-height: 1.65;
}
.post-single__body .entry-content h2,
.post-single__body .entry-content h3 {
  color: var(--news-ink);
  text-transform: uppercase;
}
/* Holds the standard pill; the button brings its own type and colour. */
.post-single__back {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 2.5rem); }

  /* The subject stands to the right of frame, so the crop is pulled that way
     as the hero narrows — otherwise she is cut in half at the edge. */
  .page-hero--news .page-hero__media img { object-position: 78% center; }
}

@media (max-width: 900px) {
  /* The picture drops beneath the headline. */
  .post-single__head--has-media .post-single__head-inner { grid-template-columns: minmax(0, 1fr); }

  /* With one column there is no gap left to fill, so the other posts follow
     the article rather than sitting beside it. */
  .post-single__body-inner { grid-template-columns: minmax(0, 1fr); }
  .post-single__related { margin-top: clamp(2rem, 6vw, 3rem); }
}

@media (max-width: 560px) {
  .news-grid { grid-template-columns: 1fr; }
  .post-single__title { max-width: none; }
}
