/* ===========================================================
   مراجعتي — موقع تعريفي (RTL)
   نظام تصميم موحّد لجميع الصفحات
   =========================================================== */

:root {
  --indigo: #3f51e5;
  --violet: #8a5cf6;
  --violet-deep: #6d3fe0;
  --gold: #fbbf24;
  --gold-deep: #d97706;
  --green: #10b981;
  --red: #ef4444;

  --ink: #1b1f33;
  --muted: #5b6178;
  --line: #e7e9f2;
  --bg: #f6f7fc;
  --card: #ffffff;

  --grad: linear-gradient(135deg, #3f51e5 0%, #6d3fe0 55%, #8a5cf6 100%);
  --grad-gold: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 45px -22px rgba(63, 81, 229, 0.35);
  --shadow-soft: 0 10px 30px -18px rgba(27, 31, 51, 0.35);
  --max: 1120px;
  --font: "Tajawal", "Cairo", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 22px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 252, 0.85);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.25rem; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: var(--shadow-soft); }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.nav-links a {
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: .96rem;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: #eef0fb; }
.nav-links a.cta {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow);
}
.nav-links a.cta:hover { color: #fff; filter: brightness(1.05); }
.nav-toggle {
  display: none;
  margin-inline-start: auto;
  background: #eef0fb;
  border: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.02rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform .15s, filter .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-gold { background: var(--grad-gold); color: #3a2400; box-shadow: 0 16px 40px -20px rgba(217,119,6,.6); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet-deep); }
.btn-lg { padding: 16px 34px; font-size: 1.08rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--grad);
  color: #fff;
  overflow: hidden;
  padding: 78px 0 96px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 340px at 85% -10%, rgba(251,191,36,.28), transparent 60%),
    radial-gradient(560px 320px at 5% 110%, rgba(255,255,255,.16), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 46px; align-items: center; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  padding: 7px 15px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.15rem); line-height: 1.25; font-weight: 800; letter-spacing: -.5px; }
.hero h1 .hl { color: var(--gold); }
.hero p.lead { font-size: 1.18rem; color: rgba(255,255,255,.92); margin: 20px 0 30px; max-width: 34ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: 260px; aspect-ratio: 9/18.5;
  background: #0f1230;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.55), inset 0 0 0 2px rgba(255,255,255,.08);
  position: relative;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 30px;
  background: linear-gradient(180deg, #f7f8ff 0%, #eef0fb 100%);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.phone-top { background: var(--grad); color:#fff; padding: 26px 18px 20px; text-align: center; }
.phone-top img { width: 62px; height: 62px; margin: 0 auto 10px; border-radius: 16px; }
.phone-top b { font-size: 1.15rem; }
.phone-top small { display:block; opacity:.85; font-size:.8rem; }
.phone-grid { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phone-grid div {
  background: #fff; border-radius: 14px; padding: 14px 8px;
  text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted);
  box-shadow: var(--shadow-soft);
}
.phone-grid div i { font-style: normal; display:block; font-size: 1.5rem; margin-bottom: 4px; }

/* trust strip */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust .wrap { display: flex; flex-wrap: wrap; gap: 14px 40px; justify-content: center; padding: 22px; }
.trust span { color: var(--muted); font-weight: 600; font-size: .96rem; display:flex; align-items:center; gap:8px; }

/* ---------- Sections ---------- */
section.block { padding: 74px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head .kicker { color: var(--violet-deep); font-weight: 800; letter-spacing: .5px; font-size: .95rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); font-weight: 800; margin: 10px 0 12px; letter-spacing: -.4px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* feature grid */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.feature .ic {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.6rem;
  background: #eef0fb; margin-bottom: 16px;
}
.feature h3 { font-size: 1.16rem; font-weight: 800; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: .98rem; }

/* steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 22px 24px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -18px; inset-inline-start: 22px;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
  box-shadow: var(--shadow);
}
.step h3 { margin: 14px 0 6px; font-size: 1.1rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* subjects */
.subjects-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.subject-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.subject-col h3 { display:flex; align-items:center; gap:10px; font-size: 1.25rem; margin-bottom: 16px; }
.subject-col .tag { font-size:.8rem; background:#eef0fb; color:var(--violet-deep); padding:3px 10px; border-radius:999px; font-weight:700; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { background: #f2f3fb; border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; font-weight: 600; font-size: .92rem; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan {
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 22px; padding: 30px 26px; display: flex; flex-direction: column;
  position: relative;
}
.plan.free { }
.plan.featured { border-color: transparent; background: var(--grad); color: #fff; box-shadow: var(--shadow); transform: translateY(-6px); }
.plan.featured .muted { color: rgba(255,255,255,.85); }
.plan .badge {
  position: absolute; top: 18px; inset-inline-start: 26px;
  background: var(--grad-gold); color: #3a2400;
  font-size: .78rem; font-weight: 800; padding: 5px 12px; border-radius: 999px;
}
.plan h3 { font-size: 1.3rem; margin-bottom: 6px; }
.plan .muted { color: var(--muted); font-size: .95rem; }
.plan .price { margin: 18px 0 4px; font-size: 2.5rem; font-weight: 800; line-height: 1; }
.plan .price small { font-size: 1rem; font-weight: 600; }
.plan .per { font-size: .92rem; color: var(--muted); }
.plan.featured .per { color: rgba(255,255,255,.8); }
.plan ul { list-style: none; margin: 22px 0; display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .98rem; }
.plan li::before { content: "✓"; color: var(--green); font-weight: 800; }
.plan.featured li::before { color: var(--gold); }
.plan .btn { margin-top: auto; width: 100%; }
.save-note { text-align:center; color: var(--muted); margin-top: 20px; font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 14px; }
details.qa {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 4px 20px; transition: border-color .2s;
}
details.qa[open] { border-color: var(--violet); }
details.qa summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: 1.05rem;
  padding: 16px 0; display: flex; justify-content: space-between; align-items: center;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; color: var(--violet-deep); font-size: 1.5rem; font-weight: 700; }
details.qa[open] summary::after { content: "–"; }
details.qa p { color: var(--muted); padding-bottom: 18px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad); color: #fff; border-radius: 26px; padding: 52px 40px; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content:""; position:absolute; inset:0; background: radial-gradient(500px 240px at 90% 0%, rgba(251,191,36,.3), transparent 60%); }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,.9); font-size: 1.1rem; margin-bottom: 26px; }
.cta-band .btn-ghost { background: rgba(255,255,255,.14); color:#fff; border-color: rgba(255,255,255,.35); }

/* ---------- Legal / article pages ---------- */
.page-hero { background: var(--grad); color: #fff; padding: 56px 0; text-align: center; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.page-hero p { color: rgba(255,255,255,.85); margin-top: 8px; }
.article { max-width: 820px; margin: -34px auto 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 44px 40px; box-shadow: var(--shadow-soft); position: relative; }
.article h2 { font-size: 1.4rem; margin: 30px 0 10px; color: var(--violet-deep); }
.article h2:first-child { margin-top: 0; }
.article p, .article li { color: #3a4058; }
.article ul { margin: 8px 24px 8px 0; display: grid; gap: 8px; }
.article .updated { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.article a { color: var(--violet-deep); font-weight: 700; }
.callout { background: #f2f3fb; border-inline-start: 4px solid var(--violet); border-radius: 12px; padding: 16px 18px; margin: 18px 0; }

/* contact cards */
.contact-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.contact-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; text-align:center; }
.contact-card .ic { width:56px; height:56px; border-radius:16px; background: var(--grad); color:#fff; display:grid; place-items:center; font-size:1.5rem; margin: 0 auto 14px; }
.contact-card h3 { margin-bottom: 6px; }
.contact-card a { color: var(--violet-deep); font-weight: 700; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: #10122b; color: #c9cbe0; padding: 56px 0 26px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .brand span { color: #fff; -webkit-text-fill-color: #fff; }
.site-footer p.about { color: #9598b8; margin-top: 14px; font-size: .96rem; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-col a { display: block; color: #9598b8; padding: 5px 0; font-size: .95rem; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 22px; display:flex; flex-wrap:wrap; gap:10px; justify-content: space-between; color: #7a7d9c; font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { margin-top: 10px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2,1fr); }
  .pricing { grid-template-columns: 1fr; }
  .plan.featured { transform: none; }
  .subjects-tabs { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 72px; inset-inline: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 22px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article { padding: 30px 22px; }
}
