/* Gallery Lightbox Styles */

.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox.active {
  display: flex;
}

/* Overlay background */
.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

/* Content container */
.lightbox-content {
  position: relative;
  width: 90%;
  height: 85%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* Image container */
.lightbox-image-container {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 80px;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  font-size: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
  line-height: 1;
  padding: 0;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: rotate(90deg);
}

/* Navigation buttons */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev:active,
.lightbox-next:active {
  transform: translateY(-50%) scale(0.95);
}

/* Counter */
.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 20px;
  color: white;
  font-family: 'Didot', 'Times New Roman', 'Garamond', serif;
  font-size: 14px;
  letter-spacing: 1px;
  z-index: 10001;
}

/* Hover effect on gallery images */
.gallery-item img:hover,
.gallery img:hover {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .lightbox-content {
    width: 95%;
    height: 90%;
  }
  
  .lightbox-image-container {
    padding: 0 60px;
  }
  
  .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 24px;
    top: 15px;
    right: 15px;
  }
  
  .lightbox-prev,
  .lightbox-next {
    width: 45px;
    height: 45px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-counter {
    bottom: 20px;
    font-size: 12px;
    padding: 6px 16px;
  }
}

@media (max-width: 480px) {
  .lightbox-image-container {
    padding: 0 50px;
  }
  
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
  }
  
  .lightbox-prev svg,
  .lightbox-next svg {
    width: 20px;
    height: 20px;
  }
}

/* Animation for opening */
@keyframes lightboxFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.gallery-lightbox.active {
  animation: lightboxFadeIn 0.3s ease;
}

.gallery-lightbox.active .lightbox-image {
  animation: imageZoomIn 0.3s ease;
}

@keyframes imageZoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
