/**
 * ICX Implantes - Animaciones CSS
 * Animaciones para el tema WordPress
 */

/* =====================================================
   ANIMACIONES DE ENTRADA
   ===================================================== */

/* Fade In */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out forwards;
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out forwards;
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

/* =====================================================
   ANIMACIONES CONTINUAS
   ===================================================== */

/* Pulse */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* Float */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Spin Slow */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 60s linear infinite;
}

/* Spin Reverse */
@keyframes spin-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.animate-spin-reverse {
    animation: spin-reverse 45s linear infinite;
}

/* Scale X (para subrayados) */
@keyframes scaleX {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.animate-scale-x {
    animation: scaleX 0.6s ease-out 0.8s forwards;
    transform-origin: left;
}

/* Draw Line (para líneas SVG) */
@keyframes drawLine {
    from {
        stroke-dashoffset: 100;
        opacity: 0;
    }
    to {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.animate-draw-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawLine 1s ease-out forwards;
}

/* =====================================================
   ANIMACIONES DE SCROLL
   ===================================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Variantes de dirección */
.animate-on-scroll.from-left {
    transform: translateX(-30px);
}

.animate-on-scroll.from-left.is-visible {
    transform: translateX(0);
}

.animate-on-scroll.from-right {
    transform: translateX(30px);
}

.animate-on-scroll.from-right.is-visible {
    transform: translateX(0);
}

.animate-on-scroll.scale {
    transform: scale(0.9);
}

.animate-on-scroll.scale.is-visible {
    transform: scale(1);
}

/* =====================================================
   DELAYS
   ===================================================== */

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-1000 { animation-delay: 1s; }
.delay-1200 { animation-delay: 1.2s; }

/* Transition delays para scroll */
.animate-on-scroll.delay-100 { transition-delay: 0.1s; }
.animate-on-scroll.delay-200 { transition-delay: 0.2s; }
.animate-on-scroll.delay-300 { transition-delay: 0.3s; }
.animate-on-scroll.delay-400 { transition-delay: 0.4s; }
.animate-on-scroll.delay-500 { transition-delay: 0.5s; }

/* =====================================================
   HEADER SCROLL EFFECT
   ===================================================== */

.site-header {
    transition: background-color 0.4s var(--ease-out-expo), 
                backdrop-filter 0.4s var(--ease-out-expo),
                box-shadow 0.4s var(--ease-out-expo);
}

.site-header.header-scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* =====================================================
   PREFERS REDUCED MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
    
    .animate-fade-in-up {
        opacity: 1;
        animation: none;
    }
}
