/* Shifa Medical Concierge — stylesheet
   Design language: navy / gold / ivory, serif display + clean sans body.
   RTL is handled with CSS logical properties; html[dir="rtl"] flips automatically. */

:root {
  --navy-950: #060F22;
  --navy-900: #0A1730;
  --navy-800: #0E2145;
  --navy-700: #16305C;
  --gold: #C9A961;
  --gold-light: #E3C98A;
  --gold-dim: rgba(201, 169, 97, 0.32);
  --gold-faint: rgba(201, 169, 97, 0.16);
  --ivory: #F7F5F0;
  --paper: #FFFFFF;
  --ink: #1C2B47;
  --ink-soft: #5A6B8C;
  --line: #E7E1D4;
  --font-display: "Playfair Display", "Amiri", Georgia, serif;
  --font-body: "Inter", "IBM Plex Sans Arabic", -apple-system, sans-serif;
  --shadow: 0 18px 44px rgba(10, 23, 48, 0.08);
}

html[lang="ar"] {
  --font-display: "Amiri", "Playfair Display", Georgia, serif;
  --font-body: "IBM Plex Sans Arabic", "Inter", -apple-system, sans-serif;
}

/* ————— Base ————— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body { line-height: 1.85; }

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  color: var(--navy-900);
}

/* Arabic script must never be letter-spaced (breaks cursive joining) */
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] h4, html[lang="ar"] .eyebrow, html[lang="ar"] .brand-name,
html[lang="ar"] .brand-sub { letter-spacing: 0; }

.container { max-width: 1140px; margin-inline: auto; padding-inline: 24px; }
.container.narrow { max-width: 760px; }

section[id] { scroll-margin-top: 92px; }

/* ————— Reveal animation ————— */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ————— Type helpers ————— */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.section { padding-block: 104px; }
.section-dark { background: var(--navy-900); }
.section-dark h2, .section-dark h3 { color: #F4EFE4; }
.section-ivory { background: var(--ivory); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.section-sub { margin-top: 16px; color: var(--ink-soft); font-size: 17px; }
.section-dark .section-sub { color: #AAB6CF; }

/* ————— Buttons ————— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 34px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #DFC186, #B9934A);
  color: #141B2E;
  box-shadow: 0 8px 26px rgba(201, 169, 97, 0.32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(201, 169, 97, 0.44); }
.btn-ghost { background: transparent; color: #F4EFE4; border-color: var(--gold-dim); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.section:not(.section-dark) .btn-ghost { color: var(--navy-800); border-color: var(--navy-800); }
.btn-sm { padding: 10px 22px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-wa { background: #14804C; color: #fff; }
.btn-wa:hover { transform: translateY(-2px); background: #107040; }

/* ————— Nav ————— */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  padding-block: 18px;
  transition: background .35s ease, padding .35s ease, box-shadow .35s ease;
}
.nav.is-scrolled {
  background: rgba(6, 15, 34, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding-block: 12px;
  box-shadow: 0 1px 0 var(--gold-faint);
}
.nav-inner { display: flex; align-items: center; gap: 32px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.22em; color: #F4EFE4; }
.brand-sub { font-size: 10px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }
.nav-links { display: flex; gap: 30px; margin-inline-start: auto; }
.nav-links a { font-size: 14px; font-weight: 500; color: #C9D2E4; position: relative; transition: color .25s; }
.nav-links a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transition: transform .3s ease;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 22px; }

.lang-switch { display: flex; align-items: center; gap: 8px; }
.lang-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  color: #9AA7BF; padding: 2px 1px; transition: color .25s;
}
.lang-btn.is-active { color: var(--gold-light); }
.lang-btn:hover { color: #fff; }
.lang-sep { color: #56617A; font-size: 13px; }

/* ————— Hero ————— */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 150px 0 90px;
  background:
    radial-gradient(ellipse 60% 45% at 72% 18%, rgba(201, 169, 97, 0.14), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 58%, #081326 100%);
  overflow: hidden;
}
.hero-frame {
  position: absolute; inset: 26px;
  border: 1px solid var(--gold-faint);
  pointer-events: none;
}
.hero-ornament {
  position: absolute; inset-inline-end: 0; top: 0;
  width: min(46vw, 560px); height: min(46vw, 560px);
}
.hero-content { position: relative; }
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.3rem);
  color: #F7F3E9;
  margin-bottom: 26px;
  max-width: 840px;
}
.hero h1 em { color: var(--gold-light); font-style: italic; }
html[lang="ar"] .hero h1 em { font-style: normal; }
.hero-sub { max-width: 620px; font-size: 18px; color: #B9C3D8; margin-bottom: 40px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 44px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.hero-chips li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 500; color: #A9B5CE;
}
.chip-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

/* ————— Promise band ————— */
.promise { background: var(--ivory); padding-block: 84px; text-align: center; }
.promise-mark { display: block; color: var(--gold); font-size: 22px; margin-bottom: 18px; }
.promise-quote {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  font-weight: 500; font-style: italic;
  color: var(--navy-800);
  max-width: 900px; margin: 0 auto;
}
html[lang="ar"] .promise-quote { font-style: normal; }

/* ————— Cards (Why) ————— */
.grid { display: grid; gap: 26px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 34px 30px 30px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.card::before {
  content: ""; position: absolute; inset-inline: 30px; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .35s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-icon { width: 30px; height: 30px; color: var(--gold); margin-bottom: 20px; }
.card h3 { font-size: 1.28rem; margin-bottom: 12px; }
.card p { font-size: 15px; color: var(--ink-soft); }

/* ————— Journey (dark) ————— */
.phase {
  position: relative;
  padding: 36px 32px;
  border: 1px solid rgba(201, 169, 97, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}
.phase-n {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem; font-weight: 500;
  color: var(--gold);
  margin-bottom: 14px;
}
.phase h3 { font-size: 1.32rem; margin-bottom: 8px; }
.phase-d { color: #AAB6CF; font-size: 15px; margin-bottom: 18px; }
.phase ul li {
  position: relative;
  padding-inline-start: 22px;
  margin-bottom: 10px;
  font-size: 14.5px;
  color: #C9D2E4;
}
.phase ul li::before {
  content: "";
  position: absolute; inset-inline-start: 0; top: 0.62em;
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
}

/* ————— Expertise ————— */
.spec {
  background: var(--paper);
  border: 1px solid var(--line);
  border-inline-start: 2px solid var(--gold-dim);
  padding: 26px 28px;
  border-radius: 0 4px 4px 0;
  transition: border-color .3s ease, transform .3s ease;
}
html[dir="rtl"] .spec { border-radius: 4px 0 0 4px; }
.spec:hover { border-inline-start-color: var(--gold); transform: translateX(4px); }
html[dir="rtl"] .spec:hover { transform: translateX(-4px); }
.spec h3 { font-size: 1.18rem; margin-bottom: 6px; }
.spec p { font-size: 14.5px; color: var(--ink-soft); }
.exp-note { text-align: center; margin-top: 36px; color: var(--ink-soft); font-size: 15px; font-style: italic; }

/* ————— Process ————— */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; counter-reset: step; }
.steps li { position: relative; padding-top: 8px; }
.steps li:not(:last-child)::after {
  content: "";
  position: absolute; top: 30px; inset-inline-start: 64px;
  inline-size: calc(100% - 64px); height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-faint));
}
.step-n {
  font-family: var(--font-display);
  font-size: 2.3rem; font-weight: 500;
  color: var(--gold);
  display: block; margin-bottom: 10px;
}
.steps h3 { font-size: 1.15rem; margin-bottom: 8px; }
.steps p { font-size: 14.5px; color: var(--ink-soft); }

/* ————— Privacy band ————— */
.privacy { text-align: center; padding-block: 96px; }
.privacy h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 20px; }
.privacy p { color: #AAB6CF; max-width: 640px; margin-inline: auto; font-size: 16.5px; }

/* ————— Contact / form ————— */
.form-wrap { max-width: 780px; margin-inline: auto; }
.form-wrap > form, .form-sent {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: 4px;
  padding: 42px 44px 38px;
  box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; margin-bottom: 28px; }
.field-wide { grid-column: 1 / -1; }
.field label {
  display: block;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--navy-800);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--font-body); font-size: 15px;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color .25s ease, background .25s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}
.field input:user-invalid, .field select:user-invalid { border-color: #C25450; }
.form-note { margin-top: 16px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }

.form-sent { text-align: center; }
.form-sent h3 { font-size: 1.7rem; margin-bottom: 10px; }
.form-sent p { color: var(--ink-soft); margin-bottom: 26px; }
.sent-channels { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.sent-channels .btn-ghost { border-color: var(--navy-800); color: var(--navy-800); }

/* ————— Footer ————— */
.footer { background: var(--navy-950); border-top: 1px solid var(--gold-faint); padding-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.footer-brand .brand-name { display: inline-block; margin-bottom: 12px; }
.footer-brand p { color: #8B98B4; font-size: 15px; max-width: 340px; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.footer-col a { display: block; color: #A9B5CE; font-size: 14.5px; margin-bottom: 10px; transition: color .25s; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.06); padding-block: 26px 34px; }
.footer-disclaimer { font-size: 12.5px; color: #8A96B2; max-width: 720px; margin-bottom: 8px; }
.footer-rights { font-size: 12.5px; color: #8A96B2; }

/* ————— Responsive ————— */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 36px; }
  .steps li:not(:last-child)::after { display: none; }
  .nav-links { display: none; }
}
@media (max-width: 700px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .section { padding-block: 72px; }
  .hero { padding-top: 130px; }
  .hero-frame { inset: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-wrap > form, .form-sent { padding: 30px 22px 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-actions .btn { display: none; }
  .steps { grid-template-columns: 1fr; }
}