/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease-in-out;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  animation: zoomIn 0.3s ease-in-out;
}

.lightbox-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  color: white;
  text-align: center;
  padding: 15px 20px;
  font-size: 16px;
  margin-top: 10px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #ccc;
}

/* Navigation arrows */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  padding: 15px;
  user-select: none;
  transition: color 0.3s ease;
  z-index: 1001;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-nav:hover {
  color: #ccc;
}

/* Fix overlay blocking clicks */
.overlay-legendas {
  pointer-events: none; /* Allow clicks to pass through */
}

/* Make images clickable */
.photo-container img {
  cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .lightbox-content {
    max-width: 95%;
    max-height: 95%;
  }

  .lightbox-close {
    top: -35px;
    font-size: 35px;
  }

  .lightbox-caption {
    font-size: 14px;
    padding: 10px 15px;
  }
}