/* ملف تحسين وضوح النصوص */
/* يضمن تباين جيد بين النصوص والخلفيات */

/* تحسين وضوح العناوين الرئيسية */
.hero-title {
    color: #ffffff !important;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(0, 0, 0, 0.5);
    font-weight: 700 !important;
    letter-spacing: 0.5px;
}

.hero-subtitle {
    color: #f8f9fa !important;
    text-shadow: 
        1px 1px 3px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(0, 0, 0, 0.6);
    font-weight: 400 !important;
    line-height: 1.6;
}

/* ملاحظة: لا نتدخل في ألوان عناوين/نصوص البطاقات بشكل عام حتى لا تختفي على الخلفيات الفاتحة */
/* في حال الحاجة، استخدم سياقات داكنة صريحة مثل .card.bg-dark أو .card.text-white */
/*.card.bg-dark .card-title, .card.text-white .card-title { color: #ffffff !important; }
.card.bg-dark .card-text, .card.text-white .card-text { color: #e9ecef !important; }*/

/* تحسين وضوح النصوص في البطاقات */
.card {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.card-header {
    background: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* تحسين وضوح النصوص في النماذج */
.form-control {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-weight: 500;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: #D4A574 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.3rem rgba(212, 165, 116, 0.3) !important;
}

.form-control::placeholder {
    color: #adb5bd !important;
    font-weight: 400;
}

.form-label {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* تحسين وضوح النصوص في الجداول */
.table {
    color: #ffffff !important;
}

.table th {
    background: linear-gradient(135deg, #D4A574, #8B4513) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.table td {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #e9ecef !important;
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* تحسين وضوح النصوص في التنبيهات */
.alert {
    border: 2px solid !important;
    font-weight: 500 !important;
}

.alert-primary {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(139, 69, 19, 0.2)) !important;
    border-color: #D4A574 !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2), rgba(28, 200, 138, 0.2)) !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.2)) !important;
    border-color: #ffc107 !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2), rgba(231, 76, 60, 0.2)) !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* تحسين وضوح النصوص في الأزرار */
.btn {
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    border-width: 2px !important;
}

.btn-primary {
    background: linear-gradient(135deg, #D4A574, #8B4513) !important;
    border-color: #D4A574 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8B4513, #D4A574) !important;
    border-color: #8B4513 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.4) !important;
}

.btn-outline-light {
    color: #ffffff !important;
    border-color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.btn-outline-light:hover {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border-color: #ffffff !important;
}

/* تحسين وضوح النصوص في الشريط العلوي */
.navbar-brand {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.nav-link {
    color: #e9ecef !important;
    font-weight: 500 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.nav-link:hover,
.nav-link.active {
    color: #D4A574 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* تحسين وضوح النصوص في الشارات */
.badge {
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.badge-primary {
    background: linear-gradient(135deg, #D4A574, #8B4513) !important;
    color: #ffffff !important;
}

.badge-secondary {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    color: #ffffff !important;
}

.badge-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: #ffffff !important;
}

.badge-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
    color: #ffffff !important;
}

.badge-danger {
    background: linear-gradient(135deg, #dc3545, #e74c3c) !important;
    color: #ffffff !important;
}

/* تحسين وضوح النصوص في القوائم */
.list-group-item {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #e9ecef !important;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* تحسين وضوح النصوص في التنقل */
.breadcrumb {
    background: transparent !important;
}

.breadcrumb-item {
    color: #adb5bd !important;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* تحسين وضوح النصوص في التذييل */
footer {
    background: linear-gradient(135deg, #0d0d0d, #1a1a1a) !important;
    color: #adb5bd !important;
}

footer h5 {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* تحسين وضوح النصوص في الشريط الجانبي */
.sidebar {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a) !important;
    border-right: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.sidebar .nav-link {
    color: #e9ecef !important;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(212, 165, 116, 0.2) !important;
    color: #D4A574 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* تحسين وضوح النصوص في الرسائل */
.message {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    color: #e9ecef !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

/* تحسين وضوح النصوص في التحميل */
.loading {
    color: #D4A574 !important;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* ملاحظة: تم إلغاء التغلب العام على عناوين h1..h6 لتجنّب إخفاء النصوص ذات التأثيرات الخاصة مثل النصوص المتدرجة */
/* احتفظ بإضافات الظلال فقط في العناصر التي نحددها يدوياً مثل .hero-title */

/* لا نقوم بتغيير لون الفقرات عالمياً لتفادي فقدان التباين على الخلفيات الفاتحة */
/* استخدم فئات السياق الداكن عند الحاجة فقط */
/*.bg-dark p, .text-white p { color: #e9ecef !important; }*/

/* تحسين وضوح النصوص في الروابط */
a {
    color: #D4A574 !important;
    font-weight: 500;
    text-decoration: none;
}

a:hover {
    color: #8B4513 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* تحسين وضوح النصوص في الأيقونات */
.fas, .far, .fab {
    color: inherit;
}

.text-primary .fas,
.text-primary .far,
.text-primary .fab {
    color: #D4A574 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* تحسين وضوح النصوص في النصوص الصغيرة */
small, .small {
    color: #adb5bd !important;
    font-weight: 400;
}

/* تحسين وضوح النصوص في النصوص المهمة */
.text-muted {
    color: #adb5bd !important;
}

.text-light {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* تحسين وضوح النصوص في النصوص الداكنة */
/* لا تتجاوز .text-dark إلى الأبيض بشكل عام حتى لا تختفي النصوص في الخلفيات الفاتحة */
.text-dark {
    color: #212529 !important;
}

/* تحسين وضوح النصوص في الخلفيات الفاتحة */
/* لا نغيّر لون النص داخل .bg-light إلى الأبيض لتجنّب ضعف التباين حين تكون الخلفية فاتحة */
.bg-light {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* تحسين وضوح النصوص في الخلفيات الداكنة */
.bg-dark {
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d) !important;
    color: #ffffff !important;
}

/* تحسين وضوح النصوص في الخلفيات الشفافة */
.bg-transparent {
    background-color: transparent !important;
}

/* تحسين وضوح النصوص في الحدود */
.border {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.border-primary {
    border-color: #D4A574 !important;
}

.border-secondary {
    border-color: #8B4513 !important;
}

/* تحسين وضوح النصوص في الظلال */
.shadow {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.shadow-lg {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}
