/* ============================================================
   IMAGO ARC — GALLERY LIGHTBOX (PORTRAITS, PLACES, ANIMALS)
   Page-takeover lightbox layout. One image at a time.
   Activated when a page contains #gallery-lightbox.
   ============================================================ */

/* --- Body / page background, override default --- */
body.lightbox-page {
  background: #000;
  color: #f4f4f4;
  margin: 0;
  overflow-x: hidden;
}

/* Keep nav visible at top with the rest of the site, but tint
   it so it blends with the black canvas. */
body.lightbox-page .site-nav {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

body.lightbox-page .site-nav ul li a {
  color: rgba(255,255,255,0.78);
}

body.lightbox-page .site-nav ul li a.active {
  color: #fff;
}

/* Hide the seed <img data-photo> tags before JS swaps the stage.
   Without this rule the photos flash stacked vertically on load. */
#gallery-lightbox img[data-photo] {
  display: none;
}

/* --- Lightbox page wrapper --- */
.lightbox-stage-wrap {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 24px 0 0 0;
  box-sizing: border-box;
}

/* --- Gallery title (small, top of the stage) --- */
.lightbox-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  margin: 8px 0 24px 0;
  text-align: center;
}

/* --- Main stage: image + side arrows --- */
.lightbox-stage {
  position: relative;
  width: 100%;
  max-width: 1400px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 80px;
  box-sizing: border-box;
  min-height: 60vh;
}

.lightbox-image {
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 1;
  transition: opacity 0.18s ease;
}

.lightbox-image.is-loading {
  opacity: 0.35;
}

/* Side arrows, large invisible hit targets */
.lightbox-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  font-size: 2.4rem;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 5;
}

.lightbox-arrow:hover {
  color: #fff;
}

.lightbox-arrow.prev { left: 0; }
.lightbox-arrow.next { right: 0; }

/* --- Caption row: title left, counter right ---
   Width is set dynamically by JS to match the current image
   width, so the title sits flush with the image's left edge. */
.lightbox-meta {
  width: 100%;
  max-width: 1400px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0 8px 0;
  margin: 0 auto;
  box-sizing: border-box;
}

.lightbox-meta .meta-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.02em;
}

.lightbox-meta .meta-counter {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.18em;
}

/* --- Thumbnail strip at bottom (centered horizontally) --- */
.lightbox-thumbs {
  width: 100%;
  max-width: 1400px;
  padding: 12px 24px 28px 24px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  text-align: center;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}

.lightbox-thumbs::-webkit-scrollbar { height: 6px; }
.lightbox-thumbs::-webkit-scrollbar-track { background: transparent; }
.lightbox-thumbs::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 3px;
}

.lightbox-thumb {
  display: inline-block;
  width: 84px;
  height: 64px;
  margin: 0 6px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease;
  object-fit: cover;
  vertical-align: middle;
  border: 0;
  background: #111;
}

.lightbox-thumb:hover {
  opacity: 0.85;
}

.lightbox-thumb.is-active {
  opacity: 1;
  outline: 1px solid rgba(255,255,255,0.85);
  outline-offset: 2px;
}

/* --- Footer adjustments for the dark page --- */
body.lightbox-page .site-footer {
  background: #000;
  color: rgba(255,255,255,0.55);
  border-top: 1px solid rgba(255,255,255,0.06);
}

body.lightbox-page .site-footer a {
  color: rgba(255,255,255,0.7);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .lightbox-stage {
    padding: 0 56px;
    min-height: 50vh;
  }

  .lightbox-image {
    max-height: 60vh;
  }

  .lightbox-thumb {
    width: 72px;
    height: 54px;
  }
}

@media (max-width: 680px) {
  .lightbox-title {
    font-size: 1.05rem;
    margin: 4px 0 16px 0;
    letter-spacing: 0.14em;
  }

  .lightbox-stage {
    padding: 0 8px;
    min-height: 48vh;
  }

  .lightbox-image {
    max-height: 56vh;
  }

  .lightbox-arrow {
    width: 36px;
    font-size: 1.4rem;
    color: rgba(255,255,255,0.35);
  }

  .lightbox-meta {
    padding: 12px 0 6px 0;
    flex-wrap: wrap;
    gap: 4px;
  }

  .lightbox-meta .meta-title {
    font-size: 0.95rem;
  }

  .lightbox-meta .meta-counter {
    font-size: 0.7rem;
  }

  .lightbox-thumbs {
    padding: 8px 12px 20px 12px;
  }

  .lightbox-thumb {
    width: 60px;
    height: 46px;
    margin: 0 4px;
  }
}
