/* Gallery Block — grid + lightbox */

.gallery-block__grid {
  align-items: stretch;
}

.gallery-block__item {
  display: block;
  height: 332px;
  max-height: 332px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.gallery-block__item:hover {
  opacity: 0.9;
}

.gallery-block__item img {
  display: block;
  width: 100%;
  height: 332px;
  max-height: 332px;
  object-fit: cover;
}

.gallery-block-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.92);
}

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

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

.gallery-block-lightbox__close,
.gallery-block-lightbox__prev,
.gallery-block-lightbox__next {
  position: absolute;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  transition: opacity 0.2s ease;
}

.gallery-block-lightbox__close:hover,
.gallery-block-lightbox__prev:hover,
.gallery-block-lightbox__next:hover {
  opacity: 0.75;
}

.gallery-block-lightbox__close {
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
  font-weight: 300;
}

.gallery-block-lightbox__prev,
.gallery-block-lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  font-weight: 300;
}

.gallery-block-lightbox__prev {
  left: 1rem;
}

.gallery-block-lightbox__next {
  right: 1rem;
}

body.gallery-block-lightbox-open {
  overflow: hidden;
}
