/* ============================================================
   PreciosReforma v2 - Styles
   Restored from original v1 design
   Brand: Teal #00867A on Sand #F7F4EF
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,700;1,9..144,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --teal: #00867A;
  --teal-dark: #005C53;
  --teal-light: #E8F5F3;
  --sand: #F7F4EF;
  --dark: #1A1A1A;
  --mid: #6B6B6B;
  --light: #E0E0DA;
  --warn: #E8761A;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.14);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--sand);
  color: var(--dark);
  min-height: 100vh;
}


/* ── HEADER ─────────────────────────────────────────────────── */

header {
  background: #fff;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #E8E8E4;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--teal-dark);
}

.logo span {
  color: var(--teal);
}

.badge {
  font-size: 11px;
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}


/* ── HERO ───────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 72px 24px 48px;
  max-width: 700px;
  margin: 0 auto;
}

.hero-eye {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 6vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero h1 em {
  font-style: italic;
  color: var(--teal);
}

.hero p {
  font-size: 17px;
  color: var(--mid);
  line-height: 1.7;
  margin-bottom: 36px;
  font-weight: 300;
}

.price-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--dark);
  color: #fff;
  padding: 14px 28px;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 10px;
}

.price-pill .p {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: #A8D8D4;
}

.price-note {
  font-size: 13px;
  color: var(--mid);
}


/* ── STEPS BAR ──────────────────────────────────────────────── */

.steps-bar {
  max-width: 600px;
  margin: 0 auto 48px;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.sdot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.sdot::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--light);
  z-index: 0;
}

.sdot:last-child::after { display: none; }

.scirc {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  position: relative;
  z-index: 1;
  transition: all .3s;
}

.sdot.active .scirc {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.sdot.done .scirc {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
}

.sdot.done::after {
  background: var(--teal);
}

.slabel {
  font-size: 11px;
  color: var(--mid);
  margin-top: 6px;
  font-weight: 500;
  text-align: center;
}

.sdot.active .slabel {
  color: var(--teal-dark);
  font-weight: 600;
}


/* ── FORM CONTAINER ─────────────────────────────────────────── */

.fc {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 80px;
}


/* ── CARDS ───────────────────────────────────────────────────── */

.card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  display: none;
  animation: fu .4s ease;
}

.card.active { display: block; }

@keyframes fu {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ctitle {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.csub {
  font-size: 15px;
  color: var(--mid);
  margin-bottom: 32px;
  font-weight: 300;
}


/* ── OPTION GRID (Tipo de inmueble) ─────────────────────────── */

.ogrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.obtn {
  border: 2px solid #E8E8E4;
  border-radius: var(--radius);
  padding: 16px 12px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.obtn .ic { font-size: 28px; }

.obtn:hover, .obtn.sel {
  border-color: var(--teal);
  background: var(--teal-light);
  transform: translateY(-2px);
}

.obtn.sel { color: var(--teal-dark); }


/* ── FORM ELEMENTS ──────────────────────────────────────────── */

.fg { margin-bottom: 24px; }

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 8px;
}

.lh {
  font-size: 12px;
  color: var(--mid);
  font-weight: 400;
  margin-left: 6px;
}

input[type=number],
input[type=text],
input[type=email],
input[type=tel],
input[type=date],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #E8E8E4;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--dark);
  background: #fff;
  transition: border-color .2s;
  outline: none;
  resize: vertical;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--teal);
}

.irow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}


/* ── QUESTIONNAIRE ──────────────────────────────────────────── */

.qsec { margin-bottom: 28px; }

.qsec-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--teal);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--teal-light);
}

.qrow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.qchip {
  border: 2px solid #E8E8E4;
  border-radius: 8px;
  padding: 8px 14px;
  background: #fff;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  transition: all .2s;
  white-space: nowrap;
}

.qchip:hover {
  border-color: var(--teal);
  background: var(--teal-light);
}

.qchip.sel {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 600;
}

.qchip.sel-warn {
  border-color: var(--warn);
  background: #FFF8F0;
  color: var(--warn);
}

.qpregunta {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qpregunta .req {
  font-size: 10px;
  color: var(--warn);
  font-weight: 700;
}

.qselect {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #E8E8E4;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--dark);
  background: #fff;
  outline: none;
  cursor: pointer;
}

.qselect:focus { border-color: var(--teal); }


/* ── NIVEL CARDS ────────────────────────────────────────────── */

.nivel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.nivel-card {
  border: 2px solid #E8E8E4;
  border-radius: 10px;
  padding: 14px 10px;
  cursor: pointer;
  transition: all .2s;
  background: #fff;
  text-align: center;
}

.nivel-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.nivel-card.sel {
  border-color: var(--teal);
  background: var(--teal-light);
}

.nivel-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.nivel-desc {
  font-size: 11px;
  color: var(--mid);
  line-height: 1.4;
}

.progreso {
  font-size: 12px;
  color: var(--mid);
  text-align: right;
  margin-bottom: 16px;
}

.progreso span {
  color: var(--teal);
  font-weight: 700;
}


/* ── UPLOAD ZONE ────────────────────────────────────────────── */

.uzone {
  border: 2px dashed var(--light);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 16px;
  position: relative;
}

.uzone:hover, .uzone.has {
  border-color: var(--teal);
  background: var(--teal-light);
}

.uzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
}

.uic { font-size: 40px; margin-bottom: 12px; }
.utxt { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.uht  { font-size: 13px; color: var(--mid); }

.pprev {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.pthumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--teal-light);
}


/* ── CHECKBOXES (RGPD) ─────────────────────────────────────── */

.cl {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.ci {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #E8E8E4;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}

.ci:hover { border-color: var(--teal); }

.ci input[type=checkbox] { display: none; }

.cbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
  font-size: 13px;
}

.ci.ck .cbox {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.ci.ck {
  border-color: var(--teal);
  background: var(--teal-light);
}

.clabel { font-size: 14px; font-weight: 500; }
.cimp { font-size: 12px; color: var(--warn); font-weight: 500; margin-left: auto; }


/* ── NAVIGATION BUTTONS ─────────────────────────────────────── */

.navbtns {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.bbk {
  padding: 14px 24px;
  border: 2px solid var(--light);
  border-radius: var(--radius);
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--mid);
  cursor: pointer;
  transition: all .2s;
}

.bbk:hover {
  border-color: var(--dark);
  color: var(--dark);
}

.bnxt {
  flex: 1;
  padding: 16px 24px;
  background: var(--teal);
  border: none;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all .2s;
}

.bnxt:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.bnxt:disabled {
  background: var(--light);
  color: var(--mid);
  cursor: not-allowed;
  transform: none;
}


/* ── LOADING SCREEN ─────────────────────────────────────────── */

.lscreen { display: none; text-align: center; padding: 60px 24px; }
.lscreen.active { display: block; }

.spin {
  width: 56px;
  height: 56px;
  border: 4px solid var(--teal-light);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: sp .8s linear infinite;
  margin: 0 auto 24px;
}

@keyframes sp { to { transform: rotate(360deg); } }

.ltit {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.lslist {
  font-size: 14px;
  color: var(--mid);
  line-height: 2.2;
}

.ls { opacity: .4; transition: opacity .4s; }
.ls.active { opacity: 1; color: var(--teal); }
.ls.done { opacity: .7; }


/* ── RESULTS CARD ───────────────────────────────────────────── */

.rcard {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  display: none;
  animation: fu .4s ease;
}

.rcard.active { display: block; }

.rhead {
  text-align: center;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--sand);
  margin-bottom: 32px;
}

.rlogo {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 24px;
}

.rlogo span { color: var(--teal); }

.rtot {
  font-family: 'Fraunces', serif;
  font-size: clamp(42px, 8vw, 64px);
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1;
  margin-bottom: 8px;
}

.rrange {
  font-size: 15px;
  color: var(--mid);
  margin-bottom: 20px;
}

.rmeta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mchip {
  background: var(--sand);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.ctit {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}


/* ── CHAPTER ROWS ───────────────────────────────────────────── */

.crow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--sand);
  font-size: 14px;
}

.crow:last-child { border-bottom: none; }
.cn { font-weight: 500; }

.ca {
  font-weight: 700;
  color: var(--teal-dark);
  font-family: 'Fraunces', serif;
  font-size: 16px;
}

.cbw { flex: 1; margin: 0 16px; }
.cb  { height: 4px; background: var(--teal-light); border-radius: 2px; }
.cbf { height: 100%; background: var(--teal); border-radius: 2px; }


/* ── DETECTED / NO-INCLUDE ──────────────────────────────────── */

.detsec {
  background: #FFF8F0;
  border: 1px solid #F0D5B8;
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}

.dettit {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--warn);
  margin-bottom: 12px;
}

.deti {
  display: flex;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 8px;
}

.diagsec {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}

.nosec {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}

.notit {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mid);
  margin-bottom: 12px;
}

.noi {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 6px;
}


/* ── BUTTONS: PAY & PDF ─────────────────────────────────────── */

.paybtn {
  width: 100%;
  padding: 18px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.paybtn:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.paybtn:disabled {
  background: var(--light);
  color: var(--mid);
  cursor: not-allowed;
  transform: none;
}

.pdfbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: var(--sand);
  border: 2px solid var(--light);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: all .2s;
  margin-top: 16px;
  text-decoration: none;
}

.pdfbtn:hover {
  border-color: var(--teal);
  background: var(--teal-light);
}


/* ── CTA BOX ────────────────────────────────────────────────── */

.gbox {
  background: #fff;
  border: 1px solid #E8E8E4;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.gic { font-size: 24px; flex-shrink: 0; }

.gtxt {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.6;
}

.gtxt strong {
  color: var(--dark);
  display: block;
  margin-bottom: 3px;
}


/* ── CTA SECTION ────────────────────────────────────────────── */

.cta {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: #fff;
  border-radius: 20px;
  padding: 36px;
  text-align: center;
  margin-top: 36px;
}

.cta h3 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta p {
  font-size: 15px;
  opacity: .85;
  margin-bottom: 28px;
  font-weight: 300;
  line-height: 1.6;
}

.ctabtn {
  display: inline-block;
  background: #fff;
  color: var(--teal-dark);
  padding: 16px 32px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .2s;
}

.ctabtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.ctacc {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.ctac { font-size: 14px; opacity: .8; }


/* ── PAYMENT SUMMARY ────────────────────────────────────────── */

.psum {
  background: var(--teal-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
}

.psum h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 16px;
}

.sr {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
}

.sr.tot {
  border-top: 1px solid rgba(0,134,122,.3);
  padding-top: 12px;
  margin-top: 4px;
  font-weight: 700;
  font-size: 16px;
}

.sr.tot .amt {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  color: var(--teal-dark);
}


/* ── DEMO ALERT ─────────────────────────────────────────────── */

.demo {
  background: #FFF3CD;
  border: 1px solid #FFDA6A;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #664D03;
  text-align: center;
  margin-bottom: 24px;
}


/* ── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 640px) {
  header { padding: 16px 20px; }
  .hero { padding: 48px 20px 32px; }
  .card { padding: 28px 20px; }
  .irow { grid-template-columns: 1fr; }
  .ogrid { grid-template-columns: repeat(2, 1fr); }
  .nivel-grid { grid-template-columns: 1fr; }
}
