/* ============================================================
   Trámites SIAPA — Funnel · Hoja de estilos
   Dirección: tema claro institucional en tonos azules (agua/SIAPA):
   fondo blanco-azulado + azul profesional + navy oscuro. Mobile-first.
   ============================================================ */

:root {
  --bg: #F7FAFD;
  --card: #FFFFFF;
  --ink: #20323F;
  --muted: #56677A;
  --line: #DDE6EF;
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --on-primary: #FFFFFF;
  --violet: #1D4ED8;
  --ok-bg: rgba(63, 191, 119, .12);
  --ok-line: #2F9E63;
  --warn-bg: rgba(204, 148, 76, .10);
  --warn-ink: #7A5A1E;
  --err: #C24A38;
  --radius: 20px;
  --shadow: 0 10px 28px rgba(28, 50, 79, .08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container { width: min(720px, 92%); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(247, 250, 253, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.3px;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #60A5FA, #2563EB);
  color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .30);
}
.badge-private {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: #1D4ED8;
  background: rgba(37, 99, 235, .08);
  border: 1px solid rgba(37, 99, 235, .30);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 46px 0 32px; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto -30%;
  height: 150%;
  background:
    radial-gradient(620px 320px at 72% 18%, rgba(37, 99, 235, .10), transparent 62%),
    radial-gradient(520px 300px at 12% 8%, rgba(56, 189, 248, .08), transparent 60%);
  pointer-events: none;
}
.hero > .container { position: relative; }
.hero h1 {
  font-size: clamp(30px, 6.2vw, 46px);
  line-height: 1.12;
  margin: 0 0 14px;
  color: var(--ink);
  letter-spacing: -1px;
  font-weight: 800;
}
.hero p.sub {
  font-size: 16.5px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 52ch;
}

/* ---------- Botones (pill) ---------- */
.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 16px 26px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -.1px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  min-height: 54px;
  transition: transform .1s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: linear-gradient(135deg, #4F8DF9, #2563EB);
  color: var(--on-primary);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
}
.btn-primary:hover { background: linear-gradient(135deg, #2563EB, var(--primary-dark)); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid #C9D6E4;
}
.btn-outline:hover { border-color: var(--primary); }
.btn + .btn, .btn-row .btn { margin-top: 10px; }
.btn svg { width: 20px; height: 20px; flex: none; }

.cta-row { display: flex; gap: 10px; }
.cta-row .btn { margin-top: 0; flex: 1; }
@media (max-width: 540px) {
  .cta-row { flex-direction: column; }
}

/* ---------- Tarjetas / secciones ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin: 0 0 16px;
}

/* ---------- Planes (precios) ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan {
  position: relative;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.plan.featured { border: 2px solid var(--primary); }
.plan .flag {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #60A5FA, #2563EB);
  color: var(--on-primary);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 4px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan-years {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.plan-price { font-size: 27px; font-weight: 800; color: var(--ink); margin: 6px 0 4px; letter-spacing: -.5px; }
.plan-note { font-size: 12px; color: var(--muted); }

.price-note { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.6; }

/* ---------- Badges de confianza (hero) ---------- */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Cómo funciona (grid) ---------- */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .how { grid-template-columns: 1fr; } }
.pain { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 560px) { .pain { grid-template-columns: 1fr; } }
.how-card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.how-num {
  width: 34px; height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #60A5FA, #2563EB);
  color: var(--on-primary);
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .25);
}
.how-card h3 { margin: 0 0 5px; font-size: 15px; color: var(--ink); letter-spacing: -.2px; }
.how-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ---------- Avisos / transparencia ---------- */
.notice {
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.6;
}
.notice strong { display: block; margin-bottom: 4px; }
.notice-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid rgba(204, 148, 76, .30); }
.notice-ok   { background: var(--ok-bg);    color: #1F7A4D; }

/* ---------- FAQ (chevron) ---------- */
details.faq {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 15px 18px;
  margin-bottom: 10px;
}
details.faq summary {
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "";
  width: 9px; height: 9px; flex: none;
  border-right: 2.5px solid var(--muted);
  border-bottom: 2.5px solid var(--muted);
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .2s ease;
}
details.faq[open] summary::after { transform: rotate(-135deg) translate(-1px, 1px); }
details.faq p { margin: 10px 0 0; font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ---------- Formulario (páginas de pasos) ---------- */
label.field-label { display: block; font-weight: 700; font-size: 14px; margin: 18px 0 7px; color: var(--ink); }
input[type="text"], input[type="email"], input[type="tel"], select, input[type="date"] {
  width: 100%;
  padding: 14px 15px;
  font-size: 16px; /* evita zoom en iOS */
  border: 2px solid #CBD8E6;
  border-radius: 13px;
  background: #FFFFFF;
  color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .16); }
.field-error { color: var(--err); font-size: 13px; margin-top: 5px; display: none; }
.has-error input, .has-error select { border-color: var(--err); }
.has-error .field-error { display: block; }

.consent {
  display: flex; gap: 10px; align-items: flex-start;
  background: #EEF4FB; border-radius: 13px; padding: 13px 14px; margin-top: 20px;
  font-size: 13px; color: var(--muted); line-height: 1.55;
}
.consent input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--primary); }
.consent a { color: var(--violet); font-weight: 700; }

/* ---------- Progreso (chips con conectores) ---------- */
.progress { display: flex; align-items: stretch; margin-bottom: 8px; }
.pstep {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .2px;
}
.pstep::before, .pstep::after {
  content: "";
  position: absolute;
  top: 13px;
  height: 2.5px;
  background: #C9D6E4;
  width: calc(50% - 17px);
}
.pstep::before { left: 0; }
.pstep::after { right: 0; }
.pstep:first-child::before, .pstep:last-child::after { display: none; }
.pdot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid #C9D6E4;
  color: var(--muted);
  font-weight: 800;
  font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.pstep.active { color: var(--ink); }
.pstep.active .pdot {
  background: linear-gradient(135deg, #60A5FA, #2563EB);
  border-color: transparent;
  color: var(--on-primary);
  box-shadow: 0 6px 14px rgba(37, 99, 235, .35);
}
.pstep.done { color: var(--ok-line); }
.pstep.done .pdot { background: var(--ok-line); border-color: transparent; color: #FFFFFF; }
.pstep.done::after { background: var(--ok-line); }

/* ---------- Opciones tipo tarjeta (radio) ---------- */
.radio-group { display: grid; gap: 9px; margin-bottom: 4px; }
.radio-card {
  display: flex; align-items: center; gap: 11px;
  border: 2px solid #CBD8E6; border-radius: 14px;
  padding: 14px 15px; cursor: pointer;
  font-weight: 700; font-size: 14.5px; background: transparent;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.radio-card input { width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.radio-card.selected, .radio-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(37, 99, 235, .07);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .12);
}

.office-info {
  margin-top: 12px; font-size: 13.5px; color: var(--muted);
  background: #EEF4FB; border-radius: 13px;
  padding: 13px 15px; line-height: 1.65;
}
.office-info a { color: var(--violet); font-weight: 700; }

/* ---------- Resumen / totales ---------- */
.summary { border-radius: 14px; overflow: hidden; margin-bottom: 8px; box-shadow: var(--shadow); background: var(--card); }
.summary-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 12px 15px; font-size: 14px;
  border-bottom: 1px solid var(--line); background: var(--card);
}
.summary-row:last-child { border-bottom: none; }
.summary-row .k { color: var(--muted); flex: none; font-weight: 600; }
.summary-row .v { text-align: right; font-weight: 700; word-break: break-word; }

.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin-top: 0; flex: 1; }

.total-box {
  background: #EEF4FB; border-radius: 14px;
  padding: 15px 17px; margin-top: 18px; font-size: 14px;
}
.total-box .total-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--muted); }
.total-box .total-final {
  display: flex; justify-content: space-between; gap: 12px;
  font-weight: 800; font-size: 17.5px; color: var(--ink);
  border-top: 1.5px dashed #C9D6E4; margin-top: 9px; padding-top: 11px;
}

/* ---------- Folio / confirmación ---------- */
.folio-box {
  background: linear-gradient(135deg, #EFF5FF 0%, #E1EBF9 100%);
  border: 1px solid rgba(37, 99, 235, .35);
  color: var(--ink); border-radius: var(--radius);
  padding: 22px; text-align: center; margin-bottom: 16px;
  box-shadow: 0 14px 34px rgba(28, 50, 79, .10);
}
.folio-box .label { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; opacity: .75; font-weight: 700; }
.folio-box .value {
  font-family: "Courier New", monospace;
  font-size: 21px; font-weight: 700; letter-spacing: 2px;
  margin-top: 8px; word-break: break-all; color: #1D4ED8;
}

.success-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin: 0 auto 14px;
}

/* ---------- CLABE / pago ---------- */
.clabe-box {
  background: #EEF4FB; border: 2px dashed #C9D6E4;
  border-radius: 14px; padding: 15px; margin-top: 12px;
}
.clabe-label { font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); font-weight: 800; }
.clabe-number {
  font-family: "Courier New", monospace;
  font-size: 20px; font-weight: 700; letter-spacing: 2.5px;
  text-align: center; margin: 8px 0; word-break: break-all; color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #EEF4FB;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 30px 0 38px;
  margin-top: 46px;
}
.site-footer a { color: #1D4ED8; }
.footer-disclaimer {
  background: rgba(37, 99, 235, .06);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 18px;
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---------- Utilidades ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.hidden { display: none !important; }
