/* 1. استيراد خط Cairo لجمال النصوص العربية */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

/* 2. تعريفات الألوان والأبعاد الأساسية */
:root {
    --max-width: 1260px;
    --indent: 30px;
    --indent-negative: -30px;
    --ui-bg: #fff;
    --ui-bg-darker: #f5f5f5;
    --bg: #fff;
    --bg-lighter: #fff;
    --bg-darker: #f2f6f9;
    --bg-2: #eef2f6;
    --bdc: #e5e5e5;
    --bdc-darker: #dcdcdc;
    --tt: #333;
    --tt-lighter: #666;
    --tt-lightest: #999;
    --accent: #2563eb; /* الأزرق المميز */
    --gradient: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    --bsh: 0 5px 15px rgba(0,0,0,0.05);
    --bsh-2: 0 10px 20px rgba(0,0,0,0.1);
}

/* 3. الإعدادات العامة وإصلاح الخطوط والاتجاه */
body { 
    direction: rtl; 
    text-align: right;
    font-family: 'Cairo', sans-serif !important;
    background-color: #f9f9f9;
}
.rtl { direction: rtl; }

/* 4. إصلاح محاذاة النصوص والقوائم العامة */
.full-text, .full-story, 
.full-text p, .full-text div, .full-text span,
.full-story p, .full-story div {
    text-align: right !important;
    direction: rtl !important;
    display: block;
}

/* 5. إصلاح الترقيم وصفحات التعليقات */
.page__comments .navigation, .pagination {
    justify-content: flex-start !important;
    text-align: right !important;
    direction: rtl !important;
}

/* --- بداية الأكواد الأساسية للقالب --- */

/* ================================================= */
/* === أيقونات السوشيال ميديا (وسط الصفحة) === */
/* ================================================= */

/* الحاوية الرئيسية للأيقونات - مسؤولة عن التوسيط */
.social-block {
    display: flex;              /* تفعيل فليكس بوكس */
    justify-content: center;    /* توسيط أفقي */
    align-items: center;        /* توسيط عمودي */
    flex-wrap: wrap;            /* السماح بالنزول لسطر جديد */
    gap: 10px;                  /* مسافة بين الأيقونات */
    margin: 20px 0;             /* هوامش خارجية */
    width: 100%;
}

/* التنسيق الأساسي للزر الدائري */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;                /* حجم الزر */
    height: 45px;
    border-radius: 50%;         /* دائري */
    text-decoration: none !important;
    transition: all 0.3s ease;
    background-color: #555;     /* لون افتراضي */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* تنسيق الأيقونة داخل الزر */
.social-btn i, .social-btn .fab, .social-btn .fas {
    font-size: 22px;
    color: #fff !important; /* إجبار لون الأيقونة أبيض */
    line-height: 1;
}

/* تأثير عند مرور الماوس */
.social-btn:hover {
    opacity: 0.9;
    transform: translateY(-4px); /* حركة للأعلى */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* --- ألوان الشبكات المحددة --- */
.social-btn.facebook { background-color: #1877f2; }
.social-btn.twitter { background-color: #000000; } 
.social-btn.youtube { background-color: #ff0000; }
.social-btn.telegram { background-color: #0088cc; }
.social-btn.whatsapp { background-color: #25d366; }
.social-btn.linkedin { background-color: #0077b5; }
.social-btn.pinterest { background-color: #bd081c; }
.social-btn.tiktok { background-color: #000000; }
.social-btn.rss { background-color: #f26522; }
.social-btn.snapchat { background-color: #fffc00; }
.social-btn.snapchat i { color: #333 !important; text-shadow: none; }
.social-btn.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

/* الهيكل الرئيسي (Basic Layout) */
.wrapper {min-width: 320px; position: relative;}
.wrapper-container {max-width: var(--max-width); margin: 0 auto; position: relative; z-index: 20;}
.wrapper-main {padding: 0 var(--indent); min-height: 100vh; display: flex; flex-direction: column;}
.content {flex: 1 0 auto; padding: 30px 0;}

/* القائمة العلوية الثابتة */
.header, .nav {background-color: var(--bg-lighter); box-shadow: var(--bsh); padding-top: 15px; padding-bottom: 15px;}
.header {gap: 20px 20px;}
.nav {border-top: 1px solid var(--bdc); position: sticky; top: 0; z-index: 999; transition: all 0.3s ease;}

.cols {display: grid; gap: 30px 30px; grid-template-columns: 260px minmax(0,1fr) 260px;}
.col-side {display: grid; gap: 30px; align-content: start; position: relative; z-index: 60;}
.footer {background-color: var(--bg-darker); color: var(--tt-lighter); padding-top: 30px; padding-bottom: 30px; font-size: 14px; line-height: 1.6;}
.content-block--bg {background-color: var(--bg-lighter); border-radius: 10px; padding: 40px; margin-bottom: 20px;}

#scrolltop {position: fixed; width: 60px; height: 60px; line-height: 60px; right: 10px; bottom: 10px; z-index: 990; display: none; background-color: var(--bg-lighter); color: var(--tt-lightest); cursor: pointer; font-size: 24px; border-radius: 50%; text-align: center; box-shadow: var(--bsh);}

/* عناصر الهيدر */
.logo {display: inline-flex; align-items: center; height: 40px; position: relative; font-weight: 700; font-size: 28px; letter-spacing: 1px; padding-left: 40px; margin-right: 40px; background: url(../images/logo.svg) 0 6px / 30px no-repeat; color: var(--tt) !important;}
.logo span {font-weight: 400; font-size: 10px; text-transform: uppercase; color: var(--tt-lightest); position: absolute; right: -10px; top: 0;}
.search-block form {max-width: 400px; position: relative;}
.search-block__input[type="text"], .search-block__input[type="text"]:focus {border-radius: 20px; box-shadow: none; border: 1px solid var(--bdc); background-color: var(--bg-lighter); height: 40px; line-height: 38px; padding: 0 50px 0 20px;}
.search-block__input[type="text"]:not(:focus):placeholder {color: var(--tt-lightest); opacity: 1; font-size: 14px;}
.search-block__btn {position: absolute; right: 0; top: 0; width: 50px; background: none; color: var(--tt); border-radius: 20px; padding: 0; font-size: 16px;}

/* القائمة (Nav) */
.nav__list {margin: 0 -40px;}
.nav__list > li, .side-nav > li {flex-grow: 1; font-size: 14px; position: relative;}
.nav__list > li + li {border-left: 1px solid var(--bdc);}
.nav__list > li > a, .side-nav > li > a {height: 40px;font-weight: 700; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; padding: 0 20px;}
.nav__list-hidden {width: 240px; padding: 40px; border-radius: 0 0 10px 10px; position: absolute; left: 0; top: 100%; background-color: var(--bg-lighter); box-shadow: var(--bsh-2); display: grid; gap: 10px; visibility: hidden; opacity: 0; transform: translateY(40px);}
.submenu > a::after {content:"\f107"; font-weight: 300; font-family:'Font Awesome 5 Pro'; margin-left:7px; display: inline-block;}
.side-nav {border-radius: 6px; padding: 20px 0px; background-color: var(--bg-lighter);}
.side-nav .nav__list-hidden {left: 100%; top: -40px; border-radius: 0 10px 10px 0;}
.side-nav > li > a {justify-content: flex-start;}

/* الجزء العلوي والأقسام */
.top {gap: 15px 15px; margin-bottom: 30px;}
.top-item {flex: 1 1 30%; box-shadow: var(--bsh); border-radius: 6px; padding: 0;}
.top-item:nth-child(2), .top-item:nth-child(3) {flex-basis: 60%;}
.top-item__desc {position: relative; z-index: 5; min-height: 140px; padding: 20px; color: #fff; gap: 10px; max-width: 100%;}
.top-item__title {font-weight: 600; color: #fff !important; font-size: 15px;}
.top-item__date {font-size: 12px;}
.top-item::before {height: 100%; background: var(--gradient); opacity: 0.6;}
@media screen and (min-width: 1220px) {
	.top {display: grid; grid-template-columns: repeat(6,1fr);}
	.top-item {grid-column: span 1;}
	.top-item:nth-child(3), .top-item:nth-child(4) {grid-column: span 2;}
	.top-item:nth-child(1) {grid-column: span 3; grid-row: span 2;}
	.top-item__desc {height: 100%;}
	.top-item:nth-child(1) .top-item__title {font-size: 24px; margin-bottom: 30px;}
}

.sect__header {margin-bottom: 30px;}
.sect__sort {height: 36px;}
.sect__sort ul {height: 36px; background-color: var(--bg-lighter); border-radius: 6px; position: relative; z-index: 50; cursor: pointer; text-align: center;}
.sect__sort ul li {height: 36px; line-height: 36px; visibility: hidden; padding: 0 10px; font-size: 13px;}
.sect__sort ul li[class], .sect__sort ul:hover li {visibility: visible;}
.sect__sort ul:hover {height: auto; box-shadow: var(--bsh);}
.sect__sort ul li[class]::before {content: 'Сортировать по:'; margin-right: 6px;}
.sect__sort li.asc a::after, .sect__sort li.desc a::after {content: "\f063"; font-family: "Font Awesome 5 Pro"; display: inline-block; margin-left: 6px; font-weight: 300; font-size: 10px;}
.sect__sort li.desc a::after {content: "\f062"}
.speedbar {margin-bottom: 15px; margin-top: -15px; font-size: 13px; color: var(--tt-lightest);}
.descr {display: grid; grid-gap: 20px; line-height: 1.7; color: var(--tt-lighter); grid-column: 1 / -1; padding: 20px 0;}
.descr h1, .descr h2, .descr h3 {font-weight: 400; font-size: 18px; color: var(--tt); line-height: 1.3;}
.descr a {text-decoration: underline; color: var(--accent);}
.descr ul li {position: relative; padding-left: 25px; margin-left: 25px;}
.descr ul li::before {content:"\f00c"; font-weight: 300; font-family:'Font Awesome 5 Pro'; color: var(--accent); position: absolute; left: 0; top: 0;}

/* الأخبار القصيرة (Short Story) */
.short {background-color: var(--bg-lighter); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05);}
.short__header, .short__desc {padding: 30px;}
.short__title {font-size: 24px; font-weight: 700;}
.short__meta {margin-top: 15px; gap: 10px 20px; font-size: 12px; color: var(--tt-lighter);}
.short__meta-item a {color: var(--accent); text-decoration: underline;}
.short__meta .fal {margin-right: 6px; opacity: 0.6;}
.short__img {height: 260px; display: block;}
.short__text {color: var(--tt-lighter); line-height: 1.6; margin-bottom: 38px;}
.short.grid-item {position: relative; padding-bottom: 60px;}
.short.grid-item .short__header, .short.grid-item .short__desc {padding: 20px;}
.short.grid-item .short__header {padding-bottom: 0;}
.short.grid-item .short__title {font-size: 16px;}
.short.grid-item .short__img {height: 0;}
.short.grid-item .short__meta {gap: 10px 10px;}
.short.grid-item .short__text {-webkit-line-clamp: 4; font-size: 14px; margin: 0;}
.short__btn .fal {opacity: 1; font-size: 18px; margin: 0;}
.short__btn {padding: 0; width: 40px;}
.short__desc .short__meta {position: absolute; left: 0; right: 0; bottom: 0; padding: 20px;}

/* القائمة الجانبية (Sidebar) */
.side-block__title {font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--bdc-darker);}
.side-block__content {display: grid; gap: 15px; grid-template-columns: repeat(auto-fill,minmax(240px,1fr));}
.side-block--sticky {position: sticky; left: 0; top: 80px;}
.popular {background-color: var(--bg-darker); border-radius: 6px; overflow: hidden; position: relative;}
.popular__desc {padding: 16px 20px; padding-top: 14px;}
.popular__title {font-weight: 700;}
.popular__text {font-size: 13px; color: var(--tt-lighter); margin-top: 6px; -webkit-line-clamp: 4;}
.attent {text-align: center; position: relative; border-radius: 6px; padding: 20px; background-color: var(--bg-lighter);}
.attent__title {font-weight: 700; margin: 20px 0;}
.attent .short__meta {margin: 0; margin-bottom: 20px;}
.int {position: relative; gap: 20px; height: 60px;}
.int__img {width: 60px; height: 60px; box-shadow: var(--bsh); border-radius: 6px;}
.int__title div {-webkit-line-clamp: 3; font-size: 14px;}

/* الفوتر والترقيم */
.footer__text {color: var(--tt);}
.footer__text a {margin: 0 20px 0 0; color: var(--accent);}
.pagination__btn-loader a, .pagination__btn-loader span {display: inline-flex; justify-content: center; align-items: center; height: 60px; padding: 0 50px; border-radius: 30px; background: var(--bg-darker); color: var(--tt-lighter); font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: 1px; width: 400px; max-width: 100%;}
.pagination__pages {gap: 10px 10px;}
.pagination__pages a, .pagination__pages span {display: inline-block; line-height: 38px; padding: 0 10px; min-width: 40px; font-size: 16px; border: 1px solid var(--bdc-darker); border-radius: 20px;}
.pagination__pages span:not(.nav_ext) {background: var(--accent); color: #fff; border-color: var(--accent);}

/* الصفحة الداخلية (Inner Page) */
.page__tags {font-size: 0; gap: 10px 4px; margin-top: 40px;}
.page__tags .fal {height: 30px; line-height: 30px; font-size: 16px; margin-right: 6px;}
.page__tags a {display: flex; align-items: center; white-space: nowrap; height: 30px; border-radius: 2px; padding: 0 10px; font-size: 11px; text-transform: uppercase; color: var(--tt-lighter); border: 1px solid var(--bdc-darker);}
.page__tags + .page__footer {margin-top: -10px;}
.page__footer {font-size: 14px; border-top: 1px solid var(--bdc); padding-top: 20px;}
.page__fav a {padding-left: 50px; position: relative; display: block; color: var(--tt-lightest); line-height: 1.3; font-size: 13px;}
.page__fav .fal {width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--bdc); border-radius: 50%; color: var(--accent); position: absolute; left: 0; top: 50%; margin-top: -20px;}
.page__btn-comments {height: 30px; padding: 0 10px; font-size: 11px; text-transform: uppercase; margin-left: 20px;}
.page__prev-next {background-color: var(--bg-2); width: 300px; padding: 20px; float: left; margin: 0 20px 10px 0; padding-bottom: 3px;}
.page__prev-next-link {line-height: 1.5; display: block; margin-bottom: 20px; font-weight: 300;}
.page__prev-next-link div {font-size: 12px; color: var(--tt-lightest); margin-bottom: 5px;}
.popular-item__img {width: 100px; height: 60px; margin-right: 20px;}
.popular-item__title {line-height: 1.4; -webkit-line-clamp: 3;}
.popular-item:hover, .page__prev-next-link:hover {text-decoration: underline;}

/* ================================================= */
/* === تنسيق المقالات (نسخة محسنة بدون فراغات) === */
/* ================================================= */

.full-text {
    line-height: 1.6;        /* ارتفاع السطر مناسب للقراءة */
    font-size: 16px;         /* حجم خط مريح */
    word-wrap: break-word;
    color: #333;
}

.full-text a {
    text-decoration: underline;
    color: #2563eb;
    font-weight: bold;
}

/* تقليل الهوامش لإزالة الفراغات الزائدة */
.full-text p, 
.full-text > ul, 
.full-text > ol, 
.full-text table, 
.page__title,
.full-text img:not(.emoji) {
    margin-bottom: 15px !important; 
    margin-top: 0;
}

/* تنسيق خاص للعناوين داخل المقال */
.full-text h1, .full-text h2, .full-text h3, .full-text h4, .full-text h5 {
    font-weight: 700;
    margin-top: 25px !important;    
    margin-bottom: 10px !important;
    color: #000;
    line-height: 1.3;
}

/* إخفاء الفقرات الفارغة تماماً */
.full-text p:empty {
    display: none !important;
}

/* تنسيق القوائم والنقاط لليمين */
.full-text ul, .full-text ol {
    text-align: right !important;
    direction: rtl !important;
    padding-right: 25px !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    list-style-position: inside;
}
.full-text li {
    margin-bottom: 5px;
}

/* تنسيق الصور */
.full-text > img[style*="left"], .full-text > .highslide img[style*="left"] {margin:0 15px 15px 0;}
.full-text > img[style*="right"], .full-text > .highslide img[style*="right"] {margin:0 0 15px 15px;}

/* الجداول والفيديو */
.full-text table, .video-inside > * {width:100%; border-collapse: collapse;}
.full-text table tr td {padding:8px 12px; border:1px solid #ddd;}
.full-text table tr:nth-child(2n+1) {background-color:#f9f9f9;} 
.full-text table tr:nth-child(1) {background-color:#eef2f6; font-weight: bold;}

.video-responsive {padding-top: 56.25%; position: relative; margin-bottom: 20px;}
.video-responsive > iframe, .video-responsive > video {position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 8px;}
.full-text iframe {width: 100%; aspect-ratio: 16/9; height: auto; margin-bottom: 20px;}

/* أزرار التحميل */
.fdl-btn {
    display: block; position: relative; box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    text-decoration: none !important; padding: 12px 15px 12px 100px; 
    background: linear-gradient(to right, #27ae60, #2ecc71); 
    color: #fff !important; border-radius: 8px; margin-bottom: 15px;
}
.fdl-btn-title {font-weight: 700; font-size: 15px;}
.fdl-btn-size {font-size: 13px; opacity: 0.9;}
.fdl-btn-icon {
    width: 40px; height: 40px; border-radius: 50%; margin-top: -20px; font-size: 20px;
    position: absolute; left: 20px; top: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.2);
}

/* التعليقات (Comments) */
.page__comments {margin: 0; margin-top: 30px; padding: 20px; border-radius: 10px; background: var(--bg-lighter);}
.page__comments-title {font-size: 21px; font-weight: 700; margin-bottom: 20px;}
.page__comments-info {font-size: 14px; margin-bottom: 15px; margin-top: -15px; color: var(--tt-lighter); line-height: 1.5;}
.page__comments-info .fal {color: #eb4d4b; margin-right: 6px;}
.page__comments-header {position: relative; padding-right: 130px;}
.page__comments-btn {position: absolute; right: 0; top: 0;}
.ac-form {display: grid; gap: 20px; margin-bottom: 40px;}
.ac-form__bottom {gap: 10px 20px;}
.ac-form .message-info {margin: 0;}
.ac-form .tox-tinymce {height: 160px !important;}
.comments_subscribe + br {display: none;}
.mass_comments_action {display: flex; align-items: center; max-width: 800px; white-space: nowrap; margin-bottom: 20px;}
.mass_comments_action select {flex: 1 1 0; margin: 0 -8px 0 20px;}
.mass_comments_action .bbcodes {border-radius: 0; padding: 0 10px;}
.has-comms {margin-bottom: -20px;}
.comment-item__title {font-weight: 700; font-size: 18px; margin-bottom: 20px;}
.comment-item {margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--bdc-darker);}
.comment-item__img {width: 40px; height: 40px; border-radius: 50%; margin-right: 10px;}
.comment-item__letter {width: 100%; height: 100%; text-transform: uppercase; font-weight: 700; position: absolute; left: 0; top: 0; z-index: 5; color: #fff; font-size: 18px;}
.comment-item__author {font-weight: 600; font-size: 14px;}
.comment-item__date {color: var(--tt-lightest); margin-top: 4px; font-size: 12px;}
.comment-item__main {margin: 8px 0 6px 0; font-size: 15px;}
.comment-item__rating {white-space: nowrap; font-size: 14px;}
.comment-item__rating a {margin-left: 6px;}
.comment-item__rating a > span:first-child {color: #6ab04c; margin-right: 2px;}
.comment-item__rating a:last-child > span:first-child {color: #eb4d4b;}
.comment-item__reply a {font-size: 12px; margin-right: 20px; color: var(--tt-lightest);}
.comment-item__reply a .fal {margin-left: 5px;}
.comment-item__reply + .comment-item__reply a .fal {margin-left: 0; margin-right: 5px;}
.comment-item__controls {text-align: right; font-size: 12px; margin-right: -15px;}
.comment-item__controls li {display: inline-block; vertical-align: middle; margin: 0 0 0 10px; height: 16px; line-height: 16px;}
.comment-item__controls a:not(:hover) {color: var(--tt-lightest);}
.comment-item__footer a:hover {text-decoration: underline;}
.comment-item__rating a:hover > span:first-child {text-decoration: none;}
.comment-item__controls .checkbox {transform: scale(0.8,0.8); margin-left: 5px;}

/* LOGIN */
.login {position: fixed; z-index: 999; left: 50%; top: 50%; transform: translate(-50%,-50%); overflow: hidden; background-color: var(--ui-bg); border-radius: 4px; width: 400px; box-shadow: 0 0 0 10px rgba(255,255,255,0.2), 0 15px 45px rgba(0,0,0,1);}
.login__header {padding: 20px 40px; background-color: var(--ui-bg-darker);}
.login__title {font-size: 18px; font-weight: 600; padding: 1px 0; text-transform: capitalize;}
.login__close {cursor: pointer; font-size: 24px; opacity: 0.6; margin-left: 20px;}
.login__title a {border-bottom: 1px dotted var(--tt-lighter); margin-left: 10px; font-weight: 400; color: var(--tt-lightest);}
.login__content {padding: 20px 40px;}
.login__row {margin-bottom: 20px; position: relative; display: block; font-size: 14px; color: var(--tt-lightest);}
.login__caption {font-size: 14px; color: var(--tt); margin-bottom: 10px;}
.login__caption a {text-decoration: underline; margin-left: 6px; color: var(--accent);}
.login__input input {padding-left: 40px;}
.login__row .fal {opacity: 0.5; position: absolute; left: 0; bottom: 0; line-height: 40px; width: 40px; text-align: center;}
.login__row button {width: 100%;}
.login__social {background-color: var(--ui-bg-darker); padding: 20px 40px; text-align: center;}
.login__social-caption {font-size: 11px; text-transform: uppercase; margin-bottom: 10px;}
.login__social-btns a {display:inline-block; margin: 0 3px; vertical-align:top;}
.login__social-btns img {display:block; width:34px; height: 34px;}
.login__avatar {width: 40px; height: 40px; border-radius: 50%; margin-right: 10px;}
.login__menu {padding-left: 35px; padding-right: 35px; margin-bottom: -10px;}
.login__menu li {flex: 1 1 0; min-width: auto; max-width: 100%; margin: 0 5px 10px 5px;}
.login__menu a {display: block; border-radius: 6px; padding: 10px; text-align: center; white-space: nowrap; background-color: var(--ui-bg-darker); box-shadow: inset 0 0 10px rgba(0,0,0,0.1); font-size: 13px;}
.login__menu .fal {display: block; height: 30px; font-size: 24px; opacity: 0.3;}

/* Code Syntax Highlighter */
.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}
.hljs-doctag,.hljs-keyword,.hljs-formula{color:#a626a4}
.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e45649}
.hljs-literal{color:#0184bb}
.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta-string{color:#50a14f}
.hljs-built_in,.hljs-class .hljs-title{color:#c18401}
.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-type,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-number{color:#986801}
.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-title{color:#4078f2}
.hljs-emphasis{font-style:italic}
.hljs-strong{font-weight:700}
.hljs-link{text-decoration:underline}
figure{margin:0}
figure.align-left{float:left}
figure.align-right{float:right}
figure.image.align-center{display:table;margin-left:auto;margin-right:auto}
figure.image figcaption{padding:1rem;background-color:#fafafa;font-size:.8rem;caption-side:bottom;word-break:break-word;text-align:center}
figure.image.align-center figcaption{display:table-caption}
.comments-image-gallery{margin:0;padding:0;list-style:none;clear:both}
.comments-image-gallery li{list-style:none;margin:0;padding:0}
.comments-image-gallery li img{float:left;margin-right:5px;border:5px solid #fff;width:100px;height:100px;transition:box-shadow .5s ease}
.comments-image-gallery li img:hover{box-shadow:0 0 7px rgba(0,0,0,0.4)}
.mce-toc{border:1px solid #dbdada;margin:0 0 .7rem}
.mce-toc h2{margin:4px}
.mce-toc ul{padding-left:20px;list-style:none;margin-top:0;margin-bottom:0;margin-block-start:1em;margin-block-end:1em}
.mce-toc ul ul{padding-left:20px;margin-block-start:0;margin-block-end:0}
.mce-toc li{list-style-type:none}
.image-bordered{border:1px solid #ddd}
.image-shadows{box-shadow:#170000 0 4px 8px -2px,#170000 0 0 0 1px}
.image-padded{padding:.5rem}
.comments-user-profile{font-weight:700;cursor:pointer;color:#3394e6}
.mce-accordion summary{cursor:pointer}
.self_delete_link{border:0 none;display:inline-block;vertical-align:middle;cursor:pointer;padding:12px 27px;border-radius:10px;outline:none;background-color:#f44336;color:#fff;text-shadow:0 1px #333;text-decoration:none!important;box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);box-sizing:border-box;transition:all ease .1s;transition:all ease .1s}

/* 6. إصلاح قائمة الموبايل (لتختفي عن الديسكتوب وتظهر بشكل صحيح في الموبايل) */
.mobile-menu {
    position: fixed !important;
    left: -320px !important;
    top: 0 !important;
    width: 280px !important;
    height: 100% !important;
    background-color: #fff !important;
    z-index: 9999 !important;
    overflow-y: auto !important;
    transition: left 0.4s ease !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: block;
}
.mobile-menu.is-active {
    left: 0 !important;
}
/* إخفاء الخلفية السوداء افتراضياً */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 9990; display: none;
}
.overlay.is-active { display: block !important; }
/* إخفاء زر الإغلاق افتراضياً */
.mobile-menu-close {
    position: fixed; left: 280px; top: -50px; width: 40px; height: 40px;
    background: #e74c3c; color: #fff; text-align: center; line-height: 40px;
    cursor: pointer; z-index: 10000; transition: top 0.4s ease;
}
.mobile-menu-close.is-active { top: 0 !important; }

/* 7. قواعد الاستجابة (Responsive) */
@media screen and (min-width: 1220px) {
    /* إخفاء قائمة الموبايل تماماً على الديسكتوب لمنع التكرار */
    .mobile-menu, .overlay, .mobile-menu-close { display: none !important; }
}

@media screen and (max-width: 1220px) {
    body {background-image: none;}
    .wrapper {padding: 0; background-image: none; overflow: hidden;}
    .wrapper-container {max-width:1000px;}
    #scrolltop {width: 40px; height: 40px; line-height: 40px; font-size: 18px;}
    .nav, .col-side .js-this-in-mobile-menu, .header__link, .hm {display: none;}
    .header__btn-menu {display: inline-flex; width: 40px; padding: 0; font-size: 18px;}
    .cols {grid-template-columns: minmax(0,1fr);}
    .col-side {order: 10;}
    .footer {display: block; text-align: center;}
    .footer__text {margin: 20px 0;}
    .footer__logo {margin: 0;}
    .side-block--sticky {position: static;}
    .top-item {flex: 1 0 30% !important;}
}

@media screen and (max-width: 950px) {
    .wrapper-container {max-width:768px;}
    .top-item {flex: 1 0 200px !important;}
    .short__header, .short__desc, .content-block--bg {padding: 20px;}
    .short__text {margin-bottom: 20px;}
}

@media screen and (max-width: 760px) {
    .wrapper-container {max-width:640px;}
    .header {gap: 20px 10px;}
    .header__search {min-width: 100%; order: 10; margin: 0;}
    .header__search form {max-width: 100%;}
    .header__logo {flex: 1 1 0; max-width: 100%; min-width: 100px; margin: 0;}
    .header__logo span {position: static; font-size: 1em; text-transform: none; margin-left: 3px;}
    .top {gap: 10px 10px;}
    .short__title, .sect__title, h1, h2, h3, h4, h5 {font-size: 18px;}
    .header__btn-login {width: 40px; overflow: hidden; font-size: 0; padding: 0; display: block;}
    .header__btn-login::before {display: block; width: 40px; height: 40px; line-height: 40px; text-align: center; font-size: 18px; content:"\f007"; font-weight: 300; font-family:'Font Awesome 5 Pro';}
    .page .short, .content-block--bg, .page__comments {margin-left: -20px; margin-right: -20px; border-radius: 0;}
    .page__text .quote {margin-left: var(--indent-negative); margin-right: var(--indent-negative); padding-right: var(--indent);}
    .full-text h1, .full-text h2, .full-text h3, .full-text h4, .full-text h5 {font-size: 18px;}
    .ac-form__bottom > * {min-width: 100%;}
    .ac-form__bottom button {width: 100%; order: 10;}
    .mass_comments_action, .comment-item__controls, .comment-item__rating-caption {display: none;}
}

@media screen and (max-width: 590px) {
    .wrapper-container {max-width:480px;}
    .login {
        max-width: 90%; 
        max-height: 90%; 
        overflow-x: hidden; 
        overflow-y: auto; 
        z-index: 10005 !important;
    }
    .login__header, .login__content, .login__social, .pages-bg {padding-left: 20px; padding-right: 20px;}       
    .page__share {display: flex; min-width: 100%; margin: 0 0 20px 0px;}
    .page__yadzen {width: 100%; margin-bottom: 20px;}
    .page__meta, .page__date {font-size: 12px;}
    .page__header h1 {line-height: 1.4; font-size: 19px;}
    .page__poster {height: 240px;}
    .page__date {position: absolute; left: 0px; top: 30px;}
    .page__rating {top: 20px; bottom: auto; font-size: 13px;}
    .page__rating > * {width: 40px; padding: 5px; text-align: center; height: 70px;}
    .page__rating .fal {margin: 0; margin-bottom: 6px;}
}

@media screen and (max-width: 470px) {
    .wrapper-container22 {max-width:360px;}
    .header__logo {font-size: 22px;}
    .hm2, .page__comments-info {display: none;}
    .short__img {height: 160px;}
    .short__text {font-size: 13px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;}
    .pagination__btn-loader > * {width: 100% !important; padding: 0 !important;}
    .hm {display: block;}
    .full-text iframe {width: calc(100% + 40px); max-width: calc(100% + 40px); height: 260px; margin-left: -20px; margin-right: -20px;}
}

/* ================================================= */
/* === إصلاح محتويات قائمة الموبايل (حجم البنر والبحث والقائمة) === */
/* ================================================= */

/* 1. تصغير بنر المنصة الذكية داخل الموبايل */
.mobile-menu .smart-fit-card {
    width: auto !important;
    margin: 10px !important;
    padding: 15px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
.mobile-menu .smart-fit-title {font-size: 14px !important; margin-bottom: 5px !important;}
.mobile-menu .smart-fit-desc {font-size: 11px !important; line-height: 1.3 !important; margin-bottom: 10px !important;}
.mobile-menu .smart-fit-icon {width: 35px !important; height: 35px !important; font-size: 16px !important; margin-bottom: 5px !important;}
.mobile-menu .smart-fit-btn {padding: 8px 0 !important; font-size: 12px !important;}

/* 2. ضبط مربع بحث جوجل داخل الموبايل */
.mobile-menu .header__search, 
.mobile-menu .search-block {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 10px !important;
    margin-bottom: 10px !important;
}
.mobile-menu .search-block form {
    max-width: 100% !important;
}

/* 3. جعل القائمة عمودية (كل قسم في سطر) */
.mobile-menu ul, 
.mobile-menu .nav__list,
.mobile-menu .nav__list.d-flex {
    display: block !important;
    flex-direction: column !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mobile-menu ul li, 
.mobile-menu .nav__list li {
    display: block !important;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    border-left: none !important;
    border-bottom: 1px solid #f1f1f1 !important;
}

/* 4. تحسين شكل الروابط داخل القائمة */
.mobile-menu ul li a, 
.mobile-menu .nav__list li a {
    display: block !important;
    width: 100% !important;
    text-align: right !important;
    padding: 12px 20px !important;
    height: auto !important;
    line-height: normal !important;
    justify-content: flex-start !important;
    font-size: 15px !important;
    color: #333 !important;
}

/* 5. إظهار القائمة الفرعية دائماً */
.mobile-menu .submenu .nav__list-hidden {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    transform: none !important;
    width: 100% !important;
    box-shadow: none !important;
    background-color: #f4f6f9 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-top: 1px solid #eee !important;
}

.mobile-menu .submenu .nav__list-hidden li a {
    font-size: 13px !important;
    color: #555 !important;
    padding: 10px 30px 10px 10px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    font-weight: normal !important;
}

/* إخفاء سهم القائمة وتمييز العنوان الرئيسي */
.mobile-menu .submenu > a::after { display: none !important; }
.mobile-menu .submenu > a {
    font-weight: bold !important;
    background-color: #fff !important;
    border-bottom: 2px solid #2563eb !important;
}