/* ─────────────────────────────────────────────────────────────
   صيدلية البيت · Home Pharmacy
   Shared stylesheet for the Arabic (/) and English (/en/) pages.

   One sheet serves both directions: layout uses CSS logical
   properties (margin-inline, padding-inline, text-align:start)
   so nothing needs an [dir] override to flip.
   ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #0b1220;
  --ink-2:      #1c2740;
  --muted:      #5a6982;
  --muted-2:    #8a96ab;
  --line:       #e3e8f2;
  --line-soft:  #eef2f8;

  --bg:         #ffffff;
  --bg-soft:    #f6f8fc;
  --bg-deep:    #0b1220;

  --brand:      #2563eb;
  --brand-deep: #1a4fd0;
  --brand-tint: #eaf0ff;

  --gold:       #f59e0b;
  --gold-tint:  #fff5e3;

  --green:      #10b981;
  --red:        #ef4444;

  --radius:     18px;
  --radius-sm:  12px;
  --shadow:     0 1px 2px rgba(11,18,32,.04), 0 12px 32px rgba(11,18,32,.06);
  --shadow-lg:  0 30px 70px rgba(11,18,32,.16);

  --wrap:       1160px;
  --font-ar:    'Cairo', system-ui, sans-serif;
  --font-en:    'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ar);
  line-height: 1.75;
  overflow-x: hidden;
  font-size: 16px;
}
body[dir="ltr"] { font-family: var(--font-en); line-height: 1.65; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

/* ─── Type ─────────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p  { color: var(--muted); }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px;
}
body[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; }

.lead { font-size: clamp(1.02rem, 1.5vw, 1.15rem); max-width: 62ch; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; font-family: inherit;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 10px 26px rgba(37,99,235,.28);
}
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ─── Nav ──────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.brand-name { font-weight: 800; font-size: 1.03rem; line-height: 1.2; }
.brand-sub { font-size: .72rem; color: var(--muted); letter-spacing: .04em; }

.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { font-size: .94rem; font-weight: 600; color: var(--ink-2); }
.nav-links a:hover { color: var(--brand); }

.nav-right { display: flex; align-items: center; gap: 14px; }
.lang {
  font-size: .84rem; font-weight: 700; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px;
}
.lang:hover { border-color: var(--brand); color: var(--brand); }
.nav-cta { background: var(--brand); color: #fff; padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.nav-cta:hover { background: var(--brand-deep); color: #fff; }

@media (max-width: 900px) { .nav-links { display: none; } }

/* ─── Hero ─────────────────────────────────────────────────── */
.hero { position: relative; padding-block: clamp(48px, 7vw, 92px) clamp(40px, 6vw, 76px); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset-block-start: -30%; inset-inline-end: -10%;
  width: 780px; height: 780px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.10) 0%, transparent 62%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 .hl { color: var(--brand); }
.hero .lead { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stores img { height: 48px; width: auto; }
.stores a { transition: transform .18s ease, opacity .18s ease; }
.stores a:hover { transform: translateY(-2px); }
.store-soon {
  display: inline-flex; align-items: center; height: 48px; padding-inline: 18px;
  border: 1px dashed var(--line); border-radius: 10px;
  color: var(--muted); font-size: .82rem; font-weight: 600;
}

/* phone frame ─ holds a real 390×844 app capture */
.phone {
  position: relative; margin-inline: auto;
  width: min(300px, 78vw);
  border-radius: 42px; padding: 11px;
  background: linear-gradient(160deg, #222c40, #0b1220);
  box-shadow: var(--shadow-lg);
}
/* No fake notch: these are real device captures, and an overlay would
   simply cover the app's own UI. */
.phone img { border-radius: 32px; width: 100%; }
.phone-lg { width: min(340px, 82vw); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-actions, .stores { justify-content: center; }
}

/* ─── Trust strip ──────────────────────────────────────────── */
.trust { border-block: 1px solid var(--line-soft); background: var(--bg-soft); }
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; padding-block: 34px; text-align: center;
}
.trust-n { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; color: var(--ink); }
.trust-l { font-size: .87rem; color: var(--muted); }
@media (max-width: 760px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }

/* ─── Section shell ────────────────────────────────────────── */
section { padding-block: clamp(56px, 7vw, 100px); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-bottom: 14px; }

/* ─── Feature rows: copy paired with a real screenshot ─────── */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 84px); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 110px); }
.feature.flip .feature-media { order: -1; }

.feature-body h2 { margin-bottom: 16px; }
.feature-body .lead { margin-bottom: 24px; }

.points { list-style: none; display: grid; gap: 14px; }
.points li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: .97rem; }
.points li::before {
  content: ''; flex: none;
  width: 7px; height: 7px; margin-top: .62em; border-radius: 50%;
  background: var(--brand);
}
.points strong { font-weight: 700; color: var(--ink); }

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-media { order: 0; }
}

/* ─── Plain capability grid (no icons; type does the work) ── */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cap { background: #fff; padding: 30px 28px; }
.cap h3 { font-size: 1.06rem; margin-bottom: 9px; }
.cap p { font-size: .92rem; }
.cap .tag {
  display: inline-block; margin-bottom: 12px;
  font-size: .7rem; font-weight: 800; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--gold-tint); color: #a16207;
}
.cap .tag.free { background: var(--brand-tint); color: var(--brand-deep); }
@media (max-width: 900px) { .caps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .caps { grid-template-columns: 1fr; } }

/* ─── Pricing ──────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 26px; justify-content: center; align-items: start; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px; box-shadow: var(--shadow); }
.plan.best { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint), var(--shadow); position: relative; }
.plan-badge {
  position: absolute; inset-block-start: -13px; inset-inline-start: 30px;
  background: var(--brand); color: #fff;
  font-size: .74rem; font-weight: 800; letter-spacing: .05em;
  padding: 5px 15px; border-radius: 999px;
}
.plan-name { font-weight: 800; font-size: 1.2rem; margin-bottom: 6px; }
.plan-price { font-size: 2.5rem; font-weight: 800; line-height: 1.1; }
.plan-price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan-note { color: var(--muted); font-size: .88rem; margin-bottom: 22px; }
.plan ul { list-style: none; display: grid; gap: 12px; margin-bottom: 26px; }
.plan li { display: flex; gap: 11px; align-items: flex-start; font-size: .95rem; color: var(--ink-2); }
.plan li .mk { flex: none; font-weight: 800; color: var(--green); }
.plan li.off { color: var(--muted-2); }
.plan li.off .mk { color: var(--line); }
.plan .btn { width: 100%; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }

/* login button in the nav */
.nav-login {
  font-size: .9rem; font-weight: 700; color: var(--brand);
  border: 1px solid var(--brand); border-radius: 999px; padding: 9px 20px;
  white-space: nowrap;
}
.nav-login:hover { background: var(--brand-tint); color: var(--brand-deep); }

/* price tiers inside the paid plan card.
   Selectors are .plan-scoped: bare .tiers would lose to `.plan ul`. */
.plan .tiers {
  list-style: none; display: grid; gap: 11px;
  margin: 2px 0 22px; padding: 15px 16px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.plan .tiers li {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; font-size: .93rem; color: var(--ink);
}
.plan .tiers .t-name { color: var(--muted); font-weight: 600; }
.plan .tiers .t-val  { font-weight: 800; text-align: end; }
.plan .tiers s { color: var(--muted-2); font-weight: 600; margin-inline-end: 10px; }
.plan .tiers em {
  font-style: normal; font-size: .74rem; font-weight: 800;
  color: #a16207; background: var(--gold-tint);
  padding: 3px 9px; border-radius: 999px; margin-inline-start: 7px;
  white-space: nowrap;
}

/* nav-login can carry a long and a short label; the short one takes over
   on narrow screens so the nav never forces horizontal overflow. */
.nav-login .lbl-sm { display: none; }

@media (max-width: 560px) {
  .nav-login { padding: 8px 13px; font-size: .82rem; }
  .nav-right { gap: 7px; }
  .nav-cta { padding: 9px 15px; font-size: .82rem; }
  .lang { padding: 6px 11px; font-size: .78rem; }
  .nav-login .lbl-lg { display: none; }
  .nav-login .lbl-sm { display: inline; }
}

.price-foot { text-align: center; color: var(--muted); font-size: .87rem; margin-top: 26px; }

/* ─── FAQ ──────────────────────────────────────────────────── */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq details { background: #fff; }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 26px;
  font-weight: 700; color: var(--ink); font-size: 1rem;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.35rem; font-weight: 400; color: var(--brand); flex: none; }
.faq details[open] summary::after { content: '\2212'; }
.faq p { padding: 0 26px 22px; font-size: .95rem; }

/* ─── Closing CTA ──────────────────────────────────────────── */
.cta { background: var(--bg-deep); color: #fff; border-radius: var(--radius); padding: clamp(40px, 6vw, 68px) clamp(26px, 5vw, 60px); text-align: center; }
.cta h2 { color: #fff; margin-bottom: 14px; }
.cta p { color: rgba(255,255,255,.66); max-width: 56ch; margin-inline: auto; margin-bottom: 28px; }
.cta .stores { justify-content: center; }
.cta .store-soon { border-color: rgba(255,255,255,.24); color: rgba(255,255,255,.6); }

/* ─── Footer ───────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line-soft); padding-block: 52px 30px; background: var(--bg-soft); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.foot-grid p { font-size: .92rem; max-width: 42ch; margin-top: 14px; }
.foot-col h4 { font-size: .82rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 800; }
body[dir="rtl"] .foot-col h4 { letter-spacing: 0; text-transform: none; }
.foot-col ul { list-style: none; display: grid; gap: 10px; }
.foot-col a { font-size: .93rem; color: var(--ink-2); }
.foot-col a:hover { color: var(--brand); }
.foot-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; color: var(--muted); font-size: .86rem; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ─── Reveal on scroll ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
