/* Culorile principale se schimbă din aceste variabile. */
:root {
  --brand: #1f3a5f;
  --brand-2: #2f5d8a;
  --accent: #c8963e;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #5d6878;
  --line: #d9dfe7;
  --error: #b42318;
  --error-bg: #fef3f2;
  --ok: #157f3c;
  --radius: 14px;
  --focus: 0 0 0 3px rgba(47, 93, 138, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

header.site {
  background: var(--brand);
  color: #fff;
  padding: 14px 20px;
  padding-top: max(14px, env(safe-area-inset-top));
}
.agency { font-weight: 700; letter-spacing: .02em; }

.wrap { max-width: 680px; margin: 0 auto; padding: 24px 16px 56px; }
.intro h1 { font-size: 1.75rem; line-height: 1.2; margin: 8px 0 8px; color: var(--brand); }
.intro p { margin: 0 0 20px; color: var(--muted); }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 24px rgba(16, 24, 40, .06);
  padding: 24px 20px;
}
@media (min-width: 600px) { .card { padding: 32px; } }

.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar { height: 100%; width: 25%; background: var(--accent); transition: width .3s ease; }
.step-count { margin: 10px 0 0; font-size: .875rem; color: var(--muted); font-weight: 600; }
.legend { margin: 2px 0 8px; font-size: .875rem; color: var(--muted); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step-title { font-size: 1.35rem; font-weight: 700; color: var(--brand); padding: 0; margin: 12px 0 16px; }

.field { margin-bottom: 22px; }
.label { display: block; font-weight: 600; margin-bottom: 8px; }
.req { color: var(--error); font-weight: 700; }
.opt { color: var(--muted); font-weight: 400; font-size: .9em; }
.hint { margin: 6px 0 0; font-size: .875rem; color: var(--muted); }
.budget-hint { margin: -12px 0 20px; }

input[type=text], input[type=tel], input[type=email], textarea, select {
  width: 100%;
  font: inherit;
  font-size: 17px; /* ≥16px previne zoom-ul automat pe iPhone */
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  min-height: 50px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand-2); box-shadow: var(--focus); }

.affix { position: relative; }
.affix input { padding-right: 76px; }
.suffix {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-weight: 600; font-size: .9rem; pointer-events: none;
}

.row-2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .row-2 { grid-template-columns: 1fr 1fr; } }

/* Carduri mari pentru Cumpărare / Închiriere */
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 14px; cursor: pointer;
  transition: border-color .15s, background .15s; min-height: 120px;
}
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.cc-icon { font-size: 1.6rem; }
.cc-title { font-weight: 700; font-size: 1.1rem; }
.cc-sub { color: var(--muted); font-size: .875rem; line-height: 1.35; }
.choice-card:has(input:checked) { border-color: var(--brand-2); background: #eef4fb; }
.choice-card:has(input:focus-visible) { box-shadow: var(--focus); }

/* Chips (radio/checkbox compacte) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 10px 16px;
  border: 1.5px solid var(--line); border-radius: 99px; background: #fff; font-weight: 500;
  transition: all .15s;
}
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input:focus-visible + span { box-shadow: var(--focus); }

.segmented { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 11px 20px; min-height: 46px; font-weight: 600; }
.segmented label + label span { border-left: 1.5px solid var(--line); }
.segmented input:checked + span { background: var(--brand); color: #fff; }
.segmented input:focus-visible + span { box-shadow: inset var(--focus); }

/* Liste de opțiuni (radio și checkbox pe rânduri) */
.options, .checks { display: grid; gap: 8px; }
@media (min-width: 560px) { .checks { grid-template-columns: 1fr 1fr; } }
.option {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 50px;
  transition: border-color .15s, background .15s;
}
.option:has(input:checked) { border-color: var(--brand-2); background: #eef4fb; }
.option input, .consent input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--brand); margin: 0; }

.consent { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.consent input { margin-top: 2px; }
.consent a { color: var(--brand-2); font-weight: 600; }

/* Erori */
.error { margin: 6px 0 0; color: var(--error); font-size: .9rem; font-weight: 500; }
.error:empty { display: none; }
.invalid input[type=text], .invalid input[type=tel], .invalid input[type=email], .invalid textarea { border-color: var(--error); }
.invalid .choice-card, .invalid .chip span, .invalid .option, .invalid .segmented { border-color: var(--error); }
.form-error { background: var(--error-bg); color: var(--error); border-radius: 10px; padding: 12px 14px; font-weight: 500; }

/* Navigare */
.nav { display: flex; gap: 12px; justify-content: space-between; margin-top: 8px; }
.btn {
  font: inherit; font-weight: 700; border-radius: 12px; border: 0; cursor: pointer;
  min-height: 52px; padding: 12px 22px; transition: background .15s, opacity .15s;
}
.btn.primary { background: var(--brand); color: #fff; margin-left: auto; flex: 1 1 auto; max-width: 320px; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--line); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled { opacity: .6; cursor: wait; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.success { text-align: center; padding: 40px 24px; }
.success:focus { outline: none; }
.check-icon {
  width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%;
  background: #e7f6ec; color: var(--ok); font-size: 2rem; font-weight: 700;
  display: grid; place-items: center;
}
.success h2 { color: var(--brand); margin: 0 0 8px; }
.success p { color: var(--muted); margin: 0 0 24px; }

[hidden] { display: none !important; }

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