/* ================================================
   Gallery Page — gallery.css
   ================================================ */

/* Page header */
.gallery-page-header {
  padding: 100px 0 72px;
  overflow: hidden;
}

/* Gallery section top spacing */
.gallery-main-section {
  padding-top: 56px;
}

/* ── Masonry Grid ── */
.gallery-masonry {
  columns: 4;
  column-gap: 18px;
}

@media (max-width: 1100px) { .gallery-masonry { columns: 3; } }
@media (max-width: 700px)  { .gallery-masonry { columns: 2; } }
@media (max-width: 480px)  { .gallery-masonry { columns: 1; } }

/* ── Gallery Item ── */
.gal-item {
  break-inside: avoid;
  margin-bottom: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  will-change: transform, opacity;
}

.gal-thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-alt);
}

.gal-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.55s var(--ease), filter 0.45s ease;
  object-fit: cover;
}

.gal-item:hover .gal-thumb img {
  transform: scale(1.07);
  filter: brightness(0.82);
}

/* ── Overlay (click-through, invisible — effect is on the img itself) ── */
.gal-overlay {
  display: none;
}

.gal-label  { display: none; }
.gal-zoom   { display: none; }

/* ── Lightbox Backdrop ── */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 14, 28, 0.93);
  backdrop-filter: blur(12px);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

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

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 510;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

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

.lightbox-inner {
  position: relative;
  max-width: min(92vw, 1080px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lb-img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  object-fit: contain;
  transition: opacity 0.25s ease;
}

.lb-caption {
  margin-top: 14px;
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: center;
}

/* ── Lightbox Controls ── */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  border: none;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 520;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
  width: 22px;
  height: 22px;
}

.lightbox-close:hover { background: var(--pink); transform: scale(1.08); }
.lightbox-prev:hover,
.lightbox-next:hover  { background: var(--pink); transform: translateY(-50%) scale(1.08); }

@media (max-width: 600px) {
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
}
