/* ============================================
   HERO SECTION RTL/LTR FIX
   إصلاح توافق Hero Section مع RTL/LTR
   ============================================ */

/* RTL - اللغة العربية (الافتراضي) */
[dir="rtl"] .text-white {
    text-align: right !important;
}

[dir="rtl"] .inline-flex {
    flex-direction: row-reverse;
}

[dir="rtl"] h1,
[dir="rtl"] p {
    text-align: right;
}

[dir="rtl"] .flex.flex-col.sm\:flex-row {
    justify-content: flex-start;
}

/* LTR - اللغة الإنجليزية */
[dir="ltr"] .text-white {
    text-align: left !important;
}

[dir="ltr"] .inline-flex {
    flex-direction: row;
}

[dir="ltr"] h1,
[dir="ltr"] p {
    text-align: left;
}

[dir="ltr"] .flex.flex-col.sm\:flex-row {
    justify-content: flex-start;
}

/* إصلاح الأيقونات في الأزرار */
[dir="rtl"] .btn-hover .flex.items-center {
    flex-direction: row-reverse;
}

[dir="ltr"] .btn-hover .flex.items-center {
    flex-direction: row;
}

/* إصلاح الشارة العلوية */
[dir="rtl"] .glass-effect.rounded-full {
    flex-direction: row-reverse;
}

[dir="ltr"] .glass-effect.rounded-full {
    flex-direction: row;
}

/* إصلاح max-width للفقرات */
[dir="rtl"] p.max-w-2xl {
    margin-right: 0;
    margin-left: auto;
}

[dir="ltr"] p.max-w-2xl {
    margin-left: 0;
    margin-right: auto;
}

/* إصلاح الإحصائيات */
[dir="rtl"] .flex.items-center.justify-center.gap-8 {
    flex-direction: row;
}

[dir="ltr"] .flex.items-center.justify-center.gap-8 {
    flex-direction: row-reverse;
}

/* تحسين المسافات */
[dir="rtl"] .space-y-8 > * + * {
    margin-top: 2rem;
}

[dir="ltr"] .space-y-8 > * + * {
    margin-top: 2rem;
}

/* إصلاح النص المتدرج - منع التقطع */
.text-gradient {
    padding: 0.15em 0 !important;
    display: inline-block !important;
    line-height: 1.35 !important;
    letter-spacing: 0.02em !important;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* تحسين العرض للنصوص العربية */
[dir="rtl"] .text-gradient {
    font-weight: 900 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* تحسين العرض للنصوص الإنجليزية */
[dir="ltr"] .text-gradient {
    font-weight: 800 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* إصلاح العنوان الرئيسي */
h1 {
    overflow: visible !important;
}

h1 span {
    overflow: visible !important;
}

/* ============================================
   RTL/LTR ICON ORDER FIX
   إصلاح ترتيب الأيقونات في الشارات
   ============================================ */

/* RTL - اللغة العربية: الأيقونة على اليمين */
[dir="rtl"] .order-first {
    order: 2 !important;
}

/* LTR - اللغة الإنجليزية: الأيقونة على اليسار */
[dir="ltr"] .order-first {
    order: -1 !important;
}

/* ============================================
   ENGLISH TEXT SIZE ADJUSTMENT
   تعديل حجم النص الإنجليزي
   ============================================ */

/* تقليل حجم العنوان الثانوي في اللغة الإنجليزية */
[dir="ltr"] h1 .text-gradient {
    font-size: 2rem !important; /* 32px */
}

/* للشاشات المتوسطة */
@media (min-width: 640px) {
    [dir="ltr"] h1 .text-gradient {
        font-size: 2.25rem !important; /* 36px */
    }
}

/* للشاشات الكبيرة */
@media (min-width: 1024px) {
    [dir="ltr"] h1 .text-gradient {
        font-size: 2.5rem !important; /* 40px */
    }
}
