/* ============================================================
   GALLERY HEADER
   ============================================================ */
.gallery-header {
  background: var(--bg-dark);
  color: #fff;
  border-bottom: none;
}
.gallery-header .page-label { color: rgba(255,255,255,0.35); }
.gallery-header .page-intro { color: rgba(255,255,255,0.5); }

.gallery-title {
  display: flex;
  flex-direction: column;
  color: #fff !important;
}
.gt-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  animation: lineReveal 0.9s var(--ease-out) both;
  animation-delay: calc(var(--i) * 0.13s + 0.2s);
}
@keyframes lineReveal {
  from { opacity: 0; transform: translateY(80%); }
  to   { opacity: 1; transform: translateY(0); }
}
.accent-letter { color: var(--accent); }

/* ============================================================
   GALLERY WALL (masonry via CSS columns)
   ============================================================ */
.gallery-main {
  padding: 3rem 0 6rem;
  background: var(--bg);
}

.gallery-wall {
  column-count: 4;
  column-gap: 6px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--px);
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: block;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease-out);
  filter: grayscale(8%);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(200, 88, 26, 0.55);
  opacity: 0;
  transition: opacity 0.35s;
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: grayscale(0%);
}
.gallery-item:hover::after { opacity: 1; }

/* Expand icon on hover */
.gallery-item::before {
  content: '+';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  z-index: 2;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s, transform 0.35s var(--ease-out);
  pointer-events: none;
}
.gallery-item:hover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 8, 0.95);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: lbFadeIn 0.3s var(--ease-out) both;
}
.lightbox-overlay.open { display: flex; }
@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  animation: lbScale 0.4s var(--ease-out) both;
}
@keyframes lbScale {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.lightbox-inner img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}
.lightbox-close {
  position: absolute;
  top: -2.5rem; right: 0;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s;
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) { .gallery-wall { column-count: 3; } }
@media (max-width: 768px)  { .gallery-wall { column-count: 2; column-gap: 4px; } .gallery-item { margin-bottom: 4px; } }
@media (max-width: 480px)  { .gallery-wall { column-count: 2; column-gap: 3px; } .gallery-item { margin-bottom: 3px; } }
@media (max-width: 640px)  { .gt-line { white-space: normal; overflow-wrap: break-word; } }
