/* ── Gallery Pages ────────────────────────────────── */
.gallery-main {
  padding: 8rem 4rem 6rem;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-header {
  margin-bottom: 3rem;
}

.back-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.back-link:hover { color: var(--silver); }

.gallery-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-top: 0.5rem;
}

/* Uniform grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  grid-auto-rows: 280px;
}

.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
}

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

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lightbox img.fade-left {
  opacity: 0;
  transform: translateX(-30px);
}

.lightbox img.fade-right {
  opacity: 0;
  transform: translateX(30px);
}

.lightbox img.fade-in {
  opacity: 0;
  transform: scale(0.97);
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

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

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .gallery-main { padding: 7rem 1.5rem 4rem; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
}
