/* ===== ANIMATIONS ===== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

/* Scale Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleInUp {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Slide Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

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

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

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

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--accent-color);
    }
}

/* Loading Animation */
@keyframes loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Hover Effects */
.hover-lift {
    transition: var(--transition);
}

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

.hover-scale {
    transition: var(--transition);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: var(--transition);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    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;
}

.btn:hover::before {
    left: 100%;
}

/* Text Animations */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.text-reveal span:nth-child(1) { animation-delay: 0.1s; }
.text-reveal span:nth-child(2) { animation-delay: 0.2s; }
.text-reveal span:nth-child(3) { animation-delay: 0.3s; }
.text-reveal span:nth-child(4) { animation-delay: 0.4s; }
.text-reveal span:nth-child(5) { animation-delay: 0.5s; }

/* Card Animations */
.card-stagger {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.card-stagger:nth-child(1) { animation-delay: 0.1s; }
.card-stagger:nth-child(2) { animation-delay: 0.2s; }
.card-stagger:nth-child(3) { animation-delay: 0.3s; }
.card-stagger:nth-child(4) { animation-delay: 0.4s; }

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

/* Scroll Animations */
.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

.scroll-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.scroll-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.scroll-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.scroll-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Hero Animations */
.hero-title {
    animation: fadeInDown 1s ease 0.5s both;
}

.hero-subtitle {
    animation: fadeInUp 1s ease 0.7s both;
}

.hero-cta {
    animation: fadeInUp 1s ease 0.9s both;
}

/* Menu Card Hover */
.menu-card {
    transition: all 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.menu-overlay {
    transition: all 0.3s ease;
}

.menu-card:hover .menu-overlay {
    background: rgba(0, 0, 0, 0.8);
}

/* Feature Card Hover */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-color);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

/* Testimonial Card */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Event Card */
.event-card {
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Social Links */
.social-link {
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Navigation Hover */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Form Animations */
.form-control {
    transition: all 0.3s ease;
}

.form-control:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Button States */
.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.nav-link:focus {
    outline: none;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 

/* ===== CHISPAS VOLADORAS ===== */

/* Chispas base */
.spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ffd700, #ff6b35, #ff4500);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    animation: sparkFloat 1.5s ease-out forwards;
}

.spark::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: sparkGlow 1.5s ease-out forwards;
}

/* Animación de flotación de chispas */
@keyframes sparkFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-20px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.5);
    }
}

/* Animación de brillo de chispas */
@keyframes sparkGlow {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
}

/* Chispas que caen desde arriba */
.falling-spark {
    position: fixed;
    top: -10px;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, #ffd700, #ff6b35);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;
    animation: sparkFall 3s linear infinite;
}

@keyframes sparkFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Chispas en hover de elementos */
.spark-hover {
    position: relative;
    overflow: hidden;
}

.spark-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                rgba(255, 215, 0, 0.3) 0%, 
                transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.spark-hover:hover::after {
    opacity: 1;
}

/* Chispas en botones CTA */
.cta-spark {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ffd700, #ff6b35, #ff4500);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1001;
    animation: ctaSparkFloat 2s ease-out forwards;
}

.cta-spark::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ctaSparkGlow 2s ease-out forwards;
}

@keyframes ctaSparkFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    25% {
        opacity: 1;
        transform: translateY(-15px) scale(1.3) rotate(90deg);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-30px) scale(1.1) rotate(180deg);
    }
    75% {
        opacity: 0.5;
        transform: translateY(-45px) scale(0.8) rotate(270deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.3) rotate(360deg);
    }
}

@keyframes ctaSparkGlow {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(3);
    }
}

/* Chispas especiales para formulario completo */
.form-complete-spark {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ffd700, #ff6b35, #ff4500, #ff0000);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1002;
    animation: formCompleteSpark 3s ease-out forwards;
}

.form-complete-spark::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, rgba(255, 215, 0, 1), rgba(255, 107, 53, 0.8), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: formCompleteGlow 3s ease-out forwards;
}

@keyframes formCompleteSpark {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: translateY(-20px) scale(1.5) rotate(72deg);
    }
    40% {
        opacity: 1;
        transform: translateY(-40px) scale(1.2) rotate(144deg);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-60px) scale(0.9) rotate(216deg);
    }
    80% {
        opacity: 0.5;
        transform: translateY(-80px) scale(0.6) rotate(288deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.2) rotate(360deg);
    }
}

@keyframes formCompleteGlow {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(2.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(4);
    }
}

/* Responsive para chispas */
@media (max-width: 768px) {
    .spark {
        width: 3px;
        height: 3px;
    }
    
    .cta-spark {
        width: 4px;
        height: 4px;
    }
    
    .form-complete-spark {
        width: 6px;
        height: 6px;
    }
    
    .falling-spark {
        width: 2px;
        height: 2px;
    }
    
    /* Chispas táctiles optimizadas */
    .touch-spark {
        width: 5px;
        height: 5px;
        background: radial-gradient(circle, #ffd700, #ff6b35, #ff4500);
        border-radius: 50%;
        pointer-events: none;
        z-index: 1003;
        animation: touchSparkFloat 1s ease-out forwards;
    }
    
    .touch-spark::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 10px;
        height: 10px;
        background: radial-gradient(circle, rgba(255, 215, 0, 0.8), transparent);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        animation: touchSparkGlow 1s ease-out forwards;
    }
    
    @keyframes touchSparkFloat {
        0% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
        50% {
            opacity: 0.8;
            transform: translateY(-15px) scale(1.3);
        }
        100% {
            opacity: 0;
            transform: translateY(-30px) scale(0.3);
        }
    }
    
    @keyframes touchSparkGlow {
        0% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
        50% {
            opacity: 0.6;
            transform: translate(-50%, -50%) scale(1.8);
        }
        100% {
            opacity: 0;
            transform: translate(-50%, -50%) scale(2.5);
        }
    }
    
    /* Chispas de scroll optimizadas */
    .scroll-spark {
        width: 4px;
        height: 4px;
        background: radial-gradient(circle, #ffd700, #ff6b35);
        border-radius: 50%;
        pointer-events: none;
        z-index: 1004;
        animation: scrollSparkFloat 2s ease-out forwards;
    }
    
    @keyframes scrollSparkFloat {
        0% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
        100% {
            opacity: 0;
            transform: translateY(-50px) scale(0.5);
        }
    }
} 