.gallery {
  margin: 1em auto;
  max-width: 100%;
}

.gallery-subtitle {
  text-align: center;
  margin: 0 0 0.5em;
}

.gallery-main {
  width: 100%;
}

.gallery-main .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72vh;
  position: relative;
}

.gallery-main .swiper-zoom-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4em 0.8em;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85em;
  text-align: center;
  pointer-events: none;
}

.gallery-thumbs {
  height: 84px;
  margin-top: 8px;
}

.gallery-thumbs .swiper-slide {
  width: auto;
  height: 100%;
  opacity: 0.45;
  cursor: pointer;
}

.gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
}

.gallery-thumbs img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: cover;
}

@media (max-width: 600px) {
  .gallery-main .swiper-slide {
    height: 58vh;
  }

  .gallery-thumbs {
    height: 52px;
  }
}

.gallery-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1em;
  margin: 1em 0;
}

.gallery-index a {
  display: block;
  text-align: center;
  text-decoration: none;
}

.gallery-index img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
