/* ==========================================================
   تترا للنشر والمكتبات — Tatra Publishing & Bookshops
   ========================================================== */

:root {
  /* الهوية — Brand */
  --crimson: #9A1D1D;        /* لون الواجهة (غموض وجريمة) */
  --crimson-deep: #6E1212;
  --crimson-soft: #C7372F;
  --night: #0E1726;          /* الأزرار والأقسام الداكنة (خيال علمي) */
  --night-2: #17233A;
  --gold: #D9A441;
  --beige: #EEEAE3;
  --paper: #FAF8F5;
  --ink: #111111;
  --ink-2: #4A4A4A;
  --ink-3: #7A7570;
  --line: #DDD7CD;
  --white: #FFFFFF;

  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --shadow: 0 20px 50px -20px rgba(14, 23, 38, .35);
  --shadow-soft: 0 10px 30px -12px rgba(14, 23, 38, .18);

  --font-head: "Alexandria", "Tajawal", system-ui, sans-serif;
  --font-body: "Tajawal", system-ui, sans-serif;
  --gutter: 16px;
  --max: 1180px;
}

html[lang="en"], html[lang="lt"] {
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body, html[lang="lt"] body { line-height: 1.65; font-size: 16px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 860px; }
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 20px 44px; font-size: 1.15rem; }
.btn-light { background: var(--white); color: var(--ink); box-shadow: 0 12px 30px -10px rgba(0,0,0,.35); }
.btn-dark { background: var(--night); color: var(--white); }

/* ==========================================================
   الشريط العلوي العائم
   ========================================================== */
.nav-wrap {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  padding: calc(16px + env(safe-area-inset-top, 0px)) var(--gutter) 0;
  max-width: calc(var(--max) - 0px); margin-inline: auto;
}
.nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: var(--white); border-radius: 22px;
  padding: 12px 18px; min-height: 68px;
  box-shadow: var(--shadow-soft);
}
.nav-burger { justify-self: start; width: 44px; height: 44px; display: grid; place-content: center; gap: 7px; }
.nav-burger span { display: block; width: 30px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s ease, opacity .2s ease; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo-mark { width: 30px; color: var(--crimson); }
.logo-word { font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; line-height: 1; }

.lang { justify-self: end; display: inline-flex; gap: 2px; background: var(--beige); padding: 4px; border-radius: 999px; }
.lang button { padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--ink-2); line-height: 1.4; transition: background .2s, color .2s; }
.lang button[lang="ar"] { font-family: "Tajawal", sans-serif; font-size: 1rem; line-height: 1.2; }
.lang button.active { background: var(--white); color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.08); }

.menu-panel {
  margin-top: 10px; background: var(--white); border-radius: 22px;
  padding: 8px 28px; box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column;
  animation: drop .25s ease;
}
.menu-panel[hidden] { display: none; }
.menu-panel a {
  padding: 20px 0; font-size: 1.25rem; font-family: var(--font-head); font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.menu-panel a:last-child { border-bottom: 0; }
.menu-panel a:hover { color: var(--crimson); }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) {
  .menu-panel { max-width: 420px; margin-inline-start: 0; }
}

/* ==========================================================
   الواجهة
   ========================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 20% 110%, rgba(0,0,0,.35), transparent 60%),
    radial-gradient(900px 500px at 85% 10%, rgba(255,120,90,.18), transparent 60%),
    var(--crimson);
  color: var(--white);
  padding: 130px 0 40px;
  min-height: 100svh;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.hero-text { align-self: stretch; text-align: start; }
.hero-title { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 700; line-height: 1.3; }
.hero-title span { display: block; }
.hero-sub { margin-top: 18px; max-width: 620px; font-size: clamp(1rem, 1.6vw, 1.2rem); opacity: .92; }


.hero-visual { position: relative; margin: 36px 0 8px; perspective: 1400px; }
.book {
  position: relative; width: min(64vw, 300px); aspect-ratio: 2 / 3;
  transform: rotateY(-22deg) rotateX(6deg) rotateZ(-2deg);
  transform-style: preserve-3d;
  animation: float 6s ease-in-out infinite;
}
html[dir="ltr"] .book { transform: rotateY(22deg) rotateX(6deg) rotateZ(2deg); }
.book-cover {
  position: absolute; inset: 0; border-radius: 6px 16px 16px 6px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(14,23,38,.25) 0%, rgba(14,23,38,.1) 40%, rgba(14,23,38,.92) 100%),
    var(--img) center / cover no-repeat,
    var(--night-2);
  box-shadow: 30px 40px 60px -20px rgba(0,0,0,.6), inset 8px 0 14px -6px rgba(0,0,0,.6);
  display: flex; flex-direction: column; justify-content: space-between; padding: 22px;
  transform: translateZ(14px);
}
.book-cover::before { /* spine line */
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 12px; width: 2px; background: rgba(255,255,255,.15);
}
.book-top svg { width: 38px; color: var(--gold); margin-inline-start: auto; }
.book-bottom { text-align: start; }
.book-bottom strong { display: block; font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; line-height: 1.1; }
.book-bottom small { display: block; margin-top: 6px; font-size: .8rem; letter-spacing: .04em; color: var(--gold); }
.book-pages {
  position: absolute; inset-block: 6px; inset-inline-end: -10px; width: 22px;
  background: repeating-linear-gradient(90deg, #f3efe6 0 2px, #ddd5c6 2px 3px);
  border-radius: 0 6px 6px 0; transform: translateZ(0);
}
html[dir="rtl"] .book-pages { border-radius: 6px 0 0 6px; }
.hero-glow {
  position: absolute; left: 50%; bottom: -40px; width: 120%; height: 80px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0,0,0,.45), transparent); filter: blur(8px); z-index: -1;
}
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -12px; } }

.hero-cta { margin-top: 26px; position: relative; z-index: 2; }

/* الشريط السفلي: المقر | لديك مخطوطة؟ | الأنواع */
.hero-center { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-center small { font-size: .9rem; opacity: .85; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35); color: var(--white);
  font-family: var(--font-head); font-weight: 500; font-size: .95rem; white-space: nowrap;
  transition: background .2s ease;
}
.hero-pill:hover { background: rgba(255,255,255,.2); }
.hero-pill svg { width: 18px; }

.hero-foot { align-self: stretch; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 12px; margin-top: 28px; }
@media (max-width: 599px) { .hero-center { order: -1; flex-basis: 100%; } }
.hero-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start; }
.hero-meta-end { align-items: flex-end; text-align: end; }
.hero-meta small { font-size: .85rem; opacity: .85; }
.hero-meta-val { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta-val svg { width: 22px; color: var(--gold); }
.hero-meta b { font-weight: 600; font-family: var(--font-head); }
.hero-big { font-size: 1.4rem; }

/* ==========================================================
   الأقسام العامة
   ========================================================== */
.sec { padding: 90px 0; }
.sec-beige { background: var(--beige); }
.sec-paper { background: var(--paper); }
.sec-dark { background: var(--night); color: var(--white); }
@media (min-width: 900px) { .sec { padding: 130px 0; } }

.sec-head { text-align: center; max-width: 900px; margin: 0 auto 56px; }
.sec-head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; color: #0F2A22; color: var(--night); }
.sec-dark .sec-head h2 { color: var(--white); }
.sec-head p { margin-top: 20px; font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--ink-3); }
.sec-dark .sec-head p { color: rgba(255,255,255,.7); }

.kicker { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--crimson); letter-spacing: .02em; }

/* ---------- بطاقات السلاسل (مثل بطاقات مديد) ---------- */
.series-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 900px) { .series-grid { grid-template-columns: repeat(4, 1fr); gap: 28px; } }
.series-card {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,0) 35%, rgba(0,0,0,.15)), var(--img) center / cover no-repeat, var(--night-2);
  transition: transform .4s ease;
}
.series-card:hover { transform: translateY(-6px); }
.series-frame {
  position: absolute; inset: 16px; border: 1px solid rgba(255,255,255,.45); border-radius: 18px;
  display: flex; flex-direction: column; justify-content: space-between; padding: 14px;
}
@media (min-width: 900px) { .series-frame { inset: 30px; padding: 16px; } }
.series-top { color: var(--white); text-align: end; display: flex; flex-direction: column; align-items: flex-end; }
html[dir="rtl"] .series-top { align-items: flex-end; }
.series-top small { font-size: .8rem; opacity: .9; }
.series-top b { font-family: var(--font-head); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.1; display: inline-flex; gap: 6px; align-items: center; }
.chip-card {
  align-self: center; background: var(--white); color: var(--ink); border-radius: 8px;
  padding: 8px 12px; display: flex; gap: 8px; align-items: center; max-width: 100%;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.chip-ico { flex: none; width: 22px; height: 22px; color: var(--crimson); }
.chip-ico svg, .m-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip-card strong { display: block; font-size: .78rem; line-height: 1.3; font-family: var(--font-head); font-weight: 600; }
.chip-card small { display: block; font-size: .68rem; color: var(--ink-3); line-height: 1.3; }
@media (max-width: 480px) {
  .chip-card { padding: 6px 8px; gap: 6px; }
  .chip-card strong { font-size: .68rem; }
  .chip-card small { font-size: .6rem; }
}

.about-p2 { max-width: 860px; margin: 56px auto 0; text-align: center; font-size: 1.1rem; color: var(--ink-2); }

/* ---------- الرقم الكبير ---------- */
.stat { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 70px; text-align: start; }
.stat-ico svg { width: 76px; }
.stat-num { font-family: var(--font-head); font-size: clamp(3.4rem, 7vw, 5rem); line-height: 1; color: var(--night); }
.stat p { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.5rem); color: var(--night); max-width: 460px; }

/* ---------- لماذا تترا ---------- */
.why-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .why-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.why-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.why-img { position: relative; aspect-ratio: 16 / 10; background: var(--img) center / cover no-repeat, var(--beige); }
.why-num {
  position: absolute; top: 16px; inset-inline-start: 16px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: var(--crimson);
}
.why-body { padding: 26px 26px 30px; }
.why-quote { font-size: 1.35rem; margin: 8px 0 12px; color: var(--night); font-weight: 700; }
html[lang="ar"] .why-card:first-child .why-quote { font-family: "Amiri", "Tajawal", serif; font-size: 1.5rem; }
.why-body p { color: var(--ink-2); font-size: 1rem; }
.why-outro { max-width: 820px; margin: 56px auto 0; text-align: center; font-family: var(--font-head); font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--night); font-weight: 500; }

/* ---------- صفوف الميزات (الرؤية/الرسالة/الأهداف) ---------- */
.feature { display: grid; gap: 32px; align-items: center; margin-bottom: 90px; }
.feature:last-child { margin-bottom: 0; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 80px; margin-bottom: 130px; }
  .feature-rev .feature-visual { order: 2; }
}
.feature-text h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--night); margin-bottom: 18px; }
.feature-text p { font-size: 1.1rem; color: var(--ink-2); }
.feature-text p + p { margin-top: 14px; }

.app-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow); position: relative;
}
.app-card-photo {
  min-height: 380px; background: linear-gradient(180deg, rgba(14,23,38,0) 40%, rgba(14,23,38,.55)), var(--img) center / cover no-repeat, var(--night-2);
  display: flex; flex-direction: column; justify-content: space-between;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.95); padding: 8px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-red { background: var(--crimson-soft); }
.dot-gold { background: var(--gold); }
.app-float { align-self: flex-start; background: var(--white); border-radius: 18px; padding: 14px 20px; box-shadow: var(--shadow-soft); }
.app-float small { display: block; font-size: .8rem; color: var(--ink-3); }
.app-float b { font-family: var(--font-head); font-size: 1.2rem; }

.app-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.app-badge { background: var(--beige); padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--night); }
.app-mark { width: 34px; color: var(--crimson); }
.app-count { font-family: var(--font-head); font-size: 2.2rem; line-height: 1; color: var(--crimson); }
.app-quote { margin: 0; font-family: var(--font-head); font-size: 1.15rem; line-height: 1.8; color: var(--night); border-inline-start: 3px solid var(--gold); padding-inline-start: 18px; }
html[lang="en"] .app-quote, html[lang="lt"] .app-quote { font-size: 1.05rem; line-height: 1.6; }

.check-list, .num-list { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.check-list li, .num-list li {
  position: relative; padding: 14px 0; padding-inline-start: 40px; border-bottom: 1px solid var(--line);
  font-size: .98rem; color: var(--ink-2); line-height: 1.6;
}
.check-list li:last-child, .num-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.check-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 16px; width: 26px; height: 26px; border-radius: 50%;
  background: #E9F6EF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' stroke='%23218A5A' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.num-list li { counter-increment: n; }
.num-list li::before {
  content: counter(n); position: absolute; inset-inline-start: 0; top: 14px; width: 28px; height: 28px; border-radius: 8px;
  background: var(--night); color: var(--white); font-family: var(--font-head); font-size: .85rem; display: grid; place-items: center;
}

/* ---------- أهمية الدار ---------- */
.matters-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .matters-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .matters-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.m-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px; transition: transform .3s ease, box-shadow .3s ease; }
.m-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.m-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--beige); display: grid; place-items: center; margin-bottom: 18px; color: var(--crimson); }
.m-ico svg { width: 26px; height: 26px; }
.m-card h3 { font-size: 1.25rem; color: var(--night); margin-bottom: 10px; }
.m-card p { color: var(--ink-2); font-size: .98rem; }

/* ---------- ما يميزنا ---------- */
.diff-grid { display: grid; gap: 0; border-top: 1px solid rgba(255,255,255,.12); }
@media (min-width: 900px) { .diff-grid { grid-template-columns: 1fr 1fr; column-gap: 60px; } }
.d-item { display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.d-num { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--gold); width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(217,164,65,.5); display: grid; place-items: center; }
.d-item h3 { font-size: 1.25rem; margin-bottom: 6px; }
.d-item p { color: rgba(255,255,255,.72); font-size: 1rem; }

/* ---------- البرامج ---------- */
.programs-grid { display: grid; gap: 22px; }
@media (min-width: 700px) { .programs-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; } }
.program { background: var(--white); border-radius: var(--radius-lg); padding: 14px 14px 28px; box-shadow: var(--shadow-soft); }
.program-img { aspect-ratio: 16 / 9; border-radius: calc(var(--radius-lg) - 10px); background: var(--img) center / cover no-repeat, var(--beige); margin-bottom: 22px; }
.program h3 { font-size: 1.4rem; color: var(--night); padding-inline: 14px; margin-bottom: 10px; }
.program p { color: var(--ink-2); padding-inline: 14px; font-size: 1rem; }

/* ---------- الأسئلة الشائعة ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 30px 0; text-align: start; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--night);
}
.faq-icon { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--beige); display: grid; place-items: center; transition: transform .3s ease, background .3s; }
.faq-icon svg { width: 20px; }
.faq-item.open .faq-icon { transform: rotate(180deg); background: var(--night); color: var(--white); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding-bottom: 30px; color: var(--ink-2); font-size: 1.05rem; max-width: 760px; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }

/* ---------- دعوة ختامية ---------- */
.cta {
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(154,29,29,.35), transparent 70%),
    var(--night);
  color: var(--white); padding: 110px 0 100px; text-align: center;
}
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.cta p { margin: 22px auto 40px; max-width: 720px; color: rgba(255,255,255,.78); font-size: 1.1rem; }
.cta-note { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; color: rgba(255,255,255,.7); font-size: .95rem; }
.cta-note svg { width: 20px; color: var(--gold); }

/* ---------- الفوتر ---------- */
.footer { background: var(--paper); padding: 80px 0 140px; text-align: center; }
@media (min-width: 900px) { .footer { padding-bottom: 60px; } }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.logo-foot .logo-word { font-size: 2rem; color: var(--night); }
.footer-tag { color: var(--ink-3); font-size: 1.1rem; margin-top: -8px; }
.footer-based { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-head); color: var(--night); }
.footer-based svg { width: 44px; color: var(--crimson); }
.footer-based small { font-size: .95rem; font-weight: 500; }
.footer-mail { color: var(--ink-3); }
.footer-mail a { color: var(--night); font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.socials { display: flex; gap: 30px; }
.socials a { width: 34px; color: #4b5a55; transition: color .2s; }
.socials a:hover { color: var(--crimson); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 30px; color: var(--ink-3); }
.footer-links a:hover { color: var(--night); }
.lang-foot { justify-self: auto; }
.lang-foot button { padding: 6px 14px; font-size: .9rem; }
.footer-rights { font-size: .8rem; color: var(--ink-3); }
.footer-legal { font-size: .85rem; color: var(--ink-3); max-width: 640px; }

/* ---------- شريط الهاتف السفلي ---------- */
.sticky-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(250, 248, 245, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .35s ease;
}
.sticky-bar.show { transform: none; }
.sticky-bar b { display: block; font-family: var(--font-head); font-size: 1.05rem; color: var(--night); }
.sticky-bar small { display: block; color: var(--ink-3); font-size: .85rem; }
.sticky-bar .btn { padding: 16px 30px; font-size: 1.05rem; }
@media (min-width: 900px) { .sticky-bar { display: none; } }

/* ---------- حركات الظهور ---------- */
.reveal { transform: translateY(20px); transition: transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .book { animation: none; }
}

/* على الهاتف: النص قبل البطاقة */
@media (max-width: 899px) {
  .feature-text { order: -1; }
  .book { width: min(56vw, 260px); }
}

/* الهاتف: شريط علوي أصغر حتى لا يتداخل الشعار مع مبدّل اللغة */
@media (max-width: 520px) {
  .nav { padding: 10px 12px; min-height: 62px; }
  .logo { gap: 7px; }
  .logo-mark { width: 24px; }
  .logo-word { font-size: 1.4rem; }
  .nav .lang button { padding: 5px 9px; font-size: .78rem; }
  .nav .lang button[lang="ar"] { font-size: .95rem; }
}
.sticky-bar > div { min-width: 0; }
.sticky-bar b, .sticky-bar small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================
   صفحة سياسة الخصوصية
   ========================================================== */
.legal-page { background: var(--paper); }
.legal-back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: var(--ink-2); padding: 8px 4px; }
.legal-back svg { width: 20px; }
html[dir="rtl"] .legal-back svg { transform: scaleX(-1); }
.legal-back:hover { color: var(--crimson); }
.legal { max-width: 820px; margin: 0 auto; padding: 140px var(--gutter) 80px; }
.legal-body h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--night); margin-top: 18px; }
.legal-body h2 { font-size: 1.35rem; color: var(--night); margin: 44px 0 12px; }
.legal-body p, .legal-body li { color: var(--ink-2); font-size: 1.02rem; }
.legal-body p + p { margin-top: 12px; }
.legal-body ul { margin: 12px 0 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.legal-body b { color: var(--ink); }
.legal-body a { color: var(--crimson); border-bottom: 1px solid currentColor; }
.legal-meta { margin-top: 10px; font-size: .9rem !important; color: var(--ink-3) !important; }
.legal-draft {
  display: inline-block; background: #FCEBD2; color: #7A4A06 !important; border: 1px solid #F0CD95;
  padding: 6px 14px; border-radius: 999px; font-size: .85rem !important; font-weight: 600;
}
.legal-summary { margin-top: 32px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px 28px; }
.legal-summary h2 { margin-top: 0; }
.ph { background: #FFF1C9; color: #6B4A00 !important; border-radius: 4px; padding: 0 4px; border-bottom: 0 !important; }
.legal-foot { text-align: center; padding: 30px var(--gutter) 50px; color: var(--ink-3); font-size: .85rem; border-top: 1px solid var(--line); }

/* ==========================================================
   الواجهة على الكمبيوتر: عمودان مثل مديد
   النص والزر في جهة البداية، والكتاب في الجهة الأخرى، والشريط السفلي بعرض كامل
   ========================================================== */
@media (min-width: 900px) {
  .hero { display: flex; flex-direction: column; }
  .hero-inner {
    flex: 1; display: grid; text-align: start;
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: 1fr auto auto;
    grid-template-areas: "text visual" "cta visual" "foot foot";
    column-gap: 48px; align-items: center;
  }
  .hero-text { grid-area: text; align-self: end; }
  .hero-title { font-size: clamp(2.6rem, 4vw, 3.9rem); }
  .hero-sub { max-width: 560px; }
  .hero-cta { grid-area: cta; justify-self: start; align-self: start; margin-top: 40px; }
  .hero-visual { grid-area: visual; justify-self: center; margin: 0; }
  .book { width: min(26vw, 340px); }
  .hero-foot { grid-area: foot; flex-wrap: nowrap; margin-top: 48px; }
  .hero-foot > * { flex: 1; }
  .hero-center { flex: 0 0 auto; }
}
