/* ========================================
   RTL STYLES FOR ARABIC VERSION
   ======================================== */

/* Import base styles */
@import url('style.css');

/* ========================================
   ARABIC FONT - CAIRO
   ======================================== */

* {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* استثناء الأيقونات من خط Cairo */
i,
.fa,
.fas,
.far,
.fal,
.fab,
.fa-solid,
.fa-regular,
.fa-light,
.fa-brands,
[class*="fa-"],
svg {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
}

/* ========================================
   RTL DIRECTIONAL OVERRIDES
   ======================================== */

/* Text alignment and direction */
body {
    direction: rtl;
    /* لا نضع text-align هنا - ندعه يرث من العناصر الفردية */
}

html {
    scroll-behavior: smooth;
}

/* ========================================
   RTL LAYOUT ADJUSTMENTS
   ======================================== */

/* Container - نتركه بدون محاذاة ليرث من العناصر الداخلية */

/* Flexbox direction reversals - الحل النهائي والصحيح */
.navbar {
    direction: rtl !important; /* هذا هو المفتاح! */
}

/* لا حاجة لـ order - direction: rtl يعكس كل شيء تلقائياً */

.hero-content {
    flex-direction: row-reverse;
}

.about-content {
    flex-direction: row-reverse;
}

.contact-content {
    flex-direction: row-reverse;
}

.footer-grid {
    flex-direction: row-reverse;
}

/* Grid adjustments */
.about-features {
    flex-direction: column;
}

.about-feature {
    flex-direction: row-reverse;
}

.stats-grid {
    direction: rtl;
}

.vision-cards {
    direction: rtl;
}

.cards-grid {
    direction: rtl;
}

.steps-container {
    flex-direction: row-reverse;
}


.footer-social {
    flex-direction: row-reverse;
}

/* ========================================
   RTL MARGIN AND PADDING ADJUSTMENTS
   ======================================== */

/* Logo adjustments */
.logo {
    flex-direction: row-reverse;
}

/* Navigation links adjustments */
.nav-links {
    flex-direction: row;
    /* Keep the internal items in RTL order */
}

/* Hero section adjustments */
.hero-text {
    text-align: right;
}

.hero-title {
    text-align: right;
}

.hero-subtitle-title {
    text-align: right;
}

.hero-subtitle {
    text-align: right;
}

/* Card adjustments - البطاقات center في الإنجليزية فنتركها center */
/* تم حذف text-align: right من البطاقات */

/* Contact section adjustments */
.contact-features {
    direction: rtl;
}

.contact-feature {
    flex-direction: row-reverse;
    text-align: right;
}

.feature-icon {
    margin-left: 0;
    margin-right: 16px; /* الأيقونة على اليمين */
}

/* Form adjustments */
.contact-form {
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
}

.form-row {
    flex-direction: row-reverse;
    gap: 20px;
}

.form-group {
    text-align: right;
    margin-bottom: 24px;
}

.form-group label {
    text-align: right;
    display: block;
    margin-bottom: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    text-align: right;
    padding: 14px 16px;
    width: 100%;
    box-sizing: border-box;
}

.btn-submit {
    flex-direction: row-reverse;
}

.btn-submit svg {
    margin-right: 8px;
    margin-left: 0;
    transform: scaleX(-1);
}

/* Footer adjustments - نتركها ترث من direction: rtl */

/* ========================================
   RTL ICON DIRECTION ADJUSTMENTS
   ======================================== */

/* Flip icons that need RTL direction */
.footer-social a {
    margin-left: 20px;
    margin-right: 0;
}

/* ========================================
   RTL LANGUAGE SWITCHER
   ======================================== */

.language-switcher {
    margin-left: 20px;
    margin-right: 0;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(108, 39, 255, 0.1);
    border: 1px solid rgba(108, 39, 255, 0.2);
    border-radius: 20px;
    color: var(--primary-purple);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(108, 39, 255, 0.2);
    border-color: var(--primary-purple);
    transform: translateY(-2px);
}

.lang-btn i {
    font-size: 16px;
}

/* ========================================
   RTL MOBILE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    /* تحسين تباعد السطور للغة العربية على الجوال */
    body {
        line-height: 1.8 !important;
        font-size: 16px !important;
    }
    
    /* تحسين العناوين */
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.4 !important;
        margin-bottom: 16px !important;
    }
    
    /* تحسين الفقرات */
    p {
        line-height: 1.9 !important;
        margin-bottom: 20px !important;
        font-size: 16px !important;
    }
    
    /* تحسين section titles */
    .section-title {
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }
    
    .section-subtitle {
        line-height: 1.8 !important;
        margin-bottom: 24px !important;
        font-size: 16px !important;
    }
    
    .section-label {
        margin-bottom: 16px !important;
    }
    
    /* Mobile navigation */
    .nav-links {
        flex-direction: column;
        align-items: center;
        right: auto !important;
        left: 0 !important;
        width: 100% !important;
        direction: rtl;
        padding: 100px 24px 40px !important;
    }
    
    .nav-links a {
        padding: 18px 0 !important;
        line-height: 1.6 !important;
    }
    
    .language-switcher {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 24px;
    }
    
    .language-switcher .lang-btn {
        padding: 12px 20px !important;
        gap: 10px !important;
        border-radius: 25px !important;
        font-size: 15px !important;
    }
    
    .language-switcher .lang-btn i {
        font-size: 16px !important;
    }
    
    .language-switcher .lang-btn span {
        font-size: 15px !important;
    }
    
    /* إصلاح زر الإغلاق (hamburger) */
    .hamburger {
        right: auto !important;
        left: 20px !important;
        transform: scale(1) !important;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px) !important;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px) !important;
    }
    
    /* Mobile hero */
    .hero-content {
        flex-direction: column-reverse;
        padding: 40px 20px !important;
    }
    
    .hero-text {
        text-align: center;
        padding: 0 10px;
    }
    
    .hero-title,
    .hero-subtitle-title,
    .hero-subtitle {
        text-align: center;
    }
    
    .hero-title {
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }
    
    .hero-subtitle-title {
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
    }
    
    .hero-subtitle {
        line-height: 1.8 !important;
    }
    
    /* Mobile about section */
    .about-content {
        display: grid !important;
        grid-template-columns: 1fr !important; /* عمود واحد فقط */
        gap: 40px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 20px !important;
    }
    
    .about-text {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center;
        padding: 0 10px !important;
    }
    
    .about-text .section-title {
        line-height: 1.4 !important;
        margin-bottom: 20px !important;
    }
    
    .about-text .section-subtitle {
        line-height: 1.9 !important;
    }
    
    .about-features {
        align-items: center !important;
        width: 100% !important;
        gap: 20px !important;
    }
    
    .about-feature {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px !important;
    }
    
    /* تحسين البطاقات */
    .use-case-card,
    .step-card,
    .vision-card {
        padding: 24px 20px !important;
        margin-bottom: 20px !important;
    }
    
    .use-case-card h3,
    .step-card h3,
    .vision-card h3 {
        line-height: 1.5 !important;
        margin-bottom: 12px !important;
    }
    
    .use-case-card p,
    .step-card p,
    .vision-card p {
        line-height: 1.8 !important;
    }
    
    /* Mobile contact */
    .contact-content {
        flex-direction: column;
        padding: 0 20px !important;
        gap: 40px !important;
    }
    
    .contact-info {
        padding: 0 10px !important;
    }
    
    .contact-info .section-title {
        line-height: 1.4 !important;
        margin-bottom: 16px !important;
    }
    
    .contact-info .section-subtitle {
        line-height: 1.8 !important;
    }
    
    .contact-features {
        align-items: center;
        gap: 20px !important;
        margin-top: 30px !important;
    }
    
    .contact-feature {
        text-align: right !important;
        padding: 16px !important;
    }
    
    .contact-feature .feature-icon {
        margin-left: 0 !important;
        margin-right: 12px !important;
    }
    
    .contact-feature h4 {
        line-height: 1.5 !important;
        margin-bottom: 8px !important;
        text-align: right !important;
    }
    
    .contact-feature p {
        line-height: 1.7 !important;
        text-align: right !important;
    }
    
    /* تحسين الفورم على الجوال - 90% من viewport */
    .contact-content {
        width: 90vw !important;
        max-width: 90vw !important;
        margin-left: calc(-45vw + 50%) !important;  /* توسيط النموذج */
        padding: 0 !important;
    }
    
    .contact-form-wrapper {
        padding: 0 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .contact-form {
        width: 100% !important;
        max-width: 100% !important;
        padding: 30px 20px !important;
        box-sizing: border-box !important;
    }
    
    .form-group {
        margin-bottom: 20px !important;
        width: 100% !important;
    }
    
    .form-row {
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .form-row .form-group {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    
    .form-group label {
        line-height: 1.6 !important;
        margin-bottom: 8px !important;
        display: block !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 16px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
    }
    
    .form-group textarea {
        min-height: 120px !important;
        resize: vertical !important;
    }
    
    .btn-submit {
        padding: 14px 28px !important;
        font-size: 16px !important;
        margin-top: 10px !important;
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Mobile footer */
    .footer-grid {
        flex-direction: column;
        align-items: center;
        padding: 60px 20px 40px !important;
        gap: 40px !important;
    }
    
    .footer-col {
        text-align: center;
        padding: 0 10px !important;
    }
    
    .footer-col h4 {
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
    }
    
    .footer-col ul {
        text-align: center;
        gap: 12px !important;
    }
    
    .footer-col ul li a {
        line-height: 1.8 !important;
        padding: 8px 0 !important;
    }
    
    .footer-description {
        line-height: 1.8 !important;
        padding: 0 10px !important;
    }
    
    .footer-bottom {
        padding: 30px 20px !important;
        line-height: 1.7 !important;
    }
    
    /* Mobile steps */
    .steps-container {
        flex-direction: column;
        padding: 0 20px !important;
        gap: 30px !important;
    }
    
    /* تحسين الأقسام */
    section {
        padding: 60px 0 !important;
    }
    
    .section-header {
        margin-bottom: 40px !important;
        padding: 0 20px !important;
    }
    
    /* تحسين Solutions Grid */
    .cards-grid {
        padding: 0 20px !important;
        gap: 20px !important;
    }
    
    /* تحسين Vision Section */
    .vision-section {
        padding: 60px 20px !important;
    }
    
    .vision-cards {
        gap: 24px !important;
    }
    
    /* Mobile vision cards */
    .vision-cards {
        grid-template-columns: 1fr;
    }
    
    /* Mobile solutions cards */
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    /* تحسين الأزرار */
    .btn-gradient,
    .btn-outline {
        padding: 14px 28px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        min-height: 50px !important;
    }
    
    /* تحسين العناوين الرئيسية */
    h1 {
        font-size: 36px !important;
    }
    
    h2 {
        font-size: 28px !important;
    }
    
    h3 {
        font-size: 22px !important;
    }
    
    h4 {
        font-size: 18px !important;
    }
    
    /* تحسين المسافات بين الأقسام */
    .about-sidrah,
    .vision-section,
    .solutions-section,
    .how-it-works,
    .contact-sales {
        padding: 60px 0 !important;
    }
    
    /* تحسين Social Proof */
    .social-proof {
        padding: 40px 20px !important;
    }
    
    .social-proof-label {
        line-height: 1.6 !important;
        margin-bottom: 24px !important;
    }
    
    /* تحسين Automation Demo */
    .automation-demo {
        padding: 60px 20px !important;
    }
    
    .demo-content {
        gap: 40px !important;
    }
    
    .demo-text h2 {
        line-height: 1.4 !important;
        margin-bottom: 20px !important;
    }
    
    .demo-text p {
        line-height: 1.9 !important;
    }
    
    .feature-list li {
        line-height: 1.8 !important;
        padding: 10px 0 !important;
    }
    
    /* تحسين Integrations */
    .integrations-section {
        padding: 60px 20px !important;
    }
    
    /* تحسين How It Works */
    .how-it-works .section-header {
        margin-bottom: 50px !important;
    }
}

/* ========================================
   SCROLL ANIMATIONS - FADE UP
   ======================================== */

/* Initial state - hidden */
.fade-up {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    filter: blur(2px);
    transition: opacity 1.2s cubic-bezier(0.42, 0, 0.58, 1), 
                transform 1.2s cubic-bezier(0.42, 0, 0.58, 1),
                filter 1.2s cubic-bezier(0.42, 0, 0.58, 1);
    transition-delay: 0.3s;
    will-change: opacity, transform, filter;
}

/* Visible state */
.fade-up.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Delay variations for staggered animations */
.fade-up.delay-1 {
    transition-delay: 0.45s;
}

.fade-up.delay-2 {
    transition-delay: 0.6s;
}

.fade-up.delay-3 {
    transition-delay: 0.75s;
}

.fade-up.delay-4 {
    transition-delay: 0.9s;
}

/* Smoother animation for cards */
.fade-up-fast {
    opacity: 0;
    transform: translateY(35px) scale(0.95);
    filter: blur(1px);
    transition: opacity 1s cubic-bezier(0.42, 0, 0.58, 1), 
                transform 1s cubic-bezier(0.42, 0, 0.58, 1),
                filter 1s cubic-bezier(0.42, 0, 0.58, 1);
    transition-delay: 0.3s;
    will-change: opacity, transform, filter;
}

.fade-up-fast.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* ========================================
   RTL ANIMATION ADJUSTMENTS
   ======================================== */

/* Surreal scene - keep standard layout */
.surreal-scene {
    direction: ltr;
}

/* Glass cards - no RTL adjustments needed */

/* ========================================
   RTL AUTOMATION DEMO SECTION
   ======================================== */

.demo-content {
    flex-direction: row-reverse;
}

.demo-text {
    text-align: right;
}

.feature-list {
    text-align: right;
    list-style: none;
    padding: 0;
}

.feature-list li {
    text-align: right;
    padding-right: 0;
    padding-left: 0;
}

.demo-arrow {
    transform: scaleX(-1);
}

/* ========================================
   RTL INTEGRATIONS SECTION
   ======================================== */

.integrations-carousel {
    direction: ltr; /* Keep carousel animation direction */
}

/* ========================================
   RTL SOCIAL PROOF SECTION
   ======================================== */

.social-proof-label {
    text-align: center;
}

.logo-grid {
    direction: ltr; /* Keep logos in standard layout */
}

/* ========================================
   RTL SPECIFIC TYPOGRAPHY
   ======================================== */

/* Better Arabic line height */
p {
    line-height: 1.8;
}

.section-subtitle {
    line-height: 1.8;
}

/* ========================================
   RTL BUTTON ADJUSTMENTS
   ======================================== */

.btn-gradient,
.btn-outline {
    text-align: center;
}

/* ========================================
   RTL BACK TO TOP BUTTON
   ======================================== */

.back-to-top {
    left: 30px;
    right: auto;
}

/* تم دمج تعليمات Mobile Menu مع RTL Mobile Adjustments في الأعلى */
