/* Gallery — column grid with hover captions + lightbox */

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

@media (max-width: 900px) { .gallery-grid { column-count: 2; } }
@media (max-width: 684px) { .gallery-grid { column-gap: 0.3rem; } }

.gallery-photo-link {
  display: block;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
  break-inside: avoid;
  margin-bottom: 0.5rem;
}

.gallery-photo-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
}

.gallery-photo-link:hover img { transform: scale(1.05); }

.gallery-photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.35;
  transform: translateY(100%);
  transition: transform 0.22s ease;
  pointer-events: none;
}

.gallery-photo-link:hover .gallery-photo-caption { transform: translateY(0); }

/* Lightbox */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.93);
}

.lightbox.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.lightbox-close:hover { color: #fff; }

.lightbox-counter {
  position: absolute;
  top: 1.1rem;
  left: 1.25rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.75rem 0.9rem;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.lightbox-btn:hover { background: rgba(255,255,255,0.2); }
.lightbox-btn--prev { left: 1rem; }
.lightbox-btn--next { right: 1rem; }

.lightbox-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100vw - 8rem);
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  display: block;
  border-radius: 2px;
}

.lightbox-caption {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  text-align: center;
  margin: 0.6rem 0 0;
}

@media (max-width: 684px) {
  .lightbox-body { max-width: calc(100vw - 1rem); }
  .lightbox-btn { font-size: 1.1rem; padding: 0.5rem 0.65rem; }
  .lightbox-btn--prev { left: 0.25rem; }
  .lightbox-btn--next { right: 0.25rem; }
}
