/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Apply animations to elements */

/* Hero sections */
.hero-content, .about-content, .solutions-content, .contact-content {
    animation: fadeIn 1s ease-out;
}

/* Feature cards */
.feature-card {
    animation: scaleIn 0.5s ease-out;
}

/* Solution cards */
.solution-card {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.solutions-grid .solution-card:nth-child(1) { animation-delay: 0.1s; }
.solutions-grid .solution-card:nth-child(2) { animation-delay: 0.2s; }
.solutions-grid .solution-card:nth-child(3) { animation-delay: 0.3s; }
.solutions-grid .solution-card:nth-child(4) { animation-delay: 0.4s; }

/* Team members */
.team-member {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.team-grid .team-member:nth-child(1) { animation-delay: 0.1s; }
.team-grid .team-member:nth-child(2) { animation-delay: 0.2s; }
.team-grid .team-member:nth-child(3) { animation-delay: 0.3s; }

/* Values cards */
.value-card {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.values-grid .value-card:nth-child(1) { animation-delay: 0.1s; }
.values-grid .value-card:nth-child(2) { animation-delay: 0.2s; }
.values-grid .value-card:nth-child(3) { animation-delay: 0.3s; }
.values-grid .value-card:nth-child(4) { animation-delay: 0.4s; }

/* Case studies */
.case-study {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.case-studies-grid .case-study:nth-child(1) { animation-delay: 0.1s; }
.case-studies-grid .case-study:nth-child(2) { animation-delay: 0.2s; }
.case-studies-grid .case-study:nth-child(3) { animation-delay: 0.3s; }

/* FAQ items */
.faq-item {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.faq-grid .faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-grid .faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-grid .faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-grid .faq-item:nth-child(4) { animation-delay: 0.4s; }

/* CTA button hover effect */
.cta-button {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Social icons hover effect */
.social-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    color: var(--primary-color);
}

/* Form input focus effects */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Mobile menu animation */
.nav-links {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 768px) {
    .nav-links {
        transform: translateY(-10px);
        opacity: 0;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation for submit button */
@keyframes loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.submit-button.loading::after {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 0.5em;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: loading 0.6s linear infinite;
}
