/* ==========================================================================
   LIGHTBOX UNIFICADO (Bioculturalidad, Arte con la Gente, Agroturismo)
   Un solo modal de imagen ampliada, mismo aspecto y comportamiento en
   todas las páginas. Gestionado por initLightbox() en js/nina-sonqo.js.
   ========================================================================== */

.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  justify-content: center;
  align-items: center;
  background: rgba(245, 240, 230, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.show {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(43, 38, 18, 0.35);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox-modal.show .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  z-index: 2;
  color: var(--olive-deep, #2b2b23);
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.lightbox-close:hover {
  color: var(--terracotta, #c96f4a);
}

.lightbox-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: none;
  width: 52px;
  height: 64px;
  align-items: center;
  justify-content: center;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(43, 38, 18, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  color: var(--olive-deep, #2b2b23);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lightbox-modal.has-navigation .lightbox-nav {
  display: flex;
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  background: rgba(255, 255, 255, 0.92);
  color: var(--terracotta, #c96f4a);
}

.lightbox-nav svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

@media (max-width: 767px) {
  .lightbox-modal {
    inset: 0;
    padding: 12px;
  }

  .lightbox-content {
    max-width: 100%;
    max-height: 100%;
  }

  .lightbox-close {
    top: 14px;
    right: 16px;
    font-size: 34px;
  }

  .lightbox-nav {
    width: 42px;
    height: 54px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}
