 /* تعريف المتغيرات لألوان الوضع الفاتح والداكن */
        :root {
            --primary-color: #2874f0; /* أزرق أساسي */
            --secondary-color: #1a53bf; /* أزرق ثانوي أغمق */
            --background-light: #f0f4ff; /* خلفية فاتحة جداً */
            --text-dark: #2c3e50; /* نص داكن */
            --text-medium: #555; /* نص متوسط */
            --card-background: #ffffff; /* خلفية البطاقة */
            --section-background: #ffffff; /* خلفية القسم */
            --accent-color: #ff5722; /* لون مميز للإعلان والأزرار */
            --header-height: 0px; /* سيتم تحديده بالـ JS */
            --banner-height: 0px; /* سيتم تحديده بالـ JS */
            --border-color-light: #e0e0e0; /* لون حدود فاتح */
            --shadow-light: rgba(0, 0, 0, 0.08); /* ظل فاتح */
        }

        /* الوضع الداكن */
        body.dark-mode {
            --primary-color: #5a8ee7; /* أزرق فاتح قليلاً للداكن */
            --secondary-color: #3b6edc; /* أزرق متوسط للداكن */
            --background-light: #1a202c; /* خلفية داكنة جداً */
            --text-dark: #e0e0e0; /* نص فاتح */
            --text-medium: #b0b0b0; /* نص متوسط فاتح */
            --card-background: #2d3748; /* خلفية بطاقة داكنة */
            --section-background: #222b3a; /* خلفية قسم داكنة */
            --accent-color: #ff8a65; /* لون مميز للإعلان في الوضع الداكن */
            --border-color-light: #4a5568; /* لون حدود داكن */
            --shadow-light: rgba(0, 0, 0, 0.2); /* ظل داكن */
        }

        body {
            margin: 0;
            padding: 0;
            font-family: 'Cairo', sans-serif;
            background: var(--background-light);
            color: var(--text-dark);
            direction: rtl;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            
            transition: background-color 0.4s ease, color 0.4s ease;
            line-height: 1.6; /* تحسين قراءة النص */
			padding-top: 100px; /* أعلى من ارتفاع الهيدر */
          


        }



	

/* تحسين الاستجابة */
@media (max-width:480px){
  .section-header{ font-size:1.6em }
}

/* زر وضع الظلام */
        .dark-mode-toggle {
            background-color: white;
            color: var(--primary-color);
            border: 1px solid var(--primary-color);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            font-size: 1.2em;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: all 0.3s ease;
            margin-right: 15px; /* لإعطاء مسافة بينه وبين عناصر الـ nav */
        }

        .dark-mode-toggle:hover {
            background-color: var(--primary-color);
            color: white;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        }

        body.dark-mode .dark-mode-toggle {
            background-color: #3b455c;
            color: #f0f0f0;
            border-color: #f0f0f0;
        }
        body.dark-mode .dark-mode-toggle:hover {
            background-color: #f0f0f0;
            color: var(--primary-color);
        }
/* --------------- الحاوية الرئيسية --------------- */
.container {
    max-width: 1460px;
   
    margin-left: auto;
    display: flex;
    flex-direction: row-reverse;
    gap: 30px;
    padding: 25px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    margin: 8rem auto 2rem; /* زادت المسافة من الأعلى */
    margin-right: 50px; /* **دفع النموذج إلى اليمين بترك هامش 50px** */

}

/* تغليف الرسالة لتمركزها */
#no-results-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none; /* سيتم التحكم بها من JS */
    width: 100%;
    text-align: center;
}

/* شكل النص */
#no-results {
    font-size: 1.6rem;
    color: #777;
    padding: 20px;
}
/* --------------- الشريط الجانبي --------------- */
.sidebar {
    width: 280px; /* زيادة عرض الشريط الجانبي قليلاً */
    padding-left: 25px;
    border-left: 1px solid #eee;
}

.sidebar h2 {
    color: #1e88e5; /* تم التعديل إلى الأزرق */
    font-size: 1.7rem;
    margin-top: 0;
    text-align: right;
    margin-bottom: 18px;
    border-bottom: 2px solid #1e88e5; /* خط أكثر بروزاً */
    padding-bottom: 10px;
}

.search-filter {
    margin-bottom: 30px;
}

.search-filter input {
    width: calc(100% - 22px);
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc; /* لون حدود أفتح */
    border-radius: 6px;
    outline: none;
    margin-bottom: 20px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); /* ظل داخلي ناعم */
}

.categories-filter {
    margin-top: 30px;
}

.categories-filter h3 {
    color: #1e88e5; /* تم التعديل إلى الأزرق */
    font-size: 1.4rem;
    margin-bottom: 15px;
    text-align: right;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-right: 10px;
}

.category-item input[type="radio"] {
    margin-left: 12px;
}

.category-item label {
     width: calc(100% - 22px);
	 padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.category-item label:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* --------------- محتوى المدونة --------------- */
.blog-content {
    flex: 1;
    padding-right: 25px;
    position: relative; /* لنقطة ارتكاز الخط الفاصل */
    padding-left: 40px; /* مساحة للخط الفاصل */
}

.blog-content h2.section-title {
    color: #1e88e5; /* تم التعديل إلى الأزرق */
    font-size: 2.4rem; /* حجم أكبر للعنوان */
    text-align: right;
    margin-bottom: 25px;
    border-bottom: 3px solid #1e88e5; /* خط أكثر سمكاً */
    padding-bottom: 15px;
    position: relative;
}

.blog-item {
    display: flex; /* لجعل الصورة والنص في صف واحد */
    padding: 20px;
    margin-bottom: 25px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out;
}
.blog-item:hover {
    transform: translateY(-3px); /* ارتفاع طفيف عند التمرير */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* ظل أكثر بروزاً عند التمرير */
}

.image-container {
    flex-shrink: 0; /* منع الصورة من الانكماش */
    margin-left: 35px; /* تحريك الصورة إلى اليمين */
    margin-right: 5px; /* مسافة ثابتة بين الصورة والنص */
}

.blog-item img {
    max-width: 150px; /* عرض الصورة ثابت */
    height: auto; /* الحفاظ على النسبة الأصلية للصورة */
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.text-container {
    flex-grow: 1; /* جعل النص يملأ المساحة المتبقية */
	font-size: 1.6rem;
}

.blog-item h3 {
    color: #1e88e5;
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 12px;
    
    /* منع النص من الانتقال إلى سطر جديد */
    white-space: nowrap;
    
    /* إخفاء النص الزائد الذي يتجاوز الحدود */
    overflow: hidden;
    
    /* إضافة نقاط متتابعة في حال كان النص طويلًا جدًا */
    text-overflow: ellipsis;
}


.blog-item.hidden {
    display: none;
}


/* --------------- الخط الرأسي الفاصل --------------- */
.blog-content::before {
    content: "";
    position: absolute;
    top: calc(2.4rem + 15px + 25px); /* تعديل نقطة البداية بناءً على حجم العنوان الجديد */
    left: -15px;
    height: calc(100% - (2.4rem + 15px + 25px + 25px)); /* تعديل الارتفاع */
    width: 2px;
    background-color: #1e88e5; /* تم التعديل إلى الأزرق */
    z-index: 1;
}

.sidebar {
    margin-top: calc(2.4rem + 15px + 25px); /* محاذاة الشريط الجانبي مع بداية الخط */
}

/* --------------- سهم الصعود للأعلى --------------- */
#scrollTopButton {
    display: none; /* سيتم عرضه بواسطة JavaScript عند التمرير */
    position: fixed;
    bottom: 20px;
    left: 20px; /* سيتم تعديله إلى right في حالة RTL بواسطة JavaScript */
    background-color: #1e88e5; /* تم التعديل إلى الأزرق */
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}
#scrollTopButton:hover {
    opacity: 1;
}

#scrollTopButton svg {
    width: 24px;
    height: 24px;
    display: block;
}
.pagination {
    text-align: center;
    margin: 30px 0;
}

.pagination .page-btn {
    background-color: #f0f0f0;
    border: none;
    margin: 0 5px;
    padding: 8px 15px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination .page-btn:hover {
    background-color: #ccc;
}

.pagination .page-btn.active {
    background-color: #333;
    color: white;
    font-weight: bold;
}

/* --------------- تأثيرات الحركة --------------- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

