/* Cairo Font and RTL Enhancements - FORCE CAIRO ON EVERYTHING */
*, *::before, *::after {
    font-family: 'Cairo', 'Tajawal', 'Amiri', Arial, sans-serif !important;
}

/* FORCE Cairo on all headings */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
}

/* FORCE Cairo on all text elements */
p, span, div, a, li, td, th, label, input, textarea, select, button {
    font-family: 'Cairo', sans-serif !important;
}

/* FORCE Cairo on specific classes */
.fw-semibold, .fw-bold, .font-weight-bold, .font-weight-semibold {
    font-family: 'Cairo', sans-serif !important;
}

/* Specific targeting for features section */
.card h3, .card p, section h3, section p {
    font-family: 'Cairo', sans-serif !important;
}

/* Features cards specific styling */
.col-md-6.col-xl-4 h3, 
.col-md-6.col-xl-4 p {
    font-family: 'Cairo', sans-serif !important;
    direction: rtl !important;
    text-align: right !important;
}

html {
    direction: rtl !important;
    lang: ar !important;
}

body {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Cairo', 'Tajawal', 'Amiri', Arial, sans-serif !important;
}

/* Force RTL for all text elements */
h1, h2, h3, h4, h5, h6, p, span, div, a, li, td, th {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Cairo', sans-serif !important;
}

/* Navigation RTL */
.navbar-nav {
    direction: rtl !important;
}

.nav-link {
    text-align: right !important;
}

/* Cards and content areas */
.card, .card-body {
    direction: rtl !important;
    text-align: right !important;
}

/* Lists */
ul, ol, li {
    direction: rtl !important;
    text-align: right !important;
}

/* Form elements */
input, textarea, select {
    direction: rtl !important;
    text-align: right !important;
}

/* Buttons */
.btn {
    font-family: 'Cairo', sans-serif !important;
}

/* Tables */
table, th, td {
    direction: rtl !important;
    text-align: right !important;
}

/* Flex items */
.d-flex {
    flex-direction: row-reverse !important;
}

/* Float overrides for RTL */
.float-left {
    float: right !important;
}

.float-right {
    float: left !important;
}

/* Text alignment overrides */
.text-left {
    text-align: right !important;
}

.text-right {
    text-align: left !important;
}

/* Margin and padding RTL adjustments */
.ml-auto {
    margin-right: auto !important;
    margin-left: unset !important;
}

.mr-auto {
    margin-left: auto !important;
    margin-right: unset !important;
}

/* Bootstrap RTL fixes */
.ms-auto {
    margin-left: auto !important;
    margin-right: unset !important;
}

.me-auto {
    margin-right: auto !important;
    margin-left: unset !important;
}

/* Ensure Cairo font loads properly */
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/cairo/v17/SLXVc1nY6HkvalIhTp2mxdt0UX8.woff2) format('woff2');
    unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

/* Numbers styling - ensure English numbers are clearly visible */
.statistics-number, .number, .count {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    direction: ltr !important; /* Numbers read left to right even in RTL */
    display: inline-block;
}

/* Override any LTR settings */
[dir="ltr"] {
    direction: rtl !important;
}

/* Force RTL on root elements */
:root {
    --bs-body-direction: rtl !important;
}

/* Ensure proper RTL for specific components */
.landing-page * {
    direction: rtl !important;
}

/* Special handling for statistics section */
.feature-card .h1 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 800 !important;
}

.feature-card .h5 {
    font-family: 'Cairo', sans-serif !important;
    text-align: right !important;
}