/*
  LIGHTHOUSE_NEWS_IMAGE_ALIGNMENT_V1
  Private staging review.
  Homepage and archive card images only.
*/

/* Keep the card and its media within the grid column. */
.news-story-grid > .news-story-card,
.archive-grid > .archive-card {
  min-width: 0;
}

.news-story-grid > .news-story-card .news-story-image {
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0;
  max-width: none !important;
  overflow: hidden;
  margin-left: 0;
  margin-right: 0;
}

.news-story-grid > .news-story-card .news-story-image img {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
}

/* Desktop: equal image heights in the same row. */
@media (min-width: 901px) {
  .news-story-grid > .news-story-card .news-story-image {
    height: 225px !important;
    max-height: none !important;
    aspect-ratio: auto !important;
  }
}

/* Tablet and mobile: consistent responsive proportions. */
@media (max-width: 900px) {
  .news-story-grid > .news-story-card .news-story-image {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
  }
}

/* Archive images should also fill their cards. */
.archive-card > a:first-child {
  display: block;
  width: 100%;
  min-width: 0;
}

.archive-card > a:first-child > img {
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}
