/* Background animado para la sección de horarios */

/* Quitar imagen de fondo original */
#schedule {
    background-image: none !important;
    background: #1a1a1a !important;
    position: relative;
    overflow: hidden;
}

/* Quitar el overlay que aclara la imagen */
#schedule::before {
    display: none !important;
}

/* Gradiente sutil de fondo */
#schedule::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(237, 86, 59, 0.05) 0%, 
        transparent 50%, 
        rgba(240, 148, 51, 0.05) 100%
    );
    z-index: 1;
}

/* Partículas flotantes */
.schedule-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(237, 86, 59, 0.3);
    border-radius: 50%;
    opacity: 0;
    animation: floatUp 15s infinite;
}

.particle:nth-child(1) {
    width: 8px;
    height: 8px;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 6px;
    height: 6px;
    left: 20%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 10px;
    height: 10px;
    left: 30%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 4px;
    height: 4px;
    left: 40%;
    animation-delay: 6s;
}

.particle:nth-child(5) {
    width: 12px;
    height: 12px;
    left: 50%;
    animation-delay: 8s;
}

.particle:nth-child(6) {
    width: 7px;
    height: 7px;
    left: 60%;
    animation-delay: 10s;
}

.particle:nth-child(7) {
    width: 5px;
    height: 5px;
    left: 70%;
    animation-delay: 1s;
}

.particle:nth-child(8) {
    width: 9px;
    height: 9px;
    left: 80%;
    animation-delay: 3s;
}

.particle:nth-child(9) {
    width: 6px;
    height: 6px;
    left: 90%;
    animation-delay: 5s;
}

.particle:nth-child(10) {
    width: 8px;
    height: 8px;
    left: 95%;
    animation-delay: 7s;
}

@keyframes floatUp {
    0% {
        bottom: -100px;
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.2;
    }
    100% {
        bottom: 100%;
        opacity: 0;
        transform: translateX(100px) rotate(360deg);
    }
}

/* Efecto de onda de energía */
.geometric-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.geometric-bg::before,
.geometric-bg::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: energyWave 4s ease-out infinite;
}

.geometric-bg::before {
    border: 2px solid rgba(237, 86, 59, 0.5);
    animation-delay: 0s;
}

.geometric-bg::after {
    border: 2px solid rgba(240, 148, 51, 0.5);
    animation-delay: 2s;
}

@keyframes energyWave {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 150%;
        height: 150%;
        opacity: 0;
    }
}

/* Efecto de rayo láser */
.laser-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(237, 86, 59, 0.8) 45%, 
        #ed563b 50%, 
        rgba(237, 86, 59, 0.8) 55%, 
        transparent 100%
    );
    z-index: 2;
    animation: laserScan 6s linear infinite;
}

@keyframes laserScan {
    0% {
        left: -100%;
        top: 20%;
    }
    50% {
        left: 100%;
        top: 80%;
    }
    100% {
        left: -100%;
        top: 20%;
    }
}


/* Efecto de entrada impactante para las tarjetas */
.schedule-card {
    animation: cardEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    animation-delay: calc(var(--card-index, 0) * 0.1s);
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(45deg);
    }
    50% {
        transform: scale(1.1) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Modo claro */
.light-theme #schedule {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
}

.light-theme #schedule::after {
    background: linear-gradient(135deg, 
        rgba(237, 86, 59, 0.08) 0%, 
        rgba(240, 148, 51, 0.05) 50%, 
        rgba(155, 89, 182, 0.08) 100%
    );
}

.light-theme .particle {
    background: linear-gradient(45deg, #ed563b, #f09433);
    box-shadow: 0 0 10px rgba(237, 86, 59, 0.3);
}

.light-theme .geometric-bg::before {
    border: 3px solid rgba(237, 86, 59, 0.4);
    box-shadow: 0 0 20px rgba(237, 86, 59, 0.2);
}

.light-theme .geometric-bg::after {
    border: 3px solid rgba(155, 89, 182, 0.4);
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.2);
}

.light-theme .laser-effect {
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(237, 86, 59, 0.4) 40%, 
        #ed563b 50%, 
        rgba(237, 86, 59, 0.4) 60%, 
        transparent 100%
    );
    box-shadow: 0 0 15px rgba(237, 86, 59, 0.5);
}

/* Ajustar el contenido para que esté sobre las animaciones */
#schedule .container,
#schedule .section-heading,
#schedule .filters,
#schedule .schedule-cards,
#schedule .schedule-table-wrapper {
    position: relative;
    z-index: 10;
}

/* Efecto de brillo en hover de las tarjetas */
.schedule-cards .schedule-card {
    position: relative;
    overflow: hidden;
}

.schedule-cards .schedule-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ed563b, #f09433, #ed563b);
    border-radius: 15px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    animation: borderGlow 3s linear infinite;
}

.schedule-cards .schedule-card:hover::before {
    opacity: 1;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .particle {
        animation-duration: 8s;
    }
    
    .geometric-bg {
        animation-duration: 15s;
    }
    
    #schedule::after {
        animation-duration: 10s;
    }
}

/* Efectos adicionales para modo claro */
.light-theme .schedule-card {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.light-theme .schedule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(237, 86, 59, 0.2);
}

/* Partículas más visibles en modo claro */
.light-theme .particle:nth-child(odd) {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}

.light-theme .particle:nth-child(even) {
    background: linear-gradient(45deg, #ed563b, #dc2743);
}

/* Animación de fondo sutil */
.light-theme #schedule {
    position: relative;
    background-size: 400% 400%;
    animation: subtleGradient 15s ease infinite;
}

@keyframes subtleGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}