/* ==========================================================================
   PureMed Research Center — Stylesheet
   Design tokens: Medical Blue / Dark Navy / White / Soft Gray
   ========================================================================== */

:root {
  --navy: #0B2545;
  --navy-soft: #16345E;
  --blue: #1B5FA8;
  --blue-deep: #12457F;
  --blue-tint: #EAF1FA;
  --white: #FFFFFF;
  --gray-soft: #F4F6F9;
  --gray-line: #E3E8EF;
  --ink: #101826;
  --ink-muted: #56657A;
  --ink-faint: #8595AB;
  --success: #1F8A6E;

  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', -apple-system, sans-serif;

  --container: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(11,37,69,0.06), 0 1px 1px rgba(11,37,69,0.04);
  --shadow-md: 0 8px 24px rgba(11,37,69,0.08);
  --shadow-lg: 0 20px 48px rgba(11,37,69,0.12);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

body {
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Premium ambient background mesh — soft, subtle, fixed behind all content.
   No icons/illustrations: just gentle blurred color and a faint dot grid. */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-decor span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.bg-decor .blob-1 { width: 560px; height: 560px; top: -180px; inset-inline-end: -140px; background: radial-gradient(circle, #d7e6f7 0%, transparent 70%); }
.bg-decor .blob-2 { width: 460px; height: 460px; top: 38vh; inset-inline-start: -180px; background: radial-gradient(circle, #e7edf6 0%, transparent 70%); }
.bg-decor .blob-3 { width: 620px; height: 620px; top: 78vh; inset-inline-end: -220px; background: radial-gradient(circle, #dde8f6 0%, transparent 70%); }
.bg-decor .blob-4 { width: 500px; height: 500px; top: 130vh; inset-inline-start: -160px; background: radial-gradient(circle, #eef2f8 0%, transparent 70%); }
.bg-decor .grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(circle, rgba(11,37,69,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container { padding: 0 40px; }
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head.center { margin-inline: auto; text-align: center; }

h1, h2, h3, h4 { color: var(--navy); font-weight: 700; letter-spacing: -0.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { letter-spacing: 0; }

h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.35; }

.section-head p { color: var(--ink-muted); font-size: 17px; margin-top: 12px; }

section { padding: 96px 0; }
@media (max-width: 640px) { section { padding: 64px 0; } }

.bg-soft { background: var(--gray-soft); }
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy h2, .bg-navy h3 { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11,37,69,0.1), 0 8px 20px rgba(27,95,168,0.28);
}
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(27,95,168,0.34); }
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--gray-line);
}
.btn-secondary:hover { border-color: var(--navy); background: var(--white); }
.btn-on-navy { background: #fff; color: var(--navy); }
.btn-on-navy:hover { background: var(--blue-tint); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(11,37,69,0.08);
  box-shadow: none;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.98);
  border-bottom-color: transparent;
  box-shadow: 0 8px 30px rgba(11,37,69,0.09);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 24px;
  transition: height .3s var(--ease);
}
.navbar.scrolled .container { height: 68px; }
.navbar-spacer { height: 80px; }
@media (max-width: 640px) {
  .navbar .container { height: 64px; }
  .navbar-spacer { height: 64px; }
  .brand img { height: 34px; }
  /* Fixed + backdrop-filter is the single most expensive combination for
     scroll performance, and mobile GPUs (Safari/iOS especially) feel it
     the most. A near-opaque background looks almost identical without it. */
  .navbar { background: rgba(255,255,255,0.94); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 42px; width: auto; transition: height .3s var(--ease); }
.navbar.scrolled .brand img { height: 36px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name-main { font-size: 17px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
.brand-name-sub { font-size: 10.5px; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.06em; text-transform: uppercase; }
html[lang="ar"] .brand-name-sub { letter-spacing: 0; text-transform: none; }

.nav-links {
  display: none;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--navy-soft);
  white-space: nowrap;
}
.nav-links a { position: relative; padding: 4px 0; transition: color .2s; white-space: nowrap; }
.nav-links a:hover { color: var(--blue); }
.nav-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  padding: 0 !important;
  border-radius: 10px;
  border: 1px solid var(--gray-line);
  color: var(--navy-soft);
  transition: border-color .2s, color .2s, background .2s;
}
.nav-contact-icon svg { width: 17px; height: 17px; }
.nav-contact-icon:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-tint); }
@media (min-width: 1000px) { .nav-links { display: flex; } }

.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.lang-switch {
  display: flex;
  border: 1px solid var(--gray-line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  background: var(--white);
  flex-shrink: 0;
}
.lang-switch button,
.lang-switch a {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: all .2s;
  white-space: nowrap;
}
.lang-switch button.active,
.lang-switch a.active { background: var(--navy); color: #fff; }

/* Desktop "more" overflow menu — houses secondary pages (Research Journey,
   How It Works, Blog, FAQ, Privacy, Terms) so the primary nav stays short
   and uncluttered. Hidden on mobile: those links live in .mobile-menu instead. */
.nav-more { position: relative; display: none; flex-shrink: 0; }
@media (min-width: 1000px) { .nav-more { display: block; } }
.nav-more-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--gray-line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy-soft);
  transition: border-color .2s, color .2s, background .2s;
}
.nav-more-toggle svg { width: 17px; height: 17px; }
.nav-more-toggle:hover, .nav-more.open .nav-more-toggle {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--white);
}
.nav-more-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 110;
}
html[lang="ar"] .nav-more-panel { right: auto; left: 0; }
.nav-more.open .nav-more-panel { display: block; }
.nav-more-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--navy-soft);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-more-panel a:hover { background: var(--blue-tint); color: var(--blue-deep); }
.nav-more-divider { height: 1px; background: var(--gray-line); margin: 6px 4px; }

.nav-cta { display: none; }
@media (min-width: 640px) { .nav-cta { display: inline-flex; } }
.btn-sm { padding: 10px 20px; font-size: 13.5px; }

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--gray-line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  flex-shrink: 0;
}
.menu-toggle svg { width: 20px; height: 20px; }
@media (min-width: 1000px) { .menu-toggle { display: none; } }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 8px 24px 24px;
  border-top: 1px solid var(--gray-line);
  background: rgba(255,255,255,0.98);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-line);
  font-weight: 500;
  color: var(--navy-soft);
}
.mobile-menu .btn { margin-top: 16px; }
.mobile-menu a.btn { color: #fff; font-weight: 600; border-bottom: none; padding: 14px 28px; }
@media (min-width: 1000px) { .mobile-menu { display: none !important; } }

/* ---------- Hero ---------- */
.hero {
  /* local tokens, scoped to this section only — nothing outside .hero reads these */
  --hero-navy-950: #0c1a30;
  --hero-navy-800: #173463;
  --hero-navy-700: #1d3f78;
  --hero-blue-600: #1d5fad;
  --hero-blue-500: #2f74c9;
  --hero-blue-100: #e9f1fb;
  --hero-slate-500: #5b6b82;
  --hero-green-600: #1f9d55;

  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 96px 0 88px;
  background:
    radial-gradient(900px 520px at 12% -5%,  #dcebfb 0%, transparent 60%),
    radial-gradient(760px 480px at 92% 108%, #e2f0f7 0%, transparent 62%),
    linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
}

/* layer 1: clinical dot-grid (data / trial matrix) */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -3;
  background-image: radial-gradient(rgba(29,95,173,.20) 1px, transparent 1.4px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(105deg, transparent 0%, black 30%, black 72%, transparent 96%);
          mask-image: linear-gradient(105deg, transparent 0%, black 30%, black 72%, transparent 96%);
  opacity: .6;
}

/* layer 2: soft medical-cross watermark */
.hero::after {
  content: "";
  position: absolute; z-index: -3;
  top: -90px; inset-inline-end: -70px;
  width: 520px; height: 520px;
  background: linear-gradient(to right, rgba(29,95,173,.055) 0 100%) 0 0/100% 100% no-repeat;
  -webkit-mask:
    linear-gradient(#000 0 0) 50% 0/28% 100% no-repeat,
    linear-gradient(#000 0 0) 0 50%/100% 28% no-repeat;
          mask:
    linear-gradient(#000 0 0) 50% 0/28% 100% no-repeat,
    linear-gradient(#000 0 0) 0 50%/100% 28% no-repeat;
  transform: rotate(12deg);
}

/* layer 3: full-width ECG pulse behind the copy */
.hero-ecg {
  position: absolute; z-index: -2;
  left: 0; right: 0; bottom: 12%;
  width: 100%; height: 220px;
  pointer-events: none;
  opacity: .85;
}
.hero-ecg path {
  fill: none;
  stroke: url(#heroPulseGrad);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: heroEcgTrace 7s cubic-bezier(.5,0,.5,1) infinite;
}
@keyframes heroEcgTrace {
  0%   { stroke-dashoffset: 2600; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -260; }
}

/* layer 4: drifting molecule / citation nodes */
.hero-nodes { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.hero-node {
  position: absolute;
  border-radius: 50%;
  background: rgba(47,116,201,.35);
  animation: heroNodeDrift 9s ease-in-out infinite;
}
@keyframes heroNodeDrift {
  0%, 100% { transform: translateY(0) scale(1); opacity: .35; }
  50%      { transform: translateY(-14px) scale(1.15); opacity: .7; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-ecg path { animation: none; stroke-dashoffset: 0; }
  .hero-node { animation: none; }
}
.hero.is-offscreen .hero-ecg path,
.hero.is-offscreen .hero-node {
  animation-play-state: paused;
}

/* ---------- content ---------- */
.hero-inner { position: relative; max-width: 900px; margin: 0 auto; text-align: center; }

.hero-badge-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  background: rgba(233,241,251,.9);
  border: 1px solid rgba(29,95,173,.16);
  color: var(--hero-blue-600);
  font-weight: 700; font-size: 13.5px;
  margin-bottom: 24px;
}
.hero-badge-pill svg { width: 15px; height: 15px; stroke: var(--hero-blue-600); flex-shrink: 0; }

.hero-eyebrow-lg {
  font-family: 'Manrope', var(--font-en), sans-serif;
  font-weight: 800; font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--hero-blue-600);
  margin: 0 0 16px;
}
html[lang="ar"] .hero-eyebrow-lg { font-family: var(--font-ar); letter-spacing: 0; }

.hero-h1 {
  font-family: 'Manrope', var(--font-en), sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5.4vw, 62px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--hero-navy-950);
  margin: 0 0 24px;
}
html[lang="ar"] .hero-h1 { font-family: var(--font-ar); letter-spacing: 0; }
.hero-accent {
  background: linear-gradient(120deg, var(--hero-blue-500), var(--hero-navy-700));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lede {
  font-size: 18.5px; line-height: 1.66;
  color: var(--hero-slate-500);
  max-width: 660px;
  margin: 0 auto 38px;
}

.hero-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: -14px 0 36px; }
.hero-cta-row .btn-primary {
  background: linear-gradient(135deg, var(--hero-blue-500), var(--hero-navy-700));
  box-shadow: 0 12px 28px -10px rgba(29,63,120,.6);
}
.hero-cta-row .btn-primary:hover { background: linear-gradient(135deg, var(--hero-blue-500), var(--hero-navy-700)); box-shadow: 0 16px 34px -8px rgba(29,63,120,.7); }
.hero-cta-row .btn-secondary {
  background: rgba(255,255,255,.85);
  color: var(--hero-navy-950);
  border-color: #dfe7f3;
  backdrop-filter: blur(4px);
}
.hero-cta-row .btn-secondary:hover { background: #fff; border-color: #c7d5ea; }

.hero-checks { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 14px; column-gap: 30px; }
.hero-check-item { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: var(--hero-navy-800); }
.hero-check-item svg { width: 16px; height: 16px; stroke: var(--hero-green-600); flex-shrink: 0; }

@media (max-width: 640px) {
  .hero { padding: 52px 0 48px; }
  .hero-ecg { height: 150px; bottom: 8%; }
  .hero-badge-pill { margin-bottom: 16px; padding: 7px 14px; }
  .hero-eyebrow-lg { margin-bottom: 10px; }
  .hero-h1 { font-size: clamp(28px, 8vw, 40px); margin-bottom: 14px; }
  .hero-lede { font-size: 16.5px; line-height: 1.55; margin-bottom: 22px; }
  .hero-cta-row { margin: 0 0 22px; }
  .hero-cta-row .btn { width: 100%; }
}

/* Arabic hero: slightly more generous line-height and spacing — Arabic
   script needs more vertical room, and gradient-clipped text (.hero-accent)
   can visually clip descenders if the line is too tight. */
html[lang="ar"] .hero-h1 { line-height: 1.4; }
html[lang="ar"] .hero-accent { display: inline-block; padding-bottom: 0.08em; }
html[lang="ar"] .hero-eyebrow-lg { font-size: 14px; margin-bottom: 18px; }
html[lang="ar"] .hero-lede { line-height: 1.9; }
html[lang="ar"] .hero-badge-pill { margin-bottom: 20px; }

/* ---------- Cards grid (Why PureMed) ---------- */
.cards-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }
/* 9 cards in a 2-column grid leaves the last one alone in its own row —
   span it across both columns so that row doesn't look unbalanced. Only
   applies at the 2-column breakpoint; single-column and 3-column (exact
   multiple of 9) layouts don't have this problem. */
@media (min-width: 640px) and (max-width: 979px) {
  .cards-grid .card:last-child { grid-column: 1 / -1; }
}

.card {
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--blue-tint);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-muted); font-size: 15px; }

/* ---------- Challenges (comparison cards) ---------- */
.challenge-list { display: flex; flex-direction: column; gap: 14px; }
.challenge-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}
@media (max-width: 720px) {
  .challenge-row { grid-template-columns: 1fr; gap: 10px; text-align: start; }
  .challenge-arrow { transform: rotate(90deg); justify-self: center; }
}
.challenge-problem { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; font-size: 15.5px; }
.challenge-problem .dot { width: 8px; height: 8px; border-radius: 50%; background: #D64545; flex-shrink: 0; }
.challenge-solution { display: flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 600; font-size: 15.5px; }
.challenge-solution .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.challenge-arrow { display: flex; align-items: center; justify-content: center; color: var(--ink-faint); flex-shrink: 0; }
.challenge-arrow svg { width: 20px; height: 20px; display: block; }
/* This flip is only correct for the desktop side-by-side layout, where the
   arrow runs horizontally from problem to solution. On mobile the layout
   stacks vertically and the arrow is rotated to point straight down instead
   — flipping it there would combine with the rotation and point it up. */
@media (min-width: 721px) {
  html[dir="rtl"] .challenge-arrow svg { transform: scaleX(-1); }
}

/* ---------- Research Journey (signature timeline) ---------- */
.journey-track { position: relative; margin-top: 16px; }
.journey-line {
  position: absolute;
  inset-inline-start: 19px;
  top: 8px; bottom: 8px;
  width: 2px;
  background: var(--gray-line);
}
.journey-steps { display: flex; flex-direction: column; gap: 0; position: relative; }
.journey-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 20px;
  padding: 16px 0;
  align-items: center;
}
.journey-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  z-index: 1;
  transition: background .3s, color .3s;
}
.journey-step.done .journey-num { background: var(--blue); color: #fff; }
.journey-label {
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-weight: 600;
  color: var(--navy);
  font-size: 15.5px;
}
@media (min-width: 860px) {
  .journey-steps { display: grid; grid-template-columns: repeat(11, 1fr); gap: 0; }
  .journey-line { inset-inline-start: 5%; inset-inline-end: 5%; top: 20px; bottom: auto; height: 2px; width: auto; }
  .journey-step { grid-template-columns: 1fr; justify-items: center; gap: 12px; text-align: center; padding: 0; }
  .journey-label { font-size: 12.5px; padding: 10px 8px; min-height: 54px; display: flex; align-items: center; justify-content: center; }
}

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card {
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.service-card:hover { border-color: transparent; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service-card-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--blue-tint);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.service-card-icon svg { width: 19px; height: 19px; }
.service-card h3 { font-size: 16.5px; margin-bottom: 6px; }
.service-card p { font-size: 14px; color: var(--ink-muted); }

/* ---------- Process ---------- */
.process-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .process-grid { grid-template-columns: repeat(4, 1fr); } }
.process-card {
  position: relative;
  padding: 26px 24px 24px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--gray-line);
}
.process-index { font-size: 13px; font-weight: 700; color: var(--blue); letter-spacing: 0.05em; margin-bottom: 10px; }
.process-card p { color: var(--ink-muted); font-size: 14.5px; margin-top: 6px; }

/* ---------- Testimonials: real feedback screenshot gallery ---------- */
.testi-gallery { columns: 1; column-gap: 20px; }
@media (min-width: 640px) { .testi-gallery { columns: 2; } }
@media (min-width: 980px) { .testi-gallery { columns: 3; } }
.testi-shot {
  margin: 0 0 20px;
  break-inside: avoid;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-line);
  box-shadow: var(--shadow-sm);
  background: #fff;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.testi-shot:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testi-shot img { display: block; width: 100%; height: auto; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.faq-item { border: 1px solid var(--gray-line); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  text-align: start;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--navy);
}
.faq-q svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .3s var(--ease); color: var(--blue); }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); padding: 0 24px; }
.faq-a-inner { padding-bottom: 20px; color: var(--ink-muted); font-size: 15px; line-height: 1.7; }
.faq-item.open .faq-a { max-height: 300px; }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-cta h2 { color: #fff; margin-bottom: 14px; }
.final-cta p { color: rgba(255,255,255,0.78); font-size: 17px; max-width: 560px; margin: 0 auto 32px; }

/* ---------- Blog ---------- */
.blog-note { text-align: center; color: var(--ink-faint); font-size: 13.5px; margin-top: 28px; }
.blog-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 780px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }
.blog-card {
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.blog-thumb { height: 160px; background: linear-gradient(135deg, var(--navy), var(--blue)); display: flex; align-items: center; justify-content: center; }
.blog-thumb svg { width: 34px; height: 34px; color: rgba(255,255,255,0.85); }
.blog-body { padding: 22px 22px 24px; }
.blog-tag { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.04em; }
html[lang="ar"] .blog-tag { letter-spacing: 0; }
.blog-body h3 { margin: 10px 0 8px; }
.blog-body p { color: var(--ink-muted); font-size: 14.5px; margin-bottom: 16px; }
.blog-link { font-weight: 600; font-size: 14px; color: var(--navy); display: inline-flex; align-items: center; gap: 6px; }
.blog-link svg { width: 15px; height: 15px; transition: transform .2s; }
html[dir="rtl"] .blog-link svg { transform: scaleX(-1); }

/* ---------- Consultation Form ---------- */
.consult-wrap {
  display: grid;
  gap: 40px;
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}
@media (min-width: 900px) { .consult-wrap { grid-template-columns: 0.9fr 1.1fr; padding: 48px; } }
.consult-info h2 { margin-bottom: 14px; }
.consult-info p { color: var(--ink-muted); margin-bottom: 24px; }
.consult-points { display: flex; flex-direction: column; gap: 14px; }
.consult-point { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14.5px; color: var(--navy-soft); }
.consult-point svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; }

.calendly-panel { display: flex; flex-direction: column; min-height: 100%; }
.calendly-panel .eyebrow { display: block; margin-bottom: 8px; }
.calendly-panel-note { color: var(--ink-muted); font-size: 14.5px; margin-bottom: 18px; }
.calendly-inline-widget {
  flex: 1;
  min-width: 280px;
  min-height: 640px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-line);
}
@media (max-width: 560px) { .calendly-inline-widget { min-height: 720px; } }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255,255,255,0.75); padding: 72px 0 32px; }
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand-mark { margin-bottom: 16px; }
.footer-brand-mark img { height: 34px; filter: brightness(0) invert(1); }
.footer-brand-mark .brand-name-main { font-size: 18px; color: #fff; }
.footer-brand-mark .brand-name-sub { color: rgba(255,255,255,0.65); }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 280px; }
.footer h4 { color: #fff; font-size: 14px; margin-bottom: 18px; }
.footer ul { display: flex; flex-direction: column; gap: 12px; }
.footer ul a, .footer ul span { font-size: 14px; transition: color .2s; }
.footer ul a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  font-size: 13px;
}
.footer-lang { display: flex; gap: 2px; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 3px; }
.footer-lang button, .footer-lang a { background: transparent; border: none; color: rgba(255,255,255,0.7); padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.footer-lang button.active, .footer-lang a.active { background: rgba(255,255,255,0.14); color: #fff; }

/* ---------- Skip link / a11y ---------- */
.skip-link {
  position: fixed;
  inset-inline-start: 12px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  z-index: 999;
  border-radius: 0 0 8px 8px;
  transform: translateY(-120%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; }

/* ---------- Reveal on scroll ----------
   Previously: content started invisible and faded/slid in as it entered
   the viewport. Removed — on longer pages (especially the homepage, ~70
   animated elements) this made scrolling feel like content was "loading
   in pieces," which was worse than just showing everything immediately,
   particularly on mobile. Content is now visible right away; the .in
   class is still added by JS for compatibility but no longer does
   anything visually. */
.reveal { opacity: 1; transform: none; }
.reveal.in { opacity: 1; transform: none; }

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

/* ---------- RTL specific tweaks ---------- */
html[dir="rtl"] .journey-num { direction: ltr; }
html[dir="rtl"] .card-icon svg { transform: scaleX(-1); }

/* ---------- Trust Signals ---------- */
.trust-signals { padding: 56px 0 88px; }
.center-eyebrow { display: block; text-align: center; margin-bottom: 20px; }
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 32px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-soft);
}
.trust-item svg { width: 17px; height: 17px; color: var(--success); flex-shrink: 0; }

/* ---------- Booking section / glass card ---------- */
.booking-section { position: relative; }
.glass-card {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.6);
}

/* ---------- Contact card (WhatsApp / Facebook / Instagram) ---------- */
.contact-card {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-line);
}
.contact-card h3 { font-size: 18px; margin: 4px 0 8px; }
.contact-card p { color: var(--ink-muted); font-size: 14.5px; margin-bottom: 18px; }
.contact-social { display: flex; flex-direction: column; gap: 10px; }
.contact-social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.contact-social-link:hover { border-color: transparent; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.contact-social-link span:last-child { display: flex; flex-direction: column; }
.contact-social-link span:last-child > span { font-weight: 700; font-size: 14px; color: var(--navy); }
.contact-social-link small { font-size: 12.5px; color: var(--ink-muted); }
.contact-social-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-social-icon svg { width: 18px; height: 18px; }
.contact-social-icon.whatsapp { background: #e7f9ee; color: #25d366; }
.contact-social-icon.facebook { background: var(--blue-tint); color: #1877f2; }
.contact-social-icon.instagram { background: #fdeef4; color: #d6249f; }

/* ---------- Footer social icons ---------- */
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8);
  transition: background .2s, color .2s, border-color .2s;
}
.footer-social a svg { width: 17px; height: 17px; }
.footer-social a:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.35); }

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  inset-inline-end: 28px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(37,211,102,0.4);
  transition: transform .25s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.06); }
.whatsapp-float svg { width: 28px; height: 28px; position: relative; z-index: 1; }
.whatsapp-float-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  animation: whatsappPulse 2.4s ease-out infinite;
}
@keyframes whatsappPulse {
  0% { transform: scale(1); opacity: .55; }
  100% { transform: scale(1.9); opacity: 0; }
}
.whatsapp-float-tip {
  position: absolute;
  inset-inline-end: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.whatsapp-float:hover .whatsapp-float-tip { opacity: 1; visibility: visible; }
@media (max-width: 640px) { .whatsapp-float-tip { display: none; } }
@media (max-width: 900px) { .whatsapp-float { bottom: 92px; } }

/* ---------- Mobile sticky action bar ---------- */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.96);
  border-top: 1px solid var(--gray-line);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 28px rgba(11,37,69,0.12);
}
@media (max-width: 900px) { .mobile-bar { display: flex; } }
.mobile-bar-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 58px;
  border-radius: 999px;
  background: #e7f9ee;
  color: #1a9e50;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.mobile-bar-whatsapp svg { width: 22px; height: 22px; }
.mobile-bar-whatsapp span { display: none; }
.mobile-bar-book {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  box-shadow: 0 8px 20px rgba(27,95,168,0.3);
}
@media (max-width: 900px) { .final-cta, .booking-section, .footer { scroll-margin-bottom: 90px; } }
@media (max-width: 900px) { body { padding-bottom: 82px; } }

/* ---------- page-level fade transition (homepage ↔ Knowledge Center articles) ---------- */
body.pm-fade { opacity: 0; animation: pmFadeIn .35s var(--ease) forwards; }
@keyframes pmFadeIn { to { opacity: 1; } }
body.pm-leaving { opacity: 0; transition: opacity .18s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  body.pm-fade { animation: none; opacity: 1; }
  body.pm-leaving { transition: none; }
}

/* ---------- Knowledge Center: "coming soon" cards ---------- */
.blog-card.is-soon { opacity: 0.55; }
.blog-card.is-soon .blog-thumb { background: var(--gray-soft); color: var(--ink-faint); }
.is-soon-link {
  display: inline-flex; align-items: center;
  font-size: 12.5px; font-weight: 700;
  color: var(--ink-faint);
  border: 1px dashed var(--gray-line);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: default;
}

/* Knowledge Center: show only the first 3 cards until "Load More" is pressed —
   fewer choices up front reads calmer, and the 3 shown are always live,
   clickable articles (extras are ordered live-first in the markup). */
.blog-card.is-extra { display: none; }
.blog-grid.is-expanded .blog-card.is-extra { display: block; }
.blog-load-more-wrap { display: flex; justify-content: center; margin-top: 32px; }
#blogLoadMore[hidden] { display: none; }

