/* --------------- PHOTOS PAGE - Waterfall / Masonry Grid --------------- */

.photos-section .container {
  width: min(1280px, 95vw);
}

.gallery {
  column-count: 4;
  column-gap: 0;
  line-height: 0;
}

.gallery .tile {
  break-inside: avoid;
  margin: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

.gallery .tile img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
  border-radius: 0;
}

.gallery .tile figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery .tile:hover figcaption {
  opacity: 1;
}

@media (max-width: 1024px) {
  .gallery { column-count: 3; }
}

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

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
}

.lightbox.open {
  display: flex;
}

.viewer {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: min(1000px, 95vw);
  width: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.viewer .stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  background: #0b1020;
}

.viewer .stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.viewer .meta {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  pointer-events: none;
}

.lightbox .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.lightbox .btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.prev-btn, .next-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.3rem;
}

.close {
  position: absolute;
  top: 16px;
  right: 16px;
}
