/* Lightbox-Galerie — Spec 2026-04-25 */

html.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(2px);
}

.lightbox[hidden] { display: none; }

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 96vw;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 96vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  background: #111;
}

.lightbox-caption {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  max-width: 80vw;
  font-size: 14px;
  line-height: 1.4;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(0, 255, 208, 0.3); }

.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 2px solid #00ffd0;
  outline-offset: 2px;
}

.lightbox-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 28px;
  line-height: 1;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  border-radius: 999px;
}

/* Galerie-Grid (events + locations gemeinsam) */
.event-gallery {
  margin-top: 24px;
}

.event-gallery .gallery-grid,
.location-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.event-gallery .gallery-item,
.location-gallery .gallery-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  background: rgba(0, 0, 0, 0.2);
  cursor: zoom-in;
}

.event-gallery .gallery-item img,
.location-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.event-gallery .gallery-item:hover img,
.location-gallery .gallery-item:hover img {
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .lightbox-close { top: 8px; right: 8px; width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-prev,
  .lightbox-next { width: 40px; height: 40px; }
}
