/*
 * gallery.css — Masonry Gallery + Lightbox
 * Ref: Passalacqua, Capella Ubud, Banyan Tree Escape
 */

/* ── MASONRY GRID ────────────────────────────────── */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 280px;
  gap: 6px;
}

/* Span variations */
.gallery-tall {
  grid-row: span 2;
}

.gallery-wide {
  grid-column: span 2;
}

/* ── GALLERY ITEM ────────────────────────────────── */
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.gallery-item:hover .gallery-item__img {
  transform: scale(1.05);
}

.gallery-item__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--sp-sm) var(--sp-sm);
  background: linear-gradient(transparent, rgba(26, 17, 8, 0.6));
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: rgba(250, 248, 244, 0.85);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.gallery-item:hover .gallery-item__caption {
  opacity: 1;
  transform: translateY(0);
}

/* ── LIGHTBOX ────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(26, 17, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s var(--ease),
    visibility 0.4s var(--ease);
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox__content {
  max-width: 90vw;
  max-height: 85vh;
  text-align: center;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox__caption {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.10em;
  color: rgba(250, 248, 244, 0.7);
  margin-top: var(--sp-sm);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white-warm);
  transition: opacity var(--speed) var(--ease);
  z-index: 1;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  opacity: 0.6;
}

.lightbox__close {
  top: 28px;
  right: 32px;
}

.lightbox__close svg {
  width: 28px;
  height: 28px;
}

.lightbox__prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__prev svg,
.lightbox__next svg {
  width: 36px;
  height: 36px;
}
