/* Animation Classes */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 1s ease forwards;
}

.animate-slide-down {
    opacity: 0;
    transform: translateY(-30px);
    animation: slideDown 1s ease forwards;
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(30px);
    animation: slideLeft 1s ease forwards;
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideRight 1s ease forwards;
}

.animate-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.animate-counter {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
}

/* Animation Delays */
.animate-fade-in.delay-1 {
    animation-delay: 0.2s;
}

.animate-fade-in.delay-2 {
    animation-delay: 0.4s;
}

.animate-fade-in.delay-3 {
    animation-delay: 0.6s;
}

.animate-fade-in.delay-4 {
    animation-delay: 0.8s;
}

.animate-slide-up.delay-1 {
    animation-delay: 0.2s;
}

.animate-slide-up.delay-2 {
    animation-delay: 0.4s;
}

.animate-slide-up.delay-3 {
    animation-delay: 0.6s;
}

.animate-slide-up.delay-4 {
    animation-delay: 0.8s;
}

/* Service Card Animation Delays */
.services-grid .service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.services-grid .service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.services-grid .service-card:nth-child(3) {
    animation-delay: 0.3s;
}

.services-grid .service-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Animations */
.service-card:hover .service-icon {
    transform: rotateY(180deg);
    background-color: var(--primary-color);
    color: white;
}

.service-icon {
    transition: all 0.5s ease;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}


/* Floating Animation */
.animate-float {
    margin-top: 20px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Simplified Card Flip Animation */
.animate-card-flip {
    perspective: 1000px;
    transition: transform 0.6s ease;
}

.animate-card-flip:hover {
    /* transform: translateY(-10px) scale(1.03); */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-front, .card-back {
    transition: all 0.6s ease;
    backface-visibility: hidden;
}

.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 15px;
    opacity: 0;
    transform: rotateY(180deg);
}

.animate-card-flip:hover .card-front {
    opacity: 0;
    transform: rotateY(180deg);
}

.animate-card-flip:hover .card-back {
    opacity: 1;
    transform: rotateY(0);
}

/* Zoom Animation */
.animate-zoom {
    transition: transform 0.3s ease;
}

.animate-zoom:hover {
    transform: scale(1.1);
}

/* Gradient Animation */
.gradient-animate {
    background: linear-gradient(270deg, #2563eb, #1e40af, #3b82f6);
    background-size: 600% 600%;
    animation: gradient 8s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Particle Animation */
.particle-animation {
    position: relative;
    overflow: hidden;
}

.particle-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/particles.png') repeat;
    opacity: 0.1;
    animation: particles 20s linear infinite;
}

@keyframes particles {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 1000px 1000px;
    }
}

/* Staggered Animation */
.animate-stagger {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* Fly-in Animation */
.animate-fly-in {
    opacity: 0;
    animation: flyIn 1s ease forwards;
}

.direction-left {
    transform: translateX(-100px);
}

.direction-right {
    transform: translateX(100px);
}

@keyframes flyIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animation */
.animate-scale {
    transition: transform 0.3s ease;
}

.animate-scale:hover {
    transform: scale(1.05);
}

/* Bounce Animation */
.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* 3D Flip Animation */
.animate-3d-flip {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    transform: rotateY(180deg);
}

.animate-3d-flip:hover {
    transform: rotateY(0deg);
}

/* Gradient Border Animation */
.animate-gradient-border {
    position: relative;
    z-index: 1;
}

.animate-gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #2563eb, #3b82f6, #1e40af);
    background-size: 200% 200%;
    z-index: -1;
    border-radius: inherit;
    animation: gradientBorder 4s ease infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.animate-gradient-border:hover::before {
    opacity: 1;
}

@keyframes gradientBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Wave Animation */
.wave-bg {
    position: relative;
    overflow: hidden;
}

.wave-bg::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url('../images/wave.png') repeat-x;
    background-size: 50% 100%;
    animation: wave 15s linear infinite;
    opacity: 0.1;
    z-index: -1;
}

@keyframes wave {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Glow Animation */
.glow-animate {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
    }
}

/* Cloud Animation */
.cloud-animation {
    position: relative;
    overflow: hidden;
}

.floating-clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.cloud {
    position: absolute;
    background: url('../images/cloud.png') no-repeat;
    background-size: contain;
    opacity: 0.8;
}

.cloud-1 {
    width: 150px;
    height: 100px;
    top: 20%;
    left: 10%;
}

.cloud-2 {
    width: 200px;
    height: 130px;
    top: 30%;
    right: 15%;
}

.cloud-3 {
    width: 180px;
    height: 120px;
    bottom: 25%;
    left: 20%;
}

/* Particle Background */
.particle-bg {
    position: relative;
}

.particle-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/particle-bg.png') center/cover;
    opacity: 0.1;
    z-index: -1;
}

/* Slide Down Animation */
.animate-slide-down {
    opacity: 0;
    transform: translateY(-30px);
    animation: slideDown 0.8s ease forwards;
}

@keyframes slideDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flip Animation */
.animate-flip {
    perspective: 1000px;
}

.animate-flip .faq-question i {
    transition: transform 0.3s ease;
}

.animate-flip.active .faq-question i {
    transform: rotate(180deg);
}

.animate-flip .faq-answer {
    transform-origin: top;
    transform: rotateX(-90deg);
    opacity: 0;
    max-height: 0;
    transition: all 0.3s ease;
}

.animate-flip.active .faq-answer {
    transform: rotateX(0deg);
    opacity: 1;
    max-height: 500px;
}