/*
 * EcuaSports - CSS Visual Effects
 * Clean, sports-themed background effects
 * Compatible with Elementor - NO CONFLICTS
 */

/* ============================================
   BASE: Force position relative on containers
   ============================================ */

.elementor-element.ecua-hero-gradient,
.elementor-element.ecua-glow-accents,
.elementor-element.ecua-dots-pattern,
.elementor-element.ecua-diagonal-lines,
.elementor-element.ecua-speed-lines,
.ecua-hero-gradient,
.ecua-glow-accents,
.ecua-dots-pattern,
.ecua-diagonal-lines,
.ecua-speed-lines {
    position: relative !important;
    overflow: hidden !important;
}

/* ============================================
   COMBINED HERO EFFECT
   When both classes are applied, use this combo
   ============================================ */

/* Hero gradient uses ::before */
.ecua-hero-gradient::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background:
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(255, 215, 0, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(0, 102, 204, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse 50% 50% at 60% 60%, rgba(227, 24, 55, 0.2) 0%, transparent 50%) !important;
    pointer-events: none !important;
    z-index: 1 !important;
    animation: gradientPulse 6s ease-in-out infinite !important;
}

/* Glow accents uses ::after for subtle ambient glow */
.ecua-glow-accents::after {
    content: '' !important;
    position: absolute !important;
    width: 800px !important;
    height: 800px !important;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 30%, transparent 60%) !important;
    border-radius: 50% !important;
    top: -300px !important;
    right: -300px !important;
    pointer-events: none !important;
    z-index: 2 !important;
    filter: blur(60px) !important;
    animation: orbFloat 15s ease-in-out infinite !important;
}

/* For the second orb, we need a different approach - using box-shadow on ::after */
.ecua-glow-accents::after {
    box-shadow:
        -800px 600px 300px 100px rgba(0, 102, 204, 0.25),
        -600px 400px 200px 80px rgba(0, 102, 204, 0.15) !important;
}

/* Keyframes for gradient pulse */
@keyframes gradientPulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.03);
    }
}

/* Keyframes for floating orb */
@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -30px) scale(1.1);
    }

    50% {
        transform: translate(20px, 30px) scale(0.95);
    }

    75% {
        transform: translate(-30px, 15px) scale(1.05);
    }
}

/* ============================================
   STANDALONE EFFECTS (individual use)
   ============================================ */

/* Dots pattern - uses ::after */
.ecua-dots-pattern::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-image: radial-gradient(rgba(255, 215, 0, 0.15) 2px, transparent 2px) !important;
    background-size: 30px 30px !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Diagonal lines - uses ::before */
.ecua-diagonal-lines::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 50px,
            rgba(255, 215, 0, 0.08) 50px,
            rgba(255, 215, 0, 0.08) 52px) !important;
    pointer-events: none !important;
    z-index: 1 !important;
    animation: diagonalMove 20s linear infinite !important;
}

@keyframes diagonalMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Speed lines - uses both ::before and ::after */
.ecua-speed-lines::before {
    content: '' !important;
    position: absolute !important;
    top: 35% !important;
    left: -100% !important;
    width: 100% !important;
    height: 4px !important;
    background: linear-gradient(90deg, transparent 0%, #FFD700 50%, transparent 100%) !important;
    pointer-events: none !important;
    z-index: 5 !important;
    animation: speedLine 4s ease-in-out infinite !important;
}

.ecua-speed-lines::after {
    content: '' !important;
    position: absolute !important;
    top: 65% !important;
    left: -100% !important;
    width: 60% !important;
    height: 3px !important;
    background: linear-gradient(90deg, transparent 0%, #0066CC 50%, transparent 100%) !important;
    pointer-events: none !important;
    z-index: 5 !important;
    animation: speedLine 4s ease-in-out infinite !important;
    animation-delay: 1.5s !important;
}

@keyframes speedLine {
    0% {
        left: -100%;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        left: 200%;
        opacity: 0;
    }
}

/* ============================================
   SPORTS STRIPE ACCENT
   ============================================ */

.ecua-sports-stripe::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 6px !important;
    height: 100% !important;
    background: linear-gradient(180deg,
            #FFD700 0%,
            #FFD700 33%,
            #0066CC 33%,
            #0066CC 66%,
            #E31837 66%,
            #E31837 100%) !important;
    z-index: 10 !important;
}

/* ============================================
   CORNER ACCENT
   ============================================ */

.ecua-corner-accent::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 300px !important;
    height: 300px !important;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 215, 0, 0.2) 50%) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

.ecua-corner-accent::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 200px !important;
    height: 200px !important;
    background: linear-gradient(-45deg, transparent 50%, rgba(0, 102, 204, 0.15) 50%) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* ============================================
   NOISE TEXTURE (Premium feel)
   ============================================ */

.ecua-noise-texture::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0.04 !important;
    pointer-events: none !important;
    z-index: 100 !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E") !important;
}

/* ============================================
   FLOATING PARTICLES (Pure CSS)
   ============================================ */

.ecua-floating-particles {
    position: relative !important;
    overflow: hidden !important;
}

.ecua-floating-particles::before,
.ecua-floating-particles::after {
    content: '' !important;
    position: absolute !important;
    width: 10px !important;
    height: 10px !important;
    background: #FFD700 !important;
    border-radius: 50% !important;
    pointer-events: none !important;
    z-index: 5 !important;
    opacity: 0.7 !important;
    animation: floatParticle 12s ease-in-out infinite !important;
}

.ecua-floating-particles::before {
    left: 15% !important;
    bottom: 25% !important;
}

.ecua-floating-particles::after {
    right: 20% !important;
    top: 35% !important;
    width: 8px !important;
    height: 8px !important;
    background: #0066CC !important;
    animation-delay: 4s !important;
}

@keyframes floatParticle {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.5;
    }

    25% {
        transform: translate(25px, -50px);
        opacity: 0.9;
    }

    50% {
        transform: translate(-15px, -100px);
        opacity: 0.7;
    }

    75% {
        transform: translate(35px, -60px);
        opacity: 0.8;
    }
}

/* ============================================
   CONFETTI (For thank you page)
   ============================================ */

.ecua-confetti-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 9999 !important;
    overflow: hidden !important;
}

.ecua-confetti {
    position: absolute !important;
    width: 10px !important;
    height: 10px !important;
    animation: confettiFall 3s ease-out forwards !important;
}

.ecua-confetti:nth-child(odd) {
    border-radius: 50% !important;
}

.ecua-confetti:nth-child(even) {
    border-radius: 0 !important;
    transform: rotate(45deg) !important;
}

.ecua-confetti:nth-child(1) {
    left: 10%;
    background: #FFD700 !important;
    animation-delay: 0s !important;
}

.ecua-confetti:nth-child(2) {
    left: 20%;
    background: #E31837 !important;
    animation-delay: 0.1s !important;
}

.ecua-confetti:nth-child(3) {
    left: 30%;
    background: #0066CC !important;
    animation-delay: 0.2s !important;
}

.ecua-confetti:nth-child(4) {
    left: 40%;
    background: #FFD700 !important;
    animation-delay: 0.15s !important;
}

.ecua-confetti:nth-child(5) {
    left: 50%;
    background: #E31837 !important;
    animation-delay: 0.25s !important;
}

.ecua-confetti:nth-child(6) {
    left: 60%;
    background: #0066CC !important;
    animation-delay: 0.05s !important;
}

.ecua-confetti:nth-child(7) {
    left: 70%;
    background: #FFD700 !important;
    animation-delay: 0.3s !important;
}

.ecua-confetti:nth-child(8) {
    left: 80%;
    background: #E31837 !important;
    animation-delay: 0.18s !important;
}

.ecua-confetti:nth-child(9) {
    left: 90%;
    background: #0066CC !important;
    animation-delay: 0.08s !important;
}

@keyframes confettiFall {
    0% {
        top: -10px;
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }

    100% {
        top: 100%;
        opacity: 0;
        transform: translateX(100px) rotate(720deg);
    }
}

/* ============================================
   PERFORMANCE & ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    .ecua-hero-gradient::before,
    .ecua-diagonal-lines::before,
    .ecua-glow-accents::after,
    .ecua-speed-lines::before,
    .ecua-speed-lines::after,
    .ecua-floating-particles::before,
    .ecua-floating-particles::after,
    .ecua-confetti {
        animation: none !important;
    }
}

@media (max-width: 768px) {
    .ecua-glow-accents::after {
        width: 300px !important;
        height: 300px !important;
        opacity: 0.25 !important;
        box-shadow:
            -400px 300px 150px 50px rgba(0, 102, 204, 0.2) !important;
    }

    .ecua-diagonal-lines::before,
    .ecua-speed-lines::before,
    .ecua-speed-lines::after {
        display: none !important;
    }
}