.image-gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 1023px) {
  .image-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .image-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}
.image-gallery__item {
  margin: 0;
  padding: 0;
}
.image-gallery__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.image-gallery__link {
  display: block;
  overflow: hidden;
  cursor: zoom-in;
}
.image-gallery__link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.image-gallery__link:hover .image-gallery__image, .image-gallery__link:focus-visible .image-gallery__image {
  transform: scale(1.04);
}
.image-gallery__image {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.image-gallery__caption {
  font-size: 0.875em;
  line-height: 1.4;
  background-image: var(--global-gradient, linear-gradient(90deg, var(--theme-palette-color-1, currentColor) 0%, var(--theme-palette-color-2, var(--theme-palette-color-1, currentColor)) 100%));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.image-gallery__empty {
  padding: 24px;
  text-align: center;
  border: 1px dashed currentColor;
  opacity: 0.6;
}

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

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.gallery-lightbox__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(92vw, 1600px);
  max-height: 88vh;
  margin: 0;
}
.gallery-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  transition: opacity 0.25s ease;
}
.gallery-lightbox__image.is-loading {
  opacity: 0;
}
.gallery-lightbox__caption {
  margin-top: 12px;
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
  min-height: 1.2em;
}
.gallery-lightbox__counter {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #fff;
  font-size: 0.875rem;
  opacity: 0.8;
}
.gallery-lightbox__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gallery-lightbox-spin 0.8s linear infinite;
  display: none;
}
.gallery-lightbox.is-loading .gallery-lightbox__spinner {
  display: block;
}
.gallery-lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease;
}
.gallery-lightbox__btn:hover, .gallery-lightbox__btn:focus-visible {
  background: rgba(255, 255, 255, 0.25);
}
.gallery-lightbox__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.gallery-lightbox__btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gallery-lightbox__btn[hidden] {
  display: none;
}
.gallery-lightbox__close {
  top: 16px;
  right: 16px;
}
.gallery-lightbox__prev, .gallery-lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}
.gallery-lightbox__prev {
  left: 16px;
}
.gallery-lightbox__next {
  right: 16px;
}
@media (max-width: 767px) {
  .gallery-lightbox__prev, .gallery-lightbox__next {
    top: auto;
    bottom: 16px;
    transform: none;
  }
}

@keyframes gallery-lightbox-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .image-gallery__image,
  .gallery-lightbox,
  .gallery-lightbox__image {
    transition: none;
  }
}
