/* ===================================
   Cairo Font Integration
   تطبيق خط Cairo
   =================================== */

/* تطبيق الخط على العناصر الأساسية */
body,
html {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
    font-weight: 400;
    line-height: 1.7;
}

/* تطبيق الخط على العناوين */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
    font-weight: 700;
}

/* تطبيق الخط على الفقرات */
p {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

/* تطبيق الخط على الروابط */
a {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

/* تطبيق الخط على الأزرار */
button,
.btn,
.optech-default-btn,
.optech-icon-btn {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

/* تطبيق الخط على النماذج */
input,
textarea,
select {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

/* تطبيق الخط على القوائم */
ul, ol, li {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

/* تطبيق الخط على الجداول */
table, th, td {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

/* تطبيق الخط على عناصر محددة */
.optech-hero-content h5,
.optech-hero-content h1,
.optech-hero-content p {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

.optech-section-title h2 {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

.optech-iconbox-data h5,
.optech-iconbox-data p {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

.optech-blog-content h4,
.optech-blog-content p {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

.optech-portfolio-data h4,
.optech-portfolio-data p {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

/* تطبيق الخط على Header */
.optech-header-info,
.navbar .navbar-nav .nav-link {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

/* تطبيق الخط على Footer */
.optech-footer-textarea,
.optech-footer-menu {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
}

/* تحسين عرض النص العربي */
body[dir="rtl"] {
    text-align: right;
    direction: rtl;
}

body[dir="rtl"] h1,
body[dir="rtl"] h2,
body[dir="rtl"] h3,
body[dir="rtl"] h4,
body[dir="rtl"] h5,
body[dir="rtl"] h6 {
    text-align: right;
}

body[dir="rtl"] p {
    text-align: right;
}

/* تحسين المسافات للنص العربي */
body[dir="rtl"] .optech-hero-content {
    text-align: right;
}

body[dir="rtl"] .optech-section-title.center {
    text-align: center;
}

/* تحسين الخط للعناصر الصغيرة */
.optech-blog-meta,
.optech-header-info ul li,
small,
.small {
    font-family: 'Cairo', 'Sora', Arial, sans-serif !important;
    font-size: 14px;
}

/* تحسين وزن الخط */
.font-weight-bold,
.fw-bold,
strong,
b {
    font-weight: 700 !important;
}

.font-weight-normal,
.fw-normal {
    font-weight: 400 !important;
}

/* تحسين حجم الخط للعناوين */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
}

h5 {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 500;
}

h6 {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    font-weight: 500;
}

/* تحسين النص للقراءة */
p {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}

/* تحسين الخط للأزرار */
.optech-default-btn .btn-wraper {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* تحسين الخط للقوائم */
.navbar .navbar-nav .nav-link {
    font-weight: 500;
    font-size: 16px;
}

/* تحسين الخط للـ Footer */
.optech-footer-menu ul li a {
    font-size: 15px;
    line-height: 1.6;
}

/* تحسين الأداء */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Media Queries للخط */
@media (max-width: 767px) {
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    p {
        font-size: 15px;
        line-height: 1.7;
    }
}

@media (max-width: 575px) {
    body {
        font-size: 14px;
    }
    
    p {
        font-size: 14px;
    }
    
    .optech-default-btn {
        font-size: 14px;
    }
}

/* تحسين الخط للطباعة */
@media print {
    * {
        font-family: 'Cairo', Arial, sans-serif !important;
    }
}