/* ==========================================================================
   JOFERFIL - Galeria Lightbox CSS
   ========================================================================== */

.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  user-select: none;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.5);
  animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-caption {
  color: #ffffff;
  margin-top: 12px;
  font-size: 15px;
  font-family: 'Open Sans', sans-serif;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  background: rgba(255,255,255,0.2);
  color: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 100000;
}

.lightbox-close-btn:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.1);
}

.lightbox-prev-btn,
.lightbox-next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: #ffffff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 100000;
}

.lightbox-prev-btn:hover,
.lightbox-next-btn:hover {
  background: rgba(255,255,255,0.4);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev-btn {
  left: 30px;
}

.lightbox-next-btn {
  right: 30px;
}

.lightbox-counter {
  position: absolute;
  top: 25px;
  left: 30px;
  color: #ffffff;
  font-size: 14px;
  font-family: 'Open Sans', sans-serif;
  background: rgba(0,0,0,0.4);
  padding: 4px 12px;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .lightbox-prev-btn {
    left: 10px;
    width: 40px;
    height: 40px;
  }
  .lightbox-next-btn {
    right: 10px;
    width: 40px;
    height: 40px;
  }
  .lightbox-close-btn {
    top: 10px;
    right: 10px;
  }
}
