/* =============================================
   ANIMACIONES AVANZADAS
   ============================================= */

/* Smooth transitions para todo */
* {
  will-change: auto;
}

/* Reveal Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Parallax elements */
[data-parallax] {
  will-change: transform;
}

/* Tilt effect on cards */
[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 0.3s ease-out;
}

[data-tilt]:hover {
  transform: perspective(1000px) scale3d(1.02, 1.02, 1.02);
}

/* Magnetic buttons */
[data-magnetic] {
  transition: transform 0.2s ease-out;
  position: relative;
}

[data-magnetic]:hover {
  transform: scale(1.05);
}

/* Scale on scroll */
[data-scale-scroll] {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* Fade scroll */
[data-fade-scroll] {
  transition: opacity 0.3s ease-out;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px var(--primary);
}

/* Video cards enhanced */
.video-card {
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.video-card:hover {
  z-index: 10;
}

/* Stagger delay for múltiple elements */
.video-card:nth-child(1) { animation-delay: 0ms; }
.video-card:nth-child(2) { animation-delay: 100ms; }
.video-card:nth-child(3) { animation-delay: 200ms; }
.video-card:nth-child(4) { animation-delay: 300ms; }
.video-card:nth-child(5) { animation-delay: 400ms; }
.video-card:nth-child(6) { animation-delay: 500ms; }

/* Concert items stagger */
.concert-item {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.concert-item:nth-child(1) { animation-delay: 0ms; }
.concert-item:nth-child(2) { animation-delay: 150ms; }
.concert-item:nth-child(3) { animation-delay: 300ms; }
.concert-item:nth-child(4) { animation-delay: 450ms; }

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section animations */
.section-header {
  transform-origin: center;
}

.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-header.revealed .section-title::after {
  width: 100%;
}

/* Hover effects mejorados */
.video-link,
.social-link,
.ticket-link {
  position: relative;
  overflow: hidden;
}

.video-link::before,
.social-link::before,
.ticket-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out;
}

.video-link:hover::before,
.social-link:hover::before,
.ticket-link:hover::before {
  width: 300px;
  height: 300px;
}

/* Carousel arrows mejoradas */
.carousel-arrow {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.carousel-arrow:hover {
  background: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.carousel-arrow:active {
  transform: scale(0.95);
}

/* Smooth scroll behavior mejorado */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  [data-parallax],
  [data-tilt],
  [data-magnetic] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Loading shimmer effect */
.loading-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Glowing effect en hover */
.video-card:hover {
  box-shadow:
    0 0 20px rgba(0, 212, 255, 0.2),
    0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Text reveal animation */
.text-reveal {
  clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
  animation: textReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes textReveal {
  to {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

/* Pulse animation para elementos importantes */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Gradient animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

/* Bounce effect */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.bounce {
  animation: bounce 2s ease infinite;
}

/* Float animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* Rotate subtle */
@keyframes rotateSubtle {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.rotate-subtle {
  animation: rotateSubtle 20s linear infinite;
}

/* GPU Acceleration */
.gpu-accelerated {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}
