/* Galería Moderna - Diseño Armónico y Elegante */

#gallery {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

#gallery::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

#gallery .section-title {
  position: relative;
  z-index: 2;
  padding-bottom: 2rem;
  margin-bottom: 3rem;
  text-align: center;
}

#gallery .section-title h2 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: #1e293b;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

#gallery .gallery-description {
  max-width: 800px;
  margin: 0 auto;
  color: #475569;
  line-height: 1.7;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

#gallery .swiper {
  position: relative;
  z-index: 2;
  padding-bottom: 3rem;
}

#gallery .swiper-wrapper {
  align-items: center;
}

#gallery .swiper-slide {
  transition: all 0.4s ease;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.95);
  position: relative;
  cursor: pointer;
}

#gallery .swiper-slide img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: all 0.4s ease;
  filter: brightness(0.98) contrast(1.02) saturate(1.05);
  display: block;
  border-radius: 15px;
}

#gallery .swiper-slide a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 15px;
}

#gallery .swiper-slide a::after {
  content: "\f00e";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  color: rgba(255, 255, 255, 0.9);
  font-size: 2rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

#gallery .swiper-slide a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(99, 102, 241, 0.1) 0%,
    rgba(168, 85, 247, 0.1) 50%,
    rgba(59, 130, 246, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  border-radius: 15px;
}

#gallery .swiper-pagination {
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

#gallery .swiper-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.3);
  opacity: 1;
  transition: all 0.3s ease;
  margin: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

#gallery .swiper-pagination .swiper-pagination-bullet-active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

#gallery .swiper-slide:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

#gallery .swiper-slide:hover img {
  transform: scale(1.05);
  filter: brightness(1.05) contrast(1.05) saturate(1.1);
}

#gallery .swiper-slide:hover a::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

#gallery .swiper-slide:hover a::before {
  opacity: 1;
}

@media (min-width: 768px) {
  #gallery .swiper-wrapper {
    padding: 30px 0;
  }

  #gallery .swiper-slide-active {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
  }
}

@media (min-width: 1200px) {
  #gallery .swiper-slide-active {
    transform: scale(1.03);
  }
}

/* Animaciones de entrada sutiles */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

#gallery .swiper-slide {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

#gallery .swiper-slide:nth-child(1) { animation-delay: 0.1s; }
#gallery .swiper-slide:nth-child(2) { animation-delay: 0.2s; }
#gallery .swiper-slide:nth-child(3) { animation-delay: 0.3s; }
#gallery .swiper-slide:nth-child(4) { animation-delay: 0.4s; }
#gallery .swiper-slide:nth-child(5) { animation-delay: 0.5s; }
#gallery .swiper-slide:nth-child(6) { animation-delay: 0.6s; }
#gallery .swiper-slide:nth-child(7) { animation-delay: 0.7s; }
#gallery .swiper-slide:nth-child(8) { animation-delay: 0.8s; }
#gallery .swiper-slide:nth-child(9) { animation-delay: 0.9s; }
#gallery .swiper-slide:nth-child(10) { animation-delay: 1.0s; }
#gallery .swiper-slide:nth-child(11) { animation-delay: 1.1s; }
#gallery .swiper-slide:nth-child(12) { animation-delay: 1.2s; }
#gallery .swiper-slide:nth-child(13) { animation-delay: 1.3s; }

/* Responsive adjustments */
@media (max-width: 767px) {
  #gallery {
    padding: 3rem 0 4rem;
  }

  #gallery .section-title h2 {
    font-size: 1.9rem;
  }

  #gallery .swiper-slide img {
    height: 200px;
  }
}

@media (max-width: 480px) {
  #gallery .swiper-slide img {
    height: 160px;
  }

  #gallery .section-title h2 {
    font-size: 1.7rem;
  }
}