/* ==========================================================================
   المقالات — صفحة القراءة (SSR) وصفحة القائمة
   تُحمّل فوق styles.css فتورث الخطوط والرموز وهوية تكايا
   ========================================================================== */

.article-body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--mist);
  background-image: var(--pattern-mist);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- الشريط العلوي المشترك ---------- */
.art-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--mist) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.art-top-in {
  width: min(1080px, 92%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.art-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--on-dark);
  text-decoration: none;
}
.art-brand img { display: block; }
.art-top-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.art-top-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.art-top-nav a:hover { color: var(--green); }

/* ---------- عمود القراءة ---------- */
.article-wrap {
  flex: 1;
  width: min(760px, 92%);
  margin-inline: auto;
  padding: 44px 0 72px;
}
.article-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.art-cover { margin: 0; }
.art-cover img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: 50% 35%;
}
.article-inner { padding: 34px clamp(20px, 5vw, 52px) 44px; }

.art-kicker {
  color: var(--price-text);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 10px;
}
.article-card h1 {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 4.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--on-dark);
  margin: 0 0 14px;
}
.art-byline {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  margin: -6px 0 14px;
}
.art-lead {
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.9;
  margin: 0 0 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

/* ---------- جسم المقال (مخرجات محرك التنسيق) ---------- */
.md-body {
  font-size: 1.06rem;
  line-height: 2.05;
  color: var(--text);
  word-wrap: break-word;
}
.md-body > *:first-child { margin-top: 0; }
.md-body p { margin: 0 0 1.15em; }
.md-body h2 {
  font-family: var(--font-head);
  font-size: 1.45rem;
  color: var(--on-dark);
  margin: 1.9em 0 0.6em;
  line-height: 1.5;
}
.md-body h3 {
  font-family: var(--font-head);
  font-size: 1.18rem;
  color: var(--on-dark);
  margin: 1.6em 0 0.5em;
}
.md-body strong { color: var(--on-dark); }
.md-body a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}
.md-body ul { margin: 0 0 1.15em; padding-inline-start: 1.5em; }
.md-body li { margin: 0.35em 0; }
.md-body li::marker { color: var(--gold); }
.md-body blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--mist) 55%, var(--white));
  border-radius: 14px;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 1.08rem;
}
.md-body blockquote p { margin: 0; }
.md-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(to left, transparent, var(--gold), transparent);
  margin: 2.2em auto;
  width: 62%;
}

/* ---------- أزرار المشاركة ---------- */
.art-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.btn-ghost-lux {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 14px;
  border: 1.5px solid color-mix(in srgb, var(--gold) 55%, transparent);
  background: transparent;
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.btn-ghost-lux:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }

/* ---------- التذييل ---------- */
.art-foot {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--mist) 65%, var(--white));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  width: min(1080px, 92%);
  margin-inline: auto;
  padding: 22px 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.art-foot p { margin: 0; }

/* ==========================================================================
   صفحة القائمة /articles
   ========================================================================== */
.arts-head {
  width: min(1080px, 92%);
  margin-inline: auto;
  padding: 58px 0 10px;
  text-align: center;
}
.arts-head .kicker {
  color: var(--price-text);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 8px;
}
.arts-head h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 2.9rem);
  color: var(--on-dark);
  margin: 0 0 12px;
}
.arts-head p { color: var(--muted); margin: 0; }

.arts-grid {
  width: min(1080px, 92%);
  margin: 34px auto 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}
.art-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.art-card:hover {
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--green) 35%, transparent);
}
.art-card-cover { margin: 0; position: relative; }
.art-card-cover img {
  display: block;
  width: 100%;
  height: 185px;
  object-fit: cover;
  object-position: 50% 35%;
}
.art-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(31, 46, 71, 0.18), transparent 45%);
}
.art-card-cover.no-cover {
  height: 120px;
  background:
    var(--pattern-mist),
    linear-gradient(135deg, color-mix(in srgb, var(--green-deep) 30%, var(--white)), color-mix(in srgb, var(--gold) 22%, var(--white)));
}
.art-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}
.art-card-date {
  color: var(--price-text);
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.art-card-title {
  font-family: var(--font-head);
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--on-dark);
  margin: 0 0 8px;
}
.art-card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.art-more {
  margin-top: auto;
  padding-top: 14px;
  color: var(--green);
  font-weight: 700;
  font-size: 0.95rem;
}
.art-empty {
  text-align: center;
  color: var(--muted);
  padding: 30px 0 10px;
}

/* ---------- الجوال ---------- */
@media (max-width: 720px) {
  .art-top-nav { display: none; }
  .article-wrap { padding: 22px 0 56px; }
  .article-card { border-radius: 20px; }
  .article-inner { padding: 24px 18px 32px; }
  .art-cover img { max-height: 300px; }
  .md-body { font-size: 1.02rem; line-height: 2; }
  .art-actions .btn,
  .art-actions .btn-ghost-lux { flex: 1; }
  .arts-grid { grid-template-columns: 1fr; gap: 18px; margin-bottom: 60px; }
  .art-foot { justify-content: center; text-align: center; }
}
