html, body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
    font-size: 16px; /* حجم مناسب للقراءة */
    line-height: 1.8; /* تباعد بين الأسطر لتحسين القراءة */
    background-color: #f8f9fa;
    padding-top: 80px; /* تعديل القيمة حسب ارتفاع الـ Navbar */
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.navbar-nav .nav-link {
    text-align: right;
}

.custom-navbar {
    background-color: #232222 !important;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000; /* لضمان أن يكون فوق أي عناصر أخرى */
    padding: 10px 0;
}

/* ✅ جعل اللوجو Responsive */
.logo {
    width: 95px; /* الحجم الافتراضي */
    height: auto;
    transition: all 0.3s ease-in-out;
}

/* تكبير اللوجو في الشاشات الكبيرة */
@media (min-width: 992px) {
    .logo {
        width: 150px;
    }
}

/* تصغير اللوجو في الشاشات الصغيرة */
@media (max-width: 768px) {
    .logo {
        width: 100px;
    }
}

/* ✅ تأثير عند تمرير الماوس على "الرئيسية" و"الأقسام" */
.nav-hover {
    position: relative;
    transition: all 0.3s ease-in-out;
}

/* ✅ عند تمرير الماوس، يظهر خط تحت النص */
.nav-hover::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background-color: #c98e29; /* لون التأثير */
    transition: width 0.3s ease-in-out;
}

/* ✅ عند تمرير الماوس، يكبر النص ويظهر الخط */
.nav-hover:hover {
    transform: scale(1.1);
    color: #c98e29 !important;
}

.nav-hover:hover::after {
    width: 100%;
}

.nav-links {
    margin-right: 20px; /* تغيير هذه القيمة للتحكم في المسافة */
}

/* تحسين مظهر شريط التنقل */
.navbar {
    padding: 10px 0;
}

/* تحسين زر تسجيل الخروج */
.navbar .btn-danger {
    font-weight: bold;
    border-radius: 20px;
    transition: all 0.3s ease-in-out;
}

/* تأثير عند تمرير الماوس على زر تسجيل الخروج */
.navbar .btn-danger:hover {
    background-color: #42171b;
    transform: scale(1.1);
}

.container {
    flex: 1;
}

.text-gray{
    color: rgb(157 104 49);
}

.card {
    border-radius: 10px;
}

.btn-dark:hover {
    background-color: #444;
}

.featured-article {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}
.featured-badge {
    background: #ff5722;
    color: #fff;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 3px;
}

/* ✅ تصميم كروت المقالات */
.article-card {
    height: 100%;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ✅ تحسين صورة المقال */
.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* ✅ تصميم العنوان */
.article-card .card-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* ✅ تحسين زر "عرض المزيد" */
.article-card .btn-primary {
    background-color: #ff9800;
    border: none;
    transition: background-color 0.3s ease-in-out;
}

.article-card .btn-primary:hover {
    background-color: #e68900;
}

/* ✅ تصميم الميتا (التاريخ) */
.article-meta {
    margin-bottom: 10px;
}

.article-meta .badge {
    font-size: 0.9rem;
    padding: 6px 12px;
}

/* ✅ تنسيق المقال */
.article-img {
    width: 100%;
    max-height: 400px; /* التحكم في الارتفاع لتجنب الصور الضخمة */
    object-fit: cover; /* جعل الصورة مناسبة دون تشويه */
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.article-meta {
    font-size: 14px;
    color: #555;
}

/* ✅ تحسين تنسيق المقال */
.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

/* ✅ تحسين تصميم زر العودة */
.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ff6600;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-back:hover {
    background: #e65c00;
    text-decoration: none;
    color: white;
}

/* ✅ أزرار مشاركة المقال */
.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.share-buttons a {
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 16px;
    color: white;
    transition: 0.3s;
}

.share-facebook { background: #3b5998; }
.share-twitter { background: #1da1f2; }
.share-whatsapp { background: #25d366; }

.share-buttons a:hover {
    opacity: 0.8;
}

/* ✅ تحسين تصميم المقالات ذات الصلة */
.related-articles {
    margin-top: 30px;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
}

.related-articles h5 {
    margin-bottom: 15px;
    font-size: 20px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.related-item:last-child {
    border-bottom: none;
}

.related-item img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

/* ✅ تنسيق القائمة الجانبية - أحدث المقالات */

.latest-articles {
    display: flex;
    align-items: center;
    gap: 10px; /* إضافة مسافة بين الصورة والنص */
    padding: 8px 0;
    border-bottom: 1px solid #ddd; /* خط فاصل بين المقالات */
}

.latest-articles:last-child {
    border-bottom: none; /* إزالة الخط الفاصل لآخر عنصر */
}

.latest-articles img {
    width: 70px; /* حجم الصورة المصغرة */
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
}

.latest-articles .article-title {
    font-size: 10px;
    font-weight: bold;
    color: #333;
}

.latest-articles .article-date {
    font-size: 12px;
    color: #777;
}

/* ✅ جعل الصور المصغرة أصغر للأجهزة الصغيرة */
@media (max-width: 768px) {
    .latest-articles img {
        width: 50px;
        height: 50px;
    }
}

.custom-separator {
    border: none;
    height: 2px;
    background: #9f9f9f;
    margin: 20px 0;
}

.breadcrumb {
    background: #f8f9fa;
    font-size: 14px;
}

.breadcrumb-item a {
    text-decoration: none;
    color: #007bff;
    transition: 0.3s;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
    color: #0056b3;
}

.btn-read-more {
    background-color: #a7741b;
    color: white;
    transition: 0.3s;
}
.btn-read-more:hover {
    background-color: #6d3312;
    transform: scale(1.05);
}

.pagination-link {
    cursor: pointer;
}

.hover-effect {
    color: #333; /* اللون الأساسي */
    transition: color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.hover-effect:hover {
    color: #0056b3; /* تغيير اللون عند تمرير الماوس */
    text-decoration: underline; /* إضافة خط تحت النص */
    transform: translateY(-2px); /* تحريك العنوان للأعلى قليلاً */
    cursor: pointer;
}

* {
    user-select: none; /* يمنع تحديد النص */
}

.footer {
    background: linear-gradient(135deg, #222, #000); /* ✅ تدرج ألوان عصري */
    text-align: center;
    font-size: 14px;
}

.footer p {
    margin-bottom: 5px;
}

.footer-link {
    color: #FFD700; /* ✅ لون ذهبي للرابط */
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.footer-link:hover {
    color: #f8b400; /* ✅ لون أفتح عند تمرير الماوس */
    text-decoration: underline;
}
