/* ============================================
   EFECTOS DE TEMPORADA - SOPMEX
   Sistema de efectos visuales estacionales
   ============================================ */

/* Contenedor principal del canvas de efectos */
#efectos-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Partículas genéricas (para efectos con elementos DOM) */
.particula-efecto {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
}

/* ============================================
   EFECTO: NIEVE
   ============================================ */
.copo-nieve {
    position: fixed;
    color: #7ec8ff;
    text-shadow: 0 0 10px #fff, 0 0 20px #7ec8ff, 0 0 30px #7ec8ff;
    pointer-events: none;
    z-index: 99999;
    opacity: 1;
    font-size: 28px;
    font-family: Arial, sans-serif;
}

/* ============================================
   EFECTO: CORAZONES (San Valentín)
   ============================================ */
.corazon {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    animation: flotar-corazon ease-in-out infinite;
    opacity: 0.7;
}

@keyframes flotar-corazon {
    0% {
        transform: translateY(110vh) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-10vh) rotate(45deg) scale(0.8);
        opacity: 0;
    }
}

/* ============================================
   EFECTO: HOJAS DE OTOÑO
   ============================================ */
.hoja-otono {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    animation: caer-hoja ease-in-out infinite;
    opacity: 0.85;
}

@keyframes caer-hoja {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) translateX(30px) rotate(90deg);
    }
    50% {
        transform: translateY(50vh) translateX(-20px) rotate(180deg);
    }
    75% {
        transform: translateY(75vh) translateX(40px) rotate(270deg);
    }
    100% {
        transform: translateY(110vh) translateX(0) rotate(360deg);
        opacity: 0.2;
    }
}

/* ============================================
   EFECTO: PÉTALOS DE FLOR (Primavera)
   ============================================ */
.petalo-flor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    animation: caer-petalo ease-in-out infinite;
    opacity: 0.8;
}

@keyframes caer-petalo {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    25% {
        transform: translateY(25vh) translateX(50px) rotate(45deg) scale(1.1);
    }
    50% {
        transform: translateY(50vh) translateX(-30px) rotate(90deg) scale(0.9);
    }
    75% {
        transform: translateY(75vh) translateX(40px) rotate(135deg) scale(1);
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(110vh) translateX(10px) rotate(180deg) scale(0.8);
        opacity: 0;
    }
}

/* ============================================
   EFECTO: CONFETI (Fiestas)
   ============================================ */
.confeti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    z-index: 9999;
    animation: caer-confeti linear infinite;
}

@keyframes caer-confeti {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0.5;
    }
}

/* Formas de confeti */
.confeti.cuadrado {
    border-radius: 2px;
}

.confeti.circulo {
    border-radius: 50%;
}

.confeti.rectangulo {
    width: 5px;
    height: 15px;
    border-radius: 2px;
}

/* ============================================
   RESPONSIVE: Reducir efectos en móviles
   ============================================ */
@media (max-width: 768px) {
    .copo-nieve,
    .corazon,
    .hoja-otono,
    .petalo-flor,
    .confeti {
        opacity: 0.5;
    }
}

/* Preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .copo-nieve,
    .corazon,
    .hoja-otono,
    .petalo-flor,
    .confeti,
    #efectos-canvas {
        display: none !important;
    }
}
