/* إضافة خط القاهرة للنصوص العربية */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

/* تطبيق خط القاهرة على النصوص العربية */
html[lang="ar"] {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* فئة Tailwind للخط العربي */
.font-cairo {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* استثناء الأيقونات من تطبيق الخط العربي */
html[lang="ar"] [class*="ri-"],
html[lang="ar"] .remix-icon,
html[lang="ar"] i[class^="ri-"],
html[lang="ar"] i[class*=" ri-"],
html[lang="ar"] .icon,
html[lang="ar"] .fa,
html[lang="ar"] [class*="fa-"],
html[lang="ar"] .material-icons {
    font-family: "remixicon" !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* تطبيق خط القاهرة على النصوص فقط (بدون الأيقونات) */
html[lang="ar"] *:not([class*="ri-"]):not(.remix-icon):not(i[class^="ri-"]):not(i[class*=" ri-"]):not(.icon):not(.fa):not([class*="fa-"]):not(.material-icons) {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* تحسين عرض النص العربي */
html[lang="ar"] {
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga", "kern";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* تطبيق خط القاهرة على العناصر المحددة */
html[lang="ar"] h1, 
html[lang="ar"] h2, 
html[lang="ar"] h3, 
html[lang="ar"] h4, 
html[lang="ar"] h5, 
html[lang="ar"] h6 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600;
}

html[lang="ar"] p,
html[lang="ar"] span,
html[lang="ar"] div,
html[lang="ar"] a,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select,
html[lang="ar"] label {
    font-family: 'Cairo', sans-serif !important;
}

/* تحسين المظهر للنصوص العربية */
html[lang="ar"] .text-sm {
    font-size: 0.9rem;
    line-height: 1.4;
}

html[lang="ar"] .text-base {
    font-size: 1rem;
    line-height: 1.6;
}

html[lang="ar"] .text-lg {
    font-size: 1.15rem;
    line-height: 1.6;
}

html[lang="ar"] .text-xl {
    font-size: 1.25rem;
    line-height: 1.5;
}

html[lang="ar"] .text-2xl {
    font-size: 1.5rem;
    line-height: 1.4;
}

html[lang="ar"] .text-3xl {
    font-size: 1.875rem;
    line-height: 1.3;
}

/* تحسين أزرار الموقع باللغة العربية */
html[lang="ar"] .btn,
html[lang="ar"] button,
html[lang="ar"] .button {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 500;
}

/* تحسين النماذج باللغة العربية */
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 400;
}

/* تحسين القوائم والنافيجيشن باللغة العربية */
html[lang="ar"] .nav-link,
html[lang="ar"] .menu-item,
html[lang="ar"] .navbar a {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 500;
}

/* تحسين الكروت والمحتوى باللغة العربية */
html[lang="ar"] .card,
html[lang="ar"] .card-title,
html[lang="ar"] .card-text,
html[lang="ar"] .content {
    font-family: 'Cairo', sans-serif !important;
}

/* تحسين العناصر الخاصة للموقع */
html[lang="ar"] .header-container *,
html[lang="ar"] .footer *,
html[lang="ar"] .sidebar * {
    font-family: 'Cairo', sans-serif !important;
}

/* تحسين النصوص في الجداول */
html[lang="ar"] table,
html[lang="ar"] th,
html[lang="ar"] td {
    font-family: 'Cairo', sans-serif !important;
}

/* تحسين النصوص في النماذج والرسائل */
html[lang="ar"] .form-group,
html[lang="ar"] .alert,
html[lang="ar"] .message,
html[lang="ar"] .notification {
    font-family: 'Cairo', sans-serif !important;
}

/* ضبط اتجاه النص للغة العربية */
html[lang="ar"] {
    direction: rtl;
    text-align: right;
}

/* تحسين شكل الأرقام العربية */
html[lang="ar"] .arabic-numerals {
    font-feature-settings: "lnum" 0;
}

/* تحسين التباعد بين الأحرف للغة العربية */
html[lang="ar"] p,
html[lang="ar"] div,
html[lang="ar"] span {
    letter-spacing: 0.01em;
    word-spacing: 0.02em;
}

/* قواعد إضافية لضمان عمل الأيقونات بشكل صحيح */
/* RemixIcon خاص */
[class*="ri-"]::before,
i[class*="ri-"]::before,
.ri-user-line::before,
.ri-user-settings-line::before,
.ri-user-add-line::before,
.ri-logout-box-r-line::before,
.ri-dashboard-line::before,
.ri-home-5-line::before,
.ri-information-line::before,
.ri-money-dollar-circle-line::before,
.ri-line-chart-line::before,
.ri-megaphone-line::before,
.ri-bank-card-line::before,
.ri-question-line::before,
.ri-contacts-line::before,
.ri-menu-line::before,
.ri-close-line::before,
.ri-global-line::before {
    font-family: "remixicon" !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* إجبار جميع عناصر الأيقونات على استخدام خط الأيقونات */
html[lang="ar"] [class*="ri-"]::before,
html[lang="ar"] i[class*="ri-"]::before {
    font-family: "remixicon" !important;
}

/* قاعدة عامة لجميع الأيقونات */
.ri::before,
[class^="ri-"]::before,
[class*=" ri-"]::before {
    font-family: "remixicon" !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* تطبيق خط القاهرة على العناصر المحددة */
html[lang="ar"] h1, 
html[lang="ar"] h2, 
html[lang="ar"] h3, 
html[lang="ar"] h4, 
html[lang="ar"] h5, 
html[lang="ar"] h6 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600;
}

html[lang="ar"] p,
html[lang="ar"] span,
html[lang="ar"] div,
html[lang="ar"] a,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select,
html[lang="ar"] label {
    font-family: 'Cairo', sans-serif !important;
}

/* تحسين المظهر للنصوص العربية */
html[lang="ar"] .text-sm {
    font-size: 0.9rem;
}

html[lang="ar"] .text-base {
    font-size: 1rem;
}

html[lang="ar"] .text-lg {
    font-size: 1.15rem;
}

html[lang="ar"] .text-xl {
    font-size: 1.25rem;
}

html[lang="ar"] .text-2xl {
    font-size: 1.5rem;
}

html[lang="ar"] .text-3xl {
    font-size: 1.875rem;
}

/* تحسين أزرار الموقع باللغة العربية */
html[lang="ar"] .btn,
html[lang="ar"] button,
html[lang="ar"] .button {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 500;
}

/* تحسين النماذج باللغة العربية */
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 400;
}

/* تحسين القوائم والنافيجيشن باللغة العربية */
html[lang="ar"] .nav-link,
html[lang="ar"] .menu-item,
html[lang="ar"] .navbar a {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 500;
}

/* تحسين الكروت والمحتوى باللغة العربية */
html[lang="ar"] .card,
html[lang="ar"] .card-title,
html[lang="ar"] .card-text,
html[lang="ar"] .content {
    font-family: 'Cairo', sans-serif !important;
}