/* ==========================================================================
   EXPE GLOBAL TALENT - ANIMATIONS CSS SYSTEM
   ========================================================================== */

/* 1. Scroll-Triggered Animation Base Styles */
.fade-in-up,
.fade-in-down,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Delay modifiers */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Animation Trigger Class (Added by JS when in viewport) */
.visible {
    opacity: 1 !important;
}

.visible.fade-in-up {
    animation-name: fadeInUp;
}

.visible.fade-in-down {
    animation-name: fadeInDown;
}

.visible.fade-in-left {
    animation-name: fadeInLeft;
}

.visible.fade-in-right {
    animation-name: fadeInRight;
}

/* Fallback for users who have JS disabled */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up, .fade-in-down, .fade-in-left, .fade-in-right {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

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

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

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

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

/* 3. Hero Visual Floating Card Animations */
@keyframes float-main {
    0% {
        transform: translateY(0px) rotate(0deg);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: translateY(-12px) rotate(0.5deg);
        box-shadow: 0 25px 50px rgba(255, 102, 0, 0.15);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    }
}

@keyframes float-sub1 {
    0% {
        transform: translateY(0px) translateX(0) scale(1);
    }
    50% {
        transform: translateY(-8px) translateX(-5px) scale(1.02);
        box-shadow: 0 20px 40px rgba(0, 87, 252, 0.15);
    }
    100% {
        transform: translateY(0px) translateX(0) scale(1);
    }
}

@keyframes float-sub2 {
    0% {
        transform: translateY(0px) translateX(0);
    }
    50% {
        transform: translateY(10px) translateX(5px) scale(0.98);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    }
    100% {
        transform: translateY(0px) translateX(0);
    }
}

/* Pulse / Glow Animation */
.pulse {
    animation: glowPulse 2.5s infinite ease-in-out;
}

@keyframes glowPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(255, 102, 0, 0.2));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 12px rgba(255, 102, 0, 0.6));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(255, 102, 0, 0.2));
    }
}

/* 4. Premium Card Hover & Micro-Interactions */
.why-card, .service-card, .country-card, .testimonial-card, .about-feature-card, .audience-card {
    transform: translateY(0) scale(1);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), 
                box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), 
                border-color 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
                background-color 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    will-change: transform, box-shadow, border-color;
}

.why-card:hover, .country-card:hover, .testimonial-card:hover, .about-feature-card:hover, .audience-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(0, 0, 0, 0.01) !important;
    border-color: var(--primary) !important;
}

.why-card:nth-child(even):hover {
    border-color: var(--color-two) !important;
    box-shadow: 0 20px 40px var(--color-two-glow) !important;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px var(--primary-glow) !important;
    border-color: var(--primary) !important;
}

.service-card.accent:hover {
    border-color: var(--color-two) !important;
    box-shadow: 0 20px 40px var(--color-two-glow) !important;
}

/* Icon Animations on Card Hover */
.why-card:hover .why-icon svg,
.why-card:hover .why-icon i,
.service-card:hover .service-icon svg,
.service-card:hover .service-icon i,
.about-feature-card:hover .afc-icon svg,
.about-feature-card:hover .afc-icon i,
.audience-card:hover .aud-icon svg,
.audience-card:hover .aud-icon i {
    transform: scale(1.15) rotate(6deg) !important;
}

.why-icon svg, .why-icon i,
.service-icon svg, .service-icon i,
.afc-icon svg, .afc-icon i,
.aud-icon svg, .aud-icon i {
    transform: scale(1) rotate(0deg);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: inline-block;
    will-change: transform;
}

/* Country Flag bounce on hover */
.country-flag-img {
    transform: translateY(0) scale(1) rotate(0deg);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    will-change: transform;
}

.country-card:hover .country-flag-img {
    transform: translateY(-4px) scale(1.15) rotate(4deg) !important;
}

/* Testimonial Star Pulse on Hover */
.testimonial-card:hover .testimonial-stars i,
.testimonial-card:hover .testimonial-stars svg {
    transform: scale(1.15) rotate(10deg) !important;
}
.testimonial-stars i, .testimonial-stars svg {
    transform: scale(1) rotate(0deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: inline-block;
    will-change: transform;
}

/* 5. Button Shine & Scaling Effects */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transform: translateY(0) scale(1);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), 
                box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), 
                background-color 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    will-change: transform, box-shadow;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-3px) scale(1.02) !important;
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3) !important;
}

.btn-secondary:hover {
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3) !important;
}

/* 6. Subtle Glow animation for active navigation link indicator */
.nav-links a.active::after {
    box-shadow: 0 0 8px var(--primary);
}

