/* ========================================
   ANIMATIONS
   ======================================== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Down Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Left Animation */
@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide Right Animation */
@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(79, 70, 229, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(79, 70, 229, 0.6);
    }
}

/* Gradient Shift Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   ANIMATION CLASSES
   ======================================== */

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

.slide-down {
    animation: slideDown 0.6s ease-out;
}

.slide-left {
    animation: slideLeft 0.6s ease-out;
}

.slide-right {
    animation: slideRight 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

.bounce {
    animation: bounce 2s infinite;
}

.pulse {
    animation: pulse 2s infinite;
}

.glow {
    animation: glow 2s infinite;
}

/* ========================================
   ELEMENT-SPECIFIC ANIMATIONS
   ======================================== */

/* Hero Section */
.hero-content {
    animation: slideRight 0.8s ease-out;
}

.hero-image {
    animation: slideLeft 0.8s ease-out;
}

.hero-content h1 {
    animation: slideUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    animation: slideUp 0.8s ease-out 0.3s both;
}

.hero-description {
    animation: slideUp 0.8s ease-out 0.4s both;
}

.hero-cta {
    animation: slideUp 0.8s ease-out 0.5s both;
}

/* Cards */
.problem-card,
.solution-card,
.pricing-card,
.testimonial-card,
.metric,
.case-study,
.industry-card {
    animation: slideUp 0.6s ease-out;
}

.problem-card:nth-child(1) {
    animation-delay: 0.1s;
}

.problem-card:nth-child(2) {
    animation-delay: 0.2s;
}

.problem-card:nth-child(3) {
    animation-delay: 0.3s;
}

.solution-card:nth-child(1) {
    animation-delay: 0.1s;
}

.solution-card:nth-child(2) {
    animation-delay: 0.2s;
}

.solution-card:nth-child(3) {
    animation-delay: 0.3s;
}

.solution-card:nth-child(4) {
    animation-delay: 0.4s;
}

.solution-card:nth-child(5) {
    animation-delay: 0.5s;
}

.solution-card:nth-child(6) {
    animation-delay: 0.6s;
}

.pricing-card:nth-child(1) {
    animation-delay: 0.1s;
}

.pricing-card:nth-child(2) {
    animation-delay: 0.2s;
}

.pricing-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    animation: bounce 0.6s ease-out;
}

.btn-primary:hover {
    animation: glow 0.6s ease-out;
}

/* Process Steps */
.process-step {
    animation: slideUp 0.6s ease-out;
}

.process-step:nth-child(1) {
    animation-delay: 0.1s;
}

.process-step:nth-child(3) {
    animation-delay: 0.2s;
}

.process-step:nth-child(5) {
    animation-delay: 0.3s;
}

.process-step:nth-child(7) {
    animation-delay: 0.4s;
}

/* FAQ Items */
.faq-item {
    animation: slideUp 0.6s ease-out;
}

.faq-item:nth-child(1) {
    animation-delay: 0.1s;
}

.faq-item:nth-child(2) {
    animation-delay: 0.2s;
}

.faq-item:nth-child(3) {
    animation-delay: 0.3s;
}

.faq-item:nth-child(4) {
    animation-delay: 0.4s;
}

.faq-item:nth-child(5) {
    animation-delay: 0.5s;
}

/* Testimonials */
.testimonial-card:nth-child(1) {
    animation-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Metrics */
.metric:nth-child(1) {
    animation-delay: 0.1s;
}

.metric:nth-child(2) {
    animation-delay: 0.2s;
}

.metric:nth-child(3) {
    animation-delay: 0.3s;
}

.metric:nth-child(4) {
    animation-delay: 0.4s;
}

/* ========================================
   HOVER EFFECTS
   ======================================== */

/* Card Hover */
.problem-card:hover,
.solution-card:hover,
.pricing-card:hover,
.testimonial-card:hover,
.metric:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Link Hover */
a {
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* Button Hover */
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

/* ========================================
   TRANSITION EFFECTS
   ======================================== */

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Form Focus */
input:focus,
textarea:focus,
select:focus {
    animation: glow 0.6s ease-out;
}

/* ========================================
   LOADING ANIMATION
   ======================================== */

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

.spinner {
    border: 4px solid rgba(79, 70, 229, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

/* Fade in on scroll */
.fade-in-on-scroll {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.slide-up-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s ease-out forwards;
}

/* ========================================
   RESPONSIVE ANIMATIONS
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
