.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 260px 20px 28px; /* 240px image + 20px gap; the image is positioned so it can grow on hover */
  isolation: isolate; /* the image sits behind the text (z-index -1) inside the card */
}
.article-card__media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 240px;
  overflow: hidden;
  border-radius: 12px;
  z-index: -1;
  transition: height 450ms var(--ease-out);
}
.article-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}
/* Hover: the image grows to the full card height behind the text and fades to black
   over its lower part, so the meta/title/author stay readable in front of it. */
.article-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.2) 35%,
    rgba(0, 0, 0, 0.8) 65%,
    #000 100%
  );
  opacity: 0;
  transition: opacity 450ms var(--ease-out);
}
.article-card:hover .article-card__media,
.article-card:focus-within .article-card__media {
  height: 100%;
}
.article-card:hover .article-card__overlay,
.article-card:focus-within .article-card__overlay {
  opacity: 1;
}
.article-card:hover .article-card__media img {
  transform: scale(1.03);
}
.article-card__title,
.article-card__meta,
.article-card__author {
  transition: color 300ms var(--ease-out);
}
.article-card:hover .article-card__title {
  color: var(--color-white);
}
@media (prefers-reduced-motion: reduce) {
  .article-card__media {
    transition: none;
  }
}

.article-card__meta {
  font-size: 11px;
  line-height: normal;
  letter-spacing: 0.08em;
  color: var(--color-link-blue);
}
.article-card__title {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--color-mist);
}
.article-card__author {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-lilac);
}

/* Whole card is clickable when it has a destination (title link stretched over the card). */
.article-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* --fill (service pages: resource library, blog & insights): the image runs to the bottom of the card on hover. */
.article-card--fill:hover .article-card__media,
.article-card--fill:focus-within .article-card__media {
  height: 100%;
}
.article-card--fill .article-card__overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.2) 35%,
    rgba(0, 0, 0, 0.8) 65%,
    #000 100%
  );
}
.article-card__sub {
  color: var(--color-lavender);
} /* date / reading time after the category */
