/* Animaciones para la sección vCISO - Versión CSS estándar */

/* Animación para el título principal */
.animated-text {
    display: inline-block;
    overflow: hidden;
    position: relative;
}

.animated-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    animation-name: fadeInUp;
    animation-duration: 0.6s;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}

/* Definir retrasos para cada letra manualmente */
.animated-letter:nth-child(1) { animation-delay: 0.05s; }
.animated-letter:nth-child(2) { animation-delay: 0.1s; }
.animated-letter:nth-child(3) { animation-delay: 0.15s; }
.animated-letter:nth-child(4) { animation-delay: 0.2s; }
.animated-letter:nth-child(5) { animation-delay: 0.25s; }
.animated-letter:nth-child(6) { animation-delay: 0.3s; }
.animated-letter:nth-child(7) { animation-delay: 0.35s; }
.animated-letter:nth-child(8) { animation-delay: 0.4s; }
.animated-letter:nth-child(9) { animation-delay: 0.45s; }
.animated-letter:nth-child(10) { animation-delay: 0.5s; }
.animated-letter:nth-child(11) { animation-delay: 0.55s; }
.animated-letter:nth-child(12) { animation-delay: 0.6s; }
.animated-letter:nth-child(13) { animation-delay: 0.65s; }
.animated-letter:nth-child(14) { animation-delay: 0.7s; }
.animated-letter:nth-child(15) { animation-delay: 0.75s; }
.animated-letter:nth-child(16) { animation-delay: 0.8s; }
.animated-letter:nth-child(17) { animation-delay: 0.85s; }
.animated-letter:nth-child(18) { animation-delay: 0.9s; }
.animated-letter:nth-child(19) { animation-delay: 0.95s; }
.animated-letter:nth-child(20) { animation-delay: 1s; }
.animated-letter:nth-child(21) { animation-delay: 1.05s; }
.animated-letter:nth-child(22) { animation-delay: 1.1s; }
.animated-letter:nth-child(23) { animation-delay: 1.15s; }
.animated-letter:nth-child(24) { animation-delay: 1.2s; }
.animated-letter:nth-child(25) { animation-delay: 1.25s; }
.animated-letter:nth-child(26) { animation-delay: 1.3s; }
.animated-letter:nth-child(27) { animation-delay: 1.35s; }
.animated-letter:nth-child(28) { animation-delay: 1.4s; }
.animated-letter:nth-child(29) { animation-delay: 1.45s; }
.animated-letter:nth-child(30) { animation-delay: 1.5s; }
.animated-letter:nth-child(31) { animation-delay: 1.55s; }
.animated-letter:nth-child(32) { animation-delay: 1.6s; }
.animated-letter:nth-child(33) { animation-delay: 1.65s; }
.animated-letter:nth-child(34) { animation-delay: 1.7s; }
.animated-letter:nth-child(35) { animation-delay: 1.75s; }
.animated-letter:nth-child(36) { animation-delay: 1.8s; }

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto de texto brillante */
.animated-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shineEffect 3s infinite;
}

@keyframes shineEffect {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* Animación para los elementos de la página */
.fade-in-elements {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-elements.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Asegurar que los elementos aparezcan en secuencia */
.animate-element:nth-child(1) { transition-delay: 0.1s; }
.animate-element:nth-child(2) { transition-delay: 0.2s; }
.animate-element:nth-child(3) { transition-delay: 0.3s; }
.animate-element:nth-child(4) { transition-delay: 0.4s; }

/* Animación para las tarjetas de beneficios */
.benefit-card {
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 157, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.benefit-card:hover::before {
    left: 100%;
    transition: left 1s ease;
}

.benefit-icon {
    transition: all 0.5s ease;
}

.benefit-card:hover .benefit-icon {
    transform: rotateY(360deg);
}

/* Animación para las estadísticas */
.stat-number {
    display: inline-block;
    position: relative;
}

.stat-number.counting {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Animación para el botón CTA */
.vciso-cta .btn {
    position: relative;
    overflow: hidden;
}

.vciso-cta .btn::after {
    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 ease;
}

.vciso-cta .btn:hover::after {
    left: 100%;
    transition: left 1s ease;
}

/* Pulso constante para el badge */
.vciso-badge {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% { transform: scale(1); box-shadow: 0 5px 15px rgba(237, 38, 122, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 5px 20px rgba(237, 38, 122, 0.5); }
    100% { transform: scale(1); box-shadow: 0 5px 15px rgba(237, 38, 122, 0.3); }
}
/* Añadir a vciso-animations.css:
/*
/* Optimizaciones CSS para rendimiento */
.reduce-animations * {
    animation-duration: 0.5s !important;
    transition-duration: 0.5s !important;
}

.reduce-animations .animated-letter {
    animation-delay: 0s !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Utilizar propiedades que no causan reflow */
.fade-in-elements,
.animate-element {
    opacity: 0;
    transform: translateY(30px);
    will-change: opacity, transform;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-elements.visible,
.animate-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Optimización para efecto de estadísticas */
.stat-number {
    transform: translateY(0);
    transition: color 0.3s ease;
}

.stat-number.animation-complete {
    color: var(--color-blue);
}

