/* Animations CSS */

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-10px) rotate(45deg);
    }
    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(236, 38, 143, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(236, 38, 143, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(236, 38, 143, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

@keyframes scrollCarousel {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Advanced Shimmer Animations for CTA Section */
@keyframes ultra-shimmer {
    0% {
        background-position: 100% 0%;
        opacity: 0.8;
    }
    100% {
        background-position: 0% 100%;
        opacity: 1;
    }
}

@keyframes border-glow {
    0%, 100% {
        box-shadow: 
            0 0 5px rgba(255, 255, 255, 0.5),
            0 0 10px rgba(236, 38, 143, 0.5),
            0 0 15px rgba(236, 38, 143, 0.3);
    }
    50% {
        box-shadow: 
            0 0 10px rgba(255, 255, 255, 0.7),
            0 0 20px rgba(236, 38, 143, 0.7),
            0 0 30px rgba(236, 38, 143, 0.5);
    }
}

@keyframes float-element {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes radial-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(236, 38, 143, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(236, 38, 143, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(236, 38, 143, 0);
    }
}

@keyframes glowing-text {
    0%, 100% {
        text-shadow: 
            0 0 5px rgba(255, 255, 255, 0.5),
            0 0 10px rgba(255, 255, 255, 0.3);
    }
    50% {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 255, 255, 0.5),
            0 0 30px rgba(236, 38, 143, 0.4);
    }
}

@keyframes sparkle-stars {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3) rotate(20deg);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
    opacity: 0;
}

.testimonial-card.animate-slide-up {
    animation-duration: 1s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-card.animate-slide-up:nth-child(1) {
    animation-delay: 0.1s;
}

.testimonial-card.animate-slide-up:nth-child(2) {
    animation-delay: 0.3s;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease-out forwards;
    opacity: 0;
}

.animate-bounce {
    animation: pulse 2s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Staggered Animations */
.animate-stagger > *:nth-child(1) {
    animation-delay: 0.1s;
}

.animate-stagger > *:nth-child(2) {
    animation-delay: 0.2s;
}

.animate-stagger > *:nth-child(3) {
    animation-delay: 0.3s;
}

.animate-stagger > *:nth-child(4) {
    animation-delay: 0.4s;
}

.animate-stagger > *:nth-child(5) {
    animation-delay: 0.5s;
}

.animate-stagger > *:nth-child(6) {
    animation-delay: 0.6s;
}

/* Intersection Observer Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Animations */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform var(--transition-base);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Button Animations */
.btn-animate {
    position: relative;
    overflow: hidden;
}

.btn-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-animate:hover::before {
    left: 100%;
}

/* Loading Animation */
.loading {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 40px;
}

.loading::after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    margin: 4px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    border-color: var(--primary-color) transparent var(--primary-color) transparent;
    animation: loading 1.2s linear infinite;
}

@keyframes loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Counter Animation */
.animate-counter {
    font-variant-numeric: tabular-nums;
}

/* Gradient Animation */
.gradient-animate {
    background: linear-gradient(-45deg, var(--primary-color), var(--primary-light), var(--secondary-color), var(--primary-dark));
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
}

/* Partners Carousel Animation */
@keyframes scrollCarousel {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.partners-track {
    animation: scrollCarousel 40s linear infinite;
}

.partners-track:hover {
    animation-play-state: paused;
}

/* Fade in animation for partner cards on load */
.partner-card {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.partner-card:nth-child(1) { animation-delay: 0.1s; }
.partner-card:nth-child(2) { animation-delay: 0.2s; }
.partner-card:nth-child(3) { animation-delay: 0.3s; }
.partner-card:nth-child(4) { animation-delay: 0.4s; }
.partner-card:nth-child(5) { animation-delay: 0.5s; }
.partner-card:nth-child(6) { animation-delay: 0.6s; }
.partner-card:nth-child(7) { animation-delay: 0.7s; }
.partner-card:nth-child(8) { animation-delay: 0.8s; }
.partner-card:nth-child(9) { animation-delay: 0.9s; }
.partner-card:nth-child(10) { animation-delay: 1.0s; }

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Text Animations */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-color);
    }
}

@keyframes shimmerSweep {
    0% {
        top: 0;
        left: 100%;
        transform: translate(0%, 0%) rotate(-45deg) scale(2);
    }
    100% {
        top: 100%;
        left: 0;
        transform: translate(-50%, 50%) rotate(-45deg) scale(2);
    }
}

/* Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.page-transition.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Optimized Animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}
