/* ============================================================
   JD-LIGHTBOX v1.0 — estilos
   ============================================================ */
#jd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99980;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 5, 14, .92);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

#jd-lightbox.open {
  opacity: 1;
  visibility: visible;
}

body.jd-lightbox-open {
  overflow: hidden;
}

.jd-lightbox-frame {
  position: relative;
  max-width: 92vw;
  max-height: 86vh;
  padding: 14px;
}

/* Esquinas doradas — mismo lenguaje que el Marco de Crónica */
.jd-lightbox-frame::before,
.jd-lightbox-frame::after {
  content: '';
  position: absolute;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ao-gold, #f5c842);
  filter: drop-shadow(0 0 6px rgba(245, 200, 66, .5));
  pointer-events: none;
}

.jd-lightbox-frame::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.jd-lightbox-frame::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

.jd-lightbox-img {
  display: block;
  max-width: calc(92vw - 28px);
  max-height: calc(86vh - 28px);
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .7);
}

.jd-lightbox-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  text-align: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  color: #e8e4f0;
  background: rgba(10, 7, 18, .7);
  padding: 6px 12px;
  border-radius: 6px;
}

.jd-lightbox-caption.hidden {
  display: none;
}

.jd-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(245, 200, 66, .4);
  background: rgba(20, 14, 32, .8);
  color: var(--ao-gold, #f5c842);
  font-size: 20px;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}

.jd-lightbox-nav:hover {
  background: rgba(35, 26, 55, .95);
  box-shadow: 0 0 12px rgba(245, 200, 66, .35);
}

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

#jd-lightbox.single .jd-lightbox-nav,
#jd-lightbox.single .jd-lightbox-counter {
  display: none;
}

.jd-lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(245, 200, 66, .4);
  background: rgba(20, 14, 32, .8);
  color: #e8e4f0;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.jd-lightbox-close:hover {
  color: #fff;
  box-shadow: 0 0 12px rgba(245, 200, 66, .35);
}

.jd-lightbox-counter {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--ao-gold, #f5c842);
}

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

@media (prefers-reduced-motion: reduce) {
  #jd-lightbox { transition: none; }
}
