/* ============================================================
   Lightweight responsive lightbox — replaces the old iWeb
   MediaGrid/DetailView widget on every gallery page.
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lb_figure {
  max-width: 92vw;
  max-height: 90vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb_image {
  max-width: 92vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  background: #111;
}

.lb_caption {
  color: #eee;
  margin-top: 14px;
  font-size: 14px;
  text-align: center;
  max-width: 80vw;
}

.lb_close,
.lb_prev,
.lb_next {
  position: fixed;
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 12px;
  opacity: 0.85;
}

.lb_close:hover,
.lb_prev:hover,
.lb_next:hover {
  opacity: 1;
}

.lb_close {
  top: 10px;
  right: 14px;
}

.lb_prev {
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
}

.lb_next {
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
}

body.lb_lock {
  overflow: hidden;
}

@media (max-width: 600px) {
  .lb_prev,
  .lb_next {
    font-size: 22px;
    padding: 8px;
  }

  .lb_close {
    font-size: 26px;
  }

  .lb_caption {
    font-size: 13px;
  }
}
