.gallery-page {
  padding-top: 82px;
}

.gallery-page__heading {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, .7fr);
  gap: clamp(22px, 5vw, 58px);
  align-items: end;
  margin-bottom: 34px;
}

.gallery-page__heading .section__kicker {
  grid-column: 1 / -1;
  margin-bottom: -8px;
}

.gallery-page__heading h2 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 4.7rem);
  font-weight: 500;
  line-height: 1.02;
}

.gallery-page__heading p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.gallery-page__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-page__item {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #ded6c8;
  cursor: zoom-in;
  box-shadow: 0 18px 54px rgba(32, 32, 29, .1);
}

.gallery-page__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .45s ease;
}

.gallery-page__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(32, 32, 29, 0), rgba(32, 32, 29, .18));
  opacity: 0;
  transition: opacity .3s ease;
}

.gallery-page__item:hover img,
.gallery-page__item:focus-visible img {
  transform: scale(1.04);
  filter: saturate(1.04);
}

.gallery-page__item:hover::after,
.gallery-page__item:focus-visible::after {
  opacity: 1;
}

.gallery-page__item:focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 4px;
}

.gallery-page__empty {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.gallery-page__empty p {
  margin: 0;
}

.about-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 68px 88px;
  background: rgba(32, 32, 29, .9);
}

.about-lightbox.is-open {
  display: flex;
}

.about-lightbox__image {
  max-width: min(1120px, 100%);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
}

.about-lightbox__button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 250, 243, .22);
  border-radius: 50%;
  background: rgba(255, 250, 243, .1);
  color: var(--white);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.about-lightbox__close {
  top: 24px;
  right: 24px;
  font-size: 1.7rem;
}

.about-lightbox__prev {
  left: 24px;
}

.about-lightbox__next {
  right: 24px;
}

@media (max-width: 900px) {
  .gallery-page__heading {
    grid-template-columns: 1fr;
  }

  .gallery-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .gallery-page__grid {
    grid-template-columns: 1fr;
  }

  .about-lightbox {
    padding: 58px 16px;
  }

  .about-lightbox__prev,
  .about-lightbox__next {
    width: 42px;
    height: 42px;
    top: auto;
    bottom: 18px;
  }
}
