.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.lightbox.show {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80vh;
  margin: auto;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.lightbox-img.visible {
  opacity: 1;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.lightbox .close:hover {
  transform: scale(1.2);
}

.lightbox .nav {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-between;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 20px;
}

.lightbox .nav span {
  color: white;
  font-size: 40px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s ease;
}
.lightbox .nav span:hover {
  transform: scale(1.2);
}