@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

/* ==========================================================================
   News article page (page-node-type-news)
   Layout, hero, reading column and inline media refinements.
   Mirrors the treatment already applied to publications in style.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Layout
   The sidebar-first region is empty on news nodes but the col-md-3 still
   reserves a quarter of the grid, which pushes the article to the right.
   -------------------------------------------------------------------------- */
.page-node-type-news .col-md-3.col-12.we-provide {
  display: none;
}

.page-node-type-news .col-md-9.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

.page-node-type-news article.node--type-news {
  max-width: 820px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   2. Hero
   Previously a hard 471px with object-fit: cover, which cropped the photo.
   Let the height follow the image and cap it so it stays reasonable on
   very wide screens.
   -------------------------------------------------------------------------- */
.page-node-type-news .view-id-banner_image.view-display-id-block_1 img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: cover;
  object-position: center;
}

/* Softer, bottom-weighted overlay so the title stays legible without
   darkening the whole picture. */
.page-node-type-news .view-banner-image.view-id-banner_image.view-display-id-block_1::after {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.28) 55%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

.page-node-type-news .view-banner-image.view-id-banner_image.view-display-id-block_1 .views-field-title {
  top: auto;
  bottom: 9%;
  left: 0;
  width: 100%;
}

.page-node-type-news .view-banner-image.view-id-banner_image.view-display-id-block_1 .views-field-title h1 {
  margin: 0;
  max-width: 900px;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   3. Reading column
   -------------------------------------------------------------------------- */
.page-node-type-news article.node--type-news .field--name-body {
  font-size: 18px;
  line-height: 1.7;
  color: #24301f;
}

.page-node-type-news article.node--type-news .field--name-body p {
  margin-bottom: 1.3rem;
}

/* Inline images were rendered at their raw width (1600px) and overflowed
   the column. Constrain them to the reading width. */
.page-node-type-news article.node--type-news .field--name-body img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 1.75rem auto;
  border-radius: 10px;
}

.page-node-type-news article.node--type-news .field--name-body figure {
  margin: 1.75rem 0;
}

/* Embeds (YouTube and similar) are often hard-coded wider than the column,
   which reintroduces horizontal scrolling. Scale them to the measure. */
.page-node-type-news article.node--type-news .field--name-body iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
  margin: 1.75rem 0;
}

/* --------------------------------------------------------------------------
   4. Gallery
   -------------------------------------------------------------------------- */
.page-node-type-news .aff-news-gallery {
  margin: 2.5rem 0 2rem;
}

.page-node-type-news .aff-news-gallery__title {
  margin: 0 0 1rem;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #1f3d2b;
}

.page-node-type-news .aff-news-gallery__caption {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.45;
  color: #566050;
}

/* --------------------------------------------------------------------------
   5. Breathing room between the hero and the article
   The hero block and .tabs-sec were flush against each other (gap of 0px).
   -------------------------------------------------------------------------- */
.page-node-type-news .tabs-sec {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
}

/* --------------------------------------------------------------------------
   6. Hero title / body alignment
   The article is a centred 820px measure, while the hero title sat in the
   full-width container, so their left edges diverged as soon as the article
   became narrower than its container (from ~850px upward).
   Give the title the same measure and centring at every width.
   -------------------------------------------------------------------------- */
.page-node-type-news .view-banner-image .views-field-title .container {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

/* --------------------------------------------------------------------------
   7. Gallery arrows
   The slider arrows had no top/bottom set, so they fell back to their static
   position in the flow: prev at the top of the slider, next below it.
   Centre both on the slide.
   -------------------------------------------------------------------------- */
.page-node-type-news .aff-news-gallery__slider .slick-prev,
.page-node-type-news .aff-news-gallery__slider .slick-next {
  top: 50%;
  bottom: auto;
  margin-top: 0;
  transform: translateY(-50%);
}

/* --------------------------------------------------------------------------
   8. Smaller screens
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .page-node-type-news article.node--type-news {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .page-node-type-news .view-id-banner_image.view-display-id-block_1 img {
    max-height: 360px;
  }

  .page-node-type-news .view-banner-image.view-id-banner_image.view-display-id-block_1 .views-field-title {
    bottom: 8%;
  }

  .page-node-type-news article.node--type-news .field--name-body {
    font-size: 17px;
  }

  .page-node-type-news article.node--type-news .field--name-body img {
    margin: 1.25rem auto;
    border-radius: 6px;
  }
}
