/* ============================================================
   QFamily — Global Fertility Platform
   Shared stylesheet (Arabic RTL-first, English LTR via [dir="ltr"])
   Brand: maroon #801030
   ============================================================ */

:root {
  --brand: #801030;
  --brand-dark: #5f0c24;
  --brand-light: #a41c46;
  --tint: #fdf4f7;
  --tint-2: #faf0f3;
  --ink: #1f2430;
  --muted: #5c6472;
  --line: #eee3e8;
  --white: #ffffff;
  --gold: #e8a33d;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(128, 16, 48, 0.08);
  --shadow-lg: 0 20px 50px rgba(128, 16, 48, 0.14);
  --font: "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: min(1180px, 92%);
  margin-inline: auto;
}

.section { padding: 88px 0; }
.section.tinted { background: var(--tint); }

/* ---------- Headings ---------- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-head .eyebrow {
  display: inline-block;
  background: var(--tint-2);
  color: var(--brand);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; line-height: 1.35; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 30px;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(128, 16, 48, 0.28);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}
.btn-outline:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.btn-outline.added { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-white { background: #fff; color: var(--brand); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.18); }
.btn-sm { padding: 9px 22px; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(31, 36, 48, 0.08); border-color: var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}
.brand img { height: 44px; width: auto; }
.main-nav ul { display: flex; align-items: center; gap: 18px; }
.main-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--brand); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.88rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.lang-toggle:hover { border-color: var(--brand); color: var(--brand); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  position: relative;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  margin: 5px auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--tint) 0%, #fff 65%);
  padding: 80px 0 90px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 7px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.hero-badge .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(128,16,48,0.35); }
  50% { box-shadow: 0 0 0 7px rgba(128,16,48,0); }
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; line-height: 1.3; }
.hero h1 .accent { color: var(--brand); }
.hero-lead { color: var(--muted); font-size: 1.13rem; margin: 20px 0 30px; max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 32px; }
.trust-list { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.trust-list li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.check-icon {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--tint-2);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

/* Hero visual: central case card + orbiting chips */
.hero-visual { position: relative; display: flex; justify-content: center; }
.orbit-wrap { position: relative; width: 440px; max-width: 100%; aspect-ratio: 1; }
.orbit-ring {
  position: absolute; inset: 8%;
  border: 1.5px dashed rgba(128, 16, 48, 0.25);
  border-radius: 50%;
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.case-card {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px 28px;
  width: 240px;
  text-align: center;
  z-index: 2;
}
.case-card .case-icon {
  width: 58px; height: 58px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.case-card h3 { font-size: 1.1rem; font-weight: 800; }
.case-card p { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.case-card .case-tag {
  display: inline-block;
  margin-top: 12px;
  background: var(--tint-2);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
}
.orbit-chip {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  z-index: 3;
  animation: float 5s ease-in-out infinite;
}
.orbit-chip svg { color: var(--brand); flex: 0 0 auto; }
.orbit-chip:nth-child(odd) { animation-delay: 1.2s; }
.orbit-chip:nth-child(3n) { animation-delay: 2.4s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.oc-1 { top: 3%;  inset-inline-start: 30%; }
.oc-2 { top: 24%; inset-inline-end: -2%; }
.oc-3 { bottom: 26%; inset-inline-end: 1%; }
.oc-4 { bottom: 4%; inset-inline-start: 32%; }
.oc-5 { bottom: 24%; inset-inline-start: -2%; }
.oc-6 { top: 26%; inset-inline-start: 0; }

/* ---------- Stats strip ---------- */
.stats-strip { background: var(--brand); color: #fff; padding: 46px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat .stat-num { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; line-height: 1.1; }
.stat .stat-num .plus { color: var(--gold); }
.stat p { color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; margin-top: 6px; }
.stat + .stat { border-inline-start: 1px solid rgba(255,255,255,0.16); }

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card .card-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: var(--tint-2);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.96rem; }
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 700;
  font-size: 0.95rem;
}
.card .card-link:hover { gap: 10px; }
.card .card-link { transition: gap 0.2s ease; }
[dir="ltr"] .flip-ltr { transform: scaleX(-1); }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.why-copy .eyebrow {
  display: inline-block;
  background: var(--tint-2); color: var(--brand);
  border: 1px solid var(--line);
  font-weight: 700; font-size: 0.85rem;
  padding: 6px 18px; border-radius: 999px; margin-bottom: 14px;
}
.why-copy h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.35; }
.why-copy > p { color: var(--muted); margin: 16px 0 24px; }
.why-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0;
  font-weight: 600;
}
.why-list li small { display: block; color: var(--muted); font-weight: 500; }
.why-visual {
  background: linear-gradient(150deg, var(--brand), var(--brand-dark));
  border-radius: 26px;
  padding: 44px 38px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.why-visual::after {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  bottom: -90px;
  inset-inline-end: -70px;
}
.why-visual h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.why-visual > p { color: rgba(255,255,255,0.85); margin-bottom: 26px; }
.why-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; position: relative; z-index: 1; }
.why-feat {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  padding: 18px;
  backdrop-filter: blur(4px);
}
.why-feat svg { margin-bottom: 10px; }
.why-feat h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.why-feat p { font-size: 0.83rem; color: rgba(255,255,255,0.78); }

/* ---------- Steps ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 26px 30px;
  position: relative;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}
.step-card:hover { transform: translateY(-6px); }
.step-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 18px rgba(128,16,48,0.3);
}
.step-card h3 { font-size: 1.12rem; font-weight: 800; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Case Match responses ---------- */
.match-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 52px; align-items: center; }
.match-copy h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 800; line-height: 1.4; margin-bottom: 14px; }
.match-copy > p { color: var(--muted); margin-bottom: 20px; }
.match-feats { margin-bottom: 28px; }
.match-feats li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-weight: 600; }
.response-list { display: grid; gap: 16px; }
.response-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}
.response-card:hover { transform: translateY(-4px); }
.score-ring { position: relative; width: 64px; height: 64px; flex: 0 0 auto; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .score-val {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.92rem; color: var(--brand);
}
.response-info { flex: 1; }
.response-info h4 { font-size: 1.05rem; font-weight: 800; }
.response-info p { color: var(--muted); font-size: 0.85rem; }
.response-meta { text-align: center; }
.response-meta .meta-pill {
  display: block;
  background: var(--tint-2);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.response-meta span { font-size: 0.8rem; color: var(--muted); }
.sample-note { font-size: 0.8rem; color: var(--muted); margin-top: 14px; font-style: italic; }

/* ---------- QFamily 12 ---------- */
.qf12-specialties {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center;
  margin-top: 40px;
}
.spec-chip {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s ease;
}
.spec-chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

/* ---------- Experts ---------- */
.expert-card { display: flex; flex-direction: column; }
.expert-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 6px 16px rgba(128,16,48,0.25);
}
.expert-top h3 { font-size: 1.12rem; font-weight: 800; }
.expert-top .spec { color: var(--brand); font-size: 0.88rem; font-weight: 700; }
.expert-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 0.87rem; margin-bottom: 12px; }
.expert-meta span { display: inline-flex; align-items: center; gap: 5px; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 0.9rem; }
.stars .rate-num { color: var(--muted); font-weight: 700; letter-spacing: 0; margin-inline-start: 4px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.tag {
  background: var(--tint-2);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.expert-bio { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; flex: 1; }
.expert-actions { display: flex; gap: 10px; }
.expert-actions .btn { flex: 1; justify-content: center; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 44px; }
.filter-chip {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 22px;
  font-size: 0.92rem;
  font-weight: 700;
  transition: all 0.2s ease;
}
.filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Compare tray */
.compare-tray {
  position: fixed;
  bottom: 18px;
  inset-inline: 0;
  margin-inline: auto;
  width: min(560px, 92%);
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  z-index: 300;
  transform: translateY(140%);
  transition: transform 0.3s ease;
}
.compare-tray.visible { transform: translateY(0); }
.compare-tray .tray-count { font-weight: 800; white-space: nowrap; }
.compare-tray .tray-names { flex: 1; font-size: 0.82rem; color: rgba(255,255,255,0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.85rem;
}
.tray-clear { background: rgba(255,255,255,0.14); color: #fff; }
.tray-compare { background: var(--brand-light); color: #fff; }
.tray-btn:hover { filter: brightness(1.15); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 36, 48, 0.55);
  backdrop-filter: blur(3px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: #fff;
  border-radius: 22px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px 32px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--tint-2);
  color: var(--brand);
  font-size: 1.1rem;
  font-weight: 800;
}
.modal-close:hover { background: var(--brand); color: #fff; }
.modal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.modal-head h3 { font-size: 1.3rem; font-weight: 800; }
.modal-head .spec { color: var(--brand); font-weight: 700; font-size: 0.92rem; }
.modal-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.modal-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--tint-2); color: var(--brand);
  border-radius: 999px; padding: 7px 16px;
  font-size: 0.85rem; font-weight: 700;
}
.modal-box > p { color: var(--muted); font-size: 0.94rem; margin-bottom: 24px; }

/* ---------- Council builder ---------- */
.council-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.mini-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.mini-card:hover { transform: translateY(-3px); }
.mini-card.added { border-color: var(--brand); background: var(--tint); }
.mini-card .avatar { width: 54px; height: 54px; font-size: 1.05rem; }
.mini-info { flex: 1; }
.mini-info h3 { font-size: 1rem; font-weight: 800; }
.mini-info .spec { color: var(--brand); font-size: 0.82rem; font-weight: 700; }
.mini-info .loc { color: var(--muted); font-size: 0.8rem; }
.add-btn {
  border: 1.5px solid var(--brand);
  background: #fff;
  color: var(--brand);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.add-btn:hover { background: var(--brand); color: #fff; }
.add-btn.added { background: var(--brand); color: #fff; }
.mini-cards { display: grid; gap: 14px; }

.council-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 26px;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 96px;
}
.council-panel h3 { font-size: 1.2rem; font-weight: 800; }
.council-count { color: var(--brand); font-weight: 800; margin: 4px 0 4px; }
.council-hint { color: var(--muted); font-size: 0.85rem; margin-bottom: 18px; }
.seats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 18px; }
.seat {
  aspect-ratio: 1;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.25s ease;
}
.seat.filled {
  border: 1.5px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
}
.progress-wrap { margin-bottom: 18px; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.83rem; font-weight: 700; margin-bottom: 6px; }
.progress-bar { height: 10px; background: var(--tint-2); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.council-panel .btn { width: 100%; justify-content: center; }
.review-note {
  margin-top: 16px;
  background: var(--tint-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--muted);
}
.review-note strong { color: var(--brand); display: block; margin-bottom: 2px; }

/* ---------- Form wizard ---------- */
.wizard-wrap {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 40px 42px;
}
.prototype-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff8ec;
  border: 1px solid #f2dfb8;
  color: #8a6d1f;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 28px;
}
.wizard-steps { display: flex; align-items: center; margin-bottom: 36px; }
.wstep { display: flex; align-items: center; gap: 10px; flex: 1; }
.wstep .wnum {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  transition: all 0.25s ease;
}
.wstep .wlabel { font-size: 0.88rem; font-weight: 700; color: var(--muted); }
.wstep.active .wnum, .wstep.done .wnum { background: var(--brand); border-color: var(--brand); color: #fff; }
.wstep.active .wlabel, .wstep.done .wlabel { color: var(--brand); }
.wline { flex: 1; height: 2px; background: var(--line); margin: 0 12px; border-radius: 2px; }
.wline.done { background: var(--brand); }
.wizard-pane { display: none; }
.wizard-pane.active { display: block; animation: fadeUp 0.35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.pane-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: 0.92rem; }
.form-field input,
.form-field select,
.form-field textarea {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(128,16,48,0.08);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field .field-error { color: #c0392b; font-size: 0.8rem; font-weight: 600; display: none; }
.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea { border-color: #c0392b; }
.form-field.invalid .field-error { display: block; }
.upload-zone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--brand); background: var(--tint); }
.upload-zone svg { margin: 0 auto 10px; color: var(--brand); }
.upload-zone p { font-weight: 700; color: var(--ink); }
.upload-zone small { font-size: 0.82rem; }
.file-list { margin-top: 14px; display: grid; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.87rem;
  font-weight: 600;
}
.file-item button { border: none; background: none; color: #c0392b; font-weight: 800; margin-inline-start: auto; }
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.92rem;
  font-weight: 600;
}
.consent-row input { width: 19px; height: 19px; accent-color: var(--brand); margin-top: 3px; flex: 0 0 auto; }
.wizard-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; }

/* After-submit steps */
.next-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.next-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.next-step .ns-num {
  width: 42px; height: 42px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--tint-2);
  color: var(--brand);
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.next-step p { font-size: 0.9rem; font-weight: 700; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  border-radius: 28px;
  padding: 60px 48px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.cta-banner::before, .cta-banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.cta-banner::before { width: 220px; height: 220px; top: -90px; inset-inline-start: -60px; }
.cta-banner::after { width: 300px; height: 300px; bottom: -140px; inset-inline-end: -80px; }
.cta-banner h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.4; position: relative; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-top: 10px; position: relative; }
.cta-banner .btn { flex: 0 0 auto; position: relative; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  text-align: start;
}
.faq-q .faq-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--tint-2);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex: 0 0 auto;
  transition: transform 0.25s ease, background 0.25s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--brand); color: #fff; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-a p { padding: 0 24px 20px; color: var(--muted); font-size: 0.94rem; }

/* ---------- Footer ---------- */
.site-footer { background: #20121a; color: rgba(255,255,255,0.75); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand img { height: 42px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.92rem; max-width: 300px; }
.footer-col h4 { color: #fff; font-size: 1.02rem; font-weight: 800; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.75); font-size: 0.92rem; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }
.footer-col li span { font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.87rem;
}
.footer-bottom .tagline { color: rgba(255,255,255,0.55); font-style: italic; }

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  bottom: 24px;
  inset-inline-start: 24px;
  z-index: 500;
  display: grid;
  gap: 10px;
}
.toast {
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 13px 22px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease;
  max-width: 340px;
}
.toast.success { background: #1e7a4a; }
.toast::before { content: "✓"; font-weight: 800; }
.toast.hide { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(14px); } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(160deg, var(--tint) 0%, #fff 70%);
  padding: 72px 0 64px;
  text-align: center;
}
.page-hero .hero-badge { margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; line-height: 1.35; }
.page-hero p { color: var(--muted); max-width: 640px; margin: 16px auto 0; font-size: 1.05rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .section { padding: 64px 0; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-cta, .trust-list { justify-content: center; }
  .hero-visual { margin-top: 24px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .stat + .stat { border-inline-start: none; }
  .why-grid, .match-layout, .council-layout { grid-template-columns: 1fr; }
  .council-panel { position: static; }
  .next-steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-banner { flex-direction: column; text-align: center; padding: 48px 30px; }

  .main-nav {
    position: fixed;
    top: 73px;
    inset-inline: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(31,36,48,0.12);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .main-nav.open { max-height: 480px; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 12px 5%; }
  .main-nav li { border-bottom: 1px solid var(--tint-2); }
  .main-nav li:last-child { border-bottom: none; }
  .main-nav a { display: block; padding: 14px 4px; }
  .nav-toggle { display: block; }
  .header-cta-desktop { display: none; }
}

@media (max-width: 576px) {
  .grid-4, .grid-3, .grid-2, .steps-grid, .form-grid, .next-steps { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .why-feats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .orbit-wrap { width: 330px; }
  .case-card { width: 200px; padding: 20px; }
  .orbit-chip { font-size: 0.72rem; padding: 6px 12px; }
  .wizard-wrap { padding: 28px 20px; }
  .wstep .wlabel { display: none; }
  .response-meta { display: none; }
  .expert-actions { flex-direction: column; }
  .seats { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- QFamily visual library ---------- */
body:has(#products) .hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(128,16,48,.18)), url("../img/qf-2.webp") center / cover;
  box-shadow: var(--shadow-lg);
}
body:has(#products) .hero-visual .orbit-wrap { z-index: 1; }
body:has(#products) .orbit-wrap { width: 540px; }
body:has(#products) .orbit-ring {
  inset: 11%;
  border-width: 1.5px;
  animation-duration: 24s;
}
body:has(#products) .orbit-ring::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid rgba(255,255,255,.92);
  box-shadow: 0 0 0 5px rgba(128,16,48,.12);
  translate: -50% 0;
}
body:has(#products) .case-card {
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 38px rgba(83, 20, 38, .1);
}
body:has(#products) .orbit-chip {
  background: rgba(255,255,255,.48);
  border-color: rgba(255,255,255,.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(83, 20, 38, .1);
  width: 146px;
  height: 46px;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  font-size: .72rem;
}
body:has(#products) .orbit-chip svg { flex: 0 0 auto; }
body:has(#products) .orbit-chip { line-height: 1.15; }
/* Two matching vertical columns: three labels on each physical side in both languages. */
body:has(#products) .oc-1 { top: 10%; inset-inline-start: auto; inset-inline-end: auto; left: 8px; right: auto; }
body:has(#products) .oc-2 { top: 42%; inset-inline-start: auto; inset-inline-end: auto; left: 8px; right: auto; }
body:has(#products) .oc-3 { bottom: 10%; inset-inline-start: auto; inset-inline-end: auto; left: 8px; right: auto; }
body:has(#products) .oc-6 { top: 10%; inset-inline-start: auto; inset-inline-end: auto; left: auto; right: 8px; }
body:has(#products) .oc-5 { top: 42%; inset-inline-start: auto; inset-inline-end: auto; left: auto; right: 8px; }
body:has(#products) .oc-4 { bottom: 10%; inset-inline-start: auto; inset-inline-end: auto; left: auto; right: 8px; }
@media (max-width: 576px) {
  body:has(#products) .orbit-wrap { width: min(100%, 360px); }
  body:has(#products) .case-card { width: 150px; padding: 16px 12px; }
  body:has(#products) .case-card .case-icon { width: 46px; height: 46px; border-radius: 14px; }
  body:has(#products) .case-card h3 { font-size: .86rem; }
  body:has(#products) .case-card p { font-size: .72rem; }
  body:has(#products) .case-card .case-tag { font-size: .62rem; padding: 4px 9px; }
  body:has(#products) .orbit-chip { width: 94px; height: 38px; padding: 5px 7px; gap: 4px; font-size: .62rem; }
  body:has(#products) .orbit-chip svg { width: 10px; height: 10px; }
}
body:has(#products) #products .card { overflow: hidden; padding-top: 170px; position: relative; }
body:has(#products) #products .card::before { content: ""; position: absolute; inset: 0 0 auto; height: 132px; background: center / cover no-repeat; border-bottom: 1px solid var(--line); }
body:has(#products) #products .card:nth-child(1)::before { background-image: url("../img/qf-3.webp"); }
body:has(#products) #products .card:nth-child(2)::before { background-image: url("../img/qf-4.webp"); }
body:has(#products) #products .card:nth-child(3)::before { background-image: url("../img/qf-9.webp"); }
body:has(#products) #products .card:nth-child(4)::before { background-image: url("../img/qf-7.webp"); }
body:has(#products) #products .card-icon { position: absolute; top: 100px; z-index: 1; }
body:has(#products) .why-visual { background: linear-gradient(150deg, rgba(128,16,48,.92), rgba(95,12,36,.9)), url("../img/qf-5.webp") center / cover; }
body:has(#products) .why-visual h3, body:has(#products) .why-visual > p { position: relative; z-index: 1; }
body:has(#products) .match-layout > .reveal:last-child { position: relative; padding: 26px; overflow: hidden; border-radius: 26px; }
body:has(#products) .match-layout > .reveal:last-child::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.84), rgba(255,255,255,.68)), url("../img/qf-6.webp") center / cover; }
body:has(#products) .match-layout > .reveal:last-child > * { position: relative; z-index: 1; }
body:has(#products) #qfamily-12 { position: relative; overflow: hidden; }
body:has(#products) #qfamily-12::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.94), rgba(255,255,255,.82)), url("../img/qf-7.webp") center / cover; opacity: .75; }
body:has(#products) #qfamily-12 > .container { position: relative; z-index: 1; }
body:has(.wizard-wrap) .page-hero { background: linear-gradient(90deg, rgba(253,244,247,.95), rgba(255,255,255,.82)), url("../img/qf-10.webp") center / cover; }
body:has(#expertsGrid) .page-hero { background: linear-gradient(90deg, rgba(253,244,247,.96), rgba(255,255,255,.78)), url("../img/qf-8.webp") center / cover; }
body:has(#councilBuilder) .page-hero { background: linear-gradient(90deg, rgba(253,244,247,.96), rgba(255,255,255,.8)), url("../img/qf-9.webp") center / cover; }
body:has(#products) .cta-banner { background: linear-gradient(120deg, rgba(128,16,48,.96), rgba(95,12,36,.82)), url("../img/qf-11.webp") center / cover; }
.contact-hero { background: linear-gradient(90deg, rgba(253,244,247,.95), rgba(255,255,255,.78)), url("../img/qf-11.webp") center / cover; }
.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: start; }
.contact-details { padding: 20px 8px; }
.contact-details .eyebrow { display: inline-block; background: var(--tint-2); color: var(--brand); border: 1px solid var(--line); padding: 6px 16px; border-radius: 999px; font-size: .85rem; font-weight: 700; margin-bottom: 14px; }
.contact-details h2, .contact-form-card h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 800; margin-bottom: 10px; }
.contact-details > p, .contact-form-card > p { color: var(--muted); margin-bottom: 24px; }
.contact-item { display: flex; align-items: center; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-item > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--tint-2); color: var(--brand); font-size: 1.15rem; }
.contact-item strong, .contact-item a, .contact-item p { display: block; }
.contact-item a, .contact-item p { color: var(--muted); font-size: .94rem; }
.contact-note { margin-top: 24px; background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; color: var(--muted); font-size: .9rem; }
.contact-note strong { color: var(--brand); display: block; margin-bottom: 4px; }
.contact-form-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 34px; }
.contact-form-card .btn { margin-top: 24px; }

@media (max-width: 576px) {
  body:has(#products) #products .card { padding-top: 158px; }
  body:has(#products) .match-layout > .reveal:last-child { padding: 16px; }
  body:has(#products) .orbit-wrap { width: 330px; }
  body:has(#products) .orbit-chip { padding: 6px 11px; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-form-card { padding: 26px 20px; }
}
