/*
====================================================================
    خط Tajawal الموحد لجميع صفحات الموقع
    Universal Tajawal Font Implementation
====================================================================
*/

/* تحميل خط Tajawal محلياً دون استدعاءات خارجية */
@import url('./tajawal-local.css');

/* ================ إعدادات عامة ================ */
/* فرض خط Tajawal على جميع العناصر */
* {
    font-family: 'Tajawal', sans-serif !important;
}

*::before,
*::after {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ إعدادات الجسم والجذر ================ */
html {
    font-family: 'Tajawal', sans-serif !important;
    direction: rtl;
    text-align: right;
}

body {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 400;
    line-height: 1.7;
    direction: rtl;
    text-align: right;
}

/* ================ العناوين ================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 700;
    line-height: 1.4;
}

h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 700; }
h4 { font-weight: 600; }
h5 { font-weight: 500; }
h6 { font-weight: 500; }

/* ================ النصوص والفقرات ================ */
p, span, div, a, li, td, th, 
.text, .content, .description,
.paragraph, .article {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 400;
}

/* ================ الروابط ================ */
a, a:hover, a:focus, a:active, a:visited {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ القوائم ================ */
ul, ol, li,
.nav, .menu, .navigation,
.navbar, .dropdown-menu {
    font-family: 'Tajawal', sans-serif !important;
}

.nav-link, .navbar-nav .nav-link,
.dropdown-item {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 500;
}

/* ================ الأزرار ================ */
.btn, button, 
input[type="submit"], 
input[type="button"],
input[type="reset"],
.button {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 500;
}

.btn-primary, .btn-secondary,
.btn-success, .btn-danger,
.btn-warning, .btn-info {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ النماذج ================ */
input, textarea, select,
.form-control, .form-select,
.form-check-label, .form-label,
input[type="text"], input[type="email"],
input[type="password"], input[type="number"],
input[type="tel"], input[type="url"] {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 400;
}

::placeholder {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ الجداول ================ */
table, thead, tbody, tfoot,
tr, th, td,
.table, .table-responsive {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ البطاقات والمكونات ================ */
.card, .card-body, .card-header, .card-footer,
.card-title, .card-text,
.modal, .modal-body, .modal-header, .modal-footer,
.modal-title,
.alert, .badge, .breadcrumb,
.pagination, .page-link {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ الشريط الجانبي والتذييل ================ */
.sidebar, .footer, .header,
.main-content, .content-wrapper,
.container, .row, .col {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ عناصر خاصة بالموقع ================ */
.course-title, .course-description,
.news-title, .news-content,
.event-title, .event-description,
.faculty-name, .faculty-description,
.student-info, .grade-info {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ الأكورديون والتبويبات ================ */
.accordion, .accordion-button, .accordion-body,
.tab-content, .tab-pane, .nav-tabs .nav-link {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ العناصر التفاعلية ================ */
.tooltip, .popover,
.toast, .toast-body,
.progress, .carousel,
.carousel-caption {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ تحسينات للشاشات المختلفة ================ */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
}

@media (max-width: 576px) {
    body {
        font-size: 13px;
    }
    
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
}

/* ================ تحسينات خاصة بالعربية ================ */
[lang="ar"], .arabic {
    font-family: 'Tajawal', sans-serif !important;
    direction: rtl;
    text-align: right;
}

.rtl {
    direction: rtl;
    text-align: right;
}

/* ================ تحسينات للطباعة ================ */
@media print {
    * {
        font-family: 'Tajawal', sans-serif !important;
    }
}

/* ================ إصلاح مشاكل الخطوط الخارجية ================ */
/* إلغاء جميع خطوط Bootstrap و Font Awesome النصية */
.fa, .fas, .far, .fal, .fab {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands" !important;
}

/* الحفاظ على خطوط الأيقونات */
[class*="icon-"], [class*="fa-"],
.glyphicon, .material-icons {
    font-family: inherit;
}

/* ================ إعدادات خاصة للمكونات ================ */
/* التأكد من تطبيق الخط على مكونات خاصة */
.custom-select, .custom-control-label,
.was-validated .form-control:valid,
.was-validated .form-control:invalid {
    font-family: 'Tajawal', sans-serif !important;
}

/* مكونات خاصة بالمكتبة */
.dataTables_wrapper, .dataTables_info,
.dataTables_paginate, .dataTables_length {
    font-family: 'Tajawal', sans-serif !important;
}

/* ================ النهاية ================ */