/*
 * News card (reusable)
 * Rendered by news_widget/templates/news_widget/news_card.html
 *
 * A card with a thumbnail (or agency-seal fallback) filling the top half and a
 * white panel in the bottom half containing a type pill, a headline link, and a
 * "source - date" meta line. The grid/carousel that lays cards out is defined
 * by the consuming page (e.g. `.card-container` or the news carousel), so this
 * component styles only a single card and stays layout-agnostic.
 */

.news-card {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.news-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transform: translateY(-4px);
}

/* Respect reduced-motion preferences: keep the shadow cue but drop the lift
   (and its animation) for users who ask for less movement. */
@media (prefers-reduced-motion: reduce) {
  .news-card {
    transition: box-shadow 0.2s ease;
  }

  .news-card:hover {
    transform: none;
  }
}


.news-card__thumbnail {
  flex: 0 0 auto;          /* was: 0 0 50% */
  aspect-ratio: 16 / 9;    /* fixed, predictable image area */
  width: 100%;
  min-height: 0;
}

.news-card__thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Agency-seal fallback: seal centered on a blue gradient background. */
.news-card__thumbnail--seal {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1a4480 0%, #162e51 100%);
}

.news-card__thumbnail--seal img {
  width: auto;
  height: 60%;
  max-width: 60%;
  object-fit: contain;
}

.news-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.75rem;
  padding: 1rem 1.25rem 1.25rem;
}

.news-card__pill {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #ffbe2e;
  color: #1b1b1b;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.news-card__headline {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
  color: #162e51;
  text-decoration: none;
}

.news-card__headline:hover,
.news-card__headline:focus {
  text-decoration: underline;
}

.news-card__meta {
  margin: 0;
  font-size: 0.875rem;
  color: #71767a;
}
