/* ── Google Fonts ───────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;600;700;800&family=Inter:wght@400;500;600;700&family=Cairo:wght@400;500;600;700&display=swap');

/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
  --primary:        #005f6a;
  --primary-dark:   #004d56;
  --primary-light:  #f0f7f8;
  --bg:             #f7f9fb;
  --surface:        #ffffff;
  --border:         #e2e8e0;
  --text:           #191c1e;
  --text-secondary: #6e797b;
  --text-muted:     #bdc8cb;
  --radius:         4px;
  --radius-lg:      8px;
  --font-header:    'Public Sans', sans-serif;
  --font-body:      'Inter', sans-serif;
  --font-arabic:    'Cairo', sans-serif;
  --shadow-popover: 0 4px 12px rgba(0,0,0,0.08);
  --content-max:    1200px;
}

/* ── Reset ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Arabic body — mirror of frontend/src/styles.css [dir="rtl"] rules */
[dir="rtl"] body {
  font-family: var(--font-arabic);
  line-height: 1.8;
}

[dir="rtl"] body *:not([class*="pi"]):not([class*="fa"]):not(i) {
  font-family: var(--font-arabic) !important;
}

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

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-header);
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 40px;
}

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

.section-wrap {
  padding: 64px 24px;
}

.section-wrap-white {
  padding: 64px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-ghost {
  display: inline-block;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ── NAV ─────────────────────────────────────────────────────────────────────── */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__logo {
  font-family: var(--font-header);
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__links {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.nav__links a:hover { color: var(--text); }

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

.lang-pill {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
}
.lang-pill a {
  padding: 5px 12px;
  color: var(--text-secondary);
  transition: background 0.1s, color 0.1s;
}
.lang-pill a.active {
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
}

.nav__login {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.nav__login:hover { color: var(--text); }

.nav__cta {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.nav__cta:hover { background: var(--primary-dark); }

/* ── HERO ───────────────────────────────────────────────────────────── */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px 64px;
  overflow: hidden;
}

.hero-split {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero__eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero__title {
  font-family: var(--font-header);
  font-size: 56px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero__sub {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero__note {
  font-size: 12px;
  color: var(--text-muted);
}

.hero__visual { position: relative; }

/* ── HOW IT WORKS ────────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
}

.step__num {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.step h3 {
  font-family: var(--font-header);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── FEATURES ────────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: var(--content-max);
  margin: 0 auto;
}

.feat-card {
  background: var(--surface);
  padding: 32px 28px;
}

.feat-card__icon { font-size: 24px; margin-bottom: 12px; }

.feat-card h3 {
  font-family: var(--font-header);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.feat-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.feat-card__tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 8px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif; /* keep EN tag font even in AR page */
}

/* ── STATS BAR ──────────────────────────────────────────────────────── */
.stats-bar { background: var(--primary); }

.stats-bar__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stats-bar__item {
  padding: 28px 20px;
  text-align: center;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.18);
}
.stats-bar__item:last-child { border-inline-end: none; }

.stats-bar__num {
  font-family: var(--font-header);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.stats-bar__lbl {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
}

/* ── PLANS ───────────────────────────────────────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.plan-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.plan-card--popular {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), 0 8px 32px rgba(0, 95, 106, 0.14);
}

.plan-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.06em;
}

.plan-card__tier {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}

.plan-card__name {
  font-family: var(--font-header);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.plan-card__desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.plan-card__price-note {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.5;
}

.plan-card__cta {
  display: block;
  text-align: center;
  padding: 9px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.plan-card__cta--primary { background: var(--primary); color: #fff; }
.plan-card__cta--primary:hover { background: var(--primary-dark); }
.plan-card__cta--ghost { border: 1.5px solid var(--primary); color: var(--primary); }
.plan-card__cta--ghost:hover { background: var(--primary-light); }

.plan-card__features {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.plan-card__features li {
  font-size: 12px;
  color: var(--text);
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.plan-card__features li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item__q {
  width: 100%;
  background: none;
  border: none;
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: inherit;
  font-family: inherit;
  line-height: 1.5;
}

.faq-item__icon {
  font-size: 20px;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s;
  margin-inline-start: 12px;
}

.faq-item.open .faq-item__icon { transform: rotate(45deg); }

.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 0 16px;
}
.faq-item.open .faq-item__a {
  max-height: 600px;
  padding: 0 16px 16px;
}

/* ── CTA BANNER ─────────────────────────────────────────────────────── */
.cta-banner {
  background: #003d47;
  padding: 80px 24px;
  text-align: center;
}
.cta-banner h2 {
  font-family: var(--font-header);
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.25;
}
.cta-banner p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 28px;
}
.cta-banner .btn-primary {
  background: #fff;
  color: #003d47;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 36px;
}
.cta-banner .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
}
.cta-banner__email {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 14px;
}

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__logo {
  font-family: var(--font-header);
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.footer__links {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.footer__links a:hover { color: var(--text); }

.footer__bottom {
  max-width: var(--content-max);
  margin: 16px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── CLINIC WORKFLOW SECTION ────────────────────────────────────────── */
.clinic-section {
  padding: 80px 24px 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.clinic-section__eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.clinic-section__title {
  font-family: var(--font-header);
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
  max-width: 700px;
  margin-inline: auto;
}
.clinic-section__sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 48px;
  line-height: 1.7;
}

/* Split-screen workflow illustration */
.clinic-split {
  max-width: 1100px;
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.06);
}
.clinic-pane {
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.clinic-pane--reception {
  border-inline-end: 2px solid var(--primary);
  background: #f8fbfb;
}
.clinic-pane__bar {
  background: #1a2f33;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.clinic-pane__bar-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}
.clinic-pane__bar-dot--red    { background: #ff5f57; }
.clinic-pane__bar-dot--yellow { background: #ffbd2e; }
.clinic-pane__bar-dot--green  { background: #28c940; }
.clinic-pane__bar-title {
  font-size: 9px;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  letter-spacing: 0.08em;
  flex: 1;
  text-align: center;
}
.clinic-pane__body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Reception pane content */
.clinic-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.clinic-queue-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}
.clinic-queue-badge {
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 8px;
}
.clinic-patient-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.clinic-patient-row--active {
  border-color: var(--primary);
  background: #e8f4f5;
}
.clinic-patient-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 1.5px solid var(--primary);
  font-size: 9px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.clinic-patient-info {
  flex: 1;
}
.clinic-patient-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
}
.clinic-patient-meta {
  font-size: 8px;
  color: var(--text-secondary);
}
.clinic-patient-status {
  font-size: 8px;
  font-weight: 600;
  border-radius: 20px;
  padding: 2px 7px;
}
.clinic-patient-status--waiting  { background: #fff3cd; color: #856404; }
.clinic-patient-status--active   { background: #d1ecf1; color: #0c5460; }
.clinic-patient-status--done     { background: #d4edda; color: #155724; }

/* Doctor pane content */
.clinic-vitals-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 4px;
}
.clinic-vital {
  background: #f8fbfb;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 4px;
  text-align: center;
}
.clinic-vital__val {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}
.clinic-vital__lbl {
  font-size: 8px;
  color: var(--text-secondary);
}
.clinic-notes-area {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px;
  font-size: 9px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  min-height: 60px;
}
.clinic-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 9px;
  color: var(--primary);
  font-weight: 600;
}
.clinic-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: mic-pulse 1.4s ease-out infinite;
}

/* Feature carousel */
.feat-carousel {
  max-width: 1000px;
  margin: 0 auto;
}
.feat-carousel__slides {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.feat-carousel__slide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px 48px;
  align-items: center;
  text-align: start;
  position: absolute;
  inset: 0;
  visibility: hidden;
}
.feat-carousel__slide.active {
  visibility: visible;
  position: relative;
}
.feat-carousel__visual { position: relative; }
.feat-carousel__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feat-carousel__tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(0,95,106,0.18);
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  align-self: flex-start;
}
.feat-carousel__title {
  font-family: var(--font-header);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.feat-carousel__body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
}
.feat-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.feat-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.feat-carousel__dot.active {
  background: var(--primary);
  transform: scale(1.25);
}

/* Carousel slide animations */
@keyframes feat-slide-enter-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes feat-slide-enter-left {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
@keyframes feat-slide-exit-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
@keyframes feat-slide-exit-right {
  from { transform: translateX(0); }
  to   { transform: translateX(100%); }
}

.feat-carousel__slide--enter-right {
  visibility: visible !important;
  z-index: 2;
  animation: feat-slide-enter-right 350ms ease-in-out both;
}
.feat-carousel__slide--enter-left {
  visibility: visible !important;
  z-index: 2;
  animation: feat-slide-enter-left 350ms ease-in-out both;
}
.feat-carousel__slide--exit-left {
  visibility: visible !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1;
  animation: feat-slide-exit-left 350ms ease-in-out both;
}
.feat-carousel__slide--exit-right {
  visibility: visible !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1;
  animation: feat-slide-exit-right 350ms ease-in-out both;
}

/* Mockup: Queue view (used in carousel) */
.mck-queue-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mck-queue-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.mck-queue-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  min-width: 16px;
}
.mck-queue-name {
  flex: 1;
  font-size: 9px;
  color: var(--text);
  font-weight: 500;
}
.mck-queue-status {
  font-size: 8px;
  border-radius: 20px;
  padding: 2px 6px;
  font-weight: 600;
}
.mck-queue-status--wait { background: #fff3cd; color: #856404; }
.mck-queue-status--now  { background: var(--primary); color: #fff; }
.mck-queue-status--done { background: #d4edda; color: #155724; }

/* ── FEATURE ALTERNATING ROWS ──────────────────────────────────────── */
.feat-sections { border-top: 1px solid var(--border); }

.feat-section {
  padding: 80px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.feat-section:nth-child(even) { background: var(--primary-light); }

.feat-row {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "visual text";
  gap: 56px;
  align-items: center;
}
/* RTL: text on right (start), visual on left (end) */
[dir="rtl"] .feat-row                { grid-template-areas: "text visual"; }
/* Flip: swap sides */
.feat-row--flip                       { grid-template-areas: "text visual"; }
[dir="rtl"] .feat-row--flip           { grid-template-areas: "visual text"; }

.feat-row__visual { grid-area: visual; }
.feat-row__text   { grid-area: text; display: flex; flex-direction: column; gap: 12px; }

.feat-row__title {
  font-family: var(--font-header);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.feat-row__body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}
.feat-row__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  transition: gap 0.15s;
}
.feat-row__cta:hover { gap: 10px; }

/* ── APP FRAME ─────────────────────────────────────────────────────── */
.app-frame {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f0f7f8;
}
.app-frame__bar {
  background: #1a2f33;
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
  flex-shrink: 0;
}
.app-frame__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.app-frame__dot--red    { background: #ff5f57; }
.app-frame__dot--yellow { background: #ffbd2e; }
.app-frame__dot--green  { background: #28c940; }
.app-frame__url {
  flex: 1;
  height: 16px;
  background: #2a4044;
  border-radius: 4px;
  margin: 0 8px;
}
.app-frame__body {
  background: #f0f7f8;
  min-height: 280px;
  display: flex;
}

/* ── MOCKUP SHARED COMPONENTS ───────────────────────────────────────── */
.mck-sidebar {
  width: 68px;
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.mck-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  border-radius: 50%;
  border: 2px solid var(--primary);
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
}
.mck-nav-item {
  height: 28px;
  border-radius: var(--radius);
  background: var(--bg);
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 8px;
  color: var(--text-secondary);
  overflow: hidden;
}
.mck-nav-item--active {
  background: var(--primary);
  color: #fff;
}

.mck-main {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.mck-heading {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── MOCKUP: PRESCRIPTION ───────────────────────────────────────────── */
.mck-drug-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mck-drug-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mck-drug-dot--1 { background: #005f6a; }
.mck-drug-dot--2 { background: #2196a0; }
.mck-drug-dot--3 { background: #7ec8cc; }
.mck-drug-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mck-drug-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mck-drug-dose {
  font-size: 9px;
  color: var(--text-secondary);
}
.mck-btn-add {
  height: 28px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-secondary);
}
.mck-btn-primary {
  height: 32px;
  background: var(--primary);
  border-radius: var(--radius);
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
}

/* ── MOCKUP: AI SCRIBE ──────────────────────────────────────────────── */
.mck-mic-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.mck-mic-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  position: relative;
}
.mck-mic-btn::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(0, 95, 106, 0.35);
  animation: mic-pulse 1.6s ease-out infinite;
}
@keyframes mic-pulse {
  0%   { transform: scale(1);   opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
.mck-recording-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--primary);
}
.mck-text-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mck-text-line {
  font-size: 9px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mck-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mck-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1.5px solid var(--primary);
  border-radius: 20px;
  background: var(--primary-light);
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.7;
}

/* ── MOCKUP: FINANCIAL DASHBOARD ────────────────────────────────────── */
.mck-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.mck-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
}
.mck-stat-num-bar {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 2px;
}
.mck-stat-lbl-bar {
  font-size: 8px;
  color: var(--text-secondary);
}
.mck-chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px 8px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 90px;
}
.mck-bar {
  flex: 1;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}
.mck-bar:nth-child(1) { height: 45%; opacity: 0.6; }
.mck-bar:nth-child(2) { height: 65%; opacity: 0.75; }
.mck-bar:nth-child(3) { height: 55%; opacity: 0.65; }
.mck-bar:nth-child(4) { height: 80%; opacity: 0.85; }
.mck-bar:nth-child(5) { height: 70%; opacity: 0.9; }
.mck-bar:nth-child(6) { height: 92%; opacity: 1; }

/* ── ANIMATIONS ─────────────────────────────────────────────────────── */

/* Hero: fires on page load via CSS animation (no JS) */
.hero__text {
  animation: slide-from-right 0.5s ease-out both;
  animation-delay: 0.1s;
}
.hero__visual {
  animation: slide-from-left 0.5s ease-out both;
  animation-delay: 0.25s;
}
[dir="ltr"] .hero__text  { animation-name: slide-from-left; }
[dir="ltr"] .hero__visual { animation-name: slide-from-right; }

@keyframes slide-from-right {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: none; }
}
@keyframes slide-from-left {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* Scroll-reveal: JS adds .reveal--visible via IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  transition-delay: calc(var(--stagger, 0) * 80ms);
}
.reveal--from-right { transform: translateX(40px); }
.reveal--from-left  { transform: translateX(-40px); }
.reveal--visible {
  opacity: 1 !important;
  transform: none !important;
}

/* Nav scrolled state */
.nav--scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal--from-right,
  .reveal--from-left {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero__text,
  .hero__visual {
    animation: none !important;
  }
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-split {
    grid-template-columns: 1fr;
  }
  .hero__visual { display: none; }
  .hero__title  { font-size: 44px; }
  .hero__text   { text-align: center; }
  .hero__cta    { justify-content: center; }

  .feat-row,
  [dir="rtl"] .feat-row,
  .feat-row--flip,
  [dir="rtl"] .feat-row--flip {
    grid-template-columns: 1fr;
    grid-template-areas: "text" "visual";
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .plans-grid { grid-template-columns: 1fr 1fr; }
  .nav__links { display: none; }
  /* P1 fix: hide login link — it overflows the nav at this width */
  .nav__login { display: none; }
  .footer__inner { flex-direction: column; gap: 12px; }
  .footer__links { gap: 12px; }

  /* P2 fix: reduce section vertical padding throughout */
  .section-wrap,
  .section-wrap-white { padding: 40px 20px; }
  .section            { padding: 40px 20px; }
  .section-title      { font-size: 24px; margin-bottom: 24px; }
  .clinic-section            { padding: 40px 20px; }
  .clinic-section__title     { font-size: 26px; }
  .clinic-section__sub       { font-size: 14px; margin-bottom: 28px; }

  /* P2 fix: hero — reduce excessive top/bottom padding */
  .hero { padding: 48px 20px 40px; }

  /* Hero split → single column, app-frame hidden on mobile */
  .hero-split {
    grid-template-columns: 1fr;
  }
  .hero__visual {
    display: none;
  }
  .hero__title { font-size: 36px; }
  .hero__text { text-align: center; }
  .hero__cta { justify-content: center; }

  /* Feature rows → single column, visual stacks below text */
  .feat-row,
  [dir="rtl"] .feat-row,
  .feat-row--flip,
  [dir="rtl"] .feat-row--flip {
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "visual";
    gap: 24px;
  }
  .feat-section        { padding: 40px 20px; }
  .feat-row__title     { font-size: 22px; }

  /* P3 fix: feature cards — reduce padding on single-column mobile layout */
  .feat-card { padding: 20px 16px; }

  /* P1 fix: clinic split — stack panes vertically */
  .clinic-split {
    grid-template-columns: 1fr;
    border-radius: 8px;
  }
  .clinic-pane--reception {
    border-inline-end: none;
    border-bottom: 2px solid var(--primary);
  }

  /* P2 fix: carousel — single column, reduce padding */
  .feat-carousel__slide {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 20px;
  }
  .feat-carousel__visual { display: none; }

  /* Stats bar → 2×2 grid */
  .stats-bar__inner {
    grid-template-columns: 1fr 1fr;
  }
  .stats-bar__item:nth-child(2) { border-inline-end: none; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .plans-grid    { grid-template-columns: 1fr; }
  .hero__cta     { flex-direction: column; }

  /* Stats bar → single column on very small screens */
  .stats-bar__inner { grid-template-columns: 1fr; }
  .stats-bar__item  { border-inline-end: none; border-bottom: 1px solid rgba(255,255,255,0.18); }
  .stats-bar__item:last-child { border-bottom: none; }

  /* Hero split */
  .hero__title { font-size: 30px; }
}
