/* ═══════════════════════════════════════
   GALLERY GRID
═══════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gallery-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  margin: 0;
  aspect-ratio: 4/3;
  background: var(--border);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.35s ease;
  pointer-events: none;
}
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(27,43,94,0);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s ease;
  pointer-events: none;
}
.gallery-zoom {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-dk);
  font-size: 1.4rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.gallery-item:hover img               { transform: scale(1.05); }
.gallery-item:hover .gallery-overlay  { background: rgba(27,43,94,0.45); }
.gallery-item:hover .gallery-zoom     { opacity: 1; transform: scale(1); }
@media (hover: none) {
  .gallery-overlay { background: rgba(27,43,94,0.2); }
  .gallery-zoom    { opacity: 1; transform: scale(0.9); }
}

/* ═══════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════ */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(4, 6, 16, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }

/* Image area */
.lb-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  padding: 70px 110px 14px;
  box-sizing: border-box;
  min-height: 0;
}
.lb-img-wrap img {
  max-width: 100%;
  max-height: calc(100vh - 130px);
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
}

/* Counter bottom */
.lb-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px 20px;
}
.lb-counter {
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
}
#lbCaption { display: none; }

/* ── CLOSE BUTTON ───────────────────────────── */
.lb-close {
  position: fixed;
  top: 16px; right: 16px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  color: #fff;
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10001;
  transition: background 0.2s, transform 0.2s;
}
.lb-close:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-dk);
  transform: scale(1.1);
}

/* ── PREV / NEXT — large side panels ──────────── */
.lb-prev, .lb-next {
  position: fixed;
  top: 0; bottom: 0;
  width: 90px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0);  /* arrow hidden until hover */
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}
.lb-prev { left: 0; }
.lb-next { right: 0; }

/* Arrow icon inside */
.lb-prev::after,
.lb-next::after {
  content: '';
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.lb-prev::after { content: '‹'; font-size: 2.2rem; font-family: sans-serif; line-height: 56px; text-align: center; }
.lb-next::after { content: '›'; font-size: 2.2rem; font-family: sans-serif; line-height: 56px; text-align: center; }

.lb-prev:hover,
.lb-next:hover { background: rgba(255,255,255,0.05); }

.lb-prev:hover::after,
.lb-next:hover::after {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-dk);
  transform: scale(1.1);
}

/* ═══════════════════════════════════════
   MOBILE
═══════════════════════════════════════ */
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2,1fr); gap: 6px; }

  .lightbox { background: #000; }

  .lb-img-wrap {
    padding: 60px 0 10px;
  }
  .lb-img-wrap img {
    max-height: calc(100svh - 100px);
    border-radius: 0;
  }

  /* Close — bigger on mobile */
  .lb-close {
    top: 10px; right: 10px;
    width: 48px; height: 48px;
    font-size: 1.2rem;
    background: rgba(0,0,0,0.6);
    border: 2px solid rgba(255,255,255,0.5);
  }

  /* Prev/Next — full height tap zones, smaller arrow bubble */
  .lb-prev, .lb-next { width: 60px; }

  .lb-prev::after,
  .lb-next::after {
    width: 44px; height: 44px;
    font-size: 1.8rem;
    line-height: 44px;
    background: rgba(0,0,0,0.55);
    border: 2px solid rgba(255,255,255,0.4);
  }

  .lb-bottom { padding: 8px 16px 16px; }
  .lb-counter { font-size: 0.82rem; }
}

@media (max-width: 400px) {
  .lb-prev, .lb-next { width: 48px; }
}
