/* =========================================================
   مؤسسة العجمي — نظام التصميم للموقع العام
   الفكرة: صفحة مصحف مُذهّبة — حبر أخضر عميق، خطوط ذهبية رفيعة للزخرفة بس،
   ونجمة ثمانية (خاتم) كنقش هادي في الخلفية. العناوين بخط كوفي هندسي.
   ========================================================= */
:root {
  --ink: #10302c;
  --ink-soft: #3d544f;
  --muted: #5e6f6b;
  --green: #0f5e55;
  --green-600: #0c4f47;
  --green-deep: #0a3f39;
  --green-tint: #e6f0ec;
  --gold: #c49a2c;
  --gold-soft: #f3e7c6;
  --page: #f4f7f4;
  --surface: #ffffff;
  --line: #dce5e1;
  --danger: #b42318;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(10, 63, 57, .06), 0 8px 24px rgba(10, 63, 57, .06);
  --font-display: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --container: 1160px;
  --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23c49a2c' stroke-width='1'%3E%3Crect x='22' y='22' width='28' height='28'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3Cpath d='M0 36h8M64 36h8M36 0v8M36 64v8'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.8;
  direction: rtl; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3, h4 { font-family: var(--font-body); font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; top: -60px; right: 12px; background: var(--green-deep); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 1000; }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 26px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); color: #fff; }
.btn-gold { background: var(--gold); color: #1d1606; }
.btn-gold:hover { background: #d8ad3c; color: #1d1606; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.btn-block { width: 100%; }

/* ---------- الهيدر ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--gold); object-fit: cover; background: #fff; }
.brand-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font-body); font-size: .72rem; font-weight: 500; color: var(--muted); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .96rem; white-space: nowrap; }
.nav a:hover { color: var(--green); background: var(--green-tint); }
.nav a[aria-current="page"] { color: var(--green); font-weight: 700; box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn { min-height: 44px; padding: 9px 20px; font-size: .95rem; }
.account-link { font-weight: 600; text-decoration: none; color: var(--ink-soft); font-size: .95rem; white-space: nowrap; }
.menu-btn { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; }
.menu-btn span { position: absolute; right: 12px; left: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-btn span:nth-child(1) { top: 15px; } .menu-btn span:nth-child(2) { top: 22px; } .menu-btn span:nth-child(3) { top: 29px; }
.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); }

@media (max-width: 1080px) {
  .menu-btn { display: block; margin-inline-start: auto; }
  .header-inner { gap: 12px; }
  .nav { display: none; position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; align-items: stretch; gap: 2px;
         background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; box-shadow: 0 18px 30px rgba(10, 63, 57, .12); }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; font-size: 1.02rem; }
  .nav a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--gold); background: var(--green-tint); }
  .header-actions .account-link { display: none; }
}
@media (max-width: 560px) {
  .container { padding-inline: 16px; }
  .brand-name small { display: none; }
  .header-actions .btn { padding: 8px 14px; font-size: .88rem; min-height: 40px; }
  .brand img { width: 40px; height: 40px; }
}

/* ---------- الهيرو: صفحة مصحف مذهّبة ---------- */
.hero { position: relative; background: var(--green-deep); color: #eaf2ef; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--lattice); opacity: .16; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 85% 20%, rgba(196, 154, 44, .18), transparent 60%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 8vw, 96px); }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.45; margin-bottom: 18px; }
.hero-lead { font-size: 1.15rem; color: #cfe1db; max-width: 34em; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 0; margin: 0; list-style: none; color: #cfe1db; font-size: .96rem; }
.hero-facts li { display: flex; align-items: center; gap: 9px; }
.hero-facts svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }

.mushaf { position: relative; padding: 18px; }
.mushaf-frame { position: relative; background: #fbfaf5; color: var(--ink); border-radius: 6px; padding: clamp(22px, 3vw, 34px); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.mushaf-frame::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(196, 154, 44, .55); border-radius: 3px; pointer-events: none; }
.mushaf-border { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); pointer-events: none; overflow: visible; }
.mushaf-border rect { fill: none; stroke: var(--gold); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 0; }
.mushaf .corner { position: absolute; width: 34px; height: 34px; background: var(--gold); z-index: 2;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 2l5 9.5L35 7l-4.5 10L40 20l-9.5 3L35 33l-10-4.5L20 38l-5-9.5L5 33l4.5-10L0 20l9.5-3L5 7l10 4.5z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 2l5 9.5L35 7l-4.5 10L40 20l-9.5 3L35 33l-10-4.5L20 38l-5-9.5L5 33l4.5-10L0 20l9.5-3L5 7l10 4.5z'/%3E%3C/svg%3E") center/contain no-repeat; }
.corner.tr { top: 1px; right: 1px; } .corner.tl { top: 1px; left: 1px; } .corner.br { bottom: 1px; right: 1px; } .corner.bl { bottom: 1px; left: 1px; }
.cartouche { position: relative; text-align: center; padding: 16px 40px; margin: 0 auto 22px; background: var(--green-deep); color: #f3e7c6;
  clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%); }
.cartouche::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(196, 154, 44, .7); clip-path: inherit; }
.verse { font-family: 'Amiri Quran', 'Amiri', serif; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.9; margin: 0; }
.verse-ref { display: block; font-size: .8rem; color: rgba(243, 231, 198, .75); margin-top: 2px; font-family: var(--font-body); }
.video-facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: #0a3f39; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s, transform .4s; }
.video-facade:hover img { opacity: 1; transform: scale(1.02); }
.video-facade .play { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%; background: rgba(10, 63, 57, .9); border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; }
.video-facade .play svg { width: 28px; height: 28px; color: #fff; margin-right: -4px; }
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mushaf-caption { text-align: center; color: var(--muted); font-size: .9rem; margin: 14px 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .mushaf-border rect { stroke-dashoffset: 1; animation: draw-frame 2.2s .25s cubic-bezier(.65, 0, .35, 1) forwards; }
  .mushaf .corner { opacity: 0; animation: corner-in .5s 2.1s ease-out forwards; }
}
@keyframes draw-frame { to { stroke-dashoffset: 0; } }
@keyframes corner-in { from { opacity: 0; transform: scale(.4) rotate(-45deg); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero h1 { font-size: clamp(1.75rem, 7.4vw, 2.4rem); }
  .hero-inner { grid-template-columns: 1fr; }
  .mushaf { max-width: 560px; }
}

/* ---------- الخطوات (تسلسل حقيقي) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 0 0 0 28px; }
.steps li + li { padding-right: 28px; border-right: 1px solid var(--line); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 16px; font-family: var(--font-display); font-size: 1.45rem; color: var(--green-deep);
  background: var(--gold-soft); clip-path: polygon(50% 0, 63% 18%, 85% 15%, 82% 37%, 100% 50%, 82% 63%, 85% 85%, 63% 82%, 50% 100%, 37% 82%, 15% 85%, 18% 63%, 0 50%, 18% 37%, 15% 15%, 37% 18%); }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li, .steps li + li { padding: 0; border: 0; }
}

/* ---------- المميزات ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 32px; list-style: none; padding: 0; margin: 0; }
.features li { border-top: 2px solid var(--green); padding-top: 18px; }
.features h3 { font-size: 1.08rem; margin-bottom: 6px; }
.features p { color: var(--muted); font-size: .97rem; margin: 0; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- البرامج ---------- */
.band { background: var(--surface); border-block: 1px solid var(--line); }
.programs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; list-style: none; padding: 0; margin: 0; }
.programs li { display: flex; gap: 18px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.prog-kind { flex-shrink: 0; font-size: .8rem; font-weight: 600; color: var(--green); background: var(--green-tint); border-radius: 8px; padding: 3px 10px; margin-top: 6px; }
.programs h3 { margin-bottom: 2px; }
.programs h3 a { color: inherit; text-decoration: none; }
.programs h3 a:hover { color: var(--green); }
.prog-aud { color: var(--muted); margin: 0; font-size: .97rem; }
.section-foot { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .programs { grid-template-columns: 1fr; } }

/* ---------- العرض ---------- */
.offer { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; background: var(--green-deep); color: #eaf2ef; border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); position: relative; overflow: hidden; }
.offer::before { content: ""; position: absolute; inset: 0; background-image: var(--lattice); opacity: .12; }
.offer > * { position: relative; }
.offer h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.offer p { margin: 0; color: #cfe1db; }
.offer-badge { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--gold); text-align: center; }
.offer-badge small { display: block; font-family: var(--font-body); font-size: .85rem; color: #cfe1db; margin-top: 6px; }
@media (max-width: 760px) { .offer { grid-template-columns: 1fr; text-align: center; } }

/* ---------- آراء ---------- */
.reviews { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 18px; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.reviews figure { flex: 0 0 auto; width: min(300px, 78vw); margin: 0; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.reviews img { width: 100%; height: 400px; object-fit: cover; object-position: top; border-radius: 8px; background: var(--green-tint); }
.reviews-nav { display: flex; gap: 8px; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { border-color: var(--green); color: var(--green); }
.icon-btn svg { width: 20px; height: 20px; }
.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.row-head .section-head { margin-bottom: 0; }

/* ---------- الأسئلة الشائعة ---------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0 20px 44px; position: relative; font-weight: 600; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; left: 8px; top: 50%; width: 12px; height: 12px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: translateY(-70%) rotate(-45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(135deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 20px; margin: 0; }

/* ---------- نهاية الصفحة / تواصل ---------- */
.cta { text-align: center; }
.cta h2 { margin-bottom: 10px; }
.cta p { color: var(--muted); margin-bottom: 26px; }
.cta .hero-actions { justify-content: center; margin: 0; }
.contact-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 40px 0 0; }
.contact-strip li { display: flex; gap: 14px; align-items: flex-start; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: right; }
.contact-strip svg { width: 24px; height: 24px; color: var(--green); flex-shrink: 0; margin-top: 4px; }
.contact-strip strong { display: block; }
.contact-strip span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .contact-strip { grid-template-columns: 1fr; } }

/* ---------- رأس الصفحات الداخلية ---------- */
.page-head { position: relative; background: var(--green-deep); color: #cfe1db; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; background-image: var(--lattice); opacity: .14; }
.page-head .container { position: relative; padding-block: clamp(40px, 6vw, 72px); }
.page-head h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 10px; }
.page-head p { max-width: 42em; font-size: 1.08rem; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 14px; list-style: none; font-size: .9rem; }
.crumbs a { color: #f3e7c6; text-decoration: none; }
.crumbs li + li::before { content: "‹"; margin-left: 8px; color: rgba(255, 255, 255, .5); }

/* ---------- محتوى نصي (من نحن / الجودة) ---------- */
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose h2 { margin-top: 1.6em; }
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding: 7px 30px 7px 0; }
.checklist li::before { content: ""; position: absolute; right: 2px; top: 17px; width: 12px; height: 12px; background: var(--gold);
  clip-path: polygon(50% 0, 63% 18%, 85% 15%, 82% 37%, 100% 50%, 82% 63%, 85% 85%, 63% 82%, 50% 100%, 37% 82%, 15% 85%, 18% 63%, 0 50%, 18% 37%, 15% 15%, 37% 18%); }
.split { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 100px; list-style: none; padding: 0; margin: 0; border-right: 2px solid var(--line); }
.toc a { display: block; padding: 7px 16px; color: var(--muted); text-decoration: none; font-size: .95rem; margin-right: -2px; border-right: 2px solid transparent; }
.toc a:hover { color: var(--green); border-right-color: var(--green); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 24px; } .toc { display: none; } }
.pullquote { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--green-deep); border-right: 3px solid var(--gold); padding: 6px 22px 6px 0; margin: 1.6em 0; line-height: 1.7; }
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
.team li { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--green-tint); color: var(--green-deep); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.4rem; flex-shrink: 0; }
.team strong { display: block; }
.team span { color: var(--muted); font-size: .92rem; }

/* ---------- الباقات بالتفصيل ---------- */
.plan { display: grid; grid-template-columns: 1fr 340px; gap: 40px; padding: 44px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.plan:first-of-type { padding-top: 0; }
.plan-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.plan-head h2 { margin: 0; font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.plan-aud { font-weight: 600; color: var(--green); margin-bottom: 6px; }
.plan-sum { color: var(--ink-soft); }
.plan-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 32px; margin-top: 18px; }
.plan-cols h3 { font-size: 1rem; color: var(--muted); font-family: var(--font-body); font-weight: 600; margin: 0 0 4px; }
.plan-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; align-self: start; position: sticky; top: 100px; }
.plan-side table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: .97rem; }
.plan-side caption { text-align: right; font-weight: 600; margin-bottom: 8px; }
.plan-side th { text-align: right; color: var(--muted); font-weight: 500; font-size: .88rem; padding: 6px 0; border-bottom: 1px solid var(--line); }
.plan-side td { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.plan-tip { font-size: .92rem; background: var(--gold-soft); color: #5a4510; border-radius: 10px; padding: 8px 12px; margin-bottom: 14px; }
.plan-note { color: var(--muted); font-size: .88rem; margin: 10px 0 0; text-align: center; }
.plans-jump { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; list-style: none; }
.plans-jump a { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); color: #fff; text-decoration: none; font-size: .9rem; }
.plans-jump a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
@media (max-width: 900px) { .plan { grid-template-columns: 1fr; gap: 20px; } .plan-side { position: static; } }

/* ---------- الفورم ---------- */
.form-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .form-layout { grid-template-columns: 1fr; } }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .97rem; }
.field .req { color: var(--danger); margin-right: 3px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fbfdfc;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(15, 94, 85, .12); background: #fff; }
.field .err { color: var(--danger); font-size: .88rem; margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.notice { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.notice-error { background: #fdecea; color: var(--danger); }
.notice-success { background: var(--green-tint); color: var(--green-deep); }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.side-list svg { width: 24px; height: 24px; color: var(--green); flex-shrink: 0; margin-top: 3px; }
.side-list strong { display: block; }
.side-list span, .side-list a { color: var(--muted); }

/* ---------- الفوتر ---------- */
.site-footer { background: var(--green-deep); color: #b9cfc8; position: relative; overflow: hidden; margin-top: 0; }
.site-footer::before { content: ""; position: absolute; inset: 0; background-image: var(--lattice); opacity: .08; }
.footer-inner { position: relative; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; padding-block: 64px 40px; }
.site-footer h2 { color: #fff; font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; margin-bottom: 14px; }
.site-footer a { color: #dce9e4; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; }
.footer-brand p { margin: 14px 0 0; max-width: 30em; font-size: .95rem; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand-name small { color: #9fbab2; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.socials a { padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; font-size: .86rem; }
.socials a:hover { border-color: var(--gold); }
.footer-bottom { position: relative; border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 18px; font-size: .88rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.push-btn { background: none; border: 1px solid rgba(255, 255, 255, .25); color: #dce9e4; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-family: inherit; font-size: .88rem; margin-top: 10px; }
@media (max-width: 960px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; gap: 28px; padding-block: 48px 28px; } }

/* ---------- زر واتساب العائم ---------- */
.fab-wa { position: fixed; left: 18px; bottom: 18px; z-index: 90; display: inline-flex; align-items: center; gap: 10px; background: #1f8f4e; color: #fff; text-decoration: none; border-radius: 999px; padding: 12px 18px 12px 14px; font-weight: 600; box-shadow: 0 10px 24px rgba(0, 0, 0, .22); }
.fab-wa:hover { background: #18773f; color: #fff; }
.fab-wa svg { width: 24px; height: 24px; }
@media (max-width: 560px) { .fab-wa { padding: 13px; } .fab-wa span { display: none; } }

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

/* =========================================================
   المدونة والأسئلة
   ========================================================= */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.search { display: flex; gap: 8px; flex: 1; min-width: 240px; max-width: 460px; }
.search input { flex: 1; min-width: 0; min-height: 48px; border-radius: 999px; border: 1.5px solid var(--line); padding: 10px 18px; font-family: var(--font-body); font-size: 1rem; background: var(--surface); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(15, 94, 85, .12); }
.search .btn { min-height: 48px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips a { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); text-decoration: none; font-size: .92rem; font-weight: 500; }
.chips a:hover { border-color: var(--green); color: var(--green); }
.chips a[aria-current] { background: var(--green); border-color: var(--green); color: #fff; }

.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
@media (max-width: 1000px) { .with-aside { grid-template-columns: 1fr; } }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; list-style: none; padding: 0; margin: 0; }
.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card a.cover { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--green-tint); }
.post-card a.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover a.cover img { transform: scale(1.03); }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .86rem; color: var(--muted); margin: 14px 0 6px; }
.post-meta a { color: var(--green); font-weight: 600; text-decoration: none; }
.post-card h3 { font-size: 1.12rem; line-height: 1.6; margin: 0 0 6px; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--green); }
.post-card p { color: var(--muted); font-size: .96rem; margin: 0; }
.featured { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; margin-bottom: 56px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.featured a.cover { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); }
.featured h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 6px 0 10px; }
.featured h2 a { color: var(--ink); text-decoration: none; }
@media (max-width: 800px) { .featured { grid-template-columns: 1fr; } }
.aside-block { margin-bottom: 36px; }
.aside-block h2 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; padding-bottom: 10px; border-bottom: 2px solid var(--green); margin-bottom: 8px; }
.aside-list { list-style: none; padding: 0; margin: 0; }
.aside-list li { border-bottom: 1px solid var(--line); }
.aside-list a { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; color: var(--ink-soft); text-decoration: none; }
.aside-list a:hover { color: var(--green); }
.aside-list small { color: var(--muted); white-space: nowrap; }
.aside-cta { background: var(--green-deep); color: #cfe1db; border-radius: var(--radius-lg); padding: 22px; position: relative; overflow: hidden; }
.aside-cta::before { content: ""; position: absolute; inset: 0; background-image: var(--lattice); opacity: .12; }
.aside-cta > * { position: relative; }
.aside-cta h2 { color: #fff; border: 0; padding: 0; font-family: var(--font-display); font-size: 1.3rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 44px; }
.pager span { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

.article { max-width: 760px; margin-inline: auto; }
.article-head { max-width: 860px; margin-inline: auto; }
.article-head .post-meta { color: #cfe1db; margin: 0 0 12px; }
.article-head .post-meta a { color: #f3e7c6; }
.article-cover { max-width: 980px; margin: -40px auto 0; position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.article-body { font-size: 1.12rem; line-height: 2.05; color: #213b37; }
.article-body p { margin: 0 0 1.25em; }
.article-body h2, .article-body h3 { margin-top: 1.6em; }
.article-body blockquote { border-right: 3px solid var(--gold); margin: 1.5em 0; padding: 4px 20px 4px 0; color: var(--green-deep); font-weight: 500; }
.article-body img { border-radius: var(--radius); margin: 1em auto; height: auto; }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 22px 0; border-block: 1px solid var(--line); margin: 36px 0; }
.share strong { margin-left: 6px; }
.share a, .share button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); text-decoration: none; font-family: inherit; font-size: .9rem; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--green); color: var(--green); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0; }
.gallery figure { margin: 0; cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.gallery figcaption { font-size: .86rem; color: var(--muted); margin-top: 4px; }
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.comment { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment strong { display: block; }
.comment time { font-size: .84rem; color: var(--muted); }
.comment p { margin: 6px 0 0; color: var(--ink-soft); }
.lightbox { position: fixed; inset: 0; background: rgba(6, 30, 27, .92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; border-radius: 10px; }
.lightbox button { position: absolute; top: 18px; left: 18px; }
.progress { position: fixed; top: 0; right: 0; height: 3px; background: var(--gold); width: 0; z-index: 150; }
.inline-cta { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--green-tint); border-radius: var(--radius-lg); padding: 22px 26px; margin: 40px 0; }
.inline-cta p { margin: 0; font-weight: 600; color: var(--green-deep); font-size: 1.08rem; }
.qlist { list-style: none; padding: 0; margin: 0; }
.qitem { padding: 22px 0; border-bottom: 1px solid var(--line); }
.qitem h3 { font-size: 1.15rem; margin: 6px 0; line-height: 1.6; }
.qitem h3 a { color: var(--ink); text-decoration: none; }
.qitem h3 a:hover { color: var(--green); }
.qitem p { color: var(--muted); margin: 0 0 8px; }
.qmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .86rem; color: var(--muted); }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: 8px; background: var(--green-tint); color: var(--green); }
.tag-gold { background: var(--gold-soft); color: #6b5212; }
.tag-wait { background: #eef1f0; color: var(--muted); }
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 28px); margin-bottom: 18px; }
.answer.official { border: 2px solid var(--green); }
.answer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.answer-body { font-size: 1.06rem; line-height: 2; color: #213b37; }
.vote { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-family: inherit; color: var(--ink-soft); }
.vote:hover, .vote.voted { border-color: var(--green); color: var(--green); }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-family: inherit; font-size: .88rem; text-decoration: underline; padding: 4px; }
.field.agree { display: flex; gap: 10px; align-items: flex-start; }
.field.agree input { width: 20px; min-height: 20px; height: 20px; margin-top: 6px; flex-shrink: 0; }
.field.agree label { font-weight: 500; }

/* ===== محتوى المقالات المنسّق ===== */
.article-body ul, .article-body ol, .answer-body ul, .answer-body ol { padding-inline-start: 1.4em; margin: 0 0 1.25em; }
.article-body li, .answer-body li { margin-bottom: .45em; }
.article-body h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); color: var(--green-deep); scroll-margin-top: 90px; }
.article-body h3 { font-size: 1.2rem; color: var(--green); scroll-margin-top: 90px; }
.qv { font-family: 'Amiri Quran', serif; font-size: 1.18em; color: var(--green-deep); line-height: 2.2; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .98rem; line-height: 1.8; }
.table-wrap th { background: var(--green-tint); color: var(--green-deep); font-weight: 700; text-align: start; padding: 10px 14px; }
.table-wrap td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.toc-box { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 28px; }
.toc-box strong { display: block; color: var(--green-deep); margin-bottom: 6px; }
.toc-box ol { margin: 0; padding-inline-start: 1.3em; }
.toc-box li { margin: 4px 0; }
.toc-box a { color: var(--ink-soft); text-decoration: none; }
.toc-box a:hover { color: var(--green); text-decoration: underline; }
.answer-body blockquote { border-right: 3px solid var(--gold); margin: 1em 0; padding: 2px 16px 2px 0; color: var(--green-deep); }

.learn-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 22px; }
.learn-links a { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--radius); background: var(--green-tint); color: var(--ink); text-decoration: none; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.learn-links a:hover { border-color: var(--gold); transform: translateY(-2px); }
.learn-links strong { color: var(--green-deep); font-size: 1.05rem; }
.learn-links span { color: var(--ink-soft); font-size: .92rem; }
.related-learn { margin-top: 28px; }
.related-learn ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.related-learn a { color: var(--green); font-weight: 600; }

/* صفحات إنجليزي (LTR) */
[dir="ltr"] .crumbs li + li::before { content: "›"; margin-left: 0; margin-right: 8px; }
[dir="ltr"] .toc-box { border-inline-start: 4px solid var(--gold); }
[dir="ltr"] .article-body blockquote, [dir="ltr"] .answer-body blockquote { border-right: 0; border-left: 3px solid var(--gold); padding: 4px 0 4px 20px; }

/* عدادات المدونة */
/* شريط الإحصائيات (المدونة + الأسئلة) */
.stats-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); max-width: 860px; margin: 28px 0 0; padding: 6px; list-style: none; border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(255,255,255,.11), rgba(255,255,255,.03)); border: 1px solid rgba(243,231,198,.22); box-shadow: 0 18px 40px -18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.stat { position: relative; }
.stat + .stat::before { content: ""; position: absolute; inset-block: 22%; inset-inline-start: 0; width: 1px; background: linear-gradient(transparent, rgba(243,231,198,.35), transparent); }
.stat > .stat-link, .stat { display: flex; align-items: center; gap: 14px; }
.stat { padding: 16px 18px; border-radius: calc(var(--radius-lg) - 6px); transition: background .2s; }
.stat:has(.stat-link) { padding: 0; }
.stat-link { flex: 1; padding: 16px 18px; border-radius: inherit; text-decoration: none; color: inherit; }
.stat:hover { background: rgba(255,255,255,.06); }
.stat-ico { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #1b2b28; background: linear-gradient(145deg, #f3d989, var(--gold)); box-shadow: 0 6px 16px -6px rgba(196,154,44,.7), inset 0 1px 0 rgba(255,255,255,.5); }
.stat-ico svg { width: 24px; height: 24px; }
.stat-txt { display: flex; flex-direction: column; min-width: 0; }
.stat-num { color: #fff; font-family: 'IBM Plex Sans Arabic', sans-serif; font-size: clamp(1.45rem, 2.8vw, 1.95rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-label { color: var(--gold-soft); font-size: .9rem; opacity: .9; margin-top: 3px; }
.stat-link .stat-label::after { content: " ←"; opacity: .7; }
@media (max-width: 640px) {
  .stats-band { grid-template-columns: 1fr 1fr; gap: 2px; }
  .stat + .stat::before { display: none; }
  .stat, .stat-link { padding: 12px; gap: 10px; }
  .stat:has(.stat-link) { padding: 0; }
  .stat-ico { width: 40px; height: 40px; border-radius: 12px; }
  .stat-ico svg { width: 20px; height: 20px; }
  .stat:nth-child(odd) { border-inline-end: 1px solid rgba(243,231,198,.14); }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(243,231,198,.14); }
}

/* كارت «فعّل الإشعارات» في آخر المقالات والأسئلة */
.push-card { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 32px 0 8px; padding: 18px 20px; padding-inline-end: 44px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--green-deep), var(--green)); color: #e8f1ee; box-shadow: var(--shadow); }
.push-card[hidden] { display: none; }
.push-card-ico { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: rgba(243,231,198,.14); font-size: 1.4rem; }
.push-card p { flex: 1 1 220px; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.push-card strong { color: #fff; font-size: 1.02rem; }
.push-card p span { font-size: .88rem; opacity: .85; }
.push-card .btn { flex: none; }
.push-card-x { position: absolute; inset-block-start: 8px; inset-inline-end: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: #cfe1db; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.push-card-x:hover { background: rgba(255,255,255,.1); color: #fff; }
@media (max-width: 560px) { .push-card .btn { width: 100%; } }

/* مشغل التلاوة جوه المقالات */
.surah-listen { background: var(--green-tint); border-radius: var(--radius-lg); padding: 16px 20px; margin: 0 0 28px; }
.surah-listen .sl-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.surah-listen .sl-head strong { color: var(--green-deep); }
.surah-listen select { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line, #ddd); background: #fff; font: inherit; max-width: 100%; }
.surah-listen .sl-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.surah-listen .sl-prev, .surah-listen .sl-next { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line, #ddd); background: #fff; cursor: pointer; font-size: 1rem; }
.surah-listen .sl-pos { color: var(--green-deep); font-weight: 600; font-size: .95rem; }
.surah-listen[dir="ltr"] .sl-controls, [dir="ltr"] .surah-listen .sl-controls { direction: ltr; }
.mid-cta { margin: 32px 0; }

/* اختبار الحفظ */
.hifz-quiz { border: 1px solid var(--line, #ddd); border-radius: var(--radius-lg); padding: 20px 22px; margin: 40px 0; background: var(--surface, #fff); }
.hifz-quiz h2 { margin-top: 0; font-size: 1.25rem; }
.hifz-quiz .hq-progress { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.hifz-quiz .hq-verse, .hifz-quiz .hq-opt { font-family: 'Amiri Quran', serif; font-size: 1.25rem; line-height: 2.1; }
.hifz-quiz .hq-verse { background: var(--green-tint); border-radius: 12px; padding: 12px 16px; margin: 0 0 10px; }
.hifz-quiz .hq-ask { font-weight: 600; margin: 8px 0; }
.hifz-quiz .hq-options { display: grid; gap: 8px; }
.hifz-quiz .hq-opt { text-align: right; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line, #ddd); background: #fff; cursor: pointer; color: var(--ink); }
.hifz-quiz .hq-opt.ok { border-color: #2e7d32; background: #e8f5e9; }
.hifz-quiz .hq-opt.bad { border-color: #c62828; background: #ffebee; }
.hifz-quiz .hq-feedback { font-weight: 600; color: var(--green-deep); margin: 10px 0; }
.hifz-quiz [hidden], .surah-listen [hidden] { display: none !important; }
