/* ============================================================
   GALLERY PAGE — gallery.css
   ============================================================ */

/* ── Page Hero ─────────────────────────────────────────────── */
.gallery-hero {
  background: var(--bg);
}

.gallery-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(220, 38, 38, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Gallery Section ───────────────────────────────────────── */
.gallery-section {
  padding: 4rem var(--gutter) 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Masonry Grid ──────────────────────────────────────────── */
.gallery-grid {
  columns: 3;
  column-gap: 1rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(220, 38, 38, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  background: rgba(220, 38, 38, 0.1);
}

.gallery-watermark {
  position: absolute;
  width: 90px;
  height: 28px;
  background: url('../newlogo.webp') center/contain no-repeat;
  opacity: 0.33;
  pointer-events: none;
  z-index: 2;
}

.gallery-img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.35s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.03);
}

/* ── Lightbox Overlay ──────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-img:is([src='']) {
  display: none;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0.25rem 0.5rem;
}

.lightbox-close:hover {
  opacity: 1;
}

/* Prev / Next arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Counter */
.lightbox-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* ── Video Banner ──────────────────────────────────────────── */
.gallery-video-banner {
  width: 100%;
  height: 420px;
  overflow: hidden;
  margin: 12px 0;
  border-radius: 6px;
}

.gallery-video-banner video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

@media (max-width: 900px) {
  .gallery-video-banner {
    height: 280px;
  }
}

@media (max-width: 540px) {
  .gallery-video-banner {
    height: 200px;
  }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gallery-grid {
    columns: 2;
  }
}

@media (max-width: 540px) {
  .gallery-grid {
    columns: 1;
  }

  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}
