/* Shared look for jordan.autosouq.uk: header, footer, app area. */
:root { --navy: #05294B; --navy-dark: #031B33; --orange: #E96A00; --orange-light: #FDAC17; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex; flex-direction: column; height: 100vh; height: 100dvh;
  background: #f3f5f8; color: #1b1b1b;
  font-family: -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

/* ---------- header ---------- */
.site-header {
  flex: 0 0 auto; background: var(--navy); color: #fff;
  border-bottom: 3px solid var(--orange);
}
.site-header .inner {
  max-width: 1200px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.brand .tagline { font-size: 14px; line-height: 1.25; opacity: .9; }
.brand .tagline span { display: block; font-size: 12px; opacity: .75; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: #fff; text-decoration: none; font-size: 14px; padding: 6px 12px; border-radius: 6px;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,.1); }
.site-nav a.cta { background: var(--orange); font-weight: 700; }
.site-nav a.cta:hover { background: #ff7a0d; }

/* ---------- the app ---------- */
#flutter-app {
  flex: 1 1 auto; position: relative; min-height: 0;
  background: var(--navy); /* while loading */
}

/* ---------- footer ---------- */
.site-footer { flex: 0 0 auto; background: var(--navy-dark); color: rgba(255,255,255,.75); font-size: 13px; }
.site-footer .inner {
  max-width: 1200px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: var(--orange-light); }

/* ---------- phones: keep the app as big as possible ---------- */
@media (max-width: 640px) {
  .brand .tagline, .site-nav a.hide-sm { display: none; }
  .brand img { height: 32px; }
  .site-header .inner { padding: 6px 12px; }
  .site-footer .inner { padding: 6px 12px; justify-content: center; text-align: center; }
  .site-footer .copy { display: none; }
  .site-footer { font-size: 12px; }
}

/* ---------- normal pages (contact) ---------- */
body.page { height: auto; min-height: 100vh; }
.page-main { flex: 1 0 auto; width: 100%; max-width: 640px; margin: 0 auto; padding: 24px 16px 40px; }
.page-main h1 { color: var(--navy); font-size: 26px; margin: 8px 0 4px; }
.page-main .lead { color: #555; margin: 0 0 20px; line-height: 1.6; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #222; }
.field label small { font-weight: 400; color: #777; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px;
  border: 1px solid #cfd6de; border-radius: 8px; background: #fff; color: #1b1b1b;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--orange-light); border-color: var(--orange); }
.field textarea { min-height: 140px; resize: vertical; }
.field input[type="tel"], .field input[type="email"] { direction: ltr; text-align: start; }
/* Spam-trap field: invisible, takes no space, never widens the page (safe in RTL). */
.hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
form { position: relative; }
.btn { background: var(--orange); color: #fff; border: 0; border-radius: 8px; font: inherit; font-weight: 700; font-size: 16px; padding: 12px 22px; cursor: pointer; }
.btn:hover { background: #ff7a0d; }
.btn[disabled] { opacity: .6; cursor: default; }
.status { margin-top: 14px; padding: 10px 12px; border-radius: 8px; display: none; line-height: 1.5; }
.status.ok { display: block; background: #e7f6ec; color: #1e6b37; }
.status.err { display: block; background: #fdecea; color: #a12622; }
.note { font-size: 13px; color: #666; margin-top: 16px; line-height: 1.6; }

/* ---------- long text pages (privacy, terms, delete) ---------- */
body.page, body.page input, body.page select, body.page textarea, body.page button {
  font-family: "Tajawal", -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}
.doc-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0a3d6b 100%);
  color: #fff; padding: 36px 16px 64px; text-align: center;
}
.doc-hero .kicker { color: var(--orange-light); font-weight: 700; font-size: 14px; letter-spacing: .3px; margin: 0 0 6px; }
.doc-hero h1 { font-size: 34px; margin: 0; font-weight: 800; }
.doc-hero .meta { opacity: .8; font-size: 14px; margin: 10px 0 0; }
.lang-switch {
  display: inline-flex; margin-top: 18px; background: rgba(255,255,255,.12);
  border-radius: 999px; padding: 4px; gap: 4px;
}
.lang-switch button {
  border: 0; background: transparent; color: #fff; font: inherit; font-weight: 700; font-size: 14px;
  padding: 6px 18px; border-radius: 999px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--navy); }

.doc { flex: 1 0 auto; width: 100%; max-width: 820px; margin: -40px auto 0; padding: 0 16px 56px; line-height: 1.8; font-size: 16.5px; }
.doc article[hidden] { display: none; }
.doc article[lang="en"] { direction: ltr; text-align: left; }
.doc article[lang="ar"] { direction: rtl; text-align: right; font-size: 17.5px; }

.doc .card { background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(5,41,75,.08); padding: 22px 26px; margin-bottom: 16px; }
.doc .intro p { margin: 0 0 10px; color: #333; }
.doc .summary {
  border-inline-start: 4px solid var(--orange); background: #fff6ec; color: #3a2a17;
  padding: 14px 18px; border-radius: 10px; margin: 0 0 14px;
}
.doc .toc h2 { font-size: 15px; color: #6b7785; margin: 0 0 10px; font-weight: 700; }
.doc .toc ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.doc .toc a { color: var(--navy); text-decoration: none; display: flex; gap: 8px; padding: 4px 0; }
.doc .toc a:hover { color: var(--orange); }
.doc .toc .n { color: var(--orange); font-weight: 800; min-width: 1.4em; }

.doc .sec { scroll-margin-top: 16px; }
.doc .sec h3 { display: flex; align-items: center; gap: 12px; color: var(--navy); font-size: 20px; margin: 0 0 10px; }
.doc .sec h3 .n {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800;
}
.doc .sec p { margin: 0 0 10px; color: #2b2b2b; }
.doc .sec ul { margin: 0 0 10px; padding-inline-start: 1.3em; }
.doc .sec li { margin-bottom: 6px; }
.doc .sec li::marker { color: var(--orange); }
.doc a { color: #0b63b5; }
.doc table { width: 100%; border-collapse: collapse; margin: 6px 0 4px; font-size: 15px; }
.doc th, .doc td { border-bottom: 1px solid #e8ecf1; padding: 10px 8px; vertical-align: top; text-align: start; }
.doc th { color: #6b7785; font-weight: 700; font-size: 14px; }
.doc .button { display: inline-block; background: var(--orange); color: #fff !important; text-decoration: none; font-weight: 700; padding: 10px 20px; border-radius: 8px; margin-top: 4px; }
.doc .button:hover { background: #ff7a0d; }
.doc ul.actions { list-style: none; padding: 0; margin: 8px 0 0; }
.to-top { text-align: center; margin-top: 8px; }
.to-top a { color: #6b7785; font-size: 14px; text-decoration: none; }

.doc em { font-style: normal; font-weight: 700; color: var(--navy); }

/* ---------- contact page in the same style ---------- */
.doc.narrow { max-width: 640px; }
.doc .form-card { padding: 26px; }
.doc .field label { font-size: 15px; color: var(--navy); font-weight: 700; }
.doc .field label small { color: #8a95a3; font-weight: 400; }
.doc .field input, .doc .field select, .doc .field textarea { border-radius: 10px; background: #f8fafc; }
.doc .field input:focus, .doc .field select:focus, .doc .field textarea:focus { background: #fff; }
.doc .btn { width: 100%; padding: 14px; border-radius: 10px; font-size: 17px; margin-top: 4px; }
.doc .note-card { background: #fff6ec; box-shadow: none; border-inline-start: 4px solid var(--orange); padding: 14px 18px; }
.doc .note-card p { margin: 0 0 4px; color: #3a2a17; font-size: 15px; }

@media (max-width: 640px) {
  .doc-hero { padding: 24px 16px 56px; }
  .doc-hero h1 { font-size: 26px; }
  .doc .card { padding: 18px 18px; border-radius: 12px; }
  .doc .sec h3 { font-size: 18px; }
}
