/* ================= الألوان والمتغيرات ================= */
:root {
  --green-900: #0a2a21;
  --green-800: #0f3b2e;
  --green-700: #155040;
  --gold: #c9a24a;
  --gold-light: #e7c873;

  --bg: #faf7f0;
  --bg-alt: #f2ecdf;
  --surface: #ffffff;
  --text: #1d2420;
  --muted: #6b726d;
  --border: #e4dccb;
  --primary: var(--green-800);
  --accent: var(--gold);
  --shadow: 0 6px 24px rgba(15, 59, 46, .08);

  --radius: 14px;
  --font-body: "Tajawal", system-ui, sans-serif;
  --font-head: "Noto Kufi Arabic", "Tajawal", sans-serif;
  --font-quran: "Amiri", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1613; --bg-alt: #101e1a; --surface: #14241f;
    --text: #ece6d8; --muted: #9ba59f; --border: #22362f;
    --primary: #2f8a6e; --shadow: 0 6px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #0c1613; --bg-alt: #101e1a; --surface: #14241f;
  --text: #ece6d8; --muted: #9ba59f; --border: #22362f;
  --primary: #2f8a6e; --shadow: 0 6px 24px rgba(0,0,0,.35);
}

/* ================= الأساسيات ================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.85;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.4; margin: 0 0 .5em; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); font-size: .92em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ================= الأزرار ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; cursor: pointer; transition: transform .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--green-900); }
.btn--ghost { border-color: rgba(231, 200, 115, .6); color: #fff; }
.btn--ghost:hover { background: rgba(231, 200, 115, .12); }
.btn--block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: inherit;
}
.icon-btn:hover { background: rgba(255,255,255,.1); }

/* ================= الشريط العلوي والترويسة ================= */
.topbar { background: var(--green-900); color: #d8cfb6; font-size: 14px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.topbar__actions { display: flex; gap: 4px; }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--green-800) 94%, transparent);
  backdrop-filter: blur(10px); color: #fff;
  border-bottom: 1px solid rgba(201, 162, 74, .3);
  transition: box-shadow .3s;
}
.header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.25); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { width: 48px; height: 48px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.3; }
.brand__text strong { font-family: var(--font-head); font-size: 19px; color: var(--gold-light); }
.brand__text small { font-size: 12.5px; opacity: .75; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 15.5px;
  position: relative; transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 2px;
  background: var(--gold); transform: scaleX(0); transition: transform .25s;
}
.nav a:hover, .nav a.active { color: var(--gold-light); }
.nav a.active::after, .nav a:hover::after { transform: scaleX(1); }

.menu-btn { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 8px; }
.menu-btn span { display: block; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================= الواجهة ================= */
.hero {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background: radial-gradient(ellipse at top, var(--green-700), var(--green-900) 70%);
  padding: 30px 0 48px; /* الكتابات أقرب إلى أعلى الصفحة */
}
.hero__pattern {
  position: absolute; inset: 0; opacity: var(--pattern-opacity, .09);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23e7c873' stroke-width='1'%3E%3Crect x='20' y='20' width='40' height='40'/%3E%3Crect x='20' y='20' width='40' height='40' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='10'/%3E%3C/g%3E%3C/svg%3E");
}
.hero__inner { position: relative; }
.hero__emblem { margin: 0 auto 18px; width: 110px; height: 110px; filter: drop-shadow(0 8px 24px rgba(0,0,0,.4)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero__logo { display: block; margin: 0 auto 14px; width: auto; max-width: min(260px, 60vw); max-height: 240px; object-fit: contain; filter: drop-shadow(0 8px 24px rgba(0,0,0,.35)); }
.hero__basmala { font-family: var(--font-quran); font-size: clamp(22px, 3vw, 30px); color: var(--gold-light); margin: 0 0 8px; }
.hero__verse {
  font-family: var(--font-quran); font-size: clamp(19px, 2.4vw, 25px); line-height: 2; color: #f3ead2;
  max-width: 720px; margin: 0 auto 8px;
}
.hero__verse small { display: block; font-family: var(--font-body); font-size: 13.5px; line-height: 1.6; color: var(--gold); opacity: .9; }
.hero__title {
  font-size: clamp(36px, 6.5vw, 68px); margin: 0 0 8px;
  background: linear-gradient(180deg, #fff 30%, var(--gold-light)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { max-width: 680px; margin: 0 auto 22px; font-size: clamp(16px, 2vw, 19px); opacity: .9; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.stats {
  list-style: none; padding: 0; margin: 50px auto 0; max-width: 720px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(201,162,74,.35); border-radius: var(--radius);
  background: rgba(0,0,0,.18);
}
.stats li { padding: 18px 10px; display: flex; flex-direction: column; }
.stats li + li { border-inline-start: 1px solid rgba(201,162,74,.25); }
.stats strong { font-family: var(--font-head); font-size: 30px; color: var(--gold-light); }
.stats span { font-size: 14px; opacity: .8; }

/* ================= شريط عاجل ================= */
.ticker { background: var(--gold); color: var(--green-900); font-weight: 700; }
.ticker__inner { display: flex; align-items: center; gap: 14px; min-height: 46px; }
.ticker__label { background: var(--green-900); color: var(--gold-light); padding: 3px 14px; border-radius: 6px; flex-shrink: 0; }
.ticker__track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker__content { display: inline-flex; white-space: nowrap; animation: ticker 35s linear infinite; }
.ticker__content span { padding-inline-end: 60px; }
.ticker__content span::before { content: "◆"; margin-inline-end: 12px; font-size: 10px; vertical-align: middle; }
.ticker__track:hover .ticker__content { animation-play-state: paused; }
/* ثابت أسفل الشاشة مهما نزلت الصفحة */
.ticker--fixed {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 45;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, .25); padding-bottom: env(safe-area-inset-bottom);
}
body:has(.ticker--fixed) { padding-bottom: 46px; }
body:has(.ticker--fixed) .to-top { bottom: 64px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ================= الأقسام ================= */
.section { padding: 90px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 36px; }
.section__title { font-size: clamp(26px, 3.4vw, 38px); color: var(--primary); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--gold); font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.placeholder-note {
  display: inline-block; background: rgba(201,162,74,.15); color: #8a6a1d; border: 1px dashed var(--gold);
  padding: 2px 12px; border-radius: 6px; font-size: 14px;
}
[data-theme="dark"] .placeholder-note { color: var(--gold-light); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
}

/* السيرة */
.about { display: grid; grid-template-columns: 360px 1fr; gap: 60px; align-items: start; }
.portrait-frame {
  position: relative; border-radius: 200px 200px var(--radius) var(--radius); overflow: hidden;
  border: 3px solid var(--gold); box-shadow: 0 0 0 8px var(--bg), 0 0 0 9px var(--gold), var(--shadow);
  aspect-ratio: 300 / 380; background: var(--green-800);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.timeline { margin-top: 26px; border-inline-start: 2px solid var(--border); padding-inline-start: 24px; }
.timeline__item { position: relative; padding-bottom: 18px; }
.timeline__item::before {
  content: ""; position: absolute; inset-inline-start: -32px; top: 10px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--bg);
}
.timeline__item b { color: var(--primary); margin-inline-end: 8px; font-family: var(--font-head); }

/* الفلاتر */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--surface); padding: 6px 16px; border-radius: 999px;
  cursor: pointer; font-weight: 500; transition: .2s;
}
.chip:hover { border-color: var(--gold); }
.chip[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* بطاقات البيانات */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.statement {
  display: flex; flex-direction: column; cursor: pointer; text-align: start; position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s; font-size: inherit;
}
.statement::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--gold); }
.statement:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(15,59,46,.14); }
.statement__meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.badge { background: rgba(201,162,74,.16); color: #8a6a1d; padding: 1px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; }
[data-theme="dark"] .badge { color: var(--gold-light); }
.statement h3 { font-size: 19px; color: var(--primary); }
.statement p { margin: 0 0 14px; color: var(--muted); flex: 1; }
.read-more { color: var(--gold); font-weight: 700; font-size: 15px; }

/* المرئيات */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.media-item { padding: 0; overflow: hidden; }
.media-item__thumb {
  aspect-ratio: 16/9; background: linear-gradient(135deg, var(--green-700), var(--green-900));
  display: grid; place-items: center; position: relative; cursor: pointer; border: 0; width: 100%;
}
.media-item__thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-item__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play {
  position: relative; width: 58px; height: 58px; border-radius: 50%; background: rgba(201,162,74,.92);
  display: grid; place-items: center; transition: transform .2s;
}
.play::after { content: ""; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--green-900); margin-inline-start: 4px; }
.media-item__thumb:hover .play { transform: scale(1.1); }
.duration { position: absolute; bottom: 8px; inset-inline-end: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; padding: 0 8px; border-radius: 4px; }
.media-item__body { padding: 16px 20px 20px; }
.media-item__body h3 { font-size: 17px; margin-bottom: 4px; }

/* المؤلفات */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 26px; }
.book { text-align: center; }
.book__cover {
  aspect-ratio: 3/4; border-radius: 4px 12px 12px 4px; margin-bottom: 14px; position: relative;
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  box-shadow: -8px 10px 24px rgba(0,0,0,.2), inset 6px 0 0 rgba(0,0,0,.25);
  display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; color: var(--gold-light);
  border: 1px solid rgba(201,162,74,.4); transition: transform .3s;
}
.book:hover .book__cover { transform: rotateY(-8deg) translateY(-4px); }
.book__cover::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(201,162,74,.45); border-radius: 4px; }
.book__cover strong { font-family: var(--font-head); font-size: 17px; line-height: 1.6; }
.book__cover small { margin-top: 10px; opacity: .7; font-size: 13px; }
.book h3 { font-size: 16px; margin-bottom: 4px; }
.book a { color: var(--gold); font-weight: 700; font-size: 14px; }
/* بطاقات أصغر في القوائم */
.books { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 18px; }
.books .book__cover { margin-bottom: 10px; padding: 14px 10px; }
.books .book__cover::before { inset: 8px; }
.books .book__cover strong { font-size: 13.5px; line-height: 1.55; }
.books .book__cover small { font-size: 11.5px; margin-top: 6px; }
.books .book h3 { font-size: 14px; line-height: 1.55; }
.books .book .muted { font-size: 12px; }
.books .book__part { width: 26px; height: 26px; font-size: 12.5px; top: 8px; inset-inline-start: 8px; }

/* الاستفتاءات */
.fatwa { display: grid; grid-template-columns: 1.3fr 1fr; gap: 50px; align-items: start; }
.faq details { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.faq summary {
  padding: 16px 20px; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

form label { display: block; font-weight: 500; margin-bottom: 14px; font-size: 15px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,74,.2); }
.invalid { border-color: #c0392b !important; }
.form-msg { margin: 12px 0 0; font-weight: 500; min-height: 1.5em; }
.form-msg.ok { color: #2e8b57; }
.form-msg.err { color: #c0392b; }
.fatwa__form h3, .newsletter h3 { color: var(--primary); }

/* الأخبار */
.news { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.news__date { display: inline-block; font-size: 13.5px; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.news h3 { font-size: 18px; }
.news p { margin: 0; color: var(--muted); }

/* التواصل */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.contact__list { list-style: none; padding: 0; margin: 0 0 22px; }
.contact__list li { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { border: 1px solid var(--border); padding: 6px 18px; border-radius: 999px; transition: .2s; }
.socials a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.newsletter__row { display: flex; gap: 10px; }
.newsletter__row input { margin: 0; }

/* التذييل */
.footer { background: var(--green-900); color: #cfc6ad; padding: 34px 0; border-top: 3px solid var(--gold); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer__nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__nav a:hover { color: var(--gold-light); }

/* النوافذ */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(5, 20, 15, .7); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding: 80px 16px 16px; animation: fade .2s;
}
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.search-box, .reader {
  width: min(720px, 100%); background: var(--surface); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.4);
  max-height: calc(100vh - 100px); overflow: auto;
}
.search-box__row { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.search-box__row input { border: 0; margin: 0; background: transparent; font-size: 18px; box-shadow: none !important; }
.search-results { list-style: none; margin: 0; padding: 8px; }
.search-results li a, .search-results li.empty { display: block; padding: 12px 14px; border-radius: 10px; }
.search-results li a:hover, .search-results li a:focus { background: var(--bg-alt); }
.search-results small { color: var(--gold); font-weight: 700; margin-inline-start: 8px; }
.search-results li.empty { color: var(--muted); }
mark { background: rgba(201,162,74,.35); color: inherit; border-radius: 3px; }

.reader { position: relative; padding: 40px clamp(20px, 5vw, 56px); }
.reader__close { position: absolute; top: 14px; inset-inline-end: 14px; }
.reader h2 { color: var(--primary); font-size: clamp(22px, 3vw, 30px); }
.reader .reader__meta { color: var(--muted); margin-bottom: 20px; display: flex; gap: 12px; align-items: center; }
.reader__body { font-size: 18.5px; line-height: 2.1; }
.reader__actions { display: flex; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.reader__actions .btn { padding: 8px 20px; font-size: 15px; }
.btn--outline { border-color: var(--border); }
.btn--outline:hover { border-color: var(--gold); }

.to-top {
  position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--gold); color: var(--green-900); font-size: 20px; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ظهور تدريجي */
/* يُخفى فقط عند عمل JavaScript، حتى لا يختفي المحتوى إذا تعطّل */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: none; }

/* ================= الشاشات الصغيرة ================= */
@media (max-width: 1320px) {
  .fatwa, .contact { grid-template-columns: 1fr; gap: 36px; }
  .about { grid-template-columns: 300px 1fr; gap: 40px; }
}
/* الصورة على يمين الصفحة والنص بجانبها، وعلى الهاتف تأتي الصورة فوق النص */
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; gap: 36px; }
  .about__portrait--side { max-width: 320px; margin-inline: auto; width: 100%; }
}
/* سطح المكتب: الأقسام في صف ثانٍ داخل الشريط العلوي تحت اسم الموقع */
@media (min-width: 961px) {
  .header__inner { flex-wrap: wrap; row-gap: 0; padding-top: 8px; min-height: 0; }
  .brand { flex: 1 1 auto; }
  .nav { flex: 1 0 100%; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 8px; padding: 4px 0 6px; border-top: 1px solid rgba(255,255,255,.1); }
  .nav a { font-size: 14.5px; padding: 8px 9px; }
  .nav__cta { padding: 6px 14px !important; }
}
@media (max-width: 960px) {
  /* الهاتف والجهاز اللوحي: القائمة الجانبية، الزر يمين الترويسة، والقائمة تنزلق من اليمين */
  .header { backdrop-filter: none; background: var(--green-800); }
  .menu-btn { display: block; order: -1; position: relative; z-index: 62; }
  .brand { margin-inline-end: auto; }
  .nav__cta { margin: 14px 0 0; text-align: center; }
  .nav {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 84vw);
    flex-direction: column; background: var(--green-900); padding: 86px 18px 24px; gap: 0; overflow-y: auto;
    border-inline-end: 2px solid var(--gold); z-index: 61;
    transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s, box-shadow .3s;
  }
  .header.scrolled .nav { inset-block-start: 0; }
  .nav.open { transform: none; visibility: visible; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); }
  .nav a { padding: 13px 8px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 16px; }
  .nav a::after { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 22px 0 36px; }
  .stats strong { font-size: 24px; }
  .cards, .news { grid-template-columns: 1fr; }
  .books { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
  .books .book__cover strong { font-size: 11.5px; }
  .books .book__cover small { display: none; }
  .books .book h3 { font-size: 12.5px; }
  .newsletter__row { flex-direction: column; }
  .brand__text small { display: none; }
}
/* ================= إضافات نسخة PHP ================= */
.nav a { font-size: 15px; padding: 8px 10px; white-space: nowrap; }
.nav__cta { border: 1px solid var(--gold); border-radius: 999px !important; color: var(--gold-light); margin-inline-start: 6px; }

.nav__cta::after { display: none; }
/* عبارة مؤقتة بجانب «طلب لقاء» — تُخفى من الإعدادات عند اكتمال الموقع */
.dev-notice { font-size: 13px; font-weight: 300; color: var(--gold-light); opacity: .75; margin-inline-start: 14px; white-space: nowrap; letter-spacing: .2px; }
@media (max-width: 960px) { .dev-notice { display: block; margin: 12px 0 0; text-align: center; } }
.nav__cta:hover, .nav__cta.active { background: var(--gold); color: var(--green-900) !important; }

.btn--primary { background: var(--green-800); color: #fff; }
.btn--primary:hover { background: var(--green-700); }
.btn--outline { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn--outline:hover { border-color: var(--gold); }
.section--dark { background: var(--green-900); color: #e9e2cc; }
.section--dark .section__title { color: var(--gold-light); }
.center { text-align: center; }
.narrow { max-width: 760px; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.alert--ok { background: rgba(46,139,87,.1); border-color: rgba(46,139,87,.35); color: #2e8b57; }
.alert--err { background: rgba(192,57,43,.08); border-color: rgba(192,57,43,.35); color: #c0392b; }

/* رأس الصفحات الداخلية */
.page-hero {
  position: relative; overflow: hidden; color: #fff; text-align: center; padding: 56px 0 50px;
  background: radial-gradient(ellipse at top, var(--green-700), var(--green-900) 75%);
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(28px, 4.5vw, 46px); color: var(--gold-light); margin: 0 0 8px; }
.page-hero p { max-width: 640px; margin: 0 auto; opacity: .88; }
.page-hero .eyebrow { justify-content: center; }
.page-hero .eyebrow::before { display: none; }

.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a { color: var(--gold); font-weight: 500; }

.prose p { margin: 0 0 1.1em; }
.prose--lg { font-size: 18.5px; line-height: 2.15; }
.sticky-portrait { position: sticky; top: 110px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state h1 { font-size: 64px; color: var(--gold); margin: 0; }

/* البحث والفلاتر */
.searchbar { display: flex; gap: 10px; max-width: 640px; margin: 0 auto 22px; }
.searchbar input, .searchbar select { margin: 0; flex: 1; border-radius: 999px; padding: 12px 20px; background: var(--surface); }
.searchbar select { flex: 0 0 auto; width: auto; }
.searchbar--sm { max-width: none; margin-bottom: 18px; }
.filters--center { justify-content: center; margin-bottom: 30px; }
a.chip { display: inline-block; }
.chip small { opacity: .7; }
.results-count { text-align: center; margin-bottom: 20px; }
.search-group { font-size: 19px; color: var(--primary); margin-top: 30px; border-bottom: 2px solid var(--gold); padding-bottom: 6px; }
.search-group small { color: var(--muted); font-size: 14px; }
.search-list { list-style: none; padding: 0; margin: 0; }
.search-list li { padding: 12px 4px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; }
.search-list a { font-weight: 500; }
.search-list a:hover { color: var(--gold); }
.search-list small { color: var(--muted); white-space: nowrap; }

/* الكتب */
.book { display: block; color: inherit; }
.book h3 { font-size: 15.5px; line-height: 1.6; margin-bottom: 2px; }
.book .muted { font-size: 13px; }
.book__cover--img { padding: 0; overflow: hidden; }
.book__cover--img::before { display: none; }
.book__cover--img img { width: 100%; height: 100%; object-fit: cover; }
.book__part {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: var(--green-900); font-weight: 700; font-size: 14px; display: grid; place-items: center;
}
.book-detail { display: grid; grid-template-columns: 260px 1fr; gap: 50px; align-items: start; }
.book-detail__cover .book h3, .book-detail__cover .book .muted { display: none; }
.meta-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 22px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 500; }
.hero__cta--start { justify-content: flex-start; }
.reader-frame { margin-top: 50px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #525659; height: 85vh; min-height: 520px; box-shadow: var(--shadow); }
.reader-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* البث */
.live { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: center; }
.live__player .media-item__thumb { border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #e53935; box-shadow: 0 0 0 0 rgba(229,57,53,.6); animation: pulse 1.6s infinite; }
.section--dark .eyebrow::before { display: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(229,57,53,0); } 100% { box-shadow: 0 0 0 0 rgba(229,57,53,0); } }

/* بطاقات الأخبار */
.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: inherit; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(15,59,46,.14); }
.post-card__img { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card__img img { transform: scale(1.04); }
.post-card__img--empty { background: radial-gradient(ellipse at top, var(--green-700), var(--green-900)); display: grid; place-items: center; }
.post-card__img--empty img { width: 42%; height: auto; object-fit: contain; opacity: .9; }
.post-card__badge { position: absolute; top: 10px; inset-inline-start: 10px; font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.post-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; gap: 4px; }
.post-card__date { font-size: 12.5px; color: var(--muted); }
/* العنوان فقط: ثلاثة أسطر كحد أقصى */
.post-card h3 { font-size: 15.5px; line-height: 1.6; color: var(--primary); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.section__more { display: flex; justify-content: center; margin-top: 26px; }
.cards--news { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
@media (max-width: 600px) {
  .cards.cards--news { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cards--news .post-card__body { padding: 8px 10px 10px; }
  .cards--news .post-card h3 { font-size: 13.5px; line-height: 1.55; }
  .cards--news .post-card__date { font-size: 11.5px; }
  .cards--news .post-card__badge { top: 6px; inset-inline-start: 6px; font-size: 11px; padding: 1px 8px; }
}
.post-card p { color: var(--muted); margin: 0 0 12px; flex: 1; }
.article { max-width: 820px; }
.article__title { font-size: clamp(24px, 3.6vw, 38px); color: var(--primary); margin: 10px 0 20px; }
.article__img { width: 100%; border-radius: var(--radius); margin-bottom: 26px; }
.article__figure { margin: 0 0 26px; }
.article__figure .article__img { margin-bottom: 6px; display: block; }
.article__figure figcaption { font-size: 13.5px; color: var(--muted); }
.article__photos { margin-top: 16px; }
.article__actions { display: flex; gap: 10px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }

/* المؤسسات */
.inst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.inst-card { text-align: center; color: inherit; transition: transform .25s, border-color .25s; display: flex; flex-direction: column; align-items: center; }
.inst-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.inst-card__logo { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; margin-bottom: 14px; background: var(--bg-alt); border: 2px solid var(--gold); }
.inst-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.inst-card__logo .inst-card__placeholder { width: 70%; height: 70%; object-fit: contain; }
.inst-card h3 { font-size: 16px; line-height: 1.7; margin: 0; }
.inst-card--large .inst-card__logo { width: 220px; height: 220px; margin: 0; }

/* الصور */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.album-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; display: block; box-shadow: var(--shadow); }
.album-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.album-card:hover img { transform: scale(1.06); }
.album-card__body { position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; color: #fff; background: linear-gradient(transparent, rgba(5,20,15,.9)); }
.album-card__body h3 { font-size: 17px; margin: 0; }
.album-card__body span { font-size: 13.5px; opacity: .85; }
.photo-masonry { columns: 3 260px; column-gap: 14px; }
.photo-masonry a { display: block; margin-bottom: 14px; border-radius: 10px; overflow: hidden; break-inside: avoid; }
.photo-masonry img { width: 100%; transition: transform .4s; }
.photo-masonry a:hover img { transform: scale(1.03); }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 6px; }
.lightbox p { color: #ddd; margin: 12px 0 0; text-align: center; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lightbox .lb-close { top: 16px; inset-inline-end: 16px; }
.lightbox .lb-prev { inset-inline-start: 16px; top: 50%; }
.lightbox .lb-next { inset-inline-end: 16px; top: 50%; }

/* الاستفتاءات */
.faq summary .badge { margin-inline-end: 6px; }
.faq__answer { padding: 0 20px 18px; }
.faq__answer p { color: var(--text); margin: 6px 0 0; padding: 0; }

/* شريط الدعوة */
.cta-band { padding: 60px 0; }
.cta-band__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: var(--gold-light); font-size: clamp(22px, 3vw, 30px); margin: 0 0 4px; }
.cta-band p { margin: 0; opacity: .85; }

/* الترقيم */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination .dots { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 500; }
.pagination a:hover { border-color: var(--gold); }
.pagination a.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .dots { border: 0; background: none; }

/* التذييل */
.footer { padding: 46px 0 0; }
/* ثلاثة أعمدة متوازنة: التعريف — التواصل — النشرة */
.footer__grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 48px; padding-bottom: 34px; align-items: start; }
.footer h3 { color: var(--gold-light); font-size: 16px; margin: 6px 0 16px; padding-bottom: 10px; position: relative; }
.footer h3::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 34px; height: 2px; background: var(--gold); border-radius: 2px; opacity: .8; }
.footer__about { font-size: 14.5px; line-height: 1.9; opacity: .8; margin: 14px 0 18px; max-width: 420px; }
.footer__contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 14.5px; }
.footer__contact li { display: flex; align-items: center; gap: 10px; }
.footer__contact a:hover, .footer__pages a:hover { color: var(--gold-light); }
.fc-icon { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(201,162,74,.35); color: var(--gold-light); }
.footer__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.footer-btn { border: 1px solid rgba(201,162,74,.45); color: var(--gold-light); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; transition: .2s; }
.footer-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--green-900); }
.footer__note { font-size: 14px; opacity: .75; margin: 0 0 12px; }
.footer__pages { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; font-size: 14px; }
.footer .socials a { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-color: rgba(201,162,74,.35); color: var(--gold-light); }
.footer .socials a:hover { background: var(--gold); color: var(--green-900); border-color: var(--gold); }
.footer__bottom { border-top: 1px solid rgba(201,162,74,.18); padding: 14px 0; font-size: 13.5px; }
.footer__bottom-inner { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; align-items: center; opacity: .8; }
.footer__bottom-end { display: inline-flex; gap: 14px; align-items: center; }
.footer__bottom a:hover { color: var(--gold-light); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 960px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 34px; } .footer__grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 600px) { .footer__grid { grid-template-columns: 1fr; } .footer__bottom-inner { justify-content: center; text-align: center; } }

.fatwa-groups { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.install-btn { background: transparent; border: 1px solid var(--gold); color: var(--gold-light); border-radius: 999px; padding: 4px 14px; font: inherit; font-size: 13.5px; cursor: pointer; }
.install-btn:hover { background: var(--gold); color: var(--green-900); }
.install-ios { font-size: 12.5px; opacity: .8; }
.install-btn[hidden], .install-ios[hidden] { display: none; }

/* متابعة القراءة */
.continue-box { padding: 14px 18px; margin-bottom: 22px; border-color: var(--gold); }
.continue-box[hidden] { display: none; }
.continue-box strong { color: var(--primary); font-family: var(--font-head); }
.continue-box ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.continue-box a { color: var(--gold); font-weight: 700; }
.continue-box small { color: var(--muted); }
.reader-bar { margin-top: 50px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--surface); scroll-margin-top: 100px; }
.reader-bar label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.reader-bar input { width: 90px; margin: 0; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.reader-bar__resume { color: var(--gold); font-weight: 700; font-size: 14px; width: 100%; }
.reader-bar + .reader-frame { margin-top: 0; border-radius: 0 0 var(--radius) var(--radius); }

/* الصوتيات */
.audio-list { display: grid; gap: 14px; }
.audio-card { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 18px 20px; }
.audio-card__icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--green-800); color: var(--gold-light); }
.audio-card h3 { font-size: 17px; margin: 0 0 2px; color: var(--primary); }
.audio-card__meta { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.audio-card__desc { margin: 0 0 8px; font-size: 14.5px; color: var(--muted); }
.audio-card audio { width: 100%; height: 42px; margin-top: 4px; }
.audio-card__drive { width: 100%; height: 110px; border: 0; border-radius: 10px; margin-top: 4px; background: var(--bg-alt); }
.audio-card__actions { display: flex; gap: 16px; margin-top: 8px; font-size: 14px; font-weight: 700; }
.audio-card__actions a, .audio-card__actions button { color: var(--gold); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
@media (max-width: 560px) { .audio-card { grid-template-columns: 1fr; } .audio-card__icon { display: none; } }

/* النشرة البريدية */
.footer-subscribe { margin-top: 0; max-width: 380px; }
.footer-subscribe label { display: block; color: var(--gold-light); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.footer-subscribe div { display: flex; border: 1px solid rgba(201,162,74,.5); border-radius: 999px; overflow: hidden; }
.footer-subscribe input { flex: 1; min-width: 0; border: 0; background: rgba(255,255,255,.06); color: #fff; padding: 9px 14px; font: inherit; font-size: 14px; }
.footer-subscribe input::placeholder { color: rgba(255,255,255,.55); }
.footer-subscribe button { border: 0; background: var(--gold); color: var(--green-900); font: inherit; font-weight: 700; padding: 0 16px; cursor: pointer; }
.subscribe-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.subscribe-form input[type=email] { flex: 1 1 240px; margin: 0; border-radius: 999px; padding: 11px 18px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }

/* قناة واتساب */
.wa-band { background: #0b3d2e; border-top: 1px solid rgba(201,162,74,.25); }
.wa-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0; color: #e9e2cc; }
.wa-band strong { display: block; color: var(--gold-light); font-family: var(--font-head); font-size: 17px; }
.wa-band span { font-size: 14px; opacity: .85; }
.wa-btn { display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #073b26 !important; font-weight: 700; padding: 10px 20px; border-radius: 999px; white-space: nowrap; }
.wa-btn:hover { background: #1fbe5b; }

/* الصفحات الحرة */
.page-body h2 { font-size: clamp(20px, 2.6vw, 26px); color: var(--primary); margin: 1.4em 0 .5em; }
.page-body ul { margin: 0 0 1.1em; padding-inline-start: 1.4em; }
.page-body li { margin-bottom: .35em; }
.page-body li::marker { color: var(--gold); }

/* دبوس الخريطة بجانب العنوان */
.map-pin {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; margin-inline-start: 6px;
  padding: 2px 10px 2px 8px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold) !important;
  font-size: 13px; font-weight: 700; line-height: 1.6; white-space: nowrap; transition: .2s;
}
.map-pin:hover { background: var(--gold); color: var(--green-900) !important; }
.footer .map-pin { color: var(--gold-light) !important; border-color: rgba(201,162,74,.6); }

/* «اسأل الموقع» */
.ask-fab {
  position: fixed; bottom: 22px; inset-inline-end: 18px; z-index: 46; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px 11px 16px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px;
  background: var(--green-800); color: var(--gold-light); box-shadow: 0 8px 26px rgba(0,0,0,.3), 0 0 0 2px var(--gold);
  transition: transform .2s, opacity .2s;
}
.ask-fab:hover { transform: translateY(-2px); }
.ask-fab.is-hidden { opacity: 0; pointer-events: none; transform: scale(.8); }
body:has(.ticker--fixed) .ask-fab { bottom: 62px; }
.ask-panel {
  position: fixed; bottom: 22px; inset-inline-end: 18px; z-index: 60; width: min(390px, calc(100vw - 24px)); height: min(580px, calc(100dvh - 120px));
  display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden;
}
.ask-panel[hidden] { display: none; }
body:has(.ticker--fixed) .ask-panel { bottom: 58px; }
.ask-panel__head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: var(--green-800); color: #fff; }
.ask-panel__head div { flex: 1; display: grid; line-height: 1.4; }
.ask-panel__head strong { color: var(--gold-light); font-family: var(--font-head); font-size: 16px; }
.ask-panel__head small { font-size: 12.5px; opacity: .8; }
.ask-panel__icon { background: rgba(255,255,255,.1); color: #fff; border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; }
.ask-panel__icon:hover { background: rgba(255,255,255,.22); }
.ask-panel__body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.ask-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; line-height: 1.85; font-size: 15px; overflow-wrap: anywhere; }
.ask-msg--bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-start-start-radius: 4px; }
.ask-msg--me { align-self: flex-end; background: var(--green-800); color: #fff; border-start-end-radius: 4px; }
.ask-msg--err { border-color: rgba(192,57,43,.4); color: #c0392b; }
.ask-msg a { color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ask-msg--wait { display: flex; gap: 5px; padding: 14px 16px; }
.ask-msg--wait span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: askdot 1.2s infinite; }
.ask-msg--wait span:nth-child(2) { animation-delay: .2s; } .ask-msg--wait span:nth-child(3) { animation-delay: .4s; }
@keyframes askdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.ask-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-suggest button { border: 1px solid var(--gold); background: transparent; color: var(--text); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
.ask-suggest button:hover { background: var(--gold); color: var(--green-900); }
.ask-panel__form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.ask-panel__form textarea { flex: 1; resize: none; margin: 0; border: 1px solid var(--border); border-radius: 14px; padding: 9px 12px; font: inherit; font-size: 15px; background: var(--bg); color: var(--text); max-height: 120px; }
.ask-panel__form textarea:focus { outline: none; border-color: var(--gold); }
.ask-send { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--gold); color: var(--green-900); cursor: pointer; display: grid; place-items: center; }
.ask-panel__note { margin: 0; padding: 6px 12px 9px; font-size: 12px; color: var(--muted); background: var(--surface); text-align: center; }
.ask-panel__note a { color: var(--gold); }
@media (max-width: 560px) {
  .ask-fab { padding: 10px 14px; font-size: 14px; }
  .ask-panel, body:has(.ticker--fixed) .ask-panel { inset-inline: 8px; width: auto; bottom: 8px; height: calc(100dvh - 90px); }
}
@media print { .ask-fab, .ask-panel { display: none !important; } }

/* أرشيف الأخبار */
.narrow-lg { max-width: 980px; }
.chip--gold { border-color: var(--gold); color: var(--gold); font-weight: 700; }
.archive-search { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.archive-search input[type=search] { flex: 1 1 300px; margin: 0; border-radius: 999px; padding: 12px 20px; background: var(--surface); font-size: 16px; }
.archive-search select { width: auto; margin: 0; border-radius: 999px; padding: 12px 16px; background: var(--surface); }
.arch-list { display: grid; gap: 10px; }
.arch {
  display: grid; grid-template-columns: 64px auto 1fr; gap: 16px; align-items: center; padding: 12px 16px 12px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: inherit; transition: border-color .2s, transform .2s;
}
a.arch:hover { border-color: var(--gold); transform: translateX(-3px); }
.arch__date { text-align: center; border-inline-end: 1px solid var(--border); padding-inline-end: 12px; }
.arch__date strong { display: block; font-family: var(--font-head); font-size: 26px; line-height: 1.2; color: var(--primary); }
.arch__date span { font-size: 12.5px; color: var(--muted); }
.arch__img { width: 104px; height: 70px; object-fit: cover; border-radius: 8px; }
.arch__body { min-width: 0; grid-column: auto; }
.arch:not(:has(.arch__img)) .arch__body { grid-column: 2 / -1; }
.arch__meta { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.arch h3 { font-size: 16.5px; line-height: 1.6; margin: 0; }
.arch__person, .arch__excerpt { margin: 2px 0 0; font-size: 14.5px; color: var(--muted); }
.arch__person { color: var(--gold); font-weight: 500; }
@media (max-width: 560px) {
  .arch { grid-template-columns: 52px 1fr; gap: 12px; }
  .arch__img { display: none; }
  .arch__body, .arch:not(:has(.arch__img)) .arch__body { grid-column: 2; }
  .archive-search select, .archive-search .btn { flex: 1; }
}

/* التقويم والمناسبات */
.topbar__date:hover { color: var(--gold-light); }
.anchor { scroll-margin-top: 110px; }
.today {
  display: grid; grid-template-columns: auto 1fr 1.4fr; gap: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.today > div { padding: 22px 26px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.today__label { font-size: 13px; font-weight: 700; color: var(--gold); }
.today__hijri { background: var(--green-800); color: #fff; text-align: center; min-width: 170px; }
.today__hijri strong { font-family: var(--font-head); font-size: 46px; line-height: 1.1; color: var(--gold-light); }
.today__greg b { font-family: var(--font-head); font-size: 22px; color: var(--primary); }
.today__greg span, .today__next span { color: var(--muted); }
.today__next { border-inline-start: 1px solid var(--border); }
.today__next b { font-size: 18px; line-height: 1.6; }

.ev-month { font-size: 18px; color: var(--primary); margin: 30px 0 12px; display: flex; align-items: center; gap: 12px; }
.ev-month::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.ev-list { display: grid; gap: 12px; }
.ev {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 18px; align-items: center; padding: 14px 18px 14px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); position: relative; overflow: hidden;
}
.ev::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--gold); }
.ev--shahada::before { background: #3b3b3b; }
.ev--occasion::before, .ev--program::before { background: var(--green-700); }
.ev__date { text-align: center; border-radius: 10px; padding: 6px 4px; background: rgba(201,162,74,.14); }
.ev--shahada .ev__date { background: rgba(0,0,0,.07); }
.ev__date strong { display: block; font-family: var(--font-head); font-size: 26px; line-height: 1.2; color: var(--primary); }
.ev__date span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ev__body h3 { font-size: 16.5px; margin: 0 0 4px; line-height: 1.6; }
.ev__meta { margin: 0; font-size: 14px; color: var(--muted); }
.ev__meta .badge { margin-inline-end: 4px; }
.ev__desc { margin: 6px 0 0; font-size: 14.5px; }
.ev__left { font-weight: 700; color: var(--gold); white-space: nowrap; font-size: 14.5px; }
.ev__left { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ev__cal { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.ev__cal:hover { color: var(--gold); border-color: var(--gold); }
.ev--today { border-color: var(--gold); }
.ev--today .ev__days { background: var(--gold); color: var(--green-900); padding: 2px 12px; border-radius: 999px; }
:root[data-theme="dark"] .ev--shahada::before { background: #8a8f8c; }
:root[data-theme="dark"] .ev--shahada .ev__date { background: rgba(255,255,255,.06); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ev--shahada::before { background: #8a8f8c; }
  :root:not([data-theme="light"]) .ev--shahada .ev__date { background: rgba(255,255,255,.06); }
}
.ev-list--home { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.home-cal { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: start; }
.home-cal .ev-month { margin-top: 0; }

@media (max-width: 860px) {
  .today { grid-template-columns: auto 1fr; }
  .today__next { grid-column: 1 / -1; border-inline-start: 0; border-top: 1px solid var(--border); }
  .home-cal { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .today > div { padding: 16px 18px; }
  .today__hijri { min-width: 120px; }
  .today__hijri strong { font-size: 36px; }
  .ev { grid-template-columns: 76px 1fr; gap: 12px; }
  .ev__date span { font-size: 11.5px; }
  .ev__left { grid-column: 2; font-size: 13.5px; flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (max-width: 860px) {
  .book-detail, .live { grid-template-columns: 1fr; gap: 30px; }
  .book-detail__cover { max-width: 220px; margin-inline: auto; width: 100%; }
  .inst-card--large { margin-inline: auto; }
  .sticky-portrait { position: static; }
}
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .searchbar { flex-wrap: wrap; }
  .searchbar select { flex: 1; }
  .inst-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .inst-card { padding: 16px 10px; }
  .inst-card__logo { width: 84px; height: 84px; }
  .inst-card h3 { font-size: 14px; }
  .reader-frame { height: 70vh; min-height: 420px; }
  .prose--lg { font-size: 17px; }
}
@media print {
  .topbar, .header, .footer, .to-top, .ticker, .article__actions, .breadcrumb, .page-hero .hero__pattern { display: none !important; }
  body { background: #fff; color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ================= اللغات ================= */
:root[lang="en"] { --font-body: "Inter", system-ui, sans-serif; --font-head: "Lora", Georgia, serif; }
:root[lang="fa"], :root[lang="ckb"] { --font-body: "Vazirmatn", "Tajawal", system-ui, sans-serif; --font-head: "Vazirmatn", "Noto Kufi Arabic", sans-serif; }
:root[lang="en"] body { font-size: 16.5px; line-height: 1.75; }
:root[lang="en"] .nav a { font-size: 15px; }
[lang="ar"] { font-family: "Tajawal", system-ui, sans-serif; }
.hero__basmala[lang="ar"], .hero__verse [lang="ar"], .basmala { font-family: var(--font-quran); }

/* اتجاه من اليسار لليمين (الإنجليزية) */
[dir="ltr"] .ticker__content { animation-name: ticker-ltr; }
@keyframes ticker-ltr { from { transform: translateX(0); } to { transform: translateX(-50%); } }
[dir="ltr"] a.arch:hover { transform: translateX(3px); }
[dir="ltr"] .ask-send svg { transform: scaleX(-1); }
[dir="ltr"] .book__cover { box-shadow: 8px 10px 24px rgba(0,0,0,.2), inset -6px 0 0 rgba(0,0,0,.25); }
@media (max-width: 960px) {
  [dir="ltr"] .nav { transform: translateX(-100%); }
  [dir="ltr"] .nav.open { transform: none; }
}

/* قائمة اللغات في الشريط العلوي */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  height: 36px; padding: 0 10px; border-radius: 999px; font-size: 13.5px; color: inherit;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: rgba(255,255,255,.1); }
.lang-menu ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 80; margin: 0; padding: 6px; list-style: none;
  min-width: 150px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.lang-menu li a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.lang-menu li a:hover { background: var(--bg-alt); }
.lang-menu li a[aria-current] { color: var(--primary); font-weight: 700; }
.lang-menu li a[lang="ar"] { font-family: "Tajawal", sans-serif; }
.lang-menu li a[lang="en"] { font-family: "Inter", system-ui, sans-serif; }
.lang-menu li a[lang="fa"], .lang-menu li a[lang="ckb"] { font-family: "Vazirmatn", "Tajawal", sans-serif; }

/* تنبيه الترجمة الآلية */
.mt-note {
  font-size: 13.5px; color: var(--muted); background: var(--bg-alt); border-inline-start: 3px solid var(--gold);
  padding: 8px 12px; border-radius: 8px; margin: 0 0 18px;
}
.mt-note a { color: var(--primary); text-decoration: underline; }

/* فيديو مرفوع يُعرض من الموقع قبل اكتمال رفعه إلى يوتيوب */
.media-item__thumb--file { cursor: default; background: #000; }
.media-item__thumb--file video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* نتائج البحث داخل الكتب */
.book-hit, .book-hits p { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); line-height: 1.9; font-family: "Amiri", var(--font-body); }
.book-hit mark, .book-hits mark { background: color-mix(in srgb, var(--gold) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.badge--link { text-decoration: none; }

/* إرسال طلب اللقاء إلى واتساب السكرتير */
.wa-send { text-align: center; }
.wa-send p { margin: 14px 0 18px; }
.wa-btn--lg { font-size: 17px; padding: 14px 26px; }

/* خريطة المؤسسات */
.inst-map { height: 460px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 0; margin-bottom: 10px; }
.inst-pin { background: none; border: 0; }
.inst-pop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-family: var(--font-body); min-width: 160px; }
.inst-pop img { width: 48px; height: 48px; object-fit: contain; }
.inst-pop b { font-size: 14px; color: #0f3b2e; }
.inst-pop a { color: #155040; font-weight: 700; }
@media (max-width: 560px) { .inst-map { height: 340px; } }

/* قول اليوم */
.section--quote { padding: 60px 0; background: linear-gradient(135deg, var(--green-800), var(--green-900)); color: #f3ead2; }
.quote-day { margin: 0 auto; max-width: 820px; text-align: center; }
.quote-day blockquote { margin: 10px 0 14px; font-family: var(--font-quran); font-size: clamp(22px, 2.8vw, 32px); line-height: 1.9; color: #fff8e6; position: relative; }
.quote-day blockquote::before, .quote-day blockquote::after { color: var(--gold); opacity: .6; font-size: 1.4em; }
.quote-day blockquote::before { content: "«"; margin-inline-end: 6px; }
.quote-day blockquote::after { content: "»"; margin-inline-start: 6px; }
.quote-day figcaption { color: var(--gold-light); font-weight: 700; font-size: 15px; }
.quote-day__actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.section--quote .btn--outline { color: var(--gold-light); border-color: rgba(231,200,115,.6); }

/* صورة سماحة السيد في الوسط، وعلى يمينها شجرة العائلة، وعلى يسارها «تتلمذ على يد» */
.about__portrait .portrait-frame { max-width: 270px; margin-inline: auto; }
.about:has(.about__portrait--wide) { grid-template-columns: 1fr; gap: 50px; }
.about__portrait--wide { display: grid; grid-template-columns: 1fr 280px 1fr; gap: 40px; align-items: center; max-width: 1080px; margin-inline: auto; width: 100%; }
.pw__side { min-width: 0; }
.pw__side--start { justify-self: end; }   /* العمود الأيمن: محتواه يقترب من الصورة */
.pw__side--end { justify-self: start; }   /* العمود الأيسر: محتواه يقترب من الصورة */
.pw__side > div { width: min(300px, 100%); }
.teachers__title { color: var(--gold); font-size: 17px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.teachers__list, .family__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.teacher { display: flex; align-items: center; gap: 10px; position: relative; cursor: default; outline: none; }
.teacher img, .teacher__ph { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--gold); box-shadow: 0 0 0 3px var(--bg); position: relative; z-index: 1; }
.teacher__ph { display: grid; place-items: center; background: var(--green-800); color: var(--gold-light); font-family: var(--font-head); font-size: 20px; }
.teacher b { display: block; font-family: var(--font-head); font-size: 14px; color: var(--primary); line-height: 1.45; }
.teacher__years { display: block; font-size: 12.5px; font-weight: 700; color: #8a6a1d; }
.family__rel { display: block; font-size: 12.5px; color: var(--muted); }
[data-theme="dark"] .teacher__years { color: var(--gold-light); }
/* خط الشجرة بين الدوائر */
.family__item:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 25px; top: 52px; bottom: -12px; width: 2px; background: linear-gradient(var(--gold), color-mix(in srgb, var(--gold) 40%, transparent)); }
.family__item--self img, .family__item--self .teacher__ph { width: 60px; height: 60px; border-width: 3px; }
.family__item--self b { color: var(--gold); }
/* تفاصيل دراسة الأستاذ: بطاقة صغيرة عند المرور بالفأرة أو اللمس */
.teacher__more {
  position: absolute; inset-inline-start: 0; top: calc(100% + 6px); z-index: 5; width: max-content; max-width: 260px; margin: 0;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
  font-size: 13px; line-height: 1.7; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .2s;
}
.teacher:hover .teacher__more, .teacher:focus .teacher__more { opacity: 1; visibility: visible; }
/* العائلة يمين الصورة والأساتذة يسارها في كل الشاشات: تصغر الصورة والدوائر على الشاشات الضيقة */
@media (max-width: 1100px) { .about__portrait--wide { grid-template-columns: 1fr 220px 1fr; gap: 24px; } }
@media (max-width: 860px) {
  .about__portrait--wide { grid-template-columns: 1fr 170px 1fr; gap: 14px; }
  .teacher { gap: 7px; }
  .teacher img, .teacher__ph { width: 40px; height: 40px; font-size: 16px; }
  .family__item--self img, .family__item--self .teacher__ph { width: 46px; height: 46px; }
  .family__item:not(:last-child)::after { inset-inline-start: 19px; top: 40px; }
  .teacher b { font-size: 12.5px; }
  .teacher__years, .family__rel { font-size: 11px; }
  .teachers__title { font-size: 15px; }
}
@media (max-width: 560px) {
  .about__portrait--wide { grid-template-columns: 1fr minmax(78px, 24vw) 1fr; gap: 12px; align-items: start; }
  .pw__side--start, .pw__side--end { justify-self: stretch; }
  .pw__center { align-self: center; }
  .pw__center .portrait-frame { max-width: 100%; }
  .teachers__list, .family__list { gap: 9px; }
  .teacher { gap: 5px; }
  .teacher img, .teacher__ph { width: 28px; height: 28px; font-size: 12px; border-width: 1.5px; box-shadow: 0 0 0 2px var(--bg); }
  .family__item--self img, .family__item--self .teacher__ph { width: 32px; height: 32px; border-width: 2px; }
  .family__item:not(:last-child)::after { inset-inline-start: 13px; top: 28px; bottom: -9px; }
  .teacher b { font-size: 10.5px; line-height: 1.35; }
  .teacher__years, .family__rel { font-size: 9.5px; }
  .teachers__title { font-size: 12.5px; margin-bottom: 8px; padding-bottom: 5px; }
  .teacher__more { max-width: 170px; font-size: 12px; }
}
.about__portrait--side .teachers { margin-top: 28px; }
.about__portrait--side .teachers .family__list { gap: 12px; }

/* شريط تثبيت التطبيق على الهاتف */
.app-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--green-900, #0a2a21); color: #f6efd9; border-bottom: 1px solid rgba(201,162,74,.4); }
.app-bar[hidden] { display: none; }
.app-bar__icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.app-bar__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.app-bar__text b { color: var(--gold-light, #e7c873); font-size: 14px; }
.app-bar__text span { font-size: 12.5px; opacity: .9; }
.app-bar.is-help .app-bar__text span { font-size: 13px; opacity: 1; }
.app-bar__btn { flex-shrink: 0; background: var(--gold, #c9a24a); color: var(--green-900, #0a2a21); border: 0; border-radius: 999px; padding: 7px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.app-bar__close { flex-shrink: 0; background: none; border: 0; color: inherit; font-size: 22px; line-height: 1; opacity: .7; cursor: pointer; padding: 4px 6px; }
