/* ==========================================
   BOOFABI PARSEH - ANIMATIONS STYLESHEET
   Smooth, Professional Animations
   ========================================== */

/* ==========================================
   FADE IN ANIMATIONS
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@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(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ==========================================
   SCALE ANIMATIONS
   ========================================== */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

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

/* ==========================================
   ROTATE ANIMATIONS
   ========================================== */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* ==========================================
   BOUNCE ANIMATIONS
   ========================================== */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* ==========================================
   SLIDE ANIMATIONS
   ========================================== */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================
   FLIP ANIMATIONS
   ========================================== */
@keyframes flipInX {
    from {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

@keyframes flipInY {
    from {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

/* ==========================================
   GLOW & SHINE ANIMATIONS
   ========================================== */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(37, 99, 235, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.8), 0 0 30px rgba(37, 99, 235, 0.6);
    }
}

@keyframes shine {
    0% {
        background-position: -200%;
    }
    100% {
        background-position: 200%;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ==========================================
   WAVE & RIPPLE ANIMATIONS
   ========================================== */
@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-10px);
    }
    75% {
        transform: translateY(10px);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==========================================
   GRADIENT ANIMATIONS
   ========================================== */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes rainbowGradient {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* ==========================================
   FLOATING ANIMATIONS
   ========================================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* ==========================================
   TYPING ANIMATION
   ========================================== */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    50% {
        border-color: transparent;
    }
}

/* ==========================================
   PARTICLE ANIMATIONS
   ========================================== */
@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

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

/* ==========================================
   SHAKE & WOBBLE ANIMATIONS
   ========================================== */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@keyframes wobble {
    0%, 100% {
        transform: translateX(0);
    }
    15% {
        transform: translateX(-25px) rotate(-5deg);
    }
    30% {
        transform: translateX(20px) rotate(3deg);
    }
    45% {
        transform: translateX(-15px) rotate(-3deg);
    }
    60% {
        transform: translateX(10px) rotate(2deg);
    }
    75% {
        transform: translateX(-5px) rotate(-1deg);
    }
}

/* ==========================================
   HERO SECTION ANIMATIONS
   ========================================== */
.hero-title {
    animation: fadeInUp 1s ease-out;
}

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

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

.hero-description {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-highlights {
    animation: fadeInUp 1s ease-out 1s both;
}

/* ==========================================
   BUTTON HOVER ANIMATIONS
   ========================================== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* ==========================================
   CARD HOVER ANIMATIONS
   ========================================== */
.service-card,
.project-card,
.team-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover,
.project-card:hover,
.team-card:hover {
    animation: floatSlow 3s ease-in-out infinite;
}

/* ==========================================
   LOADING ANIMATIONS
   ========================================== */
.globe-loader {
    animation: rotate 1s linear infinite;
}

/* Alternative loading animations */
@keyframes dotPulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ==========================================
   SCROLL INDICATOR ANIMATION
   ========================================== */
.scroll-indicator {
    animation: bounce 2s infinite;
}

.mouse {
    animation: float 2s ease-in-out infinite;
}

/* ==========================================
   NAVBAR SCROLL ANIMATION
   ========================================== */
.navbar {
    transition: all 0.3s ease;
}

.navbar.scrolled {
    animation: slideInDown 0.5s ease-out;
}

/* ==========================================
   LANGUAGE DROPDOWN ANIMATION
   ========================================== */
.lang-dropdown {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-dropdown.active {
    animation: scaleIn 0.3s ease-out;
}

.lang-option {
    transition: all 0.2s ease;
}

.lang-option:hover {
    transform: translateX(5px);
}

[dir="rtl"] .lang-option:hover {
    transform: translateX(-5px);
}

/* ==========================================
   FORM INPUT ANIMATIONS
   ========================================== */
.form-group input,
.form-group select,
.form-group textarea {
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* ==========================================
   STATS COUNTER ANIMATION
   ========================================== */
.stat-number {
    display: inline-block;
    transition: transform 0.3s ease;
}

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

/* ==========================================
   FEATURED BADGE ANIMATION
   ========================================== */
.featured-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* ==========================================
   BACK TO TOP BUTTON ANIMATION
   ========================================== */
.back-to-top {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top.visible {
    animation: bounceIn 0.5s ease-out;
}

.back-to-top:active {
    transform: scale(0.9);
}

/* ==========================================
   PROMO BANNER ANIMATION
   ========================================== */
.promo-banner {
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

.promo-icon {
    animation: bounce 2s ease-in-out infinite;
}

/* ==========================================
   SOCIAL LINKS ANIMATION
   ========================================== */
.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    animation: bounce 0.5s ease;
}

/* ==========================================
   PROJECT TAGS ANIMATION
   ========================================== */
.tag {
    transition: all 0.3s ease;
}

.tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   HIGHLIGHT ITEMS ANIMATION
   ========================================== */
.highlight-item {
    transition: all 0.3s ease;
}

.highlight-item:hover {
    transform: scale(1.1);
}

.highlight-icon {
    display: inline-block;
    transition: all 0.3s ease;
}

.highlight-item:hover .highlight-icon {
    animation: bounce 0.5s ease;
}

/* ==========================================
   PAYMENT ICONS ANIMATION
   ========================================== */
.payment-icons span {
    display: inline-block;
    transition: all 0.3s ease;
}

.payment-icons span:hover {
    animation: float 1s ease-in-out infinite;
}

/* ==========================================
   FOOTER LINKS ANIMATION
   ========================================== */
.footer-links a {
    position: relative;
    transition: all 0.3s ease;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

/* ==========================================
   RESULT ITEMS ANIMATION
   ========================================== */
.result-item {
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #2563eb, #10b981);
}

.result-item:hover .result-number,
.result-item:hover .result-label {
    color: white;
}

/* ==========================================
   MOBILE MENU TOGGLE ANIMATION
   ========================================== */
.mobile-menu-toggle span {
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* ==========================================
   PAGE LOAD ANIMATION
   ========================================== */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: pageLoad 0.5s ease-out;
}

/* ==========================================
   SECTION REVEAL ANIMATION (ON SCROLL)
   ========================================== */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   STAGGER ANIMATION FOR LISTS
   ========================================== */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* ==========================================
   PERFORMANCE OPTIMIZATIONS
   ========================================== */
.will-animate {
    will-change: transform, opacity;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}