/* ──────────────────────────────────────────────
   GALLERY + LIGHTBOX
─────────────────────────────────────────────── */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: var(--sp-4);
}
.gallery__item {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--grad-ocean);
  box-shadow: var(--sh-sm);
}
/* Feature a couple of tiles larger for a mosaic feel */
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }

.gallery__item img {
  position: relative;
  z-index: 1;            /* sit above the placeholder icon; it only shows if the image fails */
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6,26,43,0.55));
  opacity: 0;
  transition: opacity var(--t-base);
}
.gallery__item:hover::after { opacity: 1; }
.gallery__zoom {
  position: absolute;
  right: var(--sp-3); bottom: var(--sp-3);
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.9);
  color: var(--c-navy);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t-base), transform var(--t-base);
  z-index: 1;
}
.gallery__item:hover .gallery__zoom { opacity: 1; transform: translateY(0); }
.gallery__zoom svg { width: 18px; height: 18px; }

/* Placeholder shimmer when no real image is set */
.gallery__ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.35);
}
.gallery__ph svg { width: 48px; height: 48px; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  background: rgba(6,26,43,0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: min(92vw, 1100px);
  max-height: 84vh;
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  transform: scale(0.96);
  transition: transform var(--t-base);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__caption {
  position: absolute;
  bottom: var(--sp-8); left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-sm);
  text-align: center;
  max-width: 80vw;
}
.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  transition: background var(--t-fast);
}
.lightbox__btn:hover { background: rgba(255,255,255,0.25); }
.lightbox__btn svg { width: 26px; height: 26px; }
.lightbox__prev { left: var(--sp-6); }
.lightbox__next { right: var(--sp-6); }
.lightbox__close {
  position: absolute;
  top: var(--sp-6); right: var(--sp-6);
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.12);
  color: #fff;
  transition: background var(--t-fast), transform var(--t-fast);
}
.lightbox__close:hover { background: var(--c-coral); transform: rotate(90deg); }
.lightbox__close svg { width: 24px; height: 24px; }
