/* Enhanced Modal Gallery Styles */

/* Modal Gallery Grid */
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Custom scrollbar for gallery */
.modal-gallery::-webkit-scrollbar {
  width: 6px;
  background: rgba(0, 0, 0, 0.1);
}

.modal-gallery::-webkit-scrollbar-thumb {
  background: var(--electric-blue);
  border-radius: 10px;
}

/* Gallery Items */
.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/10;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  z-index: 5;
  box-shadow: 0 15px 30px rgba(0, 212, 255, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* Featured image (first image in gallery) */
.gallery-item.featured {
  grid-column: 1 / -1;
  aspect-ratio: 21/9;
}

/* Gallery overlay with hover effect */
.gallery-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 70%);
  opacity: 0.4;
  transition: all 0.3s ease;
}

.gallery-item:hover::after {
  opacity: 0.2;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.5),
    rgba(0, 212, 255, 0.2) 90%
  );
}

/* Zoom icon indicator */
.gallery-item::before {
  content: "🔍";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: white;
  font-size: 1.5rem;
  z-index: 10;
  opacity: 0;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.gallery-item:hover::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Modal Fullscreen Image View */
.fullscreen-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

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

.fullscreen-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

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

.fullscreen-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2001;
  transition: all 0.3s ease;
}

.fullscreen-close:hover {
  transform: scale(1.2);
  color: var(--electric-blue);
}

.fullscreen-nav {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.fullscreen-nav button {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fullscreen-nav button:hover {
  background: var(--cyber-gradient);
  transform: translateY(-3px);
}

/* Image counter */
.image-counter {
  position: absolute;
  bottom: 30px;
  right: 30px;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .modal-gallery {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .modal-gallery {
    grid-template-columns: 1fr 1fr;
    max-height: 500px;
  }
}

@media (max-width: 576px) {
  .modal-gallery {
    grid-template-columns: 1fr;
    max-height: 400px;
  }

  .gallery-item.featured {
    aspect-ratio: 16/9;
  }
}
