/* ====================================================================
   ANIMACIONES DEPORTIVAS AVANZADAS - CRC SYSTEM
   Archivo de estilos complementarios con animaciones CSS3 avanzadas
   ==================================================================== */

/* Animación de pulso energético para elementos destacados */
@keyframes energyPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(255, 107, 53, 0);
    }
}

/* Animación de onda para backgrounds */
@keyframes wave {
    0% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(-25%) translateY(-10%);
    }
    100% {
        transform: translateX(0) translateY(0);
    }
}

/* Animación de rebote deportivo */
@keyframes sportBounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-10px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-5px);
    }
}

/* Animación de slide in desde la izquierda */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animación de slide in desde la derecha */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animación de zoom in */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animación de rotación 3D */
@keyframes rotate3D {
    from {
        transform: perspective(1000px) rotateY(-15deg);
        opacity: 0;
    }
    to {
        transform: perspective(1000px) rotateY(0);
        opacity: 1;
    }
}

/* Efecto de texto animado letra por letra */
@keyframes letterAnimation {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-5px);
    }
}

/* Gradiente animado de fondo */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Efecto de brillo metálico */
@keyframes metalShine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Efecto de parpadeo suave */
@keyframes softBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ====================================================================
   CLASES UTILITARIAS PARA APLICAR ANIMACIONES
   ==================================================================== */

/* Aplicar pulso energético */
.energy-pulse {
    animation: energyPulse 2s infinite;
}

/* Aplicar rebote deportivo */
.sport-bounce {
    animation: sportBounce 1s ease-in-out infinite;
}

/* Slide animations */
.slide-in-left {
    animation: slideInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Zoom in animation */
.zoom-in {
    animation: zoomIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 3D rotation */
.rotate-3d {
    animation: rotate3D 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ====================================================================
   EFECTOS HOVER DEPORTIVOS
   ==================================================================== */

/* Efecto de elevación con sombra deportiva */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.3);
}

/* Efecto de inclinación */
.hover-tilt {
    transition: transform 0.3s ease;
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

/* Efecto de brillo al pasar el mouse */
.hover-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hover-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.hover-glow:hover::after {
    width: 300px;
    height: 300px;
}

/* ====================================================================
   ESTILOS PARA BADGES Y ETIQUETAS DEPORTIVAS
   ==================================================================== */

.sport-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.sport-badge::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;
    z-index: -1;
}

.sport-badge:hover::before {
    left: 100%;
}

.badge-cycling {
    background: linear-gradient(135deg, #FF6B35, #FFD23F);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.badge-running {
    background: linear-gradient(135deg, #00D9FF, #7DFF7D);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4);
}

.badge-triathlon {
    background: linear-gradient(135deg, #7DFF7D, #FFD23F);
    color: #1A2332;
    box-shadow: 0 4px 15px rgba(125, 255, 125, 0.4);
}

/* ====================================================================
   EFECTOS DE TEXTO DEPORTIVOS
   ==================================================================== */

.text-gradient-sports {
    background: linear-gradient(135deg, #FF6B35, #FFD23F, #00D9FF, #7DFF7D);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientAnimation 4s ease infinite;
    font-weight: 800;
}

.text-shadow-sports {
    text-shadow: 
        2px 2px 4px rgba(255, 107, 53, 0.3),
        -2px -2px 4px rgba(0, 217, 255, 0.3);
}

.text-neon {
    color: #fff;
    text-shadow:
        0 0 10px rgba(0, 217, 255, 0.8),
        0 0 20px rgba(0, 217, 255, 0.6),
        0 0 30px rgba(0, 217, 255, 0.4),
        0 0 40px rgba(0, 217, 255, 0.2);
    animation: softBlink 2s ease-in-out infinite;
}

/* ====================================================================
   LOADING Y SKELETON DEPORTIVOS
   ==================================================================== */

.skeleton-sport {
    background: linear-gradient(
        90deg,
        rgba(255, 107, 53, 0.1) 0%,
        rgba(0, 217, 255, 0.2) 50%,
        rgba(255, 107, 53, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: wave 1.5s ease-in-out infinite;
}

/* Spinner deportivo */
.sport-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 107, 53, 0.2);
    border-top-color: #FF6B35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ====================================================================
   EFECTOS PARA BOTONES ESPECIALES
   ==================================================================== */

.btn-sport-primary {
    background: linear-gradient(135deg, #FF6B35, #FFD23F);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-sport-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-sport-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-sport-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
}

.btn-sport-secondary {
    background: linear-gradient(135deg, #00D9FF, #7DFF7D);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4);
}

.btn-sport-secondary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 217, 255, 0.5);
}

/* ====================================================================
   EFECTOS DE PARALLAX Y SCROLL
   ==================================================================== */

.parallax-sport {
    transition: transform 0.3s ease-out;
}

.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ====================================================================
   RESPONSIVE - Desactivar animaciones pesadas en móviles
   ==================================================================== */

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

@media screen and (max-width: 768px) {
    /* Simplificar animaciones en móviles para mejor rendimiento */
    .hover-tilt:hover {
        transform: none;
    }
    
    .events .events__item:hover .events__item--picture img {
        transform: scale(1.05);
    }
}
