/* CBA Aachen — Gallery Masonry + Lightbox */

.masonry {
  columns: 2;
  column-gap: 12px;
}
@media (min-width: 640px)  { .masonry { columns: 3; } }
@media (min-width: 1024px) { .masonry { columns: 4; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 12px;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  display: block;
}
.masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.masonry-item:hover img {
  transform: scale(1.03);
  opacity: 0.85;
}

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-height: 90vh;
  max-width: 90vw;
  object-fit: contain;
  border-radius: 4px;
}
#lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
}
#lightbox-close:hover { opacity: 1; }
#lightbox-prev,
#lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  opacity: 0.6;
  cursor: pointer;
  padding: 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: opacity 0.2s, background 0.2s;
}
#lightbox-prev:hover,
#lightbox-next:hover { opacity: 1; background: rgba(229,1,106,0.5); }
#lightbox-prev { left: 20px; }
#lightbox-next { right: 20px; }
#lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
}
