.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 50px;
  row-gap: 60px;
  margin-bottom: 45px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: var(--font-family);
  color: var(--text-color-gray);
}

.card__img-wrapper {
  position: relative;
}

.card__img-wrapper::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: rgba(0, 0, 0, 0);
  transition: background var(--transition);
}

.card__img-wrapper::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100px;
  height: 100px;
  opacity: 0;
  z-index: 3;
  transform: translate(-50%, -50%);
  background-image: url('../img/newsImgLink.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: opacity var(--transition);
}

.card__img-wrapper:hover::after {
  background: rgba(0, 0, 0, 0.4);
}

.card__img-wrapper:hover::before {
  opacity: 1;
}

.card__img {
  width: 100%;
  height: 380px;
  box-shadow: 1px 2px 8px 0 rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.card__date {
  font-weight: 400;
  font-size: 18px;
  line-height: 100%;
  opacity: 0.5;
}

.card__title {
  font-weight: 500;
  font-size: 26px;
  line-height: 129%;
}

.card__desc {
  font-weight: 500;
  font-size: 18px;
  line-height: 150%;
  letter-spacing: 0.01em;
}

.card__bottom {
  display: flex;
  align-items: center;
  gap: 22px;
}

.card__name {
  font-size: 18px;
  line-height: 100%;
  letter-spacing: 0.03em;
  text-transform: capitalize;
  opacity: 0.5;
}

/* pagination */

.pagination {
  display: flex;
  justify-content: center;
}

.pagination__item {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 18px;
  line-height: 105%;
  letter-spacing: 0.25em;
  text-align: center;
  color: #363636;
}

.items__container {
  display: flex;
  align-items: end;
  gap: 15px;
}

.pagination__item--active {
  font-weight: 700;
  font-size: 24px;
}

@media (max-width: 1440px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 50px;
  }
}

@media (max-width: 768px) {
  .card {
    gap: 12px;
  }

  .card__title {
    font-size: 24px;
  }

  .card__desc {
    font-size: 16px;
  }

  .pagination__item {
    font-size: 16px;
  }

  .pagination__item--active {
    font-size: 20px;
  }
  .cards {
    grid-template-columns: 1fr;
  }

  .card__date {
    display: none;
  }

  .card__bottom {
    display: none;
  }
}
