/* Keyframe Animations */
@keyframes logoRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes waveMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--saffron); }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { box-shadow: 0 4px 15px rgba(19, 136, 8, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(19, 136, 8, 0.6); }
    100% { box-shadow: 0 4px 15px rgba(19, 136, 8, 0.3); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6); }
}

/* Service Card Entrance Animation */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    animation: cardEntrance 0.6s forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }
.service-card:nth-child(7) { animation-delay: 0.7s; }
.service-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AI Card Hover Effect */
.ai-card {
    position: relative;
    overflow: hidden;
}

.ai-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
}

.ai-card:hover::after {
    opacity: 1;
    animation: ripple 1s linear;
}

@keyframes ripple {
    to {
        transform: scale(1);
        opacity: 0;
    }
}

/* Scroll-triggered Animations */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Button Loading Animation */
.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Particle Animation */
@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.8;
    }
    25% {
        transform: translate(20px, -20px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translate(0, -40px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translate(-20px, -20px) rotate(270deg);
        opacity: 0.6;
    }
}

/* Gradient Border Animation */
.gradient-border {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 15px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--saffron), var(--white), var(--green));
    border-radius: 17px;
    z-index: -1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Additional Animations */
@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}