/* News results: three 360 × 164 cover cards per desktop row. */
.news-grid {
  grid-template-columns: repeat(3, minmax(0, 360px));
  justify-content: start;
  gap: 24px;
}

.content-card {
  grid-template-columns: 360px;
  grid-template-rows: 164px 390px;
  width: 360px;
  height: 554px;
}

.content-card[hidden] {
  display: none;
}

.content-card-image,
.content-card img {
  width: 360px;
  height: 164px;
  aspect-ratio: 360 / 164;
}

.content-card-body {
  width: 360px;
  height: 390px;
}

.content-card:not(:has(.content-card-image)) {
  grid-template-rows: 390px;
  height: 390px;
}

.content-card p {
  -webkit-line-clamp: 5;
  height: calc(1.65em * 5);
  line-height: 1.65;
}

.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 42px;
}

.news-pagination[hidden] {
  display: none;
}

.news-pagination button {
  min-width: 42px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #c8d0cc;
  border-radius: 8px;
  background: #fff;
  color: #075d4e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.news-pagination button[aria-current="page"] {
  border-color: #075d4e;
  background: #075d4e;
  color: #fff;
}

.news-pagination button:disabled {
  cursor: default;
  opacity: .4;
}

@media (max-width: 1160px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 360px));
  }
}

@media (max-width: 660px) {
  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 360px));
    justify-content: center;
  }

  .content-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 390px;
    width: min(360px, 100%);
    height: auto;
  }

  .content-card-image,
  .content-card img,
  .content-card-body {
    width: 100%;
  }

  .content-card-image,
  .content-card img {
    height: auto;
    aspect-ratio: 360 / 164;
  }

  .content-card-body {
    height: 390px;
  }
}
