/* إصلاح مشكلة الـ cards animations - ملف منفصل لتجنب التداخل */
/* نمط تفاعلي مشابه لـ badge-reveal في index.php */

/* Cards بـ fade-in animation باستخدام Tailwind classes */
.advantage-card,
.feature-card,
.service-card,
.project-card,
.testimonial-card,
.value-card,
.team-card,
.approach-step,
.results-card,
.contact-card,
.faq-item,
.blog-card {
    /* إضافة Tailwind animations بسيطة ومهنية */
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: cardReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    position: relative;
    overflow: hidden;
}

/* إضافة تأثير badge-reveal مشابه للكاردز */
.advantage-card::before,
.feature-card::before,
.service-card::before,
.project-card::before,
.testimonial-card::before,
.value-card::before,
.team-card::before,
.approach-step::before,
.results-card::before,
.contact-card::before,
.faq-item::before,
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.8), transparent);
    transition: left 0.6s ease-in-out;
    z-index: 1;
}

/* تدرج في الظهور للعناصر */
.advantage-card:nth-child(1) { animation-delay: 0.1s; }
.advantage-card:nth-child(2) { animation-delay: 0.2s; }
.advantage-card:nth-child(3) { animation-delay: 0.3s; }
.advantage-card:nth-child(4) { animation-delay: 0.4s; }

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

/* Animation keyframes محسنة */
@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    50% {
        opacity: 0.8;
        transform: translateY(10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Badge reveal effect للكاردز */
@keyframes badgeReveal {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* hover effects محسنة - تفاعل مهني وبسيط */
.advantage-card:hover,
.feature-card:hover,
.service-card:hover,
.project-card:hover,
.testimonial-card:hover,
.value-card:hover,
.team-card:hover,
.approach-step:hover,
.results-card:hover,
.contact-card:hover,
.faq-item:hover,
.blog-card:hover {
    transform: translateY(-12px) scale(1.03) !important;
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.15), 
                0 8px 20px rgba(0, 0, 0, 0.1) !important;
    opacity: 1 !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* تفعيل الـ badge reveal على hover */
.advantage-card:hover::before,
.feature-card:hover::before,
.service-card:hover::before,
.project-card:hover::before,
.testimonial-card:hover::before,
.value-card:hover::before,
.team-card:hover::before,
.approach-step:hover::before,
.results-card:hover::before,
.contact-card:hover::before,
.faq-item:hover::before,
.blog-card:hover::before {
    animation: badgeReveal 0.6s ease-in-out;
    left: 100%;
}

/* animation classes بديلة - للاستخدام المستقبلي فقط */
.card-fade-in {
    animation: cardFadeIn 0.6s ease-out forwards;
}

.card-slide-up {
    animation: cardSlideUp 0.6s ease-out forwards;
}

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

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


/* للصفحات التي تحتاج animation بسيط */
.simple-card-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.simple-card-animation.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تأثيرات إضافية مشابهة لـ badge-reveal */
.advantage-card .text-2xl,
.service-card h3,
.project-card h3,
.testimonial-card h3,
.blog-card h3 {
    position: relative;
    overflow: hidden;
}

.advantage-card .text-2xl::after,
.service-card h3::after,
.project-card h3::after,
.testimonial-card h3::after,
.blog-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #DC2626, transparent);
    transition: left 0.6s ease-in-out;
}

.advantage-card:hover .text-2xl::after,
.service-card:hover h3::after,
.project-card:hover h3::after,
.testimonial-card:hover h3::after,
.blog-card:hover h3::after {
    left: 100%;
}

/* Media queries للموبايل */
@media (max-width: 768px) {
    .advantage-card:hover,
    .feature-card:hover,
    .service-card:hover,
    .project-card:hover,
    .testimonial-card:hover,
    .value-card:hover,
    .team-card:hover,
    .approach-step:hover,
    .results-card:hover,
    .contact-card:hover,
    .faq-item:hover,
    .blog-card:hover {
        transform: translateY(-6px) scale(1.02) !important;
        box-shadow: 0 12px 25px rgba(220, 38, 38, 0.12) !important;
    }
    
    /* إيقاف تأثير الـ badge على الموبايل لتحسين الأداء */
    .advantage-card:hover::before,
    .feature-card:hover::before,
    .service-card:hover::before,
    .project-card:hover::before,
    .testimonial-card:hover::before,
    .value-card:hover::before,
    .team-card:hover::before,
    .approach-step:hover::before,
    .results-card:hover::before,
    .contact-card:hover::before,
    .faq-item:hover::before,
    .blog-card:hover::before {
        animation: none;
        left: -100%;
    }
}

/* تأكيد أن الـ cards مرئية دائماً */
.advantage-card,
.feature-card,
.service-card,
.project-card,
.testimonial-card,
.value-card,
.team-card,
.approach-step,
.results-card,
.contact-card,
.faq-item,
.blog-card {
    visibility: visible !important;
    display: block !important;
}

/* JavaScript-triggered states */
.advantage-card.in-viewport,
.feature-card.in-viewport,
.service-card.in-viewport,
.project-card.in-viewport,
.testimonial-card.in-viewport,
.value-card.in-viewport,
.team-card.in-viewport,
.approach-step.in-viewport,
.results-card.in-viewport,
.contact-card.in-viewport,
.faq-item.in-viewport,
.blog-card.in-viewport {
    /* تأكيد تطبيق animations عند دخول المنطقة المرئية */
    animation-play-state: running;
}

.advantage-card.animation-complete,
.feature-card.animation-complete,
.service-card.animation-complete,
.project-card.animation-complete,
.testimonial-card.animation-complete,
.value-card.animation-complete,
.team-card.animation-complete,
.approach-step.animation-complete,
.results-card.animation-complete,
.contact-card.animation-complete,
.faq-item.animation-complete,
.blog-card.animation-complete {
    /* تأكد من أن الـ cards مكتملة الظهور */
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* ===== Sticky Header موحد لجميع الصفحات ===== */
.sticky-header {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 50 !important;
    transition: all 0.3s ease !important;
    background: rgba(31, 41, 55, 0.7) !important;
    backdrop-filter: blur(10px) !important;
}

.sticky-header.scrolled {
    background: rgba(31, 41, 55, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* تطبيق تلقائي للـ sticky behavior */
body {
    padding-top: 80px; /* مساحة للـ header */
}

/* Mobile responsive للـ sticky header */
@media (max-width: 768px) {
    .sticky-header {
        padding: 0.5rem 1rem !important;
        background: rgba(31, 41, 55, 0.95) !important;
        backdrop-filter: blur(10px) !important;
    }
    
    body {
        padding-top: 70px; /* مساحة أقل للموبايل */
    }
}
