.gallery-page {
  margin-top: 100px;
  padding: 0 16px;
}

.gallery-page__header {
  position: relative;
  margin-bottom: 16px;
}

.gallery-page__title {
  margin: 0;
  font-size: 24px;
  line-height: 110%;
}

.gallery-page__count {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 12px;
  line-height: 110%;
  color: #21232580;
}

.gallery-page__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px 8px;
}

.gallery-card {
  width: 488px;
  height: 718px;
  display: flex;
  flex-direction: column;
  opacity: 1;
  color: inherit;
  text-decoration: none;
}

.gallery-card__image {
  width: 488px;
  height: 610px;
  overflow: hidden;
}

.gallery-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card__title {
  font-size: 12px;
  margin: 12px 0;
}

.gallery-card__rows {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  gap: 8px;
}

.gallery-card__row {
  display: grid;
  grid-template-columns: 50px 1fr;
  font-size: 10px;
  color: #212325;
  gap: 8px;
}

.gallery-card__row span:last-child {
  font-size: 12px;
  color: #212325;
}

@media (max-width: 900px) {
  .gallery-page {
    padding: 0 32px;
  }

  .gallery-page__header {
    margin-bottom: 64px;
  }

  .gallery-page__title {
    font-size: 48px;
    line-height: 110%;
  }

  .gallery-page__count {
    font-size: 20px;
  }

  .gallery-page__grid {
    flex-direction: column;
    align-items: center;
    gap: 64px;
  }

  .gallery-card {
    width: 836px;
    max-width: 100%;
    height: auto;
  }

  .gallery-card__image {
    width: 836px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 836 / 1045;
  }

  .gallery-card__title {
    font-size: 24px;
    margin: 18px 0;
  }

  .gallery-card__row {
    grid-template-columns: 150px 1fr;
    font-size: 20px;
  }

  .gallery-card__row span:last-child {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .gallery-page {
    padding: 0 20px;
  }

  .gallery-page__title {
    font-size: 28px;
  }

  .gallery-page__count {
    font-size: 14px;
  }

  .gallery-card__title {
    font-size: 16px;
  }

  .gallery-card__row {
    grid-template-columns: 90px 1fr;
    font-size: 13px;
  }

  .gallery-card__row span:last-child {
    font-size: 15px;
  }
}
