/* ==========================================================================
   المقال — صفحات التصنيفات والبحث والوسوم (archive) + صفحة المقال (single)
   للتراجع: احذف سطر enqueue الخاص بـ am-pages في am-home.php
   ========================================================================== */
:root {
  --p-card: #fff; --p-line: #e5e9f1; --p-ink: #0b1b3a; --p-text: #3f4d66; --p-muted: #5f6c82;
  --p-soft: #e9f0fc; --p-blue: #1456b8; --p-deep: #0b1b3a; --p-accent: #0ea5c6; --p-radius: 18px;
  --p-shadow: 0 1px 2px rgba(11,27,58,.04), 0 8px 24px rgba(11,27,58,.06);
}
.dark-skin {
  --p-card: #121d36; --p-line: #253452; --p-ink: #eaf1ff; --p-text: #c3cee4; --p-muted: #8493b0;
  --p-soft: #19305c; --p-blue: #3b82f6; --p-deep: #0a1226; --p-accent: #38bdf8;
  --p-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

/* ---------- عناصر مشتركة ---------- */
.archive .main-content, :is(.single-post,.am-static) .main-content, .search .main-content, .sidebar,
.archive .main-content *, :is(.single-post,.am-static) .main-content h1, :is(.single-post,.am-static) .main-content h2, :is(.single-post,.am-static) .main-content h3,
.archive .sidebar *, :is(.single-post,.am-static) .sidebar * { font-family: "Cairo", system-ui, sans-serif; }
.archive .container-wrapper, .am-static .container-wrapper, :is(.single-post,.am-static) .container-wrapper, .search .container-wrapper {
  background: var(--p-card) !important; border: 1px solid var(--p-line); border-radius: var(--p-radius); box-shadow: var(--p-shadow);
}
.archive #breadcrumb, :is(.single-post,.am-static) #breadcrumb, .search #breadcrumb {
  font-size: 13px; font-weight: 600; color: var(--p-muted); margin-bottom: 14px;
}
.archive #breadcrumb a, :is(.single-post,.am-static) #breadcrumb a { color: var(--p-muted); }
.archive #breadcrumb a:hover, :is(.single-post,.am-static) #breadcrumb a:hover { color: var(--p-blue); }
.archive #breadcrumb .current, :is(.single-post,.am-static) #breadcrumb .current { color: var(--p-ink); font-weight: 800; }

.post-meta, .post-meta a, .post-meta .meta-item { color: var(--p-muted); font-size: 12.5px; font-weight: 600; }
.post-meta .meta-author a { color: var(--p-ink); font-weight: 800; }

/* ---------- ترويسة صفحة التصنيف ---------- */
.archive .entry-header-outer, .search .entry-header-outer {
  background: linear-gradient(135deg, #0b1b3a 0%, #123a80 60%, #1456b8 100%) !important;
  border: 0 !important; padding: 26px 30px 24px; margin-bottom: 22px; color: #dbe6fb; position: relative; overflow: hidden;
}
.archive .entry-header-outer::after {
  content: ""; position: absolute; inset-inline-start: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,198,.35), transparent 70%); pointer-events: none;
}
.archive .entry-header-outer #breadcrumb, .archive .entry-header-outer #breadcrumb a { color: rgba(255,255,255,.7); }
.archive .entry-header-outer #breadcrumb .current { color: #fff; }
.archive .page-title { font-size: 32px; font-weight: 900; color: #fff; line-height: 1.4; margin: 0 0 8px; }
.archive .taxonomy-description, .archive .taxonomy-description p { color: #cfdcf5; font-size: 15px; line-height: 1.9; margin: 0 0 10px; }
.archive .sub-terms { margin-top: 12px; }
.archive .sub-terms .terms { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.archive .sub-terms .term, .archive .sub-terms .terms .term { margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; float: none !important; width: auto !important; }
.archive .sub-terms .term a {
  display: inline-block; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.14) !important; color: #fff !important;
  font-size: 13px; font-weight: 700; border: 1px solid rgba(255,255,255,.14); transition: all .2s;
}
.archive .sub-terms .term a:hover { background: #fff !important; color: #0b1b3a !important; }

/* ---------- قائمة المقالات (بطاقات في عمودين) ---------- */
.archive .mag-box .container-wrapper, .search .mag-box .container-wrapper { background: none !important; border: 0 !important; box-shadow: none; padding: 0 !important; }
.archive .mag-box-title, .search .mag-box-title { display: none; }
.archive .posts-items, .search .posts-items {
  display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none;
}
.archive .posts-items::before, .archive .posts-items::after, .search .posts-items::before, .search .posts-items::after { display: none; }
.archive .posts-items > li.post-item, .search .posts-items > li.post-item {
  display: flex; flex-direction: column; float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important;
  background: var(--p-card); border: 1px solid var(--p-line) !important; border-radius: 16px; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s;
}
.archive .posts-items > li.post-item:hover, .search .posts-items > li.post-item:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(11,27,58,.14); }
.archive li.post-item .post-thumb, .search li.post-item .post-thumb {
  display: block; float: none !important; width: 100% !important; margin: 0 !important; aspect-ratio: 16 / 9.5; overflow: hidden; border-radius: 0 !important;
}
.archive li.post-item .post-thumb img, .search li.post-item .post-thumb img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.archive li.post-item:hover .post-thumb img { transform: scale(1.06); }
.archive li.post-item .post-details, .search li.post-item .post-details {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 14px !important; margin: 0 !important; width: auto !important; flex: 1; float: none !important; min-height: 0;
}
.archive li.post-item .post-title, .search li.post-item .post-title { order: 1; margin: 0 !important; font-size: 16.5px; font-weight: 800; line-height: 1.65; }
.archive li.post-item .post-title a { color: var(--p-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.archive li.post-item .post-title a:hover { color: var(--p-blue); }
.archive li.post-item .post-excerpt, .search li.post-item .post-excerpt {
  order: 2; margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--p-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.archive li.post-item .post-meta, .search li.post-item .post-meta {
  order: 3; margin: auto 0 0 !important; padding: 10px 0 0 !important; border-top: 1px dashed var(--p-line) !important; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.archive li.post-item .more-link { display: none; }

/* الترقيم */
.pages-nav { margin-top: 28px; }
.pages-nav .pages-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pages-nav .pages-numbers li { margin: 0; float: none; }
.pages-nav .pages-numbers a, .pages-nav .pages-numbers span.pages-nav-item, .pages-nav .pages-numbers .the-next-page a, .pages-nav .pages-numbers .the-prev-page a {
  display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 14px; border-radius: 12px; line-height: 1;
  background: var(--p-card); border: 1px solid var(--p-line); color: var(--p-ink); font-weight: 800; transition: all .2s;
}
.pages-nav .pages-numbers a:hover { background: var(--p-blue); color: #fff; border-color: var(--p-blue); }
.pages-nav .pages-numbers .current span { background: var(--p-deep); color: #fff; border-color: var(--p-deep); }
.dark-skin .pages-nav .pages-numbers .current span { background: var(--p-blue); border-color: var(--p-blue); }
.pages-nav .pages-numbers .extend span { background: none; border: 0; }
.pages-nav .load-more-button, .pages-nav .show-more-button {
  border-radius: 999px !important; background: var(--p-deep); color: #fff; font-weight: 800; padding: 12px 34px;
}

/* ---------- الشريط الجانبي ---------- */
.sidebar .widget { margin-bottom: 22px; }
.sidebar .container-wrapper { padding: 20px 22px; }
.sidebar .widget-title { border: 0 !important; background: none !important; margin: 0 0 14px !important; padding: 0 !important; }
.sidebar .widget-title .the-global-title, :is(.single-post,.am-static) .post-components .mag-box-title .the-global-title {
  font-size: 19px; font-weight: 900; color: var(--p-ink) !important; padding: 0 14px 0 0; border: 0 !important; background: none !important; position: relative;
}
.sidebar .widget-title .the-global-title::before {
  content: "" !important; display: block !important; position: absolute; right: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 5px; background: var(--p-accent) !important;
}
.sidebar .widget-title .the-global-title::after { display: none !important; }
.sidebar .post-widget-thumbnail .post-thumb, .sidebar .post-widget-thumbnail img { border-radius: 10px; }
.sidebar .post-widget-body .post-title a, .sidebar .posts-list-container .post-title a { font-size: 14.5px; font-weight: 800; line-height: 1.65; color: var(--p-ink); }
.sidebar .post-widget-body .post-title a:hover { color: var(--p-blue); }
.sidebar .widget li { border-color: var(--p-line) !important; }
.sidebar .tagcloud a, .post-tags a, .post-bottom-tags a {
  border: 1px solid var(--p-line) !important; border-radius: 999px !important; background: var(--p-card) !important; color: var(--p-text) !important;
  padding: 4px 14px !important; font-size: 13px !important; font-weight: 700; transition: all .2s;
}
.sidebar .tagcloud a:hover, .post-tags a:hover, .post-bottom-tags a:hover { background: var(--p-blue) !important; color: #fff !important; border-color: var(--p-blue) !important; }

/* ==========================================================================
   صفحة المقال
   ========================================================================== */
:is(.single-post,.am-static) .post-content.container-wrapper { padding: 28px 34px 30px; }
:is(.single-post,.am-static) .entry-header-outer.container-wrapper, :is(.single-post,.am-static) .entry-header-outer { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0; }
:is(.single-post,.am-static) .entry-header .post-title, :is(.single-post,.am-static) .entry-title {
  font-size: 34px; font-weight: 900; line-height: 1.6; color: var(--p-ink); margin: 6px 0 14px;
}
:is(.single-post,.am-static) .post-cat-wrap { margin-bottom: 10px; }
:is(.single-post,.am-static) .post-cat, :is(.single-post,.am-static) a.post-cat {
  background: var(--p-soft) !important; color: var(--p-blue) !important; border-radius: 999px !important; padding: 6px 14px !important; font-size: 12.5px; font-weight: 800; line-height: 1;
}
:is(.single-post,.am-static) .post-cat:hover { background: var(--p-blue) !important; color: #fff !important; }
:is(.single-post,.am-static) :is(.single-post,.am-static)-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 12px 0 14px; margin: 0 0 18px;
  border-top: 1px solid var(--p-line); border-bottom: 1px solid var(--p-line);
}
:is(.single-post,.am-static) :is(.single-post,.am-static)-meta .meta-item { margin: 0; }
:is(.single-post,.am-static) .featured-area { margin: 0 0 22px; }
:is(.single-post,.am-static) .featured-area img { width: 100%; height: auto; border-radius: 16px; }

:is(.single-post,.am-static) .entry-content {
  font-size: 18px; line-height: 2.1; color: var(--p-text);
}
:is(.single-post,.am-static) .entry-content p { margin: 0 0 1.45em; }
:is(.single-post,.am-static) .entry-content h2, :is(.single-post,.am-static) .entry-content h3, :is(.single-post,.am-static) .entry-content h4 { color: var(--p-ink); font-weight: 900; line-height: 1.6; margin: 1.8em 0 .7em; }
:is(.single-post,.am-static) .entry-content h2 { font-size: 26px; padding-right: 15px; border-right: 5px solid var(--p-accent); }
:is(.single-post,.am-static) .entry-content h3 { font-size: 22px; }
:is(.single-post,.am-static) .entry-content h4 { font-size: 19px; }
:is(.single-post,.am-static) .entry-content a:not(.button):not(.wp-block-button__link) { color: var(--p-blue); border-bottom: 1px solid rgba(20,86,184,.3); transition: border-color .2s; }
:is(.single-post,.am-static) .entry-content a:not(.button):hover { border-bottom-color: var(--p-blue); }
.dark-skin :is(.single-post,.am-static) .entry-content a:not(.button) { color: #8ab8ff; border-bottom-color: rgba(138,184,255,.35); }
:is(.single-post,.am-static) .entry-content img { border-radius: 14px; height: auto; max-width: 100%; }
:is(.single-post,.am-static) .entry-content ul, :is(.single-post,.am-static) .entry-content ol { margin: 0 0 1.5em; padding-right: 1.4em; }
:is(.single-post,.am-static) .entry-content li { margin-bottom: .45em; }
:is(.single-post,.am-static) .entry-content li::marker { color: var(--p-accent); font-weight: 800; }
:is(.single-post,.am-static) .entry-content blockquote {
  background: var(--p-soft); border: 0; border-right: 5px solid var(--p-accent); border-radius: 14px;
  padding: 20px 24px; margin: 1.6em 0; color: var(--p-ink); font-weight: 600;
}
:is(.single-post,.am-static) .entry-content blockquote::before { display: none; }
:is(.single-post,.am-static) .entry-content table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--p-line); border-radius: 12px; overflow: hidden; font-size: 16px; }
:is(.single-post,.am-static) .entry-content th { background: var(--p-deep); color: #fff; padding: 12px 14px; font-weight: 800; }
:is(.single-post,.am-static) .entry-content td { padding: 11px 14px; border-top: 1px solid var(--p-line); }
:is(.single-post,.am-static) .entry-content tr:nth-child(even) td { background: rgba(120,140,180,.07); }

/* جدول المحتويات (Joli TOC) */
:is(.single-post,.am-static) .wpj-jtoc--main, :is(.single-post,.am-static) .wpj-jtoc { font-family: "Cairo", system-ui, sans-serif; }
:is(.single-post,.am-static) .wpj-jtoc--toc {
  background: var(--p-soft) !important; border: 1px solid var(--p-line) !important; border-radius: 14px !important; box-shadow: none !important; margin: 0 0 1.6em;
}
:is(.single-post,.am-static) .wpj-jtoc--title, :is(.single-post,.am-static) .wpj-jtoc--header { color: var(--p-ink) !important; font-weight: 900; }
:is(.single-post,.am-static) .wpj-jtoc--item-content a, :is(.single-post,.am-static) .wpj-jtoc--nav a { color: var(--p-blue) !important; border: 0 !important; font-weight: 700; font-size: 16px; }
.dark-skin :is(.single-post,.am-static) .wpj-jtoc--item-content a, .dark-skin :is(.single-post,.am-static) .wpj-jtoc--nav a { color: #8ab8ff !important; }

/* الوسوم والمشاركة */
:is(.single-post,.am-static) .post-bottom-meta-title, :is(.single-post,.am-static) .post-bottom-tags .post-bottom-meta-title { color: var(--p-ink); font-weight: 900; }
:is(.single-post,.am-static) .share-links a, :is(.single-post,.am-static) .post-share .share-links a { border-radius: 999px; }
:is(.single-post,.am-static) .post-bottom-meta { margin-top: 20px; }

/* مقالات ذات صلة */
:is(.single-post,.am-static) .post-components .container-wrapper { padding: 24px 26px; margin-top: 22px; }
:is(.single-post,.am-static) .post-components .mag-box-title { margin: 0 0 16px !important; }
:is(.single-post,.am-static) .related-posts-list { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
:is(.single-post,.am-static) .related-posts-list::before, :is(.single-post,.am-static) .related-posts-list::after { display: none; }
:is(.single-post,.am-static) .related-item {
  float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; background: var(--p-card);
  border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden; transition: transform .3s, box-shadow .3s;
}
:is(.single-post,.am-static) .related-item:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(11,27,58,.14); }
:is(.single-post,.am-static) .related-item .post-thumb { display: block; margin: 0 !important; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 0; }
:is(.single-post,.am-static) .related-item .post-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
:is(.single-post,.am-static) .related-item .post-title { margin: 0; padding: 12px 14px 4px; font-size: 14.5px; font-weight: 800; line-height: 1.65; }
:is(.single-post,.am-static) .related-item .post-title a { color: var(--p-ink); }
:is(.single-post,.am-static) .related-item .post-meta { padding: 0 14px 12px; }

/* السابق / التالي */
:is(.single-post,.am-static) .post-navigation { border-radius: var(--p-radius); overflow: hidden; border: 1px solid var(--p-line); }
:is(.single-post,.am-static) .post-navigation a { font-weight: 800; color: var(--p-ink); }
:is(.single-post,.am-static) .post-navigation a:hover { color: var(--p-blue); }

/* التعليقات (wpDiscuz) */
:is(.single-post,.am-static) .comments-area, :is(.single-post,.am-static) #comments { font-family: "Cairo", system-ui, sans-serif; }
:is(.single-post,.am-static) .wpd-form-wrap textarea, :is(.single-post,.am-static) .wpd-form-wrap input[type="text"], :is(.single-post,.am-static) .wpd-form-wrap input[type="email"] {
  border-radius: 12px !important; border: 1px solid var(--p-line) !important; background: var(--p-card) !important; color: var(--p-text) !important;
}
:is(.single-post,.am-static) .wpd-form-wrap .wc_comm_submit, :is(.single-post,.am-static) .wpd-form-wrap .wc-field-submit input, :is(.single-post,.am-static) .wpd-form-wrap .wc-field-submit button {
  background: var(--p-blue) !important; border-radius: 999px !important; font-weight: 800; border: 0 !important; color: #fff !important;
}
:is(.single-post,.am-static) .wpd-comment .wpd-comment-text, :is(.single-post,.am-static) .wpd-comment .wpd-comment-text p { color: var(--p-text); }
:is(.single-post,.am-static) .wpd-comment .wpd-comment-author, :is(.single-post,.am-static) .wpd-comment .wpd-comment-author a { color: var(--p-ink) !important; font-weight: 800; }

/* ---------- تجاوب ---------- */
@media (max-width: 991px) {
  .archive .page-title { font-size: 26px; }
  :is(.single-post,.am-static) .entry-header .post-title { font-size: 28px; }
  :is(.single-post,.am-static) .post-content.container-wrapper { padding: 20px 18px 22px; }
}
@media (max-width: 640px) {
  .archive .posts-items, .search .posts-items { grid-template-columns: 1fr; }
  .archive .entry-header-outer { padding: 20px 18px; }
  :is(.single-post,.am-static) .entry-header .post-title { font-size: 23px; }
  :is(.single-post,.am-static) .entry-content { font-size: 17px; line-height: 2; }
  :is(.single-post,.am-static) .entry-content h2 { font-size: 22px; }
  :is(.single-post,.am-static) .related-posts-list { grid-template-columns: 1fr; }
}

/* ---------- تصفير تنسيق مسار التنقل القديم (من CSS الموقع السابق) ---------- */
.archive #breadcrumb, :is(.single-post,.am-static) #breadcrumb, .search #breadcrumb,
.entry-header-outer #breadcrumb {
  background: none !important; border: 0 !important; padding: 0 !important; width: auto !important;
  margin: 0 0 14px !important; font-size: 13px !important; word-break: normal;
}

/* ---------- لا يوجد شريط جانبي: استغلال العرض كاملًا في التصنيفات ---------- */
.archive .main-content-row:not(:has(.sidebar)) > .main-content, .search .main-content-row:not(:has(.sidebar)) > .main-content {
  width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; float: none !important; margin-inline: 0 !important;
}
@media (min-width: 1000px) {
  .archive .main-content-row:not(:has(.sidebar)) .posts-items,
  .search .main-content-row:not(:has(.sidebar)) .posts-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 999px) and (min-width: 641px) {
  .archive .posts-items, .search .posts-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* صفحة المقال: عمود قراءة مريح في المنتصف عند غياب الشريط الجانبي */
:is(.single-post,.am-static) .main-content-row:not(:has(.sidebar)) > .main-content { float: none !important; margin-inline: auto !important; max-width: 900px; width: 100% !important; }

/* ---------- تجاوز تنسيقات قديمة في style.css (عناوين المقال) ---------- */
:is(.single-post,.am-static) .entry-content h2, :is(.single-post,.am-static) .entry-content h3, :is(.single-post,.am-static) .entry-content h4 {
  background: none !important; border-radius: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important;
}
:is(.single-post,.am-static) .entry-content h2 { padding-right: 15px !important; border-right: 5px solid var(--p-accent) !important; color: var(--p-ink) !important; }
:is(.single-post,.am-static) .entry-content h3, :is(.single-post,.am-static) .entry-content h4 { padding-right: 0 !important; border-right: 0 !important; color: var(--p-ink) !important; }
:is(.single-post,.am-static) .entry-content p, :is(.single-post,.am-static) .entry-content li { font-size: 18px; line-height: 2.1; }
:is(.single-post,.am-static) .wpj-jtoc, :is(.single-post,.am-static) .wpj-jtoc--main, :is(.single-post,.am-static) .wpj-jtoc--toc { width: 100% !important; max-width: 100% !important; float: none !important; }
@media (max-width: 640px) { :is(.single-post,.am-static) .entry-content p, :is(.single-post,.am-static) .entry-content li { font-size: 17px; line-height: 2; } }

/* مقالات ذات صلة: منع تمدد الصورة خارج البطاقة */
:is(.single-post,.am-static) .related-item .post-thumb { width: 100% !important; max-width: 100% !important; float: none !important; height: auto !important; }
:is(.single-post,.am-static) .related-item .post-thumb img { width: 100% !important; height: 100% !important; }
:is(.single-post,.am-static) .related-item { display: flex; flex-direction: column; min-width: 0; }
/* عنوان الوسوم */
:is(.single-post,.am-static) .post-bottom-meta-title {
  background: none !important; color: var(--p-ink) !important; padding: 0 !important; font-weight: 900; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 10px;
}
:is(.single-post,.am-static) .post-bottom-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
:is(.single-post,.am-static) .post-components .mag-box-title { border: 0 !important; background: none !important; }
:is(.single-post,.am-static) .post-components .mag-box-title .the-global-title { font-size: 20px; position: relative; padding-right: 15px; }
:is(.single-post,.am-static) .post-components .mag-box-title .the-global-title::before { content: "" !important; display: block !important; position: absolute; right: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 5px; background: var(--p-accent) !important; }
:is(.single-post,.am-static) .post-components .mag-box-title .the-global-title::after { display: none !important; }

/* ---------- ترويسة التصنيف: محاذاة موحدة ووضوح الروابط ---------- */
.archive .entry-header-outer { text-align: center; }
.archive .taxonomy-description { text-align: center; max-width: 900px; margin-inline: auto; }
.archive .taxonomy-description a, .archive .entry-header-outer .entry a:not(.post-cat) {
  color: #8fd8ff !important; font-weight: 800; text-decoration: underline; text-decoration-color: rgba(143,216,255,.5); text-underline-offset: 4px; border: 0 !important;
}
.archive .taxonomy-description a:hover { color: #fff !important; text-decoration-color: #fff; }
.archive .sub-terms { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.archive .sub-terms .terms { justify-content: center; gap: 10px; }
.archive .sub-terms .term a {
  background: rgba(255,255,255,.16) !important; border: 1px solid rgba(255,255,255,.28) !important; font-size: 14px; font-weight: 700;
  padding: 7px 16px !important; line-height: 1.5; font-size: 14px !important;
}
.archive .sub-terms .term a:hover { background: #fff !important; color: #0b1b3a !important; border-color: #fff !important; transform: translateY(-2px); }

/* ---------- wpDiscuz في الوضع المظلم ---------- */
.dark-skin #wpdcom, .dark-skin #wpdcom .wpd-thread-info, .dark-skin #wpdcom .wpd-sbs-title,
.dark-skin #wpdcom .wpdiscuz-subscribe-form-intro, .dark-skin #wpdcom .wpd-form-head,
.dark-skin #wpdcom .wpd-comment-text, .dark-skin #wpdcom .wpd-comment-text p,
.dark-skin #wpdcom .wpd-comment-date, .dark-skin #wpdcom label, .dark-skin #wpdcom .wpd-thread-filter,
.dark-skin #wpdcom .wpd-sbs-toggle, .dark-skin #wpdcom .wpd-auth .wpd-login { color: #c3cee4 !important; }
.dark-skin #wpdcom .wpd-comment-author, .dark-skin #wpdcom .wpd-comment-author a { color: #eaf1ff !important; }
.dark-skin #wpdcom .wpd-form-wrap, .dark-skin #wpdcom .wpd-comment, .dark-skin #wpdcom .wpd-comment .wpd-comment-wrap { background: transparent !important; }
.dark-skin #wpdcom .wpd-thread-head { border-color: var(--p-line) !important; }
.dark-skin #wpdcom .wpd-thread-info { color: #eaf1ff !important; font-weight: 800; }

/* ---------- بطاقات التصنيف: 4 في الصف + إصلاح الفراغات ---------- */
.archive li.post-item .post-thumb, .search li.post-item .post-thumb { flex: 0 0 auto !important; height: auto !important; }
.archive li.post-item .post-details, .search li.post-item .post-details { flex: 1 1 auto !important; }
.archive li.post-item, .search li.post-item { align-self: stretch; }
.archive li.post-item .post-title { font-size: 16px; }
@media (min-width: 1100px) {
  .archive .main-content-row:not(:has(.sidebar)) .posts-items,
  .search .main-content-row:not(:has(.sidebar)) .posts-items { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 760px) and (max-width: 1099px) {
  .archive .main-content-row:not(:has(.sidebar)) .posts-items,
  .search .main-content-row:not(:has(.sidebar)) .posts-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- صفحة نتائج البحث: نفس ترويسة التصنيفات ---------- */
.search .entry-header-outer { text-align: center; }
.search .entry-header-outer #breadcrumb, .search .entry-header-outer #breadcrumb a { color: rgba(255,255,255,.78) !important; }
.search .entry-header-outer #breadcrumb .current { color: #fff !important; font-weight: 800; }
.search .page-title { font-size: 28px; font-weight: 900; color: #fff !important; line-height: 1.5; margin: 0; }
.search .entry-header-outer .search-form, .search .entry-header-outer form { margin-top: 14px; }

/* صفحة اتصل بنا */
.am-contact { max-width: 820px; margin: 0 auto; }
.am-contact-lead { font-size: 1.05em; line-height: 2; color: #444; text-align: justify; text-justify: inter-word; margin: 0 0 22px; }
.am-contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 0 0 30px; }
.am-contact-cards > div { background: #f7f8fa; border: 1px solid #e6e8ec; border-radius: 12px; padding: 16px 18px; }
.am-contact-cards strong { display: block; font-size: 1em; margin-bottom: 6px; color: #111; }
.am-contact-cards span { display: block; font-size: .9em; line-height: 1.8; color: #555; }
.am-contact-cards a { color: inherit; text-decoration: underline; }
.am-contact-h { margin: 0 0 14px !important; font-size: 1.35em; }
.am-contact .wpcf7 form { background: #fff; border: 1px solid #e6e8ec; border-radius: 14px; padding: 24px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.am-contact .am-cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.am-contact .am-cf-f { display: block; margin: 0 0 16px; }
.am-contact .am-cf-f > span { display: block; font-weight: 600; font-size: .92em; margin-bottom: 6px; color: #222; }
.am-contact .am-cf-f b { color: #d33; }
.am-contact .wpcf7-form-control-wrap { display: block; }
.am-contact input[type=text], .am-contact input[type=email], .am-contact select, .am-contact textarea {
	width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid #d5d9df; border-radius: 10px; background: #fff;
	font: inherit; font-size: 1em; transition: border-color .15s, box-shadow .15s; }
.am-contact textarea { min-height: 170px; resize: vertical; line-height: 1.8; }
.am-contact input:focus, .am-contact select:focus, .am-contact textarea:focus { outline: 0; border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,.15); }
.am-contact .am-cf-act { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.am-contact input[type=submit] { background: #111; color: #fff; border: 0; border-radius: 10px; padding: 12px 30px; font: inherit; font-weight: 600; cursor: pointer; transition: background .15s; }
.am-contact input[type=submit]:hover { background: #1a73e8; }
.am-contact .am-cf-act small { color: #666; font-size: .85em; }
.am-contact .am-cf-act small a { text-decoration: underline; }
.am-contact .wpcf7-not-valid-tip { color: #d33; font-size: .85em; margin-top: 4px; }
.am-contact .wpcf7-response-output { margin: 16px 0 0 !important; border-radius: 10px; padding: 12px 16px !important; }
.am-contact-note { color: #777; font-size: .85em; margin: 14px 0 0; text-align: center; }
@media (max-width: 600px) { .am-contact .am-cf-grid { grid-template-columns: 1fr; gap: 0; } .am-contact .wpcf7 form { padding: 16px; } .am-contact input[type=submit] { width: 100%; } }

.am-contact input[type=tel] { width: 100%; box-sizing: border-box; padding: 0 14px; height: 48px !important; border: 1px solid #d5d9df; border-radius: 10px; font: inherit; direction: rtl; }
.am-contact .am-cf-ok { margin: 0 0 16px; font-size: .9em; color: #444; }
.am-contact .am-cf-ok a { text-decoration: underline; }
.am-contact .wpcf7-list-item { margin: 0 0 0 6px; }
.am-contact .wpcf7-acceptance input { width: auto; margin-left: 6px; }

.page-id-1921 .entry-content :is(p,li), .page-id-2 .entry-content :is(p,li) { text-align: justify; text-justify: inter-word; line-height: 1.95; direction: rtl; }
.page-id-1921 .entry-content h2, .page-id-2 .entry-content h2 { margin-top: 1.6em; }

.am-contact .wpcf7 form p { margin: 0; }
.am-contact .am-cf-f br { display: none !important; }
.am-contact select, .am-contact input[type=text], .am-contact input[type=email], .am-contact input[type=tel] { height: 48px !important; line-height: 1.4 !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
.am-contact select { padding: 0 14px !important; }
.am-contact textarea { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
.am-contact .wpcf7-form-control-wrap[data-name=age], .am-contact .wpcf7-form-control-wrap[data-name=age] * { position: absolute !important; left: -9999px !important; height: 0 !important; overflow: hidden; }
.am-contact input[type=submit] { width: auto !important; }

.am-contact input[type=submit] { height: 48px !important; padding: 0 30px !important; line-height: 1 !important; }

/* ==========================================================================
   تصميم المقال الجديد (نفس هوية مقال بلس بألوان المقال): كرت علوي، محتويات،
   عناوين، قوائم، مقالات ذات صلة، بطاقة الكاتب، صفحة الكاتب
   ========================================================================== */
:root { --s-hero1: #0b1b3a; --s-hero2: #1456b8; --s-hero3: #0ea5c6; --s-tint: #fff6e6; --s-tint-line: #f6dca6; }
.dark-skin { --s-hero1: #07142e; --s-hero2: #0d3f94; --s-hero3: #0b87a3; --s-tint: rgba(255,186,80,.09); --s-tint-line: rgba(255,186,80,.25); }

/* ---------- الكرت العلوي ---------- */
body.single-post #the-post > .entry-header-outer {
  position: relative; margin: -28px -34px 0 !important; padding: 28px 34px 34px !important; overflow: hidden; color: #fff;
  background: radial-gradient(circle at 12% 0%, rgba(255,255,255,.2), transparent 42%), radial-gradient(circle at 100% 100%, rgba(255,255,255,.1), transparent 38%), linear-gradient(135deg, var(--s-hero1) 0%, var(--s-hero2) 62%, var(--s-hero3) 100%) !important;
  border: 0 !important; border-radius: var(--p-radius) var(--p-radius) 0 0 !important; box-shadow: none !important;
}
body.single-post #the-post:has(.featured-area) > .entry-header-outer { padding-bottom: 92px !important; border-radius: var(--p-radius) var(--p-radius) 42px 42px !important; }
body.single-post .entry-header { position: relative; }
body.single-post .entry-header-outer #breadcrumb {
  display: block; margin: 0 0 16px; padding: 0 0 12px; border: 0; border-bottom: 1px solid rgba(255,255,255,.2); background: none;
  font-size: 13.5px; line-height: 1.8; color: rgba(255,255,255,.85); font-weight: 600;
}
body.single-post .entry-header-outer #breadcrumb a { color: rgba(255,255,255,.88) !important; }
body.single-post .entry-header-outer #breadcrumb a:hover { color: #fff !important; text-decoration: underline; }
body.single-post .entry-header-outer #breadcrumb .current { color: #fff !important; font-weight: 800; }
body.single-post .entry-header-outer #breadcrumb .delimiter { color: rgba(255,255,255,.55); margin: 0 4px; font-style: normal; }
body.single-post .entry-header-outer #breadcrumb .tie-icon-home { color: #ffd36b; }
body.single-post .entry-header .post-title, body.single-post .entry-title {
  color: #fff !important; font-size: 34px; font-weight: 900; line-height: 1.65; margin: 10px 0 18px; text-shadow: 0 2px 14px rgba(0,0,0,.25);
}
body.single-post .entry-header .post-cat-wrap { display: flex !important; position: static !important; flex-wrap: wrap; gap: 8px; margin: 0 0 4px !important; }
body.single-post .entry-header .post-cat {
  background: rgba(255,255,255,.16) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(4px);
  margin: 0 !important; transition: background .2s, color .2s;
}
body.single-post .entry-header .post-cat:hover { background: #fff !important; color: var(--s-hero2) !important; }
body.single-post .entry-header .single-post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 14px 0 0 !important; margin: 0 !important;
  border: 0 !important; border-top: 1px solid rgba(255,255,255,.22) !important; color: rgba(255,255,255,.88);
}
body.single-post .entry-header .single-post-meta .meta-item, body.single-post .entry-header .single-post-meta a, body.single-post .entry-header .single-post-meta .meta-item::before {
  color: rgba(255,255,255,.9) !important; font-size: 14px; font-weight: 600; margin: 0 !important;
}
body.single-post .entry-header .single-post-meta a:hover { color: #fff !important; text-decoration: underline; }
body.single-post .entry-header .single-post-meta .tie-alignright { float: none; margin-inline-start: auto; display: flex; gap: 14px; }
body.single-post .entry-header .single-post-meta .meta-author-avatar img { border-radius: 50%; border: 2px solid rgba(255,255,255,.7); width: 34px; height: 34px; }
body.single-post .entry-header .single-post-meta .meta-author a { font-weight: 800; font-size: 15px; }

/* صورة المقال فوق حافة الكرت */
body.single-post .featured-area { position: relative; z-index: 2; margin: -66px 22px 26px !important; }
body.single-post .featured-area .single-featured-image { margin: 0; }
body.single-post .featured-area img {
  display: block; width: 100%; height: auto; border-radius: 18px; border: 6px solid var(--p-card);
  box-shadow: 0 16px 40px rgba(10,35,80,.25); background: var(--p-card);
}
body.single-post .featured-area .single-caption-text { border-radius: 0 0 14px 14px; }

/* ---------- جدول المحتويات (Joli TOC) ---------- */
body.single-post .wpj-jtoc--toc {
  background: var(--p-card) !important; border: 1px solid var(--p-line) !important; border-radius: 16px !important; overflow: hidden; box-shadow: var(--p-shadow) !important; margin: 0 0 2em !important; padding: 0 !important;
}
body.single-post .wpj-jtoc--header { background: linear-gradient(135deg, var(--s-hero1), var(--s-hero2)) !important; padding: 15px 22px !important; border: 0 !important; margin: 0 !important; }
body.single-post .wpj-jtoc--header *, body.single-post .wpj-jtoc--title-label { color: #fff !important; }
body.single-post .wpj-jtoc--title-label { font-size: 18px !important; font-weight: 900 !important; display: inline-flex; align-items: center; gap: 10px; }
body.single-post .wpj-jtoc--title-label::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--s-hero3); display: inline-block; }
body.single-post .wpj-jtoc--body { background: color-mix(in srgb, var(--p-soft) 60%, var(--p-card)) !important; padding: 10px 22px 14px !important; border: 0 !important; }
body.single-post .wpj-jtoc--item-content a {
  display: block; padding: 9px 4px !important; color: var(--p-blue) !important; font-size: 16px !important; font-weight: 700 !important; line-height: 1.7;
  border: 0 !important; border-bottom: 1px dashed var(--p-line) !important; text-decoration: none !important; transition: color .2s, padding .2s;
}
body.single-post .wpj-jtoc--item-content a:hover { color: var(--p-ink) !important; padding-right: 8px !important; }
body.single-post .wpj-jtoc--item.--jtoc-h3 .wpj-jtoc--item-content a, body.single-post .wpj-jtoc--item.--jtoc-h4 .wpj-jtoc--item-content a { font-size: 15px !important; font-weight: 600 !important; }
.dark-skin body.single-post .wpj-jtoc--item-content a, .dark-skin.single-post .wpj-jtoc--item-content a { color: #8ab8ff !important; }

/* ---------- عناوين المقال ---------- */
body.single-post .entry-content h1 {
  font-size: 30px; font-weight: 900; line-height: 1.65; color: var(--p-ink); margin: 1.4em 0 .7em; padding-bottom: .4em; border-bottom: 3px solid var(--p-line); position: relative;
}
body.single-post .entry-content h1::after { content: ""; position: absolute; right: 0; bottom: -3px; width: 90px; height: 3px; background: var(--p-accent); border-radius: 3px; }
body.single-post .entry-content h2 {
  font-size: 25px !important; padding: 10px 18px 10px 14px !important; margin: 1.9em 0 .8em !important; border-right: 6px solid var(--p-accent) !important;
  border-radius: 12px !important; background: linear-gradient(270deg, var(--p-soft), transparent 92%) !important; color: var(--p-ink) !important;
}
body.single-post .entry-content h3 { font-size: 21px !important; position: relative; padding-right: 26px !important; margin: 1.6em 0 .6em !important; color: var(--p-ink) !important; }
body.single-post .entry-content h3::before { content: ""; position: absolute; right: 0; top: .72em; width: 14px; height: 14px; border-radius: 4px; background: var(--p-accent); transform: rotate(45deg) scale(.82); box-shadow: 0 0 0 4px rgba(14,165,198,.18); }
body.single-post .entry-content h4 { font-size: 18.5px !important; margin: 1.4em 0 .5em !important; color: var(--p-blue) !important; font-weight: 800; }

/* ---------- روابط المحتوى ---------- */
body.single-post .entry-content a:not(.button):not(.wp-block-button__link):not(.post-thumb):not(.post-title) { text-decoration: underline !important; text-decoration-thickness: 1px; text-underline-offset: 4px; border-bottom: 0 !important; }
body.single-post .wpj-jtoc a, body.single-post #inline-related-post a, body.single-post .entry-content .stream-item a { text-decoration: none !important; }

/* ---------- القوائم: بطاقات ملوّنة ---------- */
body.single-post .entry-content > :is(ul,ol) { list-style: none !important; padding: 0 !important; margin: 0 0 1.7em !important; }
body.single-post .entry-content > :is(ul,ol) > li {
  list-style: none !important; position: relative; background: var(--s-tint); border: 1px solid var(--s-tint-line); border-radius: 12px; padding: 12px 52px 12px 16px !important; margin: 0 0 8px !important; transition: transform .2s, box-shadow .2s;
}
body.single-post .entry-content > :is(ul,ol) > li::marker { content: none; font-size: 0; }
body.single-post .entry-content > :is(ul,ol) > li:hover { transform: translateX(-3px); box-shadow: 0 6px 18px rgba(120,80,0,.1); }
body.single-post .entry-content > ul > li::before { content: ""; position: absolute; right: 18px; top: calc(1.05em + 4px - 5px); width: 11px; height: 11px; border-radius: 50%; background: var(--p-accent); box-shadow: 0 0 0 4px rgba(14,165,198,.2); }
body.single-post .entry-content > ol { counter-reset: amol; }
body.single-post .entry-content > ol > li { counter-increment: amol; padding-right: 56px !important; min-height: 54px; }
body.single-post .entry-content > ol > li::before {
  content: counter(amol); position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; line-height: 1; color: #fff;
  background: linear-gradient(135deg, var(--s-hero2), var(--s-hero3)); box-shadow: 0 4px 10px rgba(20,86,184,.28);
}
body.single-post .entry-content > :is(ul,ol) :is(ul,ol) { list-style: disc; padding-right: 1.4em; margin: .5em 0 .3em; }
body.single-post .entry-content > :is(ul,ol) :is(ul,ol) > li { padding: 0; margin: 0 0 .35em; background: none; border: 0; }
body.single-post .entry-content > :is(ul,ol) :is(ul,ol) > li::before { display: none; }
body.single-post .entry-content > :is(ul,ol) :is(ul,ol) > li::marker { color: var(--p-accent); content: normal; font-size: inherit; }

/* ---------- المقالات ذات الصلة داخل المقال ---------- */
body.single-post #inline-related-post { clear: both; margin: 2em 0; }
body.single-post #inline-related-post > .container-wrapper {
  padding: 18px 18px 20px; margin: 0; border: 1px solid var(--p-line); border-radius: 18px; box-shadow: var(--p-shadow);
  background: linear-gradient(180deg, var(--p-soft), var(--p-card) 70%) !important; position: relative; overflow: hidden;
}
body.single-post #inline-related-post > .container-wrapper::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--s-hero1), var(--s-hero2), var(--s-hero3)); }
body.single-post #inline-related-post .widget-title { display: flex !important; align-items: center; gap: 10px; margin: 6px 0 16px; padding: 0 !important; border: 0 !important; position: static; float: none; height: auto; }
body.single-post #inline-related-post .widget-title::before, body.single-post #inline-related-post .widget-title::after { display: none !important; }
body.single-post #inline-related-post .widget-title .the-subtitle { display: inline-flex !important; align-items: center; gap: 10px; font-size: 18px; font-weight: 900; color: var(--p-ink); margin: 0; padding: 0; border: 0; background: none; line-height: 1.5; position: static; float: none; transform: none; }
body.single-post #inline-related-post .widget-title .the-subtitle::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: linear-gradient(180deg, var(--s-hero2), var(--s-hero3)); flex: none; }
body.single-post #inline-related-post .posts-items { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px !important; margin: 0; padding: 0; list-style: none; }
body.single-post #inline-related-post .posts-items::before, body.single-post #inline-related-post .posts-items::after { display: none; }
body.single-post #inline-related-post .widget-post-list {
  float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; min-width: 0; gap: 0;
  background: var(--p-card); border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s;
}
body.single-post #inline-related-post .widget-post-list:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(10,35,80,.16); border-color: var(--p-accent); }
body.single-post #inline-related-post .post-widget-thumbnail { float: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
body.single-post #inline-related-post .post-widget-thumbnail .post-thumb { display: block; width: 100% !important; max-width: 100% !important; float: none !important; margin: 0 !important; border-radius: 0; overflow: hidden; aspect-ratio: 16 / 10; background: var(--p-soft); }
body.single-post #inline-related-post .post-widget-thumbnail .post-thumb img { width: 100% !important; max-width: 100% !important; height: 100% !important; object-fit: cover; display: block; transition: transform .4s; }
body.single-post #inline-related-post .widget-post-list:hover .post-widget-thumbnail img { transform: scale(1.06); }
body.single-post #inline-related-post .post-widget-body { padding: 11px 13px 13px !important; margin: 0 !important; }
body.single-post #inline-related-post .post-widget-body .post-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; font-weight: 800; line-height: 1.75; color: var(--p-ink); overflow-wrap: break-word; }
body.single-post #inline-related-post .widget-post-list:hover .post-title { color: var(--p-blue); }
body.single-post #inline-related-post .post-meta { margin: 2px 0 0; font-size: 12px; }

/* ---------- بطاقة الكاتب أسفل المقال ---------- */
.am-author {
  display: flex; gap: 20px; align-items: flex-start; margin: 24px 0 0; padding: 24px 26px; background: var(--p-card);
  border: 1px solid var(--p-line); border-radius: var(--p-radius); box-shadow: var(--p-shadow); position: relative; overflow: hidden;
}
.am-author::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--s-hero1), var(--s-hero2), var(--s-hero3)); }
.am-author-av { flex: none; display: block; line-height: 0; border: 0 !important; }
.am-author-av img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 4px solid var(--p-soft); box-shadow: 0 6px 16px rgba(10,35,80,.18); }
.am-author-body { min-width: 0; flex: 1; }
.am-author-kicker { display: inline-block; font-size: 12.5px; font-weight: 800; color: var(--p-blue); background: var(--p-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 6px; }
.am-author-name { margin: 0 0 6px; font-size: 21px; font-weight: 900; line-height: 1.5; color: var(--p-ink); }
.am-author-name a { color: inherit; }
.am-author-name a:hover { color: var(--p-blue); }
.am-author-bio { margin: 0 0 12px; font-size: 15.5px; line-height: 1.95; color: var(--p-text); }
.am-author-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; color: var(--p-muted); }
.am-author-count { font-weight: 700; }
.am-author-more { font-weight: 800; color: var(--p-blue); border-bottom: 1px solid transparent; }
.am-author-more:hover { border-bottom-color: var(--p-blue); }

/* ---------- صفحة الكاتب ---------- */
body.author .am-ahero {
  position: relative; overflow: hidden; margin: 0 0 22px; padding: 28px 34px 30px; color: #fff; border-radius: var(--p-radius);
  background: radial-gradient(circle at 12% 0%, rgba(255,255,255,.2), transparent 42%), radial-gradient(circle at 100% 100%, rgba(255,255,255,.1), transparent 38%), linear-gradient(135deg, var(--s-hero1) 0%, var(--s-hero2) 62%, var(--s-hero3) 100%);
  box-shadow: 0 14px 34px rgba(10,35,80,.22);
}
body.author .am-ahero #breadcrumb { display: block; margin: 0 0 18px; padding: 0 0 12px; border: 0; border-bottom: 1px solid rgba(255,255,255,.2); background: none; font-size: 13.5px; line-height: 1.8; color: rgba(255,255,255,.85); font-weight: 600; }
body.author .am-ahero #breadcrumb a { color: rgba(255,255,255,.88) !important; }
body.author .am-ahero #breadcrumb a:hover { color: #fff !important; text-decoration: underline; }
body.author .am-ahero #breadcrumb .current { color: #fff !important; font-weight: 800; }
body.author .am-ahero #breadcrumb .delimiter { color: rgba(255,255,255,.55); margin: 0 4px; font-style: normal; }
body.author .am-ahero #breadcrumb .tie-icon-home { color: #ffd36b; }
.am-ahero-main { display: flex; align-items: center; gap: 26px; position: relative; }
.am-ahero-av { flex: none; line-height: 0; }
.am-ahero-av img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 5px solid rgba(255,255,255,.85); box-shadow: 0 10px 28px rgba(0,0,0,.3); background: #fff; }
.am-ahero-body { min-width: 0; flex: 1; }
.am-ahero-kicker { display: inline-block; font-size: 13px; font-weight: 800; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 5px 14px; margin-bottom: 8px; }
body.author .am-ahero .page-title { margin: 0 0 8px; padding: 0; border: 0; background: none; color: #fff !important; font-size: 34px; font-weight: 900; line-height: 1.5; text-shadow: 0 2px 14px rgba(0,0,0,.25); }
.am-ahero-bio { margin: 0 0 14px; max-width: 720px; font-size: 16px; line-height: 1.95; color: rgba(255,255,255,.92); text-align: justify; text-justify: inter-word; }
.am-ahero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.am-ahero-stat { font-size: 14px; font-weight: 700; color: #fff; background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 16px; }
.am-ahero-stat b { font-size: 17px; font-weight: 900; margin-inline-start: 4px; color: #ffd36b; }
.am-ahero-soc { font-size: 13.5px; font-weight: 700; color: #fff !important; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 5px 14px; transition: background .2s, color .2s; }
.am-ahero-soc:hover { background: #fff; color: var(--s-hero2) !important; }

/* ---------- الجوال ---------- */
@media (max-width: 991px) {
  body.single-post #the-post > .entry-header-outer { margin: -20px -18px 0 !important; padding: 22px 18px 26px !important; }
  body.single-post #the-post:has(.featured-area) > .entry-header-outer { padding-bottom: 72px !important; border-radius: var(--p-radius) var(--p-radius) 30px 30px !important; }
  body.single-post .featured-area { margin: -50px 6px 22px !important; }
  body.author .am-ahero { padding: 22px 18px 24px; }
}
@media (max-width: 800px) { body.single-post #inline-related-post .posts-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  body.single-post .entry-header .post-title, body.single-post .entry-title { font-size: 24px; line-height: 1.7; margin: 8px 0 14px; }
  body.single-post .featured-area img { border-width: 4px; border-radius: 14px; }
  body.single-post .entry-content h2 { font-size: 21px !important; padding: 8px 14px 8px 10px !important; }
  body.single-post .entry-content h3 { font-size: 19px !important; }
  body.single-post .wpj-jtoc--header { padding: 13px 16px !important; }
  body.single-post .wpj-jtoc--title-label { font-size: 16.5px !important; }
  body.single-post .wpj-jtoc--body { padding: 8px 16px 10px !important; }
  body.single-post .wpj-jtoc--item-content a { font-size: 15px !important; }
  body.single-post .entry-content > :is(ul,ol) > li { padding: 10px 46px 10px 12px !important; }
  body.single-post .entry-content > ol > li { padding-right: 50px !important; }
  body.single-post .entry-content > ul > li::before { right: 15px; }
  body.single-post .entry-content > ol > li::before { right: 10px; top: 10px; }
  body.single-post #inline-related-post > .container-wrapper { padding: 14px 12px 16px; }
  body.single-post #inline-related-post .post-widget-body { padding: 9px 10px 11px !important; }
  body.single-post #inline-related-post .post-widget-body .post-title { font-size: 13.5px; }
  .am-author { flex-direction: column; align-items: center; text-align: center; padding: 22px 18px; }
  .am-author-foot { justify-content: center; }
  .am-ahero-main { flex-direction: column; text-align: center; gap: 14px; }
  .am-ahero-av img { width: 104px; height: 104px; }
  body.author .am-ahero .page-title { font-size: 26px; }
  .am-ahero-bio { text-align: center; font-size: 15px; }
  .am-ahero-foot { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  body.single-post .entry-header .post-cat, body.single-post .wpj-jtoc--item-content a, body.single-post .entry-content > :is(ul,ol) > li,
  body.single-post #inline-related-post .widget-post-list, body.single-post #inline-related-post img, .am-ahero-soc { transition: none; }
}

/* Joli TOC: محاذاة يمين كاملة العرض */
body.single-post .wpj-jtoc { direction: rtl; text-align: right; }
body.single-post .wpj-jtoc--header-main { display: flex !important; align-items: center; justify-content: space-between; flex-direction: row; width: 100%; }
body.single-post .wpj-jtoc--title { text-align: right; flex: 1; }
body.single-post .wpj-jtoc--items { margin: 0 !important; padding: 0 !important; list-style: none !important; }
body.single-post .wpj-jtoc--items .wpj-jtoc--items { margin: 0 18px 0 0 !important; }
body.single-post .wpj-jtoc--item { margin: 0 !important; padding: 0 !important; list-style: none !important; }
body.single-post .wpj-jtoc--item-content { text-align: right !important; width: 100%; display: block !important; margin: 0 !important; }
body.single-post .wpj-jtoc--item-content a { width: 100%; box-sizing: border-box; text-align: right !important; }
body.single-post .wpj-jtoc--item-content a::before { color: var(--p-accent); font-weight: 900; }

body.single-post .entry-content .wpj-jtoc .wpj-jtoc--item-content a:not(.button):not(.wp-block-button__link):not(.post-thumb):not(.post-title) { text-decoration: none !important; border-bottom: 1px dashed var(--p-line) !important; }

/* محاذاة النقطة/الرقم مع منتصف السطر الأول */
body.single-post .entry-content > ul > li::before { top: calc(12px + 1.05em - 5.5px); }
body.single-post .entry-content > ol > li::before { top: calc(12px + 1.05em - 15px); }
@media (max-width: 640px) { body.single-post .entry-content > ul > li::before { top: calc(10px + 1em - 5.5px); } body.single-post .entry-content > ol > li::before { top: calc(10px + 1em - 15px); } }

/* عناصر الإعلانات المحقونة داخل شبكة المقالات ذات الصلة تأخذ الصف كاملًا */
body.single-post #inline-related-post .posts-items > :not(li) { grid-column: 1 / -1; }
body.single-post #inline-related-post .posts-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ==========================================================================
   كرت القسم/الوسم العلوي بنفس هوية كرت المقال + حل فجوة الإعلانات غير المعبأة
   ========================================================================== */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

body.archive:not(.author) .entry-header-outer.container-wrapper,
body.archive:not(.author) .entry-header-outer {
  position: relative; overflow: hidden; text-align: start; margin: 0 0 22px; padding: 26px 34px 28px !important; color: #fff; border: 0 !important; border-radius: var(--p-radius) !important;
  background: radial-gradient(circle at 12% 0%, rgba(255,255,255,.2), transparent 42%), radial-gradient(circle at 100% 100%, rgba(255,255,255,.1), transparent 38%), linear-gradient(135deg, var(--s-hero1) 0%, var(--s-hero2) 62%, var(--s-hero3) 100%) !important;
  box-shadow: 0 14px 34px rgba(10,35,80,.22) !important;
}
body.archive:not(.author) .entry-header-outer::after { display: none !important; }
body.archive:not(.author) .entry-header-outer #breadcrumb {
  display: block; margin: 0 0 18px; padding: 0 0 12px; border: 0; border-bottom: 1px solid rgba(255,255,255,.2); background: none;
  font-size: 13.5px; line-height: 1.8; color: rgba(255,255,255,.85); font-weight: 600;
}
body.archive:not(.author) .entry-header-outer #breadcrumb a { color: rgba(255,255,255,.88) !important; }
body.archive:not(.author) .entry-header-outer #breadcrumb a:hover { color: #fff !important; text-decoration: underline; }
body.archive:not(.author) .entry-header-outer #breadcrumb .current { color: #fff !important; font-weight: 800; }
body.archive:not(.author) .entry-header-outer #breadcrumb .delimiter { color: rgba(255,255,255,.55); margin: 0 4px; font-style: normal; }
body.archive:not(.author) .entry-header-outer #breadcrumb .tie-icon-home { color: #ffd36b; }
body.archive:not(.author) .page-title { color: #fff !important; font-size: 34px; font-weight: 900; line-height: 1.5; margin: 0 0 10px; text-shadow: 0 2px 14px rgba(0,0,0,.25); }
body.archive:not(.author) .taxonomy-description { text-align: justify; text-justify: inter-word; max-width: 860px; margin: 0 0 14px; }
body.archive:not(.author) .taxonomy-description, body.archive:not(.author) .taxonomy-description p { color: rgba(255,255,255,.92); font-size: 16px; line-height: 1.95; }
.am-chero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.am-chero-stat { font-size: 14px; font-weight: 700; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 6px 16px; }
.am-chero-stat b { font-size: 17px; font-weight: 900; margin-inline-start: 4px; color: #ffd36b; }
body.archive:not(.author) .sub-terms { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.2); }
body.archive:not(.author) .sub-terms .terms { justify-content: flex-start; gap: 10px; }
body.archive:not(.author) .sub-terms .term a { background: rgba(255,255,255,.16) !important; border: 1px solid rgba(255,255,255,.3) !important; color: #fff !important; }
body.archive:not(.author) .sub-terms .term a:hover { background: #fff !important; color: var(--s-hero2) !important; border-color: #fff !important; }
@media (max-width: 991px) { body.archive:not(.author) .entry-header-outer.container-wrapper, body.archive:not(.author) .entry-header-outer { padding: 20px 18px 22px !important; } }
@media (max-width: 640px) { body.archive:not(.author) .page-title { font-size: 26px; } body.archive:not(.author) .taxonomy-description, body.archive:not(.author) .taxonomy-description p { font-size: 15px; } }

/* الوضع المظلم: لون الروابط/الأزرار الزرقاء أفتح لتباين أعلى */
.dark-skin { --p-blue: #6ea8ff; }
.dark-skin .am-author-kicker { color: #9cc3ff; }

body.archive .sub-terms:not(:has(.term)) { display: none; }

/* أزرار الأقسام الفرعية: توزيع متساوٍ يمين ويسار */
body.archive:not(.author) .sub-terms .terms { display: flex; flex-wrap: wrap; justify-content: stretch; }
body.archive:not(.author) .sub-terms .terms .term { flex: 1 1 auto !important; }
body.archive:not(.author) .sub-terms .term a { display: block !important; text-align: center; width: 100%; box-sizing: border-box; white-space: nowrap; }

/* الوضع المظلم: مجموعات Gutenberg ذات الخلفيات الفاتحة المضمّنة في المقال (مثل #e6f4ea) تُحوَّل لخلفية داكنة شفافة */
.dark-skin .entry-content :is(.wp-block-group, .wp-block-column, .wp-block-cover, .wp-block-media-text, div, p).has-background:is([style*="background-color:#e"], [style*="background-color:#f"], [style*="background-color:#d"], [style*="background-color: #e"], [style*="background-color: #f"], [style*="background-color: #d"], [style*="background-color:rgb(2"], [style*="background:#e"], [style*="background:#f"]) {
  background-color: rgba(255,255,255,.07) !important; border: 1px solid var(--p-line); color: var(--p-text) !important; border-radius: 12px;
}
.dark-skin .entry-content .has-background:is([style*="background-color:#e"], [style*="background-color:#f"], [style*="background-color:#d"]) :is(p, li, strong, em, span, h1, h2, h3, h4, h5, td, th, figcaption) { color: inherit !important; }
.dark-skin .entry-content .has-background:is([style*="background-color:#e"], [style*="background-color:#f"], [style*="background-color:#d"]) :is(h2, h3, h4, strong) { color: var(--p-ink) !important; }

/* كتل بخلفية فاتحة داخل الوضع المظلم: نص داكن مقروء (تُضاف الفئة am-lightbg بسكربت صغير) */
.dark-skin .entry-content .am-lightbg { color: #10202e !important; }
.dark-skin .entry-content .am-lightbg :is(p, li, span, strong, em, h1, h2, h3, h4, h5, td, th, figcaption) { color: inherit !important; }
.dark-skin .entry-content .am-lightbg a { color: #0b4fb3 !important; text-decoration: underline; }
.dark-skin .entry-content .am-lightbg :is(h2, h3, h4)::before { filter: none; }

/* أزرار الأقسام الفرعية: شبكة أعمدة متساوية (توزيع منتظم يمين ويسار، وآخر صف لا يتمدد) */
body.archive:not(.author) .sub-terms .terms { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; justify-content: stretch; }
body.archive:not(.author) .sub-terms .terms .term { flex: none !important; min-width: 0; }
body.archive:not(.author) .sub-terms .term a { white-space: normal !important; line-height: 1.45; display: flex !important; align-items: center; justify-content: center; min-height: 40px; height: 100%; text-align: center; }
@media (max-width: 640px) { body.archive:not(.author) .sub-terms .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* الوضع المظلم: رابط داخل كتلة فاتحة بتباين أعلى + نموذج التعليقات */
.dark-skin .entry-content .am-lightbg a { color: #06357a !important; }
#wpdcom .ql-toolbar button.ql-sourcecode, #wpdcom .ql-toolbar button.ql-spoiler { color: #5f6c82 !important; }
.dark-skin #wpdcom .wpd-form-row .ql-container, .dark-skin #wpdcom .wpd-form-row .ql-toolbar, .dark-skin #wpdcom .wpd-form-row .ql-editor,
.dark-skin #wpdcom .wpd-form-row input[type="text"], .dark-skin #wpdcom .wpd-form-row input[type="email"], .dark-skin #wpdcom .wpd-form-row input[type="url"], .dark-skin #wpdcom .wpd-form-row textarea {
  background: #121d36 !important; color: #c3cee4 !important; border-color: #253452 !important;
}
.dark-skin #wpdcom .ql-editor.ql-blank::before { color: #8493b0 !important; }
.dark-skin #wpdcom .ql-toolbar .ql-stroke { stroke: #c3cee4 !important; }
.dark-skin #wpdcom .ql-toolbar .ql-fill { fill: #c3cee4 !important; }
.dark-skin #wpdcom .ql-toolbar button, .dark-skin #wpdcom .ql-toolbar button.ql-sourcecode, .dark-skin #wpdcom .ql-toolbar button.ql-spoiler { color: #c3cee4 !important; }

/* نموذج التعليقات في الدارك (selectors أوسع) */
.dark-skin #wpdcom .ql-container, .dark-skin #wpdcom .ql-toolbar, .dark-skin #wpdcom .ql-editor, .dark-skin #wpdcom .wpd-field-textarea, .dark-skin #wpdcom .wpd-field-comment,
.dark-skin #wpdcom .wpd-field, .dark-skin #wpdcom input[type="text"], .dark-skin #wpdcom input[type="email"], .dark-skin #wpdcom input[type="url"], .dark-skin #wpdcom textarea {
  background: #121d36 !important; color: #c3cee4 !important; border-color: #253452 !important;
}
.dark-skin #wpdcom .wpd-form-foot, .dark-skin #wpdcom .wpd-form-row-wrapper { background: transparent !important; }
.dark-skin #wpdcom .wpd-avatar img, .dark-skin #wpdcom .wpd-avatar { opacity: .92; }
.dark-skin #wpdcom .wc-field-submit input[type="submit"], .dark-skin #wpdcom .wpd-prim-button { background: #1456b8 !important; color: #fff !important; }
.dark-skin #wpdcom .wpd-thread-head, .dark-skin #wpdcom .wpd-thread-info { color: #eaf1ff !important; border-color: #253452 !important; }
