/* ============================================================
   Rent Matcher — Light theme inspired by ok.com Kuwait
   White body · Yellow-green hero banner · Black buttons
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --ink: #0a0a0a;
  --ink-2: #1c1c1c;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #f0f1f4;
  --green: #2bb673;
  --green-dark: #1f9a5f;
  --yellow: #fcdc4d;
  --yellow-soft: #fff4b8;
  --success: #16a34a;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- Top bar (floats over hero) ---------- */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
}
.topbar.solid { position: relative; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 32px; width: auto; display: block; }
.lang-switcher {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.lang-switcher button {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  border: none;
}
.lang-switcher button:hover { color: var(--ink); }
.lang-switcher button.active { background: var(--ink); color: #fff; }

/* ---------- Hero with yellow-green banner ---------- */
.hero {
  position: relative;
  background-image: url("hero-bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding: 96px 24px 70px;
  text-align: center;
  overflow: hidden;
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
}
.hero::before { content: none; }
.hero-inner { position: relative; z-index: 2; }
.hero .eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--ink);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.hero h1 {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -1.2px;
  line-height: 1.1;
  color: var(--ink);
}
.hero h1 .accent {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 2px 14px;
  border-radius: 10px;
  margin: 0 2px;
}
.hero p {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink-2);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 500;
}

/* ---------- Container ---------- */
.container {
  max-width: 720px;
  margin: -32px auto 0;  /* 负 margin → 表单卡片轻微压在 hero 底部 */
  position: relative;
  z-index: 5;
  padding: 0 24px 80px;
}
.container-wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
/* Single-column results container — high specificity to defeat .container negatives */
.container.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 20px 140px; /* tighter top, bottom leaves room for fixed bar */
  position: static;
}

/* ---------- Form ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px 36px 32px;
  box-shadow: var(--shadow-lg);
}

/* Hero subtitle inline number */
.hero-sub-line {
  display: flex;           /* block-level flex → trust capsule naturally wraps to next row */
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
}
/* Hide empty translation spans so they don't consume flex gap */
.hero-sub-line span[data-i18n]:empty { display: none; }
.hero-num {
  font-weight: 800;
  color: #fff;
  background: var(--ink);
  padding: 3px 10px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.hero-sep {
  color: var(--ink);
  opacity: 0.45;
  font-weight: 500;
  margin: 0 2px;
}

/* Breathing dark pulse dot (before "AI" in subtitle) */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.4);
  animation: heroBreathe 2s ease-in-out infinite;
  margin-right: 2px;
  flex-shrink: 0;
}
@keyframes heroBreathe {
  0%, 100% { opacity: 0.45; box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.35); }
  50%      { opacity: 1;    box-shadow: 0 0 0 5px rgba(0, 0, 0, 0); }
}

/* Trust capsule below subtitle — standalone centered row */
.trust-capsule {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 16px auto 0;
  padding: 7px 16px 7px 7px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
/* Wrap in hero-inner centering to force it on its own row */
.hero-inner .trust-capsule { display: inline-flex; }
.hero-inner { text-align: center; }
.trust-avatars {
  display: inline-flex;
  align-items: center;
}
.trust-avatars img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.trust-avatars img + img {
  margin-left: -10px;
}

/* Live data bar (above location) */
.data-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(95deg, #f0fdf4 0%, #fffbe9 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
  margin-bottom: 22px;
}
.data-bar .data-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 var(--green);
  animation: dataPulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
.data-bar .data-text { line-height: 1.4; }
.data-bar strong { color: var(--ink); font-weight: 800; }
@keyframes dataPulse {
  0%   { box-shadow: 0 0 0 0 rgba(43, 182, 115, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(43, 182, 115, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 182, 115, 0); }
}

/* Trust badge below submit */
.trust-badge {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}
.section { margin-bottom: 26px; }
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-1 { display: grid; grid-template-columns: 1fr; gap: 14px; }

/* Field box */
.field-box {
  position: relative;
  height: 56px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-box:focus-within,
.field-box.focused {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}
.field-box .icon { font-size: 18px; flex-shrink: 0; }
.field-box select,
.field-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.field-box select option { background: #fff; color: var(--ink); }
.field-box select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230a0a0a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 18px;
}
.field-box input::placeholder { color: var(--muted); }

/* Toggle */
.toggle-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle-btn {
  height: 48px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
}
.toggle-btn .t-title { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.toggle-btn .t-sub { font-size: 11px; color: var(--muted); font-weight: 500; }
.toggle-btn.active {
  border-color: var(--ink);
  background: var(--ink);
}
.toggle-btn.active .t-title { color: #fff; }
.toggle-btn.active .t-sub { color: rgba(255,255,255,0.7); }

.phone-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}
.phone-row .phone-country {
  overflow: hidden;
  min-width: 0;
}
.phone-row .phone-country select {
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
  width: 100%;
  text-overflow: ellipsis;
}
.phone-row .field-box { min-width: 0; }
.phone-row .field-box input { min-width: 0; width: 100%; }

/* Checkbox row */
.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 600;
  user-select: none;
}
.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
  cursor: pointer;
}

/* Submit — solid black */
.submit {
  margin-top: 18px;
  width: 100%;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.15s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.submit:hover {
  background: #1c1c1c;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
.submit:active { transform: translateY(0); }

.error { color: #dc2626; font-size: 12px; margin-top: 6px; min-height: 0; }
.error:empty { display: none; }

/* ============================================================
   Loading page
   ============================================================ */
.analysis {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-soft);
  border-radius: 24px;
  margin-top: 24px;
}
/* Sonar pulse + bouncing dots */
.orb-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sonar {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0;
  animation: sonarPulse 2.4s ease-out infinite;
}
.sonar.s2 { animation-delay: 0.6s; }
.sonar.s3 { animation-delay: 1.2s; }
.sonar.s4 { animation-delay: 1.8s; }
@keyframes sonarPulse {
  0%   { transform: scale(0.4); opacity: 0; border-width: 3px; }
  10%  { opacity: 1; }
  100% { transform: scale(1); opacity: 0; border-width: 1px; }
}
.dots {
  position: relative;
  display: flex;
  gap: 10px;
  z-index: 2;
}
.dots .dt {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  animation: dotBounce 1.2s ease-in-out infinite;
}
.dots .dt:nth-child(1) { background: var(--yellow); animation-delay: 0s; }
.dots .dt:nth-child(2) { background: var(--green); animation-delay: 0.15s; }
.dots .dt:nth-child(3) { background: var(--ink); animation-delay: 0.3s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0) scale(0.8); opacity: 0.6; }
  40% { transform: translateY(-12px) scale(1); opacity: 1; }
}
.orb, .orb-ring { display: none; }

.analysis h2 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--ink);
}
.analysis .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 36px;
}

.progress-wrap {
  width: 100%;
  max-width: 480px;
  height: 8px;
  background: #e7e9ee;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 32px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--yellow), var(--green));
  transition: width 0.4s ease;
}

.steps {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: #fff;
  opacity: 0.5;
  transition: all 0.4s;
}
.step.active {
  opacity: 1;
  border-color: var(--ink);
}
.step.done {
  opacity: 1;
  border-color: var(--green);
  background: #f0fdf4;
}
.step .dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}
.step.active .dot { border-color: var(--ink); background: var(--ink); color: #fff; }
.step.done .dot { border-color: var(--green); background: var(--green); color: #fff; }
.step .text { font-size: 14px; color: var(--ink-2); font-weight: 600; }

/* ============================================================
   Results
   ============================================================ */
.results-header { padding: 4px 0 14px; }
.results-header h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--ink);
  line-height: 1.2;
}
.chips {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  padding: 7px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 600;
}

/* AI insight (dark #0D1A0F) */
.ai-panel {
  margin-top: 14px;
  background: #0D1A0F;
  color: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(43, 182, 115, 0.2);
}
.ai-panel::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green) 0%, transparent 70%);
  opacity: 0.35;
}
.ai-panel .ai-label {
  position: relative;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #4ade80;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-panel .ai-text {
  position: relative;
  font-size: 13.5px;
  line-height: 1.6;
  color: #f0f5f0;
  min-height: 0;
}
.ai-panel .cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--yellow);
  vertical-align: middle;
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.section-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.4px;
  margin: 36px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.section-title .badge {
  background: var(--green);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* New section title row (single-col layout) */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 14px;
}
.section-title-text {
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.4px;
}
.section-chip {
  background: var(--green);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

/* Card list (single-column) */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ========== Big card (first item) ========== */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card-big {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  animation: cardFadeIn 0.45s ease both;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card-big[data-url]:not([data-url=""]) { cursor: pointer; }
.card-big:hover { border-color: var(--ink); box-shadow: var(--shadow-lg); }
.card-big .photo {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
}
.card-big .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-big .rank {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15,23,30,0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.card-big .score-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.95);
  border: 1.5px solid var(--green);
  color: var(--green-dark);
  font-weight: 800;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.card-big .body { padding: 18px 22px 20px; }
.card-big .title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.3;
}
.card-big .loc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.card-big .tags,
.card-compact .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.card-big .tag,
.card-compact .tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}
.card-big .price-row,
.card-compact .price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.card-big .price-row .aed {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}
.card-big .price-row .unit { font-size: 13px; color: var(--muted); font-weight: 600; }
.card-big .price-row .usd { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: auto; }

/* ========== Compact card ========== */
.card-compact {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  animation: cardFadeIn 0.45s ease both;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  gap: 14px;
  overflow: hidden;
}
.card-compact[data-url]:not([data-url=""]) { cursor: pointer; }
.card-compact:hover { border-color: var(--ink); box-shadow: var(--shadow); }

/* Thumb (only when has-photo) */
.card-compact .thumb {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
  align-self: flex-start;
}
.card-compact .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-compact .info {
  flex: 1;
  min-width: 0;
  position: relative;
}
.card-compact .rank-mini {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}
.card-compact .score-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid var(--green);
  color: var(--green-dark);
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.card-compact .title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.3;
}
.card-compact .loc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.card-compact .price-row .aed { font-size: 18px; font-weight: 900; color: var(--ink); }
.card-compact .price-row .unit { font-size: 12px; color: var(--muted); font-weight: 600; }
.card-compact .price-row .usd { font-size: 11px; color: var(--muted); font-weight: 600; margin-left: auto; }

/* WhatsApp button reset for both card types */
.card-big .wa-btn,
.card-compact .wa-btn {
  margin-top: 4px;
  width: 100%;
}

/* ========== Load more ========== */
.load-more-btn {
  width: 100%;
  margin-top: 18px;
  padding: 14px 20px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.load-more-btn:hover { border-color: var(--ink); background: var(--bg-soft); }

/* ========== Bottom fixed bar (sticky footer with separator) ========== */
.bottom-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  display: flex;
  justify-content: center;
}
.bottom-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  transition: all 0.18s;
  max-width: 720px;
  width: 100%;
  justify-content: center;
}
.bottom-cta:hover {
  background: #1fb955;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.45);
}

/* ========== Empty state ========== */
.scan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  margin-top: 16px;
}
.scan-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.scan-left strong { color: var(--ink); font-weight: 800; margin: 0 2px; }
.scan-chip {
  background: var(--yellow);
  color: #6b4f00;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #e9c93a;
  white-space: nowrap;
}

.agent-card {
  margin-top: 18px;
  background: #0D1A0F;
  border: 1px solid rgba(43, 182, 115, 0.25);
  border-radius: 20px;
  padding: 22px 26px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.agent-card::before {
  content: "";
  position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green) 0%, transparent 70%);
  opacity: 0.25;
}
.agent-card .agent-label {
  position: relative;
  display: inline-block;
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 800;
  color: #4ade80;
  margin-bottom: 16px;
}
.agent-card .agent-info {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.agent-card .agent-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a3a26, #0d2316);
  border: 1.5px solid rgba(74, 222, 128, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4ade80;
  flex-shrink: 0;
}
.agent-card .agent-meta { display: flex; flex-direction: column; gap: 3px; }
.agent-card .agent-title { font-size: 15px; font-weight: 800; color: #fff; }
.agent-card .agent-sub { font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 500; }
.agent-card .agent-message {
  position: relative;
  font-size: 14px;
  line-height: 1.65;
  color: #e0e8e0;
  margin-bottom: 18px;
}
.agent-card .agent-divider {
  position: relative;
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin-bottom: 18px;
}
.empty-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
  text-decoration: none;
  margin-bottom: 10px;
  transition: all 0.18s;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}
.empty-cta:hover { background: #1fb955; transform: translateY(-1px); }
.empty-secondary {
  position: relative;
  display: block;
  text-align: center;
  padding: 12px 22px;
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.18s;
}
.empty-secondary:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
}
.trust-line {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding-left: 4px;
}

/* Top 3 grid */
.top3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card-top {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.5s, opacity 0.5s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}
.card-top.in { opacity: 1; transform: translateY(0); }
.card-top[data-url]:not([data-url=""]) { cursor: pointer; }
.card-top:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-top .photo {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
}
.card-top .photo img { width: 100%; height: 100%; object-fit: cover; }
.card-top .rank {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 6px 12px;
  border-radius: 999px;
}
.card-top .score-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(43, 182, 115, 0.4);
}
.card-top .body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.card-top .title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.3;
  color: var(--ink);
  min-height: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-top .loc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.card-top .meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-2);
  padding: 12px 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.card-top .price {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}
.card-top .price small { color: var(--muted); font-weight: 500; font-size: 12px; }

/* Score breakdown */
.score-panel {
  background: var(--bg-soft);
  border-top: 1px solid var(--line-2);
  padding: 14px 20px;
  display: none;
}
.score-panel.open { display: block; }
.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 5px 0;
  color: var(--ink-2);
}
.score-row .check {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}
.score-row.ok .check { background: var(--green); color: #fff; }
.score-row.partial .check { background: var(--yellow-soft); color: #92400e; border: 1px solid var(--yellow); }
.score-row .label { font-weight: 800; min-width: 60px; color: var(--ink); }
.score-row .desc { color: var(--muted); }

/* Std list */
.list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.card-std {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.5s, opacity 0.5s, border-color 0.2s, box-shadow 0.2s;
}
.card-std.in { opacity: 1; transform: translateY(0); }
.card-std[data-url]:not([data-url=""]) { cursor: pointer; }
.card-std:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.card-std .photo { aspect-ratio: 4 / 3; background: var(--bg-soft); position: relative; }
.card-std .photo img { width: 100%; height: 100%; object-fit: cover; }
.card-std .score-mini {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
}
.card-std .body { padding: 12px 14px; }
.card-std .title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.card-std .loc {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-std .price {
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
}

.empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
}

/* Redesigned empty state */
.empty-card {
  background: linear-gradient(160deg, #fffbe9 0%, #f0fdf4 100%);
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 48px 36px 40px;
  text-align: center;
  margin-top: 16px;
  box-shadow: var(--shadow);
}
.empty-card .empty-icon {
  width: 76px; height: 76px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: #fff;
  border: 1.5px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}
.empty-card .empty-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}
.empty-card .empty-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 540px;
  margin: 0 auto 26px;
}
.empty-card .empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.35);
  transition: all 0.18s;
}
.empty-card .empty-cta:hover {
  background: #1fb955;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.45);
}

@media (max-width: 640px) {
  .empty-card { padding: 36px 22px 30px; border-radius: 18px; }
  .empty-card .empty-title { font-size: 18px; }
  .empty-card .empty-body { font-size: 13px; }
  .empty-card .empty-cta { padding: 12px 24px; font-size: 14px; }
}

/* WhatsApp buttons */
.wa-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.wa-btn:hover { background: #1fb955; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35); }
.wa-btn svg { display: block; }
.wa-btn.wa-sm { height: 34px; font-size: 11px; gap: 6px; margin-top: 10px; }

/* Floating contact bar */
.floating-cta {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.45), 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
  white-space: nowrap;
}
.floating-cta:hover {
  background: #1fb955;
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 16px 40px rgba(37, 211, 102, 0.55), 0 6px 16px rgba(0, 0, 0, 0.18);
}
.floating-cta svg { flex-shrink: 0; }
.floating-cta .pulse {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid #25d366;
  opacity: 0;
  animation: ctaPulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes ctaPulse {
  0%   { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 0; }
}
/* Push results content up so floating CTA never overlaps last cards */
.container-wide { padding-bottom: 120px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .top3-grid { grid-template-columns: 1fr; }
  .list-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .topbar { padding: 14px 16px; }
  .topbar .brand img { height: 26px; }
  .lang { padding: 5px 11px; font-size: 12px; }
  .container { padding: 0 14px 60px; margin-top: -28px; }
  .container-wide { padding: 16px 14px 60px; }
  .hero {
    background-image: url("hero-bg2.png");
    padding: 64px 16px 54px;
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
  }
  .phone-row { grid-template-columns: 124px minmax(0, 1fr); gap: 10px; }
  .phone-row .phone-country select { font-size: 12px; }
  .submit { margin-top: 14px; }
  .section { margin-bottom: 20px; }
  .hero .eyebrow { font-size: 10px; padding: 5px 12px; margin-bottom: 12px; }
  .hero h1 { font-size: 26px; letter-spacing: -0.8px; }
  .hero h1 .accent { padding: 1px 10px; border-radius: 7px; }
  .hero p { font-size: 13px; margin-top: 10px; }
  .form-card { padding: 22px 18px 20px; border-radius: 18px; }
  .row { grid-template-columns: 1fr; }
  .toggle-2 { grid-template-columns: 1fr 1fr; }
  .field-box { height: 50px; padding: 0 14px; }
  .submit { height: 54px; font-size: 15px; }
  .orb-wrap { width: 160px; height: 160px; }
  .analysis h2 { font-size: 20px; }
  .results-header h1 { font-size: 24px; }
  .ai-panel { padding: 20px 22px; }
  .list-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-top .body { padding: 14px 16px; }
  .section-title { font-size: 17px; margin: 28px 0 14px; }
  .floating-cta { padding: 12px 18px; font-size: 13px; bottom: 16px; left: 16px; right: 16px; transform: none; justify-content: center; }
  .floating-cta:hover { transform: translateY(-2px); }
  .container-wide { padding-bottom: 100px; }
  .card-compact { padding: 14px; gap: 12px; }
  .card-compact .thumb { width: 110px; height: 110px; border-radius: 10px; }
  .card-compact .title { font-size: 15px; }
  .card-compact .tags .tag { font-size: 10px; padding: 3px 8px; }
}

/* ============================================================
   RTL — Arabic
   ============================================================ */
[dir="rtl"] body {
  font-family: "Noto Sans Arabic", "Geeza Pro", "Tahoma", -apple-system, sans-serif;
}
[dir="rtl"] .field-box select {
  background-position: left center;
  padding-right: 18px;
  padding-left: 24px;
  text-align: right;
}
[dir="rtl"] .field-box input { text-align: right; }
[dir="rtl"] .section-label { letter-spacing: 0; }
[dir="rtl"] .section-label::after { background: linear-gradient(-90deg, var(--line), transparent); }
[dir="rtl"] .topbar { direction: rtl; }
[dir="rtl"] .results-header h1,
[dir="rtl"] .hero h1,
[dir="rtl"] .analysis h2 { letter-spacing: 0; }
[dir="rtl"] .card-top .rank { left: auto; right: 14px; }
[dir="rtl"] .card-top .score-badge { right: auto; left: 14px; }
[dir="rtl"] .card-std .score-mini { right: auto; left: 10px; }
[dir="rtl"] .ai-panel::before { right: auto; left: -40px; }
[dir="rtl"] .floating-cta { flex-direction: row-reverse; }
[dir="rtl"] .submit .spark { transform: scaleX(-1); }
[dir="rtl"] .check-row { direction: rtl; }
[dir="rtl"] .phone-row { direction: ltr; } /* keep phone digits LTR */
[dir="rtl"] .phone-row > * { direction: rtl; }
[dir="rtl"] .phone-row .phone-country select { text-align: right; }
