/* Animaciones personalizadas */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 13, 101, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 13, 101, 0.8);
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: var(--primary);
    }
}

/* Clases de animación */
.float {
    animation: float 3s ease-in-out infinite;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

.slide-in-left {
    animation: slideInFromLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInFromRight 0.8s ease-out;
}

.slide-in-bottom {
    animation: slideInFromBottom 0.8s ease-out;
}

.fade-in-scale {
    animation: fadeInScale 0.6s ease-out;
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary);
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Efectos de hover */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-glow {
    transition: var(--transition);
}

.hover-glow:hover {
    box-shadow: var(--shadow-lg);
}

/* Animaciones de scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Animaciones para elementos específicos */
.qr-square:nth-child(4n) {
    animation-delay: 0.1s;
}

.qr-square:nth-child(4n+1) {
    animation-delay: 0.2s;
}

.qr-square:nth-child(4n+2) {
    animation-delay: 0.3s;
}

.qr-square:nth-child(4n+3) {
    animation-delay: 0.4s;
}

/* Efectos de partículas */
.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

/* Animaciones de carga */
.loading-bar {
    width: 100%;
    height: 4px;
    background: var(--surface-dark);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: var(--gradient);
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        left: -30%;
    }

    100% {
        left: 100%;
    }
}

/* Animaciones para estadísticas */
.count-up {
    animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}