/* ============================================
   CONCALAB-UASD - Animaciones y Efectos
   ============================================ */

/* Scroll Reveal - Elementos ocultos inicialmente */
.reveal:not(.no-animation) {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active,
.reveal.no-animation {
    opacity: 1;
    transform: translateY(0);
}

/* Variaciones de reveal */
.reveal-left:not(.no-animation) {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.active,
.reveal-left.no-animation {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right:not(.no-animation) {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.active,
.reveal-right.no-animation {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale:not(.no-animation) {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scale.active,
.reveal-scale.no-animation {
    opacity: 1;
    transform: scale(1);
}

/* Delays para efectos escalonados */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Animación de entrada para el hero */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-down {
    animation: fadeInDown 1s ease;
}

/* Animación de pulse para CTAs */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(253, 185, 19, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(253, 185, 19, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(253, 185, 19, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Hover effects para cards */
.card-hover {
    position: relative;
    overflow: hidden;
}

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

.card-hover:hover::before {
    left: 100%;
}

/* Animación de typing para textos */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.typing-effect {
    overflow: hidden;
    border-right: 3px solid var(--secondary-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40) 1s 1 normal both,
               blink 0.75s step-end infinite;
}

/* Loading animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 50%,
        #f0f0f0 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Bounce effect */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 2s infinite;
}

/* Float effect */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Gradient animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradient 5s ease infinite;
}

/* Rotate effect */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 2s linear infinite;
}

/* Shake effect */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}

/* Fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s ease;
}

/* Slide in from bottom */
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-up {
    animation: slideInUp 0.8s ease;
}

/* Zoom in */
@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.zoom-in {
    animation: zoomIn 0.6s ease;
}

/* Progress bar animation */
@keyframes progress {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.progress-bar {
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    animation: progress 2s ease;
}

/* Counter animation - Para números que cuentan */
.counter {
    transition: all 1s ease;
}

/* Ripple effect para botones */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Glow effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color),
                    0 0 10px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color),
                    0 0 30px var(--primary-color);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Underline animation */
.underline-animate {
    position: relative;
    display: inline-block;
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.underline-animate:hover::after {
    width: 100%;
}

/* Scroll indicator */
@keyframes scroll-indicator {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(15px);
        opacity: 0;
    }
}

.scroll-indicator {
    animation: scroll-indicator 1.5s infinite;
}

/* Background pan effect */
@keyframes backgroundPan {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: -200% center;
    }
}

.background-pan {
    animation: backgroundPan 10s linear infinite;
}

/* Texto que aparece letra por letra */
.text-reveal span {
    opacity: 0;
    animation: fadeInLetter 0.5s forwards;
}

@keyframes fadeInLetter {
    to {
        opacity: 1;
    }
}

/* Clases de timing para animaciones escalonadas */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Smooth transitions globales */
.smooth-transition {
    transition: all 0.3s ease;
}

/* Hover lift effect */
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Rotate on hover */
.hover-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

