/* ===================================================================
   SEHATEK — Landing page styles
   Brand: red heart / green leaf / blue head. Clean medical / trust.
   Logical properties used throughout for LTR + RTL (Arabic) support.
=================================================================== */

:root {
  /* Brand */
  --red: #E02322;
  --red-soft: #fbe9e9;
  --green: #27A40F;
  --green-soft: #e7f6e3;
  --blue: #1565C0;
  --blue-soft: #e6effb;

  /* Neutrals */
  --ink: #0f1b2d;
  --ink-2: #3a4a5e;
  --muted: #6b7a8d;
  --line: #e6ebf1;
  --bg: #ffffff;
  --bg-alt: #f6f9fc;
  --white: #ffffff;

  /* Shape & depth */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06), 0 1px 3px rgba(15, 27, 45, .04);
  --shadow-md: 0 8px 24px rgba(15, 27, 45, .08);
  --shadow-lg: 0 24px 60px rgba(15, 27, 45, .14);

  --maxw: 1160px;
  --gutter: 24px;

  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-ar: 'Noto Kufi Arabic', 'Segoe UI', system-ui, sans-serif;
}

html[lang="ar"] { --font: var(--font-ar); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.15; color: var(--ink); margin: 0; letter-spacing: -.02em; }
p { margin: 0; }

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 8px;
}
.skip-link:focus { inset-inline-start: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .98rem; padding: 13px 22px; border-radius: var(--radius-pill);
  border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--green), #1f8f0c); color: #fff; box-shadow: 0 8px 20px rgba(39,164,15,.28); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(39,164,15,.36); transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-soft); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; }
.brand-name { font-size: 1.25rem; letter-spacing: -.01em; background: linear-gradient(90deg, var(--green), var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.main-nav { display: flex; gap: 26px; margin-inline-start: 12px; }
.main-nav a { color: var(--ink-2); font-weight: 500; font-size: .96rem; position: relative; padding: 4px 0; }
.main-nav a:hover { color: var(--blue); }
.main-nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px; background: var(--blue); transform: scaleX(0); transition: transform .2s ease; }
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }

.lang-switch { display: inline-flex; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px; }
.lang-btn { border: none; background: transparent; font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: var(--radius-pill); cursor: pointer; transition: all .15s ease; }
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 96px); }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(40% 50% at 12% 18%, rgba(224,35,34,.10), transparent 70%),
    radial-gradient(45% 55% at 88% 22%, rgba(21,101,192,.12), transparent 70%),
    radial-gradient(55% 60% at 50% 100%, rgba(39,164,15,.12), transparent 70%),
    linear-gradient(180deg, #fff, var(--bg-alt));
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-copy { max-width: 580px; }
.eyebrow { display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); background: var(--green-soft); padding: 6px 14px; border-radius: var(--radius-pill); }
.hero-title { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 800; margin-block: 22px 18px; }
.hero-sub { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-block: 30px; }
.hero-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--ink-2); font-weight: 500; }
.hero-trust svg { width: 20px; height: 20px; fill: var(--green); flex: none; }

/* Hero phone visual */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 420px; }
.phone {
  position: relative; z-index: 2; width: 270px; aspect-ratio: 9/19; background: #0f1b2d;
  border-radius: 38px; padding: 12px; box-shadow: var(--shadow-lg); border: 6px solid #0b1422;
}
.phone-screen { background: linear-gradient(160deg, #fff, var(--bg-alt)); border-radius: 28px; height: 100%; padding: 26px 20px; display: flex; flex-direction: column; align-items: center; }
.phone-logo { width: 56px; height: 56px; margin-bottom: 18px; }
.phone-code-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.phone-code { font-size: 1.7rem; font-weight: 800; letter-spacing: .14em; color: var(--blue); margin-block: 8px 22px; }
.phone-card-row { width: 100%; display: flex; gap: 8px; margin-bottom: 10px; }
.phone-card-row span { height: 44px; flex: 1; border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.phone-card-row.small span { height: 44px; flex: .6; }
.blob { position: absolute; border-radius: 50%; filter: blur(18px); opacity: .55; z-index: 1; }
.blob-red { width: 150px; height: 150px; background: var(--red); inset-block-start: 8%; inset-inline-start: 4%; }
.blob-green { width: 180px; height: 180px; background: var(--green); inset-block-end: 6%; inset-inline-end: 0; }
.blob-blue { width: 120px; height: 120px; background: var(--blue); inset-block-start: 40%; inset-inline-end: 8%; opacity: .4; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 100px); }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-inline: auto; text-align: center; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; margin-block: 16px 12px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px; }
.feature-icon svg { width: 30px; height: 30px; fill: #fff; }
.icon-red { background: linear-gradient(135deg, #ff4b48, var(--red)); }
.icon-green { background: linear-gradient(135deg, #34c218, var(--green)); }
.icon-blue { background: linear-gradient(135deg, #2f86e6, var(--blue)); }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.feature-card p { color: var(--ink-2); font-size: .98rem; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: 16px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px 28px; text-align: center; box-shadow: var(--shadow-sm); }
.step-num { width: 48px; height: 48px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, var(--blue), #0d4ea0); }
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: .96rem; }
.step-line { align-self: center; height: 2px; min-width: 24px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px); margin-top: 24px; }

/* ---------- Audience ---------- */
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.audience-card { border-radius: var(--radius-lg); padding: 44px 40px; position: relative; overflow: hidden; }
.audience-patients { background: linear-gradient(160deg, var(--green-soft), #fff); border: 1px solid var(--green-soft); }
.audience-doctors { background: linear-gradient(160deg, var(--blue-soft), #fff); border: 1px solid var(--blue-soft); }
.audience-card h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-block: 14px 12px; }
.audience-card > p { color: var(--ink-2); margin-bottom: 22px; }
.check-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-inline-start: 30px; color: var(--ink-2); font-weight: 500; }
.check-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); }
.audience-doctors .check-list li::before { background: var(--blue); }
.check-list li::after { content: ""; position: absolute; inset-inline-start: 5px; top: 8px; width: 8px; height: 5px; border-inline-start: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }

/* ---------- Download ---------- */
.download-section { background: linear-gradient(135deg, #0f1b2d, #163150); color: #fff; padding-block: clamp(56px, 7vw, 88px) clamp(28px, 3.5vw, 40px); }
.download-cta { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.download-copy { max-width: 480px; }
.download-copy h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.download-copy p { color: rgba(255,255,255,.75); margin-top: 12px; font-size: 1.05rem; }
.store-buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.store-btn { display: inline-flex; align-items: center; gap: 14px; background: #fff; color: var(--ink); padding: 12px 22px; border-radius: var(--radius); transition: transform .15s ease, box-shadow .2s ease; box-shadow: var(--shadow-md); }
.store-btn:hover { transform: translateY(-2px); }
.store-btn svg { width: 30px; height: 30px; fill: var(--ink); flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.2; }
.store-btn small { font-size: .72rem; color: var(--muted); }
.store-btn strong { font-size: 1.05rem; }
.store-btn-soon { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; border: 1px solid rgba(255,255,255,.25); }
.store-btn-soon svg { fill: #fff; }
.store-btn-soon small { color: rgba(255,255,255,.7); }

/* ---------- Footer (slim, inside the dark section) ---------- */
.footer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px 28px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12);
}
.footer-bar .brand-logo { width: 32px; height: 32px; }
.footer-bar .brand-name { font-size: 1.1rem; color: #fff; background: none; -webkit-text-fill-color: #fff; }
.footer-links-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 22px; flex: 1 1 auto; }
.footer-links-inline a { color: rgba(255,255,255,.68); font-weight: 500; font-size: .92rem; transition: color .15s ease; }
.footer-links-inline a:hover { color: #fff; }
.footer-bar .lang-switch { flex: none; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.footer-bar .lang-btn { color: rgba(255,255,255,.7); }
.footer-bar .lang-btn:hover { color: #fff; }
.footer-bar .lang-btn.active { background: rgba(255,255,255,.18); color: #fff; box-shadow: none; }
.footer-bottom-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px 20px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.45); font-size: .82rem;
}

/* ---------- RTL tweaks ---------- */
html[dir="rtl"] .hero-title,
html[dir="rtl"] .hero-sub { text-align: start; }
html[dir="rtl"] .phone-code { direction: ltr; }
html[dir="rtl"] .check-list li::after { transform: rotate(-45deg); }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; min-height: 0; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step-line { display: none; }
  .audience-grid { grid-template-columns: 1fr; }
  .download-cta { gap: 28px; }
}

@media (max-width: 720px) {
  .main-nav, .btn-doctors { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .main-nav {
    display: flex; position: absolute; inset-inline: 0; top: 72px; flex-direction: column;
    background: #fff; padding: 18px var(--gutter); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); gap: 14px;
  }
  .site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .footer-bar { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-links-inline { justify-content: flex-start; }
  .hero-cta .btn, .audience-card .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
