/* Card header animations to simulate GIFs */

/* Base particle styling for all card headers */
.card-header-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Speed - Light beam animation - Cosmic Speed of Light */
.speed .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #0c164d 0%, #020924 100%);
    z-index: -2;
}

.speed .card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(1px 1px at 50px 50px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 100px 150px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 200px 20px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 300px 160px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 90px 40px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 230px 90px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 45px 180px, #ffffff, rgba(0, 0, 0, 0));
    background-size: 400px 400px;
    z-index: -1;
    animation: twinkle-stars 8s ease-in-out infinite alternate;
}

@keyframes twinkle-stars {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Solution cards should have faster animations than the main hero */
.solution-card .card-header::after,
.solution-card .speed-beam,
.solution-card .photon-particle,
.solution-card .black-hole,
.solution-card .gravity-wave,
.solution-card .space-distortion,
.solution-card .energy-field,
.solution-card .nuclear-particle,
.solution-card .gluon-beam {
    animation-duration: 4s !important; /* Even faster animations for solution cards */
}

/* All other animations remain slow */
.card-header::after:not(.solution-card *),
.speed-beam:not(.solution-card *),
.photon-particle:not(.solution-card *),
.black-hole:not(.solution-card *),
.gravity-wave:not(.solution-card *),
.space-distortion:not(.solution-card *),
.energy-field:not(.solution-card *),
.nuclear-particle:not(.solution-card *),
.gluon-beam:not(.solution-card *) {
    animation-duration: 900s !important; /* Virtually static animations for non-solution cards */
}

.speed-beam {
    position: absolute;
    height: 2px;
    background: linear-gradient(to right, transparent, #fff, #6ab1ff, #006aff, transparent);
    top: 50%;
    transform-origin: left center;
    z-index: 0;
    animation: speed-of-light 6s linear infinite;
    box-shadow:
        0 0 4px #fff,
        0 0 8px #fff,
        0 0 12px #0052cc;
    border-radius: 100px;
}

@keyframes speed-of-light {
    0% {
        left: -20%;
        width: 10%;
        opacity: 0;
        transform: translateY(-50%) rotate(0deg);
    }
    5% {
        opacity: 1;
    }
    100% {
        left: 120%;
        width: 25%;
        opacity: 0;
        transform: translateY(-50%) rotate(0deg);
    }
}

/* Speed up light beams in solution cards */
.solution-card .speed-beam {
    animation-duration: 3s !important; /* Even faster light beams in solution cards */
}

/* Keep other light beams slow */
.speed-beam:not(.solution-card *) {
    animation-duration: 1800s !important; /* Virtually static light beams elsewhere */
}

/* Photon particles */
.photon-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
    box-shadow:
        0 0 4px white,
        0 0 8px #006aff;
    z-index: 1;
    animation: photon-travel 4s linear infinite;
}

@keyframes photon-travel {
    0% {
        left: -5%;
        opacity: 0;
        transform: scale(0.8);
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        left: 105%;
        opacity: 0;
        transform: scale(0.2);
    }
}

/* Even slower photon particles */
.photon-particle {
    animation-duration: 2000s !important; /* Virtually static photon particles */
}

/* Hyper Speed - Gravitational waves animation - Cosmic Black Hole Merger */
.hyper-speed .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #00372b 0%, #001a15 100%);
    z-index: -2;
}

.hyper-speed .card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(1px 1px at 40px 60px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 120px 90px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 150px 150px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 250px 40px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 200px 80px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 80px 120px, #ffffff, rgba(0, 0, 0, 0));
    background-size: 300px 300px;
    z-index: -1;
    opacity: 0.8;
}

.black-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 30%, rgba(0, 200, 83, 0.5) 70%, transparent 100%);
    box-shadow: 0 0 20px rgba(0, 200, 83, 0.8);
    z-index: 1;
    animation: pulse-black-hole 6s ease-in-out infinite alternate;
}

@keyframes pulse-black-hole {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 20px rgba(0, 200, 83, 0.5);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow: 0 0 30px rgba(0, 200, 83, 0.8);
    }
}

.gravity-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: none;
    z-index: 0;
    background: transparent;
    box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.5);
    animation: gravity-wave 8s linear infinite;
}

@keyframes gravity-wave {
    0% {
        width: 20px;
        height: 20px;
        opacity: 0.8;
        box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.7);
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.5;
        box-shadow: 0 0 0 1px rgba(0, 200, 83, 0.5);
    }
    100% {
        width: 20px;
        height: 20px;
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(0, 200, 83, 0);
        transform: translate(-50%, -50%) scale(10) rotate(180deg);
    }
}

.space-distortion {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1' d='M0,0 L100,100 M100,0 L0,100 M0,50 L100,50 M50,0 L50,100'/%3E%3C/svg%3E");
    background-size: 20px 20px;
    opacity: 0.3;
    animation: distort-space 16s linear infinite;
}

@keyframes distort-space {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.2) rotate(5deg);
        opacity: 0.3;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.2;
    }
}

/* Super slow space distortion */
.space-distortion {
    animation-duration: 3000s !important; /* Virtually static space distortion */
}

/* Ludicrous Speed - Strong nuclear force animation - Quantum Nuclear Physics */
.Ludicrous-speed .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #3a1c00 0%, #1a0f00 100%);
    z-index: -2;
}

.Ludicrous-speed .card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(1px 1px at 30px 70px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 150px 110px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 70px 190px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 270px 30px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 190px 60px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 110px 140px, #ffffff, rgba(0, 0, 0, 0));
    background-size: 300px 300px;
    z-index: -1;
    opacity: 0.5;
}

.nucleus {
    position: absolute;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #ff6d00 0%, #ff3d00 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow:
        0 0 10px #ff6d00,
        0 0 20px rgba(255, 109, 0, 0.5);
    animation: pulse-nucleus 4s ease-in-out infinite alternate;
}

@keyframes pulse-nucleus {
    0% {
        box-shadow:
            0 0 10px #ff6d00,
            0 0 20px rgba(255, 109, 0, 0.5);
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        box-shadow:
            0 0 15px #ff6d00,
            0 0 30px rgba(255, 109, 0, 0.7);
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.nuclear-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transform-origin: center center;
    z-index: 0;
    box-shadow:
        0 0 5px #fff,
        0 0 10px #ff6d00;
}

.particle-orbit {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 109, 0, 0.3);
    transform: translate(-50%, -50%);
    z-index: 0;
    box-shadow: inset 0 0 10px rgba(255, 109, 0, 0.1);
}

.gluon-beam {
    position: absolute;
    height: 2px;
    background: linear-gradient(to right, transparent, #ff6d00, transparent);
    z-index: 0;
    opacity: 0;
    animation: gluon-flash 1s ease-out;
    transform-origin: left center;
    box-shadow: 0 0 5px #ff6d00;
}

@keyframes gluon-flash {
    0% {
        opacity: 0.8;
        width: 0;
    }
    20% {
        opacity: 0.9;
        width: 20%;
    }
    100% {
        opacity: 0;
        width: 100%;
    }
}

.energy-field {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(255, 109, 0, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse at 70% 60%, rgba(255, 109, 0, 0.15) 0%, transparent 70%);
    opacity: 0.5;
    animation: energy-pulse 8s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes energy-pulse {
    0% {
        opacity: 0.3;
        transform: scale(0.95);
    }
    100% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* Pricing card header animations */

/* Speed pricing header */
.pricing-card.speed .pricing-header {
    overflow: hidden;
    position: relative;
}

.pricing-card.speed .pricing-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #0c164d 0%, #020924 100%);
    z-index: -2;
}

.pricing-card.speed .pricing-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(1px 1px at 50px 50px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 100px 150px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 200px 20px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 300px 160px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 90px 40px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 230px 90px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 45px 180px, #ffffff, rgba(0, 0, 0, 0));
    background-size: 400px 400px;
    z-index: -1;
    animation: twinkle-stars 8s ease-in-out infinite alternate;
}

/* Hyper pricing header */
.pricing-card.hyper .pricing-header {
    overflow: hidden;
    position: relative;
}

.pricing-card.hyper .pricing-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #00372b 0%, #001a15 100%);
    z-index: -2;
}

.pricing-card.hyper .pricing-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(1px 1px at 40px 60px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 120px 90px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 150px 150px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 250px 40px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 200px 80px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 80px 120px, #ffffff, rgba(0, 0, 0, 0));
    background-size: 300px 300px;
    z-index: -1;
    opacity: 0.8;
}

/* Ludicrous pricing header */
.pricing-card.Ludicrous .pricing-header {
    overflow: hidden;
    position: relative;
}

.pricing-card.Ludicrous .pricing-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #3a1c00 0%, #1a0f00 100%);
    z-index: -2;
}

.pricing-card.Ludicrous .pricing-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(1px 1px at 30px 70px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 150px 110px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 70px 190px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 270px 30px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 190px 60px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 110px 140px, #ffffff, rgba(0, 0, 0, 0));
    background-size: 300px 300px;
    z-index: -1;
    opacity: 0.5;
}

/* Include pricing headers in animation selectors */
.solution-card .card-header::after,
.solution-card .speed-beam,
.solution-card .photon-particle,
.solution-card .black-hole,
.solution-card .gravity-wave,
.solution-card .space-distortion,
.solution-card .energy-field,
.solution-card .nuclear-particle,
.solution-card .gluon-beam,
.pricing-card .pricing-header::after,
.pricing-card .speed-beam,
.pricing-card .photon-particle,
.pricing-card .black-hole,
.pricing-card .gravity-wave,
.pricing-card .space-distortion,
.pricing-card .energy-field,
.pricing-card .nuclear-particle,
.pricing-card .gluon-beam {
    animation-duration: 4s !important; /* Fast animations for solution and pricing cards */
}

/* Shared card header content styling */
.solution-card .card-header h3,
.solution-card .card-header p,
.pricing-card .pricing-header h3,
.pricing-card .pricing-header .price,
.pricing-card .pricing-header .popular-badge {
    position: relative;
    z-index: 1;
}

.solution-card .card-header h3,
.pricing-card .pricing-header h3 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.solution-card .card-header p,
.pricing-card .pricing-header .price {
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}