/* ============================================
   NIGHTDRIVE gallery.css
   Gallery grid, filter tabs and lightbox. Kept in its own file so these
   rules can't be lost when style.css is edited. Loaded after style.css.
   ============================================ */

/* ---- Filter tabs ---- */
.gallery-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--gray-dim, #444455);
  border-radius: 0;
  color: var(--gray, #888899);
  font-family: var(--font-condensed, 'Barlow Condensed', sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1;
  padding: 10px 18px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.filter-btn:hover { border-color: var(--white, #fff); color: var(--white, #fff); }
.filter-btn.active {
  background: var(--cyan, #00E5FF);
  border-color: var(--cyan, #00E5FF);
  color: var(--black, #000);
}

/* ---- Thumbnail grid ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--dark3, #1A1A24);
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.06); filter: brightness(1.1); }
.gallery-item.hidden { display: none; }

/* ---- Lightbox (full-size photo) ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;                       /* above the nav and the scanline overlay */
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}
.lightbox.open { opacity: 1; visibility: visible; pointer-events: auto; }
.lb-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 88vh;
}
.lb-img-wrap img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(123, 47, 190, 0.35);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  z-index: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--gray-dim, #444455);
  color: var(--white, #fff);
  font-size: 26px;
  line-height: 1;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--cyan, #00E5FF); color: var(--cyan, #00E5FF); }
.lb-close { top: 20px; right: 20px; }
.lb-prev  { left: 20px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
  .filter-btn { font-size: 11px; padding: 9px 12px; letter-spacing: 0.12em; }
  .lb-prev, .lb-next { top: auto; bottom: 24px; transform: none; }
  .lb-img-wrap img { max-width: 100vw; max-height: 80vh; }
}
