.image-gallery {
  margin: 2rem 0;
}
.image-gallery .image-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.image-gallery .image-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}
.image-gallery .image-gallery-item[role="button"] {
  cursor: zoom-in;
}
.image-gallery .image-gallery-item:focus-visible {
  outline: 3px solid var(--bs-tertiary);
  outline-offset: 4px;
}
.image-gallery-lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  width: 96vw;
  max-width: none;
  max-height: 96vh;
}
.image-gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
}
.image-gallery-lightbox[open] {
  animation: image-gallery-open 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.image-gallery-lightbox[open]::backdrop {
  animation: image-gallery-backdrop-open 520ms ease-out both;
}
.image-gallery-lightbox[open].is-closing {
  animation: image-gallery-open 400ms ease-in reverse both;
  pointer-events: none;
}
.image-gallery-lightbox[open].is-closing::backdrop {
  animation: image-gallery-backdrop-open 400ms ease-in reverse both;
}
@keyframes image-gallery-open {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes image-gallery-backdrop-open {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .image-gallery-lightbox[open],
  .image-gallery-lightbox[open]::backdrop,
  .image-gallery-lightbox[open].is-closing,
  .image-gallery-lightbox[open].is-closing::backdrop {
    animation: none;
  }
}
.image-gallery-lightbox .image-gallery-viewer {
  position: relative;
  padding: 3rem 4rem;
}
.image-gallery-lightbox figure {
  margin: 0;
  text-align: center;
}
.image-gallery-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  margin: auto;
  object-fit: contain;
}
.image-gallery-lightbox figcaption {
  margin-top: 0.75rem;
  white-space: pre-line;
}
.image-gallery-lightbox button {
  position: absolute;
  border: 0;
  background: #222;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
}
.image-gallery-lightbox button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.image-gallery-lightbox .image-gallery-close {
  right: 0;
  top: 0;
}
.image-gallery-lightbox .image-gallery-previous {
  left: 0;
  top: 45%;
}
.image-gallery-lightbox .image-gallery-next {
  right: 0;
  top: 45%;
}
.image-gallery-lightbox .image-gallery-counter {
  text-align: center;
  margin: 0.75rem 0 0;
}
@media (min-width: 992px) {
  .image-gallery {
    margin-left: 10%;
    margin-right: 10%;
  }
  .image-gallery .image-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
