/* مركز ينابيع الوحي — نظام التصميم
   لتغيير خط الاسم ليطابق الشعار: عدّل --font-brand فقط. */
:root {
  --font-brand: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-quran: "Amiri Quran", "Traditional Arabic", serif;

  --blue: #0A62B1;       /* أزرق الشعار */
  --blue-deep: #08487f;
  --blue-ink: #0b2a47;   /* أزرق داكن للعناوين على الفاتح */
  --ink: #211f1f;        /* أسود الشعار */
  --muted: #55606b;
  --paper: #ffffff;
  --mist: #eef4fa;       /* خلفية فاتحة مشتقة من الأزرق */
  --line: #d5e1ee;
  --sand: #a9772a;       /* لمسة ذهبية للآيات والمراجع فقط */

  --radius: 10px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink);
  background: var(--paper);
}
html[lang="en"] body { line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-brand); color: var(--blue-ink); line-height: 1.35; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 62ch; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 8px; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .6em 1.5em;
  font: 700 1rem/1.2 var(--font-brand);
  border-radius: 999px; border: 2px solid var(--blue);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--blue); color: #fff; }
.btn-solid:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn-line { background: transparent; color: var(--blue); }
.btn-line:hover { background: var(--blue); color: #fff; }
.btn-light { background: #fff; color: var(--blue-deep); border-color: #fff; }
.btn-light:hover { background: var(--mist); color: var(--blue-deep); border-color: var(--mist); }
.btn-sm { min-height: 42px; padding: .4em 1.2em; font-size: .95rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- الهيدر ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.28rem; font-weight: 800; color: var(--blue); }
.brand-text small { font-size: .78rem; color: var(--muted); font-weight: 600; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: block; padding: 8px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; }
.site-nav ul a:hover { background: var(--mist); color: var(--blue-deep); }
.site-nav ul a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); border-radius: 0; }
.nav-tools { display: flex; align-items: center; gap: 14px; }
.lang-link { font-weight: 700; text-decoration: none; padding: 6px 4px; color: var(--muted); }
.lang-link:hover { color: var(--blue); }

.menu-btn { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; background: var(--mist); border: 1px solid var(--line); border-radius: 8px; font: 700 .95rem var(--font-brand); color: var(--blue-ink); cursor: pointer; }
.menu-btn-icon, .menu-btn-icon::before, .menu-btn-icon::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s; }
.menu-btn-icon::before, .menu-btn-icon::after { content: ""; position: absolute; inset-inline-start: 0; }
.menu-btn-icon::before { top: -6px; }
.menu-btn-icon::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-btn-icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn-icon::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .site-nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 20px; flex-direction: column; align-items: stretch; gap: 14px; box-shadow: 0 14px 24px -16px rgba(11,42,71,.35); }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: 12px 8px; font-size: 1.1rem; border-bottom: 1px solid var(--mist); }
  .site-nav ul a[aria-current="page"] { box-shadow: none; background: var(--mist); }
  .nav-tools { justify-content: space-between; }
}

/* ---------- الواجهة الرئيسية ---------- */
.hero { background: linear-gradient(180deg, var(--mist) 0%, #fff 100%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(24px, 5vw, 64px); padding-block: clamp(36px, 7vw, 88px); }
.hero-copy h1 { margin-bottom: .4em; }
.hero-copy p { font-size: 1.15rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }

.arch { position: relative; width: min(100%, 380px); margin-inline: auto; aspect-ratio: 300 / 400; }
.arch-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.arch-body { position: absolute; inset: 22% 14% 14%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.arch-verse { font-family: var(--font-quran); font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 2.05; color: var(--ink); margin: 0; max-width: none; }
.arch-ref { font-size: .9rem; font-weight: 700; color: var(--sand); margin: 0; }
.drops { position: absolute; inset: 0; pointer-events: none; }
.drop { position: absolute; top: 14%; width: 14px; height: 20px; background: var(--blue); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; opacity: 0; transform-origin: center; animation: fall 3.4s ease-in 1 both; }
.drop:nth-child(1) { inset-inline-start: 30%; animation-delay: .2s; }
.drop:nth-child(2) { inset-inline-start: 44%; animation-delay: .9s; width: 11px; height: 16px; }
.drop:nth-child(3) { inset-inline-start: 56%; animation-delay: 1.5s; }
.drop:nth-child(4) { inset-inline-start: 68%; animation-delay: .5s; width: 10px; height: 14px; }
@keyframes fall {
  0% { opacity: 0; transform: translateY(-20px) scale(.6); }
  15% { opacity: .9; }
  80% { opacity: .9; transform: translateY(210px) scale(1); }
  100% { opacity: 0; transform: translateY(240px) scale(.4); }
}

@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .arch { width: min(100%, 300px); order: -1; }
}

.section { padding-block: clamp(44px, 7vw, 88px); }
.section-head { margin-bottom: clamp(24px, 4vw, 44px); }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* قائمة المسارات: صفوف بخط فاصل بدل البطاقات */
.tracks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 6vw, 72px); }
.tracks li { padding-block: 22px; border-top: 3px solid var(--blue); }
.tracks li:nth-child(n+3) { margin-top: 12px; }
.tracks h3 { margin-bottom: .3em; }
.tracks p { color: var(--muted); margin: 0; }
@media (max-width: 700px) { .tracks { grid-template-columns: 1fr; } .tracks li:nth-child(n+3) { margin-top: 0; } }

.how { background: var(--mist); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.how-grid > div { padding-inline: clamp(16px, 3vw, 36px); }
.how-grid > div + div { border-inline-start: 1px solid var(--line); }
.how-grid > div:first-child { padding-inline-start: 0; }
.how-grid > div:last-child { padding-inline-end: 0; }
.how-grid p { color: var(--muted); margin: 0; }
@media (max-width: 800px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-grid > div { padding-inline: 0; padding-block: 18px; }
  .how-grid > div + div { border-inline-start: 0; border-top: 1px solid var(--line); }
}

.cta-band { background: var(--blue); color: #fff; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band p { margin: 0; color: #e3effa; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 140px 1fr; gap: 8px 24px; padding-block: 20px; border-top: 1px solid var(--line); }
.news-list li:last-child { border-bottom: 1px solid var(--line); }
.news-date { color: var(--sand); font-weight: 700; font-size: .95rem; }
.news-list h3 { margin-bottom: .2em; }
.news-list h3 a { color: var(--blue-ink); text-decoration: none; }
.news-list h3 a:hover { color: var(--blue); text-decoration: underline; }
.news-list p { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .news-list li { grid-template-columns: 1fr; } }
.more-link { display: inline-block; margin-top: 18px; font-weight: 700; }

/* ---------- الصفحات الداخلية ---------- */
.page-head { background: var(--mist); border-bottom: 1px solid var(--line); padding-block: clamp(32px, 5vw, 60px); }
.page-head p { color: var(--muted); font-size: 1.15rem; margin: 0; }
.page-head h1 { margin-bottom: .25em; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 72px); align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.logo-panel { background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); }
.logo-panel img { width: min(100%, 360px); margin-inline: auto; }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.values li { padding: 14px 0 14px 0; border-top: 1px solid var(--line); font-weight: 700; color: var(--blue-ink); display: flex; gap: 12px; align-items: center; }
.values li:last-child { border-bottom: 1px solid var(--line); }
.values li::before { content: ""; flex: none; width: 10px; height: 14px; background: var(--blue); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; }

/* تثبيت التطبيق */
.install-box { background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); display: flex; flex-wrap: wrap; align-items: center; gap: 20px; justify-content: space-between; margin-bottom: clamp(28px, 5vw, 56px); }
.install-box p { margin: 0; color: var(--muted); }
.install-status { font-weight: 700; color: var(--blue-ink); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 48px); }
@media (max-width: 900px) { .steps-grid { grid-template-columns: 1fr; } }
.steps-grid h3 { padding-bottom: .5em; border-bottom: 3px solid var(--blue); }
.steps-grid ol { margin: 0; padding-inline-start: 1.4em; }
.steps-grid li { margin-bottom: .6em; }
.steps-grid li::marker { color: var(--blue); font-weight: 800; }
.plain-list { margin: 0; padding-inline-start: 1.2em; }
.plain-list li { margin-bottom: .4em; }

/* الأخبار */
.article { max-width: 70ch; }
.article .news-date { display: block; margin-bottom: .6em; }
.article-body p { max-width: none; font-size: 1.1rem; }
.back-link { display: inline-block; margin-bottom: 20px; font-weight: 700; }

/* النماذج */
.form-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(28px, 6vw, 72px); align-items: start; }
@media (max-width: 900px) { .form-layout { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--blue-ink); }
.field .opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 10px 14px;
  font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #9fb4c9; border-radius: 8px;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.7; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--blue); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(10,98,177,.3); outline-offset: 0; border-color: var(--blue); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #b3261e; }
.field-error { color: #b3261e; font-weight: 600; font-size: .95rem; margin: 6px 0 0; }
.alert { padding: 16px 18px; border-radius: 8px; border: 1.5px solid; }
.alert-ok { background: #eaf6ee; border-color: #2e7d4f; color: #14532d; }
.alert-err { background: #fdeeed; border-color: #b3261e; color: #7a1812; }
.alert p { margin: 0 0 .3em; }
.alert ul { margin: .3em 0 0; padding-inline-start: 1.2em; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.side-box { border-top: 3px solid var(--blue); padding-top: 18px; }
.side-box dl { margin: 0; }
.side-box dt { font-weight: 700; color: var(--blue-ink); margin-top: 14px; }
.side-box dd { margin: 0; color: var(--muted); }
.side-box .btn { margin-top: 22px; }

/* ---------- التذييل ---------- */
.site-footer { background: var(--mist); border-top: 1px solid var(--line); margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr; gap: clamp(24px, 5vw, 56px); padding-block: 48px 28px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand img { width: 230px; margin-bottom: 12px; }
.foot-brand p { color: var(--muted); }
.site-footer h2 { font-size: 1.05rem; margin-bottom: .6em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35em; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--blue); text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drop { animation: none; opacity: 0; }
  * { transition: none !important; }
}
