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

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

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Scroll Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1 !important;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.slide-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered Animation Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* Hero Section Animations */
.hero-title {
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-subtitle {
    animation: fadeInUp 1s ease 0.4s both;
}

/* Card Hover Animations */
.step-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(30, 144, 255, 0.2);
}

.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.2);
}

.testimonial-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(30, 144, 255, 0.15);
}

/* Icon Animations */
.step-icon {
    transition: all 0.3s ease;
}

.step-card:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
    animation: pulse 0.6s ease;
}

.stat-icon {
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
    animation: float 2s ease-in-out infinite;
}

/* Number Counter Animation */
.stat-number {
    transition: all 0.3s ease;
}

.stat-card:hover .stat-number {
    animation: pulse 0.6s ease;
}

/* Button Animations */
.employers-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.employers-link::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;
}

.employers-link:hover::before {
    left: 100%;
}

.employers-link:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(30, 144, 255, 0.3);
}

/* FAQ Accordion Animations */
.faq-answer {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-toggle {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

/* Loading Animations */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Parallax Effects */
.hero-background {
    transition: transform 0.1s ease-out;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #1E90FF, #0066CC);
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Smooth Scrolling Enhancement */
html {
    scroll-behavior: smooth;
}

/* Reduced Motion Support */
@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;
    }
}

/* High Performance Animations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Intersection Observer Fallback */
.no-js .fade-in,
.no-js .fade-in-left,
.no-js .fade-in-right,
.no-js .slide-in-up,
.no-js .scale-in {
    opacity: 1;
    transform: none;
}

/* Ensure elements stay visible after animation */
.fade-in.visible,
.fade-in-left.visible,
.fade-in-right.visible,
.slide-in-up.visible,
.scale-in.visible {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    display: block !important;
}

/* Specific overrides for section titles */
.section-title.fade-in,
.section-subtitle.fade-in {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: none !important;
}

.section-title.fade-in.visible,
.section-subtitle.fade-in.visible {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: none !important;
}

/* FAQ specific overrides */
.faq-item.fade-in,
.faq-question.fade-in,
.faq-answer.fade-in {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: none !important;
}

.faq-item.fade-in.visible,
.faq-question.fade-in.visible,
.faq-answer.fade-in.visible {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: none !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .step-card:hover,
    .stat-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
    
    .step-card:active,
    .stat-card:active,
    .testimonial-card:active {
        transform: scale(0.98);
    }
}
