/**
 * News archive /news/
 * Сетка: 2 карточки → 3 карточки → 2 → 3.
 */

.news-archive {
  background: #fff;
}

.news-archive__hero {
  padding: 36px 0 54px;
  background: #fff;
}

.news-archive__hero .ehs-breadcrumbs {
  margin-bottom: 32px;
}

.news-archive__title {
  margin: 0;
  color: #000;
}

.news-archive__content {
  padding: 70px 0 110px;
  background: #f5f6fa;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 30px;
  row-gap: 58px;
}

.news-card {
  min-width: 0;
  grid-column: span 2;
}

/* Каждый блок из пяти новостей: сначала две широкие, затем три обычные. */
.news-card:nth-child(5n + 1),
.news-card:nth-child(5n + 2) {
  grid-column: span 3;
}

.news-card__link {
  display: block;
  height: 100%;
  color: #000;
  text-decoration: none;
}

.news-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #e7eaf0;
}

.news-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.news-card__date {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 78px;
  min-height: 92px;
  padding: 13px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  font-style: normal;
  line-height: 1;
  box-sizing: border-box;
}

.news-card__month {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.news-card__date-line {
  width: 26px;
  height: 1px;
  margin: 9px 0 8px;
  background: #1f355f;
}

.news-card__day {
  font-size: 25px;
  font-weight: 700;
}

.news-card__body {
  padding-top: 20px;
}

.news-card__types {
  margin-bottom: 10px;
  color: #1f355f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.news-card__title {
  margin: 0;
  color: #000;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  transition: color 200ms ease;
}

.news-card:nth-child(5n + 1) .news-card__title,
.news-card:nth-child(5n + 2) .news-card__title {
  font-size: 25px;
}

.news-card__link:hover .news-card__image,
.news-card__link:focus-visible .news-card__image {
  transform: scale(1.035);
}

.news-card__link:hover .news-card__title,
.news-card__link:focus-visible .news-card__title {
  color: #1f355f;
}

.news-card__link:focus-visible {
  outline: 2px solid #1f355f;
  outline-offset: 5px;
}

.news-archive__pagination {
  margin-top: 72px;
}

.news-archive__pagination .pagination-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-archive__pagination .page-numbers {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfe3eb;
  background: #fff;
  color: #1f355f;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.news-archive__pagination .page-numbers.current,
.news-archive__pagination a.page-numbers:hover,
.news-archive__pagination a.page-numbers:focus-visible {
  border-color: #1f355f;
  background: #1f355f;
  color: #fff;
}

.news-archive__empty {
  padding: 35px;
  background: #fff;
}

.news-archive__empty p {
  margin: 0;
}

@media (max-width: 1023px) {
  .news-archive__content {
    padding: 60px 0 90px;
  }

  .news-grid {
    row-gap: 45px;
  }

  .news-card,
  .news-card:nth-child(5n + 1),
  .news-card:nth-child(5n + 2) {
    grid-column: span 3;
  }

  .news-card__title,
  .news-card:nth-child(5n + 1) .news-card__title,
  .news-card:nth-child(5n + 2) .news-card__title {
    font-size: 21px;
  }
}

@media (max-width: 767px) {
  .news-archive__hero {
    padding: 28px 0 38px;
  }

  .news-archive__hero .ehs-breadcrumbs {
    margin-bottom: 24px;
  }

  .news-archive__content {
    padding: 45px 0 70px;
  }

  .news-grid {
    row-gap: 38px;
  }

  .news-card,
  .news-card:nth-child(5n + 1),
  .news-card:nth-child(5n + 2) {
    grid-column: 1 / -1;
  }

  .news-card__date {
    width: 70px;
    min-height: 84px;
  }

  .news-card__body {
    padding-top: 16px;
  }

  .news-card__types {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .news-card__title,
  .news-card:nth-child(5n + 1) .news-card__title,
  .news-card:nth-child(5n + 2) .news-card__title {
    font-size: 19px;
  }

  .news-archive__pagination {
    margin-top: 55px;
  }
}
