/* ================================================================
   SCALING ANIMATIONS (v1.0)
   Animaciones CSS optimizadas para funcionar con el sistema de escalado
   ================================================================ */

/* 1. ANIMACIONES BASE - Preservadas durante escalado */
.desktop-scaling-active .fade-in {
    animation: fadeIn 0.6s ease-out forwards !important;
}

.desktop-scaling-active .fade-out {
    animation: fadeOut 0.4s ease-in forwards !important;
}

.desktop-scaling-active .slide-in-left {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.desktop-scaling-active .slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.desktop-scaling-active .slide-in-up {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.desktop-scaling-active .slide-in-down {
    animation: slideInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.desktop-scaling-active .zoom-in {
    animation: zoomIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.desktop-scaling-active .bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards !important;
}

/* 2. ANIMACIONES ESPECÍFICAS DEL HERO */
.desktop-scaling-active .hero-animate {
    animation: heroTextReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* 3. ANIMACIONES DE INDUSTRIAS */
.desktop-scaling-active .industry-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.desktop-scaling-active .industry-btn:hover {
    /* Mantener colores originales - gris */
    background: #adadac !important;
    border-color: #adadac !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(173, 173, 172, 0.3) !important;
}

.desktop-scaling-active .industry-btn.active {
    /* Mantener colores originales - negro */
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: white !important;
    transform: scale(1.05) !important;
}

.desktop-scaling-active .industry-image {
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}

.desktop-scaling-active .industry-image.active {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.desktop-scaling-active .industry-image:not(.active) {
    opacity: 0 !important;
    transform: scale(0.95) !important;
}

.desktop-scaling-active .description-box {
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.desktop-scaling-active .description-box.active {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

.desktop-scaling-active .description-box:not(.active) {
    opacity: 0 !important;
    transform: translateX(20px) !important;
}

/* 4. ANIMACIONES DE ESTADÍSTICAS */
.desktop-scaling-active .stat-number {
    animation: countUp 2s ease-out forwards !important;
}

.desktop-scaling-active .stats-bar {
    animation: slideInFromBottom 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* 5. ANIMACIONES DE VALORES */
.desktop-scaling-active .value-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.desktop-scaling-active .value-card:hover {
    background: rgba(30, 30, 30, 0.7) !important;
    transform: translateX(-10px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

.desktop-scaling-active .value-card.active {
    background: rgba(40, 40, 40, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transform: translateX(-15px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
}

.desktop-scaling-active .values-intro-box {
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.desktop-scaling-active .values-intro-box.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* 6. ANIMACIONES DE BOTONES */
.desktop-scaling-active .btn-secondary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.desktop-scaling-active .btn-secondary:hover {
    background: #e6661a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(249, 117, 28, 0.4) !important;
}

.desktop-scaling-active .btn-secondary:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 15px rgba(249, 117, 28, 0.3) !important;
}

/* 7. ANIMACIONES DE MODALES */
.desktop-scaling-active .modal-overlay {
    animation: modalFadeIn 0.3s ease-out forwards !important;
}

.desktop-scaling-active .modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* 8. ANIMACIONES DE NAVEGACIÓN */
.desktop-scaling-active .mobile-nav-overlay {
    transition: opacity 0.3s ease !important;
}

.desktop-scaling-active .mobile-nav-content {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 9. ANIMACIONES DE SCROLL */
.desktop-scaling-active .scroll-animate {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.desktop-scaling-active .scroll-animate.in-view {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* 10. KEYFRAMES - Definiciones de animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes heroTextReveal {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-10px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 11. ANIMACIONES ESPECÍFICAS PARA FADE-OUT/IN DE BOTONES */
.desktop-scaling-active .fade-out-down {
    animation: fadeOutDown 0.5s ease-in forwards !important;
}

.desktop-scaling-active .fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards !important;
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 12. ANIMACIONES DE LOADING Y SPINNERS */
.desktop-scaling-active .loading-spinner {
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 13. ANIMACIONES DE GLASSMORPHISM */
.desktop-scaling-active .glassmorphism-element {
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    transition: backdrop-filter 0.3s ease !important;
}

.desktop-scaling-active .glassmorphism-element:hover {
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
}

/* 14. PRESERVAR ANIMACIONES EN VIDEOS */
.desktop-scaling-active video {
    transition: filter 0.3s ease !important;
}

.desktop-scaling-active video:hover {
    filter: brightness(1.1) !important;
}

/* 15. ANIMACIONES RESPONSIVAS - Solo en escalado activo */
@media (min-width: 1024px) {
    .desktop-scaling-active .responsive-animation {
        animation-play-state: running !important;
        transition-property: all !important;
    }
}

/* 16. PERFORMANCE OPTIMIZATIONS */
.desktop-scaling-active * {
    will-change: auto !important;
}

.desktop-scaling-active .animating {
    will-change: transform, opacity !important;
}

.desktop-scaling-active .animating.animation-complete {
    will-change: auto !important;
}