/**
 * Animaciones Avanzadas y Efectos Especiales
 * Para llevar la innovación y profesionalismo al máximo nivel
 */

/* Efecto de Magnetic Hover para Botones */
.btn-magnetic {
  position: relative;
  transition: transform 0.3s ease;
}

.btn-magnetic:hover {
  transform: scale(1.05);
}

/* Efecto de Cursor Personalizado en Elementos Interactivos */
.interactive-element {
  cursor: pointer;
  position: relative;
}

.interactive-element::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.interactive-element:hover::after {
  width: 40px;
  height: 40px;
  opacity: 0.3;
}

/* Efecto de Ripple en Click */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(240, 185, 11, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple-effect:active::before {
  width: 300px;
  height: 300px;
}

/* Animación de Líneas en Paralelo */
@keyframes parallelLines {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.parallel-lines::before,
.parallel-lines::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-primary),
    transparent
  );
  animation: parallelLines 3s linear infinite;
}

.parallel-lines::before {
  top: 20%;
  animation-delay: 0s;
}

.parallel-lines::after {
  bottom: 20%;
  animation-delay: 1.5s;
}

/* Efecto de Neon Border */
.neon-border {
  border: 2px solid var(--color-primary);
  box-shadow: 
    0 0 10px var(--color-primary-glow),
    0 0 20px var(--color-primary-glow),
    inset 0 0 10px var(--color-primary-glow);
  animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 
      0 0 10px var(--color-primary-glow),
      0 0 20px var(--color-primary-glow),
      inset 0 0 10px var(--color-primary-glow);
  }
  50% {
    box-shadow: 
      0 0 20px var(--color-primary-glow),
      0 0 40px var(--color-primary-glow),
      0 0 60px var(--color-primary-glow),
      inset 0 0 20px var(--color-primary-glow);
  }
}

/* Efecto de Holograma */
.hologram-effect {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(240, 185, 11, 0.05) 0%,
    transparent 50%,
    rgba(240, 185, 11, 0.05) 100%
  );
  border-top: 1px solid rgba(240, 185, 11, 0.3);
}

.hologram-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(240, 185, 11, 0.03) 0px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

/* Efecto de Glitch */
.glitch-effect {
  position: relative;
}

.glitch-effect::before,
.glitch-effect::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-effect::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-effect::after {
  left: -2px;
  text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
  animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% {
    clip: rect(31px, 9999px, 94px, 0);
    transform: skew(0.5deg);
  }
  5% {
    clip: rect(86px, 9999px, 77px, 0);
    transform: skew(0.8deg);
  }
  10% {
    clip: rect(96px, 9999px, 13px, 0);
    transform: skew(0.3deg);
  }
  15% {
    clip: rect(5px, 9999px, 87px, 0);
    transform: skew(0.4deg);
  }
  20% {
    clip: rect(42px, 9999px, 64px, 0);
    transform: skew(0.7deg);
  }
  25% {
    clip: rect(54px, 9999px, 13px, 0);
    transform: skew(0.2deg);
  }
  30% {
    clip: rect(73px, 9999px, 35px, 0);
    transform: skew(0.4deg);
  }
  35% {
    clip: rect(12px, 9999px, 99px, 0);
    transform: skew(0.8deg);
  }
  40% {
    clip: rect(66px, 9999px, 37px, 0);
    transform: skew(0.5deg);
  }
  45% {
    clip: rect(88px, 9999px, 7px, 0);
    transform: skew(0.9deg);
  }
  50% {
    clip: rect(19px, 9999px, 68px, 0);
    transform: skew(0.3deg);
  }
  55% {
    clip: rect(93px, 9999px, 17px, 0);
    transform: skew(0.6deg);
  }
  60% {
    clip: rect(8px, 9999px, 91px, 0);
    transform: skew(0.4deg);
  }
  65% {
    clip: rect(84px, 9999px, 31px, 0);
    transform: skew(0.7deg);
  }
  70% {
    clip: rect(41px, 9999px, 53px, 0);
    transform: skew(0.8deg);
  }
  75% {
    clip: rect(57px, 9999px, 11px, 0);
    transform: skew(0.3deg);
  }
  80% {
    clip: rect(3px, 9999px, 89px, 0);
    transform: skew(0.5deg);
  }
  85% {
    clip: rect(91px, 9999px, 19px, 0);
    transform: skew(0.6deg);
  }
  90% {
    clip: rect(34px, 9999px, 72px, 0);
    transform: skew(0.9deg);
  }
  95% {
    clip: rect(78px, 9999px, 5px, 0);
    transform: skew(0.4deg);
  }
  100% {
    clip: rect(16px, 9999px, 61px, 0);
    transform: skew(0.7deg);
  }
}

@keyframes glitch-anim2 {
  0% {
    clip: rect(65px, 9999px, 100px, 0);
    transform: skew(0.3deg);
  }
  5% {
    clip: rect(14px, 9999px, 33px, 0);
    transform: skew(0.5deg);
  }
  10% {
    clip: rect(71px, 9999px, 1px, 0);
    transform: skew(0.6deg);
  }
  15% {
    clip: rect(28px, 9999px, 92px, 0);
    transform: skew(0.4deg);
  }
  20% {
    clip: rect(55px, 9999px, 25px, 0);
    transform: skew(0.8deg);
  }
  25% {
    clip: rect(89px, 9999px, 3px, 0);
    transform: skew(0.3deg);
  }
  30% {
    clip: rect(46px, 9999px, 77px, 0);
    transform: skew(0.7deg);
  }
  35% {
    clip: rect(12px, 9999px, 31px, 0);
    transform: skew(0.5deg);
  }
  40% {
    clip: rect(83px, 9999px, 9px, 0);
    transform: skew(0.6deg);
  }
  45% {
    clip: rect(21px, 9999px, 69px, 0);
    transform: skew(0.4deg);
  }
  50% {
    clip: rect(67px, 9999px, 47px, 0);
    transform: skew(0.8deg);
  }
  55% {
    clip: rect(39px, 9999px, 13px, 0);
    transform: skew(0.7deg);
  }
  60% {
    clip: rect(4px, 9999px, 88px, 0);
    transform: skew(0.3deg);
  }
  65% {
    clip: rect(94px, 9999px, 22px, 0);
    transform: skew(0.5deg);
  }
  70% {
    clip: rect(58px, 9999px, 6px, 0);
    transform: skew(0.6deg);
  }
  75% {
    clip: rect(27px, 9999px, 81px, 0);
    transform: skew(0.9deg);
  }
  80% {
    clip: rect(9px, 9999px, 35px, 0);
    transform: skew(0.4deg);
  }
  85% {
    clip: rect(72px, 9999px, 51px, 0);
    transform: skew(0.7deg);
  }
  90% {
    clip: rect(19px, 9999px, 15px, 0);
    transform: skew(0.3deg);
  }
  95% {
    clip: rect(87px, 9999px, 42px, 0);
    transform: skew(0.5deg);
  }
  100% {
    clip: rect(6px, 9999px, 95px, 0);
    transform: skew(0.6deg);
  }
}

/* Efecto de Escaneo (Scanline) */
.scanline-effect {
  position: relative;
  overflow: hidden;
}

.scanline-effect::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--color-primary),
    transparent
  );
  animation: scanline 3s linear infinite;
  box-shadow: 0 0 10px var(--color-primary);
}

@keyframes scanline {
  0% {
    top: -100%;
  }
  100% {
    top: 100%;
  }
}

/* Efecto de Partículas en Trailing */
.particle-trail {
  position: relative;
}

.particle-trail::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--color-primary);
  animation: particleFloat 3s ease-in-out infinite;
  opacity: 0;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-30px) translateX(10px);
    opacity: 0;
  }
}

/* Efecto de Blur al Desplazarse */
.blur-scroll {
  transition: filter 0.3s ease;
}

.blur-scroll.blurred {
  filter: blur(5px);
  pointer-events: none;
}

/* Efecto de Gradiente Animado en Texto */
.animated-gradient-text {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-light) 50%,
    var(--color-primary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s linear infinite;
}

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

/* Efecto de Morfismo Liquido */
.liquid-morph {
  position: relative;
  border-radius: 50px;
}

.liquid-morph::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    var(--color-primary),
    var(--color-primary-light),
    var(--color-primary)
  );
  border-radius: 50px;
  z-index: -1;
  animation: morph 4s ease-in-out infinite;
  filter: blur(10px);
}

@keyframes morph {
  0%, 100% {
    border-radius: 50% 40% 60% 30%;
  }
  25% {
    border-radius: 30% 50% 40% 60%;
  }
  50% {
    border-radius: 60% 30% 50% 40%;
  }
  75% {
    border-radius: 40% 60% 30% 50%;
  }
}

/* Efecto de Cursor Magnético Avanzado */
.magnetic-container {
  position: relative;
}

.magnetic-item {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Clase para elementos que siguen el cursor */
.track-mouse {
  position: relative;
}

/* Efecto de Parallax Suave */
.parallax-element {
  transition: transform 0.1s ease-out;
}

/* Efecto de Flip Card */
.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* Efecto de Loading Skeleton Avanzado */
.skeleton-advanced {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    rgba(240, 185, 11, 0.1) 50%,
    var(--bg-card) 100%
  );
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

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

/* Efecto de Tilt 3D */
.tilt-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

/* Efecto de Micro-interacciones */
.micro-interaction {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.micro-interaction:active {
  transform: scale(0.98);
}

