/* In-page album lightbox (keyboard + click navigation) */
.glightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 1.5rem;
  box-sizing: border-box;
}

.glightbox-overlay.is-open {
  display: flex;
}

.glightbox-overlay[hidden] {
  display: none !important;
}

.glightbox-dialog {
  position: relative;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  outline: none;
}

.glightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.glightbox-figure img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
  background: #111;
}

.glightbox-caption {
  color: #f4f6f7;
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.95rem;
  max-width: 40rem;
  line-height: 1.35;
}

.glightbox-counter {
  color: #bbb;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.glightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}

.glightbox-btn:hover,
.glightbox-btn:focus {
  background: rgba(255, 255, 255, 0.28);
  outline: 1px solid #fff;
}

.glightbox-prev {
  left: 0.5rem;
}

.glightbox-next {
  right: 0.5rem;
}

.glightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  transform: none;
  font-size: 1.5rem;
  width: 2.25rem;
  height: 2.25rem;
}

body.glightbox-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .glightbox-prev {
    left: 0.15rem;
  }
  .glightbox-next {
    right: 0.15rem;
  }
}
