/* ════════════════════════════════════════════════════════════
   INFERNO — GALLERY PAGE STYLES
   ════════════════════════════════════════════════════════════ */

.gallery-page-content { padding: 4rem 0 6rem; }

/* ─── Masonry-style grid using CSS columns for true masonry feel ─── */
.gallery-grid {
  columns: 3;
  column-gap: 1.5rem;
}

.gallery-grid .gallery-item {
  width: 100%;
  display: block;
  margin-bottom: 1.5rem;
  break-inside: avoid;
  aspect-ratio: 4/5;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.5s var(--ease-out), border-color 0.4s;
  opacity: 0;
  transform: translateY(30px);
}

.gallery-grid .gallery-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Vary heights for masonry feel */
.gallery-grid .gallery-item:nth-child(3n+1) { aspect-ratio: 4/5; }
.gallery-grid .gallery-item:nth-child(4n+2) { aspect-ratio: 3/4; }
.gallery-grid .gallery-item:nth-child(5n) { aspect-ratio: 1/1; }
.gallery-grid .gallery-item:nth-child(7n) { aspect-ratio: 4/6; }

.gallery-grid .gallery-item:hover {
  border-color: var(--neon-red);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(255, 26, 26, 0.2);
}

.gallery-grid .gallery-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.4), transparent 50%);
  opacity: 0.5;
  transition: opacity 0.4s;
}

.gallery-grid .gallery-item:hover::after { opacity: 0; }

.gallery-grid .gallery-item::before {
  content: '⤢';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: rgba(5, 5, 5, 0.7);
  border: 1px solid var(--neon-red);
  color: var(--neon-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 2;
}

.gallery-grid .gallery-item:hover::before {
  opacity: 1;
  transform: scale(1);
}

.gallery-empty-state {
  column-span: all;
  text-align: center;
  padding: 4rem 2rem;
  border: 1px dashed var(--border);
  color: var(--smoke);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.2em;
  font-size: 0.95rem;
}

/* ─── Lightbox ─── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.96);
  backdrop-filter: blur(20px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  aspect-ratio: 3/4;
  width: auto;
  box-shadow: 0 20px 80px rgba(255, 26, 26, 0.4);
  transform: scale(0.9);
  transition: transform 0.4s var(--ease-bounce);
  border: 1px solid var(--border);
}

.lightbox-image.landscape { aspect-ratio: 16/10; max-width: 90vw; }

.lightbox.open .lightbox-image { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: rgba(255, 26, 26, 0.15);
  border: 1px solid var(--neon-red);
  color: var(--neon-red);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 201;
}

.lightbox-close:hover {
  background: var(--neon-red);
  color: var(--cream);
  transform: rotate(90deg);
  box-shadow: var(--shadow-neon);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 26, 26, 0.15);
  border: 1px solid var(--neon-red);
  color: var(--neon-red);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 201;
}

.lightbox-nav:hover {
  background: var(--neon-red);
  color: var(--cream);
  box-shadow: var(--shadow-neon);
}

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

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--cream);
  padding: 0.5rem 1rem;
  background: rgba(5, 5, 5, 0.7);
  border: 1px solid var(--border);
  z-index: 201;
}

.lightbox-counter .current { color: var(--neon-red); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 968px) {
  .gallery-grid { columns: 2; column-gap: 1rem; }
  .gallery-grid .gallery-item { margin-bottom: 1rem; }

  .lightbox-nav { width: 40px; height: 40px; font-size: 1.3rem; }
  .lightbox-prev { left: 0.75rem; }
  .lightbox-next { right: 0.75rem; }
  .lightbox-close { top: 1rem; right: 1rem; width: 40px; height: 40px; }
  .lightbox-image { max-width: 95vw; }
}

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