.kh-gallery-grid {
  column-count: 3;
  column-gap: 1rem;
}

.kh-gallery-item {
  margin: 0;
  break-inside: avoid;
  margin-bottom: 1rem;
}

.kh-gallery-item a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
}

.kh-gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.kh-gallery-item figcaption {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.kh-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.kh-lightbox-overlay img {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
}

@media (max-width: 1000px) {
  .kh-gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 560px) {
  .kh-gallery-grid {
    column-count: 2;
    column-gap: 0.75rem;
  }

  .kh-gallery-item {
    margin-bottom: 0.75rem;
  }
}
