.site-main--gallery {
  background: var(--white);
}

.gallery-page {
  padding: 4.5rem 0 6rem;
  border-top: 30px solid var(--fires);
    border-bottom: 15px solid var(--fires);
    display: flex;
      padding: 10rem 0;
      flex-direction: column;
      align-items: center;
      gap: 5rem;
      align-self: stretch;
}

.gallery-page__container {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.gallery-page__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.gallery-page__title {
  color: var(--dark-blue);
}

.gallery-page__subtitle {
  max-width: 42rem;
  color: var(--dark-blue);
  font-size: 1rem;
  font-weight: var(--fw-bold);
  line-height: 1.4;
}

.gallery-page__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.62rem;
  max-width: 60rem;
  margin: -0.5rem auto 0;
}

.gallery-page__filter {
  min-height: 2.75rem;
  padding: 0.7rem 1.6rem;
  border: 1px solid rgba(6, 32, 63, 0.75);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--dark-blue);
  font: inherit;
  font-size: 0.875rem;
  font-weight: var(--fw-bold);
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gallery-page__filter:hover,
.gallery-page__filter:focus-visible,
.gallery-page__filter.is-active {
  border-color: var(--fires);
  background: var(--fires);
  color: var(--white);
}

.gallery-page__filter:focus-visible {
  outline: 3px solid rgba(237, 95, 85, 0.28);
  outline-offset: 2px;
}

.gallery-page__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.88rem;
  opacity: 1;
  transition: opacity 0.18s ease, height 0.22s ease;
}

.gallery-page__grid.is-animating {
  overflow: hidden;
  pointer-events: none;
  will-change: opacity, height;
}

.gallery-page__grid.is-leaving {
  opacity: 0;
}

.gallery-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.85rem;
}

.gallery-card[hidden] {
  display: none;
}

.gallery-card__image-link {
  display: block;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--gray);
  aspect-ratio: 1.55 / 1;
}

.gallery-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-card__image-link:hover .gallery-card__image,
.gallery-card__image-link:focus-visible .gallery-card__image {
  transform: scale(1.03);
}

.gallery-card__image-link:focus-visible {
  outline: 3px solid rgba(237, 95, 85, 0.35);
  outline-offset: 3px;
}

.gallery-card__title {
  color: var(--dark-blue);
  font-size: 1rem;
  font-weight: var(--fw-bold);
  line-height: 1.35;
}

.gallery-page__empty {
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
  color: var(--dark-blue);
  font-weight: var(--fw-bold);
}

.gallery-page__pagination {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-page__pagination[hidden] {
  display: none;
}

.gallery-page__pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  border: 0;
  background: var(--Gray, #F5F5F5);
  color: var(--dark-blue, #06203F);
  font: inherit;
  font-size: 0.875rem;
  font-weight: var(--fw-bold);
  line-height: 1;
  text-decoration: none;
  box-shadow: 3px 3px 0 0px rgba(6, 32, 63, 0.23);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-page__pagination .page-numbers + .page-numbers {
  margin-left: 0.75rem;
  margin-bottom: 0.75rem;
}

.gallery-page__pagination .page-numbers:hover {
  color: var(--fires);
}

.gallery-page__pagination .page-numbers:focus-visible {
  outline: 3px solid rgba(237, 95, 85, 0.28);
  outline-offset: 2px;
}

.gallery-page__pagination .page-numbers.current {
  background: var(--fires);
  color: #fff;
}

.gallery-page__pagination .page-numbers.prev,
.gallery-page__pagination .page-numbers.next {
  padding: 0 1rem;
}

.gallery-page__pagination .page-numbers:disabled {
  opacity: 0.45;
  cursor: default;
}

.gallery-page__pagination .page-numbers:disabled:hover {
  color: var(--dark-blue, #06203F);
}

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

  .gallery-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gallery-page {
    padding: 3.25rem 0 4rem;
  }

  .gallery-page__container {
    gap: 2.5rem;
  }

  .gallery-page__filters {
    justify-content: stretch;
  }

  .gallery-page__filter {
    flex: 1 1 100%;
    padding-inline: 1rem;
  }

  .gallery-page__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}
