/* Animations */

/* Keyframe Animations */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleSlide {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineExpand {
    from {
        width: 0;
    }
    to {
        width: 100px;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    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 shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Animation Classes */
.hero {
    animation: heroFadeIn 2s ease-in-out;
}

.hero-content {
    animation: slideUp 1.5s ease-out 0.5s both;
}

.section-title {
    animation: titleSlide 1s ease-out;
}

.section-title::after {
    animation: lineExpand 1.5s ease-out 0.5s both;
}

.huaringas-card i {
    animation: bounceIn 1s ease;
}

.floating-whatsapp {
    animation: pulse 2s infinite;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--transition-medium);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.huaringas-card {
    transform: translateY(20px);
    opacity: 0;
    transition: all var(--transition-medium);
}

.huaringas-card.animate {
    transform: translateY(0);
    opacity: 1;
}

/* Shimmer Effect for Service Cards */
.servicio-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.servicio-card:hover::before {
    animation: shimmer 1.5s ease-in-out;
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--accent-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Hover Animations */
.card-hover-lift {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card-hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.scale-hover {
    transition: transform var(--transition-fast);
}

.scale-hover:hover {
    transform: scale(1.05);
}

/* Stagger Animation Delays */
.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; }
