/* Gallery Page Styles */

/* Gallery Hero Section */
.gallery-hero {
  height: 40vh;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.9), rgba(212, 175, 55, 0.3)), 
              linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.gallery-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.1), transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.gallery-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.gallery-hero h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  color: #d4af37;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  font-weight: 600;
}

.gallery-hero p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  line-height: 1.6;
  color: #e6e6e6;
}

.back-btn {
  display: inline-block;
  background: rgba(212, 175, 55, 0.2);
  color: #d4af37;
  padding: 10px 25px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
  font-weight: 500;
}

.back-btn:hover {
  background: rgba(212, 175, 55, 0.3);
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateX(-5px);
}

/* Spiral Gallery Section */
.spiral-gallery-section {
  padding: 80px 0;
  background: #0a0a0a;
  min-height: 100vh;
}

.spiral-gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Spiral Gallery Grid */
.spiral-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  position: relative;
}

/* Gallery Items with Spiral Animation */
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0.8) rotate(0deg);
  animation: spiralIn 0.8s ease-out forwards;
  background: #1a1a1a;
  border: 1px solid rgba(212, 175, 55, 0.1);
}

/* Spiral animation with staggered delay */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.15s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.25s; }
.gallery-item:nth-child(5) { animation-delay: 0.3s; }
.gallery-item:nth-child(6) { animation-delay: 0.35s; }
.gallery-item:nth-child(7) { animation-delay: 0.4s; }
.gallery-item:nth-child(8) { animation-delay: 0.45s; }
.gallery-item:nth-child(9) { animation-delay: 0.5s; }
.gallery-item:nth-child(10) { animation-delay: 0.55s; }
.gallery-item:nth-child(11) { animation-delay: 0.6s; }
.gallery-item:nth-child(12) { animation-delay: 0.65s; }

@keyframes spiralIn {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg) translateY(100px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg) translateY(0);
  }
}

.gallery-item:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
  border-color: rgba(212, 175, 55, 0.4);
  z-index: 10;
}

.gallery-item img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

/* Gallery Overlay */
.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 25px 20px 20px;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  color: #d4af37;
  font-size: 1.2rem;
  margin-bottom: 5px;
  font-weight: 600;
}

.gallery-overlay p {
  color: #b8b8b8;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

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

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

.lightbox img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(212, 175, 55, 0.3);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(212, 175, 55, 0.9);
  color: #0a0a0a;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: #f2c94c;
  transform: rotate(90deg);
}

/* Navigation Arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(212, 175, 55, 0.8);
  color: #0a0a0a;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10001;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: #f2c94c;
  transform: translateY(-50%) scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .gallery-hero {
    height: 35vh;
  }
  
  .gallery-hero h1 {
    font-size: 2rem;
  }
  
  .gallery-hero p {
    font-size: 0.95rem;
  }
  
  .spiral-gallery-section {
    padding: 50px 0;
  }
  
  .spiral-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .gallery-item img {
    height: 250px;
  }
  
  .gallery-overlay h3 {
    font-size: 1rem;
  }
  
  .gallery-overlay p {
    font-size: 0.8rem;
  }
  
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .gallery-hero h1 {
    font-size: 1.6rem;
  }
  
  .gallery-hero p {
    font-size: 0.85rem;
  }
  
  .spiral-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .gallery-item img {
    height: 280px;
  }
  
  .gallery-overlay {
    padding: 20px 15px 15px;
  }
  
  .back-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
}
