/* Lightbox Styles */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  backdrop-filter: blur(3px);
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

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

.lightbox-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; /* altura da tela */
  width: 100vw;
  background-color: rgba(0, 0, 0, 0.85);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  box-sizing: border-box;
  padding: 20px;
}

.lightbox-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 20px;
}

.lightbox-image {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  margin: auto;
  display: block;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  border-radius: 8px;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: relative;
}

.lightbox-image.active {
  opacity: 1;
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.lightbox-close::before,
.lightbox-close::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: white;
}

.lightbox-close::before {
  transform: rotate(45deg);
}

.lightbox-close::after {
  transform: rotate(-45deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 5;
  pointer-events: none; /* Permite cliques através do container */
}

.lightbox-nav-button {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  pointer-events: auto; /* Restaura cliques nos botões */
}

.lightbox-nav-button:hover {
  background-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.lightbox-prev {
  margin-left: 15px;
}

.lightbox-next {
  margin-right: 15px;
}

.lightbox-nav-button::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid white;
  border-right: 2px solid white;
}

.lightbox-prev::before {
  transform: rotate(-135deg);
  margin-left: 5px;
}

.lightbox-next::before {
  transform: rotate(45deg);
  margin-right: 5px;
}

.lightbox-counter {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-size: 14px;
  font-family: var(--body-font);
}

/* Thumbnails at bottom */
.lightbox-thumbnails {
  position: absolute;
  bottom: -70px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
}

.lightbox-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: 2px solid transparent;
}

.lightbox-thumbnail:hover {
  opacity: 0.9;
  transform: translateY(-3px);
}

.lightbox-thumbnail.active {
  opacity: 1;
  border-color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .lightbox-nav-button {
    width: 40px;
    height: 40px;
  }
  
  .lightbox-thumbnails {
    bottom: -60px;
  }
  
  .lightbox-thumbnail {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .lightbox-nav-button {
    width: 35px;
    height: 35px;
  }
  
  .lightbox-close {
    width: 35px;
    height: 35px;
  }
  
  .lightbox-thumbnails {
    bottom: -50px;
  }
  
  .lightbox-thumbnail {
    width: 40px;
    height: 40px;
  }
}
