@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ANIMACIONES BASE */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-50px, 0, 0) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(50px, 0, 0) rotate(5deg);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate3d(0, 50px, 0) skewY(2deg);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) skewY(0);
  }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale3d(0.8, 0.8, 0.8) translateZ(-100px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1) translateZ(0);
    filter: blur(0);
  }
}

@keyframes flipX {
  from {
    opacity: 0;
    transform: perspective(1000px) rotateX(90deg);
  }
  to {
    opacity: 1;
    transform: perspective(1000px) rotateX(0);
  }
}

@keyframes flipY {
  from {
    opacity: 0;
    transform: perspective(1000px) rotateY(90deg);
  }
  to {
    opacity: 1;
    transform: perspective(1000px) rotateY(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale3d(0.5, 0.5, 0.5);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale3d(0.5, 0.5, 0.5);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale3d(1, 1, 1);
  }
}

/* Animación bounceIn corregida */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateZ(100px);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) translateZ(100px);
  }
  75% {
    transform: scale(0.9) translateZ(100px);
  }
  100% {
    transform: scale(1) translateZ(100px);
    opacity: 1; /* Mantener opacidad al final */
  }
}

/* Asegurar que no se superpone con otros elementos */
[data-animate].animate-active + .whatsapp-float {
  z-index: 10001;
}

/* ESTILOS DE ANIMACIÓN */
[data-animate] {
  opacity: 0;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  perspective: 1000px;
  will-change: transform, opacity;
}

/* ANIMACIONES ACTIVAS */
[data-animate].animate-active {
  animation-fill-mode: forwards !important;
}

[data-animate="fadeInLeft"].animate-active {
  animation: fadeInLeft 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

[data-animate="fadeInRight"].animate-active {
  animation: fadeInRight 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

[data-animate="slideUp"].animate-active {
  animation: slideUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

[data-animate="scaleUp"].animate-active {
  animation: scaleUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

[data-animate="flipX"].animate-active {
  animation: flipX 0.8s cubic-bezier(0.455, 0.03, 0.515, 0.955) forwards;
}

[data-animate="flipY"].animate-active {
  animation: flipY 0.8s cubic-bezier(0.455, 0.03, 0.515, 0.955) forwards;
}

[data-animate="zoomIn"].animate-active {
  animation: zoomIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

[data-animate="rotateIn"].animate-active {
  animation: rotateIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

[data-animate="bounceIn"].animate-active {
  animation: bounceIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* EFECTOS PARALLAX */
[data-depth] {
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  transform: translate3d(0, 0, 0);
}

/* CONTENEDORES Y SECCIONES */
.container {
  isolation: isolate;
  transform: translateZ(0);
}

section {
  transform-style: preserve-3d;
  backface-visibility: hidden;
  overflow: hidden;
}

/* Animaciones adicionales */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -50px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 50px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translate3d(0, -100px, 0) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Añade estas reglas para las nuevas animaciones */
[data-animate="fadeInDown"].animate-active {
  animation: fadeInDown 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

[data-animate="fadeInUp"].animate-active {
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

[data-animate="slideDown"].animate-active {
  animation: slideDown 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dotPop {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}
