/* Animaciones y efectos para hacer la página más dinámica */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación para títulos con efecto de escritura */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #ec4899 }
}

/* Animación para botones */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(147, 51, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0);
    }
}

/* Animación para el fondo */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animación para iconos */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Clases para aplicar las animaciones */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid;
    width: 0;
    animation: 
        typing 3.5s steps(40, end) forwards,
        blink-caret .75s step-end infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-gradient {
    background: linear-gradient(-45deg, #1e293b, #374151, #1f2937, #111827);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Efectos de hover mejorados */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Efecto zoom para tarjetas */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
}

.card-hover:hover {
    transform: scale(1.08) translateY(-8px);
    box-shadow: 0 20px 40px rgba(147, 51, 234, 0.3);
}

/* Efecto zoom para botones */
.button-zoom {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.button-zoom:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.4);
}

.button-zoom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.button-zoom:hover::before {
    left: 100%;
}

/* Efecto zoom para estadísticas */
.stats-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.stats-hover:hover {
    transform: scale(1.1);
    background: rgba(147, 51, 234, 0.1);
    border-color: rgba(147, 51, 234, 0.3);
}

/* Efecto zoom para imágenes */
.image-zoom {
    transition: transform 0.5s ease;
    overflow: hidden;
}

.image-zoom:hover {
    transform: scale(1.15);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.7);
}

/* Efecto de parallax para imágenes */
.parallax {
    transition: transform 0.2s ease-out;
}

.card-3d {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Animación para el carrusel de testimonios infinito mejorado */
@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.333%);
    }
}

.animate-scroll-infinite {
    animation: scroll-infinite 60s linear infinite;
    will-change: transform;
}

.animate-scroll-infinite:hover {
    animation-play-state: paused;
}

/* Animación de entrada suave para testimonios */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-slide {
    animation: fadeInSlide 0.6s ease-out forwards;
}

/* Animación de entrada desde abajo */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

/* Animaciones para partículas de fondo */
@keyframes float-particles {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

@keyframes drift {
    0% {
        transform: translateX(0px);
    }
    100% {
        transform: translateX(100px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Clases para partículas */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float-particles 6s ease-in-out infinite;
}

.particle-1 {
    width: 4px;
    height: 4px;
    background: rgba(147, 51, 234, 0.6);
    animation-duration: 8s;
}

.particle-2 {
    width: 6px;
    height: 6px;
    background: rgba(236, 72, 153, 0.5);
    animation-duration: 10s;
    animation-delay: -2s;
}

.particle-3 {
    width: 3px;
    height: 3px;
    background: rgba(59, 130, 246, 0.4);
    animation-duration: 12s;
    animation-delay: -4s;
}

.particle-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* Fondo de partículas */
#particles-background {
    background: radial-gradient(ellipse at center, rgba(147, 51, 234, 0.1) 0%, transparent 70%);
    overflow: hidden;
}

/* Efecto de ondas en el fondo */
@keyframes wave {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.wave-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(147, 51, 234, 0.05), transparent);
    animation: wave 8s linear infinite;
}