/* ============================================================
   04 — ARTICLE + TITLE PATH
   ============================================================ */

/* ---------- مسار العنوان ----------
   كان معطّلًا بالكامل: PHP يُخرج .ibn-title-path بينما CSS يعرّف
   .ibn-thani-title-path. تم توحيد الاسم + بناء التنسيق المفقود.
------------------------------------------------------------- */
.ibn-thani-title-path{
  width:min(var(--ibn-article),calc(100% - (var(--ibn-gutter) * 2)));
  margin:14px auto 0;
  color:var(--ibn-muted);
  font-size:15px;
  font-weight:var(--ibn-w-medium);
  line-height:1.55;
}
.ibn-thani-title-path ol{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 8px;
  list-style:none;
  margin:0;
  padding:0;
}
.ibn-thani-title-path li{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  min-width:0;
}
/* الفاصل يتبع اتجاه القراءة تلقائيًا */
.ibn-thani-title-path li + li::before{
  content:"\203A";                 /* › */
  color:var(--ibn-gold);
  font-weight:var(--ibn-w-title);
  opacity:.7;
  transform:scaleX(-1);            /* يشير لليسار في RTL */
}
.ibn-thani-title-path a{color:var(--ibn-blue-2);font-weight:var(--ibn-w-strong)}
.ibn-thani-title-path a:hover{color:var(--ibn-gold)}
.ibn-thani-title-path li:last-child span{
  color:var(--ibn-blue);
  font-weight:var(--ibn-w-title);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:min(46ch,100%);
}

/* ---------- جسم المقال ---------- */
.ibn-thani-article{
  position:relative;
  isolation:isolate;
  width:min(var(--ibn-article),calc(100% - (var(--ibn-gutter) * 2)));
  margin:18px auto 34px;
  padding:26px;
  border-radius:var(--ibn-radius-xl);
  border:1px solid var(--ibn-border);
  box-shadow:var(--ibn-shadow);
}
.ibn-thani-article::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:var(--ibn-z-surface);
  border-radius:inherit;
  pointer-events:none;
  background:var(--ibn-sheen),linear-gradient(145deg,var(--ibn-glass-strong),rgba(255,255,255,.46));
  box-shadow:inset 0 0 0 1px var(--ibn-hairline);
  backdrop-filter:blur(var(--ibn-blur)) saturate(1.3);
  -webkit-backdrop-filter:blur(var(--ibn-blur)) saturate(1.3);
}
.ibn-thani-article > *{position:relative;z-index:var(--ibn-z-content)}

.ibn-thani-article-meta{margin:0 0 8px;color:var(--ibn-muted);font-size:15px;font-weight:var(--ibn-w-medium)}
.ibn-thani-article-title{
  margin:8px 0 14px;
  color:var(--ibn-blue);
  font-size:clamp(24px,3vw,34px);
  line-height:1.4;
  font-weight:var(--ibn-w-title);
  letter-spacing:-.01em;
}

.ibn-featured-image{
  margin:16px 0 22px;
  border-radius:var(--ibn-radius);
  overflow:hidden;
  border:1px solid var(--ibn-border);
  box-shadow:var(--ibn-shadow-soft);
}
.ibn-featured-image img{width:100%;max-height:520px;object-fit:cover}

/* ---------- المحتوى ---------- */
.ibn-thani-article-content,
.domain-article{font-size:18px;line-height:2.05;color:var(--ibn-ink);font-weight:var(--ibn-w-body)}
.ibn-thani-article-content > *,
.domain-article > *{margin-block-start:0;margin-block-end:1.05em}

.ibn-thani-article-content h2,
.domain-article h2{font-size:clamp(21px,2.2vw,26px)}
.ibn-thani-article-content h3,
.domain-article h3{font-size:clamp(19px,2vw,22px)}
.ibn-thani-article-content h1,
.ibn-thani-article-content h2,
.ibn-thani-article-content h3,
.ibn-thani-article-content h4,
.domain-article .main-title,
.domain-article .section-title,
.domain-article h1,
.domain-article h2,
.domain-article h3,
.domain-article h4{
  line-height:1.55;
  font-weight:var(--ibn-w-title);
  color:var(--ibn-blue);
  margin:1.25em 0 .65em;
}
.domain-article .main-title{padding-bottom:.45em;border-bottom:1px solid var(--ibn-border)}

/* ---------- الصناديق ---------- */
.domain-article .box,
.domain-article .gold-box,
.domain-article .blue-box,
.domain-article .purple-box,
.domain-article .red-box,
.domain-article .source-box,
.domain-article .sources-box,
.domain-article .note-box{
  margin:18px 0;
  padding:18px;
  border-radius:var(--ibn-radius);
  border:1px solid var(--ibn-border);
  background:rgba(255,255,255,.36);
  box-shadow:var(--ibn-shadow-soft),inset 0 1px 0 rgba(255,255,255,.30);
}
.domain-article .gold-box{border-color:rgba(217,174,69,.48);background:linear-gradient(145deg,rgba(255,247,223,.74),rgba(255,255,255,.42))}
.domain-article .blue-box{border-color:rgba(15,91,181,.38);background:linear-gradient(145deg,rgba(11,62,122,.14),rgba(255,255,255,.40))}
.domain-article .purple-box{border-color:rgba(99,72,170,.34);background:linear-gradient(145deg,rgba(99,72,170,.11),rgba(255,255,255,.40))}
.domain-article .red-box{border-color:rgba(172,53,53,.34);background:linear-gradient(145deg,rgba(172,53,53,.10),rgba(255,255,255,.40))}
.domain-article .source-box,
.domain-article .sources-box{border-color:rgba(89,103,122,.32);background:linear-gradient(145deg,rgba(89,103,122,.09),rgba(255,255,255,.40))}

/* ---------- وسائط ---------- */
.ibn-thani-article-content img,
.domain-article img{border-radius:18px;border:1px solid var(--ibn-border);box-shadow:var(--ibn-shadow-soft)}
.ibn-thani-article-content iframe,
.domain-article iframe{width:100%;aspect-ratio:16/9;border:0;border-radius:18px;box-shadow:var(--ibn-shadow-soft)}

/* ---------- الجداول ---------- */
.ibn-thani-article-content table,
.domain-article table{
  width:100%;
  border-collapse:collapse;
  border-radius:18px;
  overflow:hidden;
  background:rgba(255,255,255,.36);
  border:1px solid var(--ibn-border);
}
.ibn-thani-article-content th,
.ibn-thani-article-content td,
.domain-article th,
.domain-article td{
  padding:12px;
  border-bottom:1px solid rgba(184,135,31,.18);
  text-align:start;                /* منطقي بدل right — يعمل في الاتجاهين */
}
.ibn-thani-article-content th,
.domain-article th{background:rgba(6,42,86,.08);font-weight:var(--ibn-w-title);color:var(--ibn-blue)}

/* ---------- الاقتباس ---------- */
.ibn-thani-article-content blockquote,
.domain-article blockquote{
  margin:18px 0;
  padding:16px 18px;
  border-inline-start:4px solid var(--ibn-gold);
  border-radius:18px;
  background:rgba(255,255,255,.36);
  color:var(--ibn-ink);
}

/* ---------- الشِّعر ---------- */
.wp-block-verse,.poem,.qasida,.abyat,.bayt,.verse{
  font-size:18px;
  line-height:2.15;
  white-space:pre-wrap;
  unicode-bidi:isolate;
  background:rgba(255,255,255,.30);
  border:1px solid var(--ibn-border);
  border-radius:var(--ibn-radius);
  padding:18px;
  margin:18px 0;
  color:var(--ibn-ink);
}
.poem-line,.verse-line,.shatr,.sadr,.ajz,.hemistich{
  display:flex;
  flex-wrap:wrap;
  gap:14px 28px;
  align-items:baseline;
  justify-content:space-between;
  unicode-bidi:isolate;
}
.poem-line > *,.verse-line > *,.shatr > *{min-width:min(280px,100%);flex:1 1 0}

.ibn-thani-tags{margin-top:18px;color:var(--ibn-muted);font-size:15px;font-weight:var(--ibn-w-medium)}
.ibn-thani-tags a{color:var(--ibn-blue-2);font-weight:var(--ibn-w-strong)}
