/* Public pages for the Rayyi7 car-owner app, styled after rayyi7.com. */
:root {
  --teal: #008b8b;
  --teal-dark: #006666;
  --orange: #ff8c00;
  --orange-dark: #e07a00;
  --ink: #111827;
  --text: #1f2937;
  --muted: #4b5563;
  --line: #e5e7eb;
  --bg: #ffffff;
  --soft: #f9fafb;
  --hero: #eef3f5;
  --navy: #111827;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
html[lang="ar"] body { font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", Tahoma, Inter, sans-serif; }
a { color: var(--teal); }
img { max-width: 100%; }

/* One language at a time; the header button switches. */
html[lang="ar"] [data-lang="en"], html[lang="en"] [data-lang="ar"] { display: none !important; }

.wrap { max-width: 1216px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 640px) { .wrap { padding-left: 32px; padding-right: 32px; } }

/* Top bar */
.nav { position: sticky; top: 0; z-index: 10; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 36px; width: auto; display: block; }
.wordmark { color: var(--teal); font-weight: 800; font-size: 24px; letter-spacing: -.3px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: #374151; text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--teal); }
.lang-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid #d1d5db; background: #fff;
  font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink);
}
.lang-btn:hover { border-color: var(--teal); color: var(--teal); }
@media (max-width: 720px) { .nav-links .hide-sm { display: none; } .nav-links { gap: 14px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 8px; font-weight: 700; font-size: 17px; text-decoration: none;
  border: 2px solid transparent; cursor: default;
}
a.btn { cursor: pointer; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 4px 12px rgba(255,140,0,.25); }
a.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { border-color: var(--teal); color: var(--teal); background: transparent; }
.btn-sm { padding: 9px 22px; font-size: 16px; font-weight: 600; }
.btn-white { background: #fff; color: var(--teal); }
.btn-ghost-white { border-color: #fff; color: #fff; }
.btn small { display: block; font-size: 11px; font-weight: 600; opacity: .85; line-height: 1.1; }
.btn .stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }

/* Hero */
.hero { background: linear-gradient(135deg, #f0f9f9 0%, var(--hero) 50%, #f3f4f6 100%); padding: 56px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; } }
.hero h1 { margin: 0 0 20px; font-size: 40px; line-height: 1.12; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
@media (min-width: 640px) { .hero h1 { font-size: 56px; } }
.hl { color: var(--teal); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 0 30px; }
.store-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Phone preview card (like the dashboard card on rayyi7.com) */
.preview-wrap { position: relative; max-width: 420px; margin: 0 auto; width: 100%; }
.preview-wrap::before {
  content: ""; position: absolute; inset: -18px -22px 12px 18px; border-radius: 28px;
  background: linear-gradient(135deg, rgba(0,139,139,.18), rgba(255,140,0,.14)); transform: rotate(4deg);
}
.preview { position: relative; background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.18); }
.pv-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pv-hello { font-weight: 800; font-size: 20px; color: var(--ink); }
.pv-sub { color: #6b7280; font-size: 13px; }
.pv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.pv-stat { border-radius: 14px; padding: 14px; }
.pv-stat b { display: block; font-size: 20px; color: var(--ink); }
.pv-stat > span { font-size: 12px; color: #6b7280; }
.pv-teal { background: #e6f5f5; } .pv-orange { background: #fff4e5; }
.pv-row { background: var(--soft); border-radius: 12px; padding: 12px 14px; margin-top: 10px; font-size: 14px; }
.pv-row .t { display: flex; justify-content: space-between; gap: 8px; color: var(--ink); font-weight: 600; }
.pv-row .s { color: #6b7280; font-size: 12px; margin-top: 2px; }
.pv-bar { display: flex; gap: 6px; margin-top: 10px; }
.pv-bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.pv-bar i.on { background: #2563eb; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.chip-blue { background: #dbeafe; color: #1d4ed8; } .chip-orange { background: #ffedd5; color: #c2410c; }

/* Sections */
.section { padding: 80px 0; }
.section.soft { background: var(--soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { font-size: 32px; line-height: 1.2; margin: 0 0 12px; color: var(--ink); font-weight: 800; }
@media (min-width: 640px) { .section-head h2 { font-size: 40px; } }
.section-head p { font-size: 19px; color: var(--muted); margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card {
  background: #fff; border-radius: 16px; padding: 32px 28px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04); transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 10px 25px -5px rgba(0,0,0,.1); }
.card svg { width: 46px; height: 46px; display: block; margin: 0 0 18px; }
.card h3 { font-size: 20px; margin: 0 0 10px; color: var(--ink); }
.card p { margin: 0; color: var(--muted); }
.ic-teal { color: var(--teal); } .ic-orange { color: var(--orange); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; counter-reset: s; }
.step { position: relative; padding: 28px; border-radius: 16px; background: var(--soft); }
.step::before {
  counter-increment: s; content: counter(s); display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.step p { margin: 0; color: var(--muted); }

/* Call to action band */
.cta { background: var(--teal); color: #fff; padding: 72px 0; text-align: center; }
.cta h2 { font-size: 32px; margin: 0 0 14px; font-weight: 800; }
@media (min-width: 640px) { .cta h2 { font-size: 40px; } }
.cta p { font-size: 19px; opacity: .92; margin: 0 0 30px; }
.cta .store-row { justify-content: center; }

/* Legal / text pages */
.page-hero { background: linear-gradient(135deg, #f0f9f9 0%, var(--hero) 100%); padding: 44px 0 36px; }
.page-hero h1 { margin: 0; font-size: 34px; line-height: 1.2; color: var(--ink); font-weight: 800; }
.page-hero p { margin: 8px 0 0; color: var(--muted); }
.doc { max-width: 820px; margin: 0 auto; padding: 36px 16px 64px; }
.doc h2 { font-size: 21px; margin: 32px 0 8px; color: var(--teal-dark); }
.doc p, .doc li { font-size: 16px; }
.doc .card-note { background: #f0f9f9; border: 1px solid #cce8e8; border-radius: 14px; padding: 16px 18px; margin: 14px 0; }
.doc ol.steps-list { counter-reset: n; list-style: none; padding: 0; }
.doc ol.steps-list li { counter-increment: n; position: relative; padding-inline-start: 42px; margin: 12px 0; }
.doc ol.steps-list li::before {
  content: counter(n); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center;
}

/* Footer */
.footer { background: var(--navy); color: #9ca3af; padding: 56px 0 32px; }
.footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; text-align: center; }
.footer h4 { color: #fff; margin: 0 0 14px; font-size: 16px; }
.footer .fw { color: var(--orange); font-weight: 800; font-size: 24px; margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 0 0 10px; }
.footer a { color: #9ca3af; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer .legal { border-top: 1px solid #1f2937; margin-top: 40px; padding-top: 28px; text-align: center; font-size: 15px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.pv-stat b { white-space: nowrap; }
@media (max-width: 400px) { .pv-stat b { font-size: 17px; } }
.doc h1 { font-size: 30px; line-height: 1.25; margin: 0 0 6px; color: var(--ink); font-weight: 800; }
.doc .muted { color: var(--muted); }

/* Dark mode (same "theme" choice as the rest of rayyi7.com) */
html.dark {
  color-scheme: dark;
  --ink: #f3f4f6; --text: #e2e8f0; --muted: #a3b1c6; --line: #2f3b51;
  --bg: #0b1220; --soft: #111827; --hero: #0f1a2b; --teal: #2bb5b5; --teal-dark: #5fd3d3;
}
html.dark .nav { background: #111827; box-shadow: 0 1px 0 #1f2937; }
html.dark .nav-links a { color: #e2e8f0; }
html.dark .lang-btn { background: #111827; color: #f3f4f6; border-color: #44516a; }
html.dark .page-hero, html.dark .hero { background: linear-gradient(135deg, #0f1d2b 0%, #0b1220 100%); }
html.dark .doc .card-note { background: rgb(20 184 166 / .1); border-color: rgb(20 184 166 / .3); }
html.dark .card, html.dark .preview { background: #111827; }
html.dark .footer { background: #060a12; }
html.dark .site-logo { background: #f8fafc; border-radius: 10px; padding: 2px 6px; }
.nav-tools { display: inline-flex; align-items: center; gap: 8px; }
.theme-btn svg { width: 18px; height: 18px; }
.doc h3 { font-size: 17px; margin: 22px 0 6px; color: var(--ink); }
.doc h2[id] { scroll-margin-top: 80px; }
