.content-gallery {
  padding: 96px 0;
  background: #f7f4ef;
}

.content-gallery__header {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.content-gallery__eyebrow {
  display: block;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9b7a4b;
}

.content-gallery__title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1;
  color: #1f2523;
}

.content-gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.content-gallery__item {
  position: relative;
  grid-column: span 4;
  min-height: 320px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #ddd;
  cursor: pointer;
}

.content-gallery__item:nth-child(1),
.content-gallery__item:nth-child(6n + 1) {
  grid-column: span 8;
}

.content-gallery__item:nth-child(2),
.content-gallery__item:nth-child(6n + 2) {
  grid-column: span 4;
}

.content-gallery__item:nth-child(3),
.content-gallery__item:nth-child(6n + 3),
.content-gallery__item:nth-child(4),
.content-gallery__item:nth-child(6n + 4),
.content-gallery__item:nth-child(5),
.content-gallery__item:nth-child(6n + 5) {
  grid-column: span 4;
}

.content-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.content-gallery__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 27, 25, 0);
  transition: background 0.3s ease;
}

.content-gallery__zoom {
  display: flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.content-gallery__item:hover img {
  transform: scale(1.04);
}

.content-gallery__item:hover .content-gallery__overlay {
  background: rgba(22, 27, 25, 0.35);
}

.content-gallery__item:hover .content-gallery__zoom {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 991px) {
  .content-gallery {
    padding: 72px 0;
  }

  .content-gallery__item,
  .content-gallery__item:nth-child(n) {
    grid-column: span 6;
    min-height: 260px;
  }
}

@media (max-width: 575px) {
  .content-gallery {
    padding: 56px 0;
  }

  .content-gallery__header {
    margin-bottom: 32px;
    text-align: left;
  }

  .content-gallery__grid {
    gap: 12px;
  }

  .content-gallery__item,
  .content-gallery__item:nth-child(n) {
    grid-column: span 12;
    min-height: 240px;
  }
}
.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1200px, 100%);
  height: min(850px, 90vh);
}

.gallery-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-lightbox__close {
  position: absolute;
  top: -18px;
  right: -10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 767px) {
  .gallery-lightbox {
    padding: 12px;
  }

  .gallery-lightbox__dialog {
    height: 85vh;
  }

  .gallery-lightbox__close {
    top: 0;
    right: 0;
  }
}
.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.gallery-lightbox.is-open {
  display: block;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.94);
}

.gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  grid-template-rows: 72px 1fr;
  align-items: center;
}

.gallery-lightbox__topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  color: #fff;
}

.gallery-lightbox__counter {
  font-size: 15px;
  letter-spacing: 0.08em;
}

.gallery-lightbox__close,
.gallery-lightbox__prev,
.gallery-lightbox__next {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.gallery-lightbox__close {
  width: 48px;
  height: 48px;
  font-size: 38px;
  line-height: 1;
}

.gallery-lightbox__prev,
.gallery-lightbox__next {
  grid-row: 2;
  width: 64px;
  height: 64px;
  justify-self: center;
  font-size: 64px;
  line-height: 1;
}

.gallery-lightbox__prev {
  grid-column: 1;
}

.gallery-lightbox__next {
  grid-column: 3;
}

.gallery-lightbox__stage {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gallery-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
}

@media (max-width: 767px) {
  .gallery-lightbox__dialog {
    grid-template-columns: 52px 1fr 52px;
    grid-template-rows: 60px 1fr;
  }

  .gallery-lightbox__topbar {
    padding: 0 14px;
  }

  .gallery-lightbox__prev,
  .gallery-lightbox__next {
    width: 44px;
    height: 44px;
    font-size: 48px;
  }

  .gallery-lightbox__stage {
    height: calc(100vh - 80px);
    padding: 8px;
  }
}