/* Página "Destacar" y sus condiciones. Colores = los de la app
   (lib/theme/app_colors.dart). El naranja y el amarillo van solo como fondo:
   el texto encima siempre es oscuro. */
:root {
  color-scheme: light;
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f2efea;
  --text: #1e2a32;
  --text-soft: #5b6770;
  --primary: #1e63d6;
  --primary-dark: #1748a8;
  --primary-tint: #e8f0fd;
  --orange: #f4a63c;
  --orange-dark: #e6922a;
  --orange-tint: #fff4e3;
  --gold: #f2c14e;
  --gold-ring: #e0a100;
  --gold-tint: #fdf3d6;
  --border: #e3e1dc;
  --ok: #1f6e43;
  --ok-bg: #e8f5ec;
  --err: #b23232;
  --err-bg: #fdecec;
  --warn-text: #8a5a00;
  --shadow: 0 1px 2px rgba(20, 34, 79, .05), 0 6px 20px rgba(20, 34, 79, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.modal-open { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--primary); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
p { margin: 0 0 10px; }
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--text-soft); }
.small { font-size: 13px; }
.ico { width: 1.2em; height: 1.2em; fill: currentColor; flex: none; vertical-align: -0.22em; }

/* ----- Encabezado ----- */
.top { background: var(--surface); border-bottom: 1px solid var(--border); }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 17px; }
.who { font-size: 13px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.top-link { font-weight: 600; text-decoration: none; font-size: 15px; }

/* ----- Portada ----- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(160deg, #2b74ea 0%, var(--primary) 42%, var(--primary-dark) 100%);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 520px; height: 520px; right: -200px; top: -260px; background: rgba(255, 255, 255, .07); }
.hero::after { width: 360px; height: 360px; left: -170px; bottom: -230px; background: rgba(244, 166, 60, .22); }
.hero-inner { position: relative; z-index: 1; display: grid; gap: 28px; padding: 30px 16px 76px; }
.eyebrow { margin: 0; color: #ffd98f; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; }
.hero h1 { margin: 6px 0 10px; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
.hero .lead { margin: 0 0 20px; font-size: 17px; color: rgba(255, 255, 255, .9); max-width: 34em; }
.hero .lead strong { color: #fff; }
.btn-hero { width: auto; padding: 14px 22px; font-size: 16px; text-decoration: none; box-shadow: 0 8px 20px rgba(8, 25, 70, .28); }

/* Maqueta: lista de la app + mini mapa */
.mock { position: relative; margin: 0 auto; width: 100%; max-width: 330px; padding-bottom: 30px; }
.phone {
  width: 236px;
  background: var(--surface);
  color: var(--text);
  border-radius: 30px;
  padding: 10px 10px 14px;
  box-shadow: 0 24px 48px rgba(8, 25, 70, .35);
  border: 1px solid rgba(255, 255, 255, .7);
}
.phone-notch { width: 64px; height: 6px; border-radius: 6px; background: var(--border); margin: 2px auto 10px; }
.phone-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 4px; font-weight: 800; font-size: 15px; }
.phone-bar .ico { color: var(--primary); }
.m-card { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 14px; margin-top: 8px; background: var(--surface); }
.m-card.is-feat { border: 2px solid var(--gold-ring); box-shadow: 0 6px 16px rgba(224, 161, 0, .22); }
.m-thumb { width: 50px; height: 50px; border-radius: 10px; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, #fde4bb, #f8c56f); }
.m-thumb svg { width: 26px; height: 26px; fill: var(--text); }
.m-thumb.sk { background: var(--surface-2); }
.m-body { min-width: 0; flex: 1; }
.m-title { font-weight: 800; font-size: 13px; line-height: 1.25; margin-top: 3px; }
.m-meta { font-size: 11px; color: var(--text-soft); }
.sk-line { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); width: 85%; margin: 6px 0; }
.sk-line.short { width: 50%; }
.map-tile { position: absolute; right: 0; bottom: 30px; width: 150px; height: 130px; border-radius: 18px; overflow: hidden; border: 4px solid #fff; box-shadow: 0 16px 32px rgba(8, 25, 70, .35); background: #eef1ea; }
.map-tile svg { display: block; width: 100%; height: 100%; }
.mock figcaption { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .8); }

/* ----- Qué incluye ----- */
.perks {
  list-style: none;
  margin: -48px 0 0;
  padding: 6px 16px;
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
}
.perks li { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 15px; }
.perks li + li { border-top: 1px solid var(--border); }
.perk-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.perk-ico svg { width: 22px; height: 22px; fill: var(--text); }
.perk-gold { background: var(--gold); }
.perk-blue { background: var(--primary-tint); }
.perk-blue svg { fill: var(--primary); }
.perk-ring { background: #fff; border: 3px solid var(--gold-ring); }
.perk-ring svg { fill: var(--warn-text); }

/* ----- Tarjetas ----- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; margin: 16px 0; box-shadow: var(--shadow); }
.badge { display: inline-block; background: var(--gold); color: var(--text); font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); line-height: 1.5; }
.badge-sm { font-size: 11px; padding: 1px 7px; }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 12px; }
.plan { position: relative; border: 1px solid var(--border); border-radius: 14px; padding: 16px 10px 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; background: var(--surface); }
.plan.is-rec { border: 2px solid var(--primary); background: var(--primary-tint); }
.plan-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em; }
.plan-days { font-weight: 700; font-size: 15px; }
.plan-price { font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; line-height: 1.2; }
.plan-day { font-size: 12px; color: var(--text-soft); line-height: 1.3; white-space: nowrap; }

/* Cómo funciona */
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps p { margin: 4px 0 0; }
.step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; }

/* ----- Botones y formularios ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; border: 1px solid transparent; padding: 13px 16px; font: inherit; font-weight: 700; cursor: pointer; width: 100%; min-height: 48px; text-align: center; line-height: 1.25; -webkit-tap-highlight-color: transparent; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible, .link:focus-visible, .icon-btn:focus-visible, summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-pay { background: var(--orange); color: var(--text); }
.btn-pay:hover:not(:disabled):not(.is-locked) { background: var(--orange-dark); }
.btn-pay.is-locked { background: var(--border); color: var(--text-soft); box-shadow: none; cursor: not-allowed; }
.btn-lg { font-size: 17px; min-height: 54px; }
.btn-google { background: #fff; color: var(--text); border-color: var(--border); }
.btn-google:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-tint); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-size: 13px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.form input { font: inherit; font-size: 16px; padding: 12px; border: 1px solid #cfccc5; border-radius: 12px; background: #fff; color: var(--text); }
.form input:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
.link { background: none; border: none; color: var(--primary); font: inherit; cursor: pointer; padding: 6px 0; text-decoration: underline; justify-self: start; }
.msg { min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }
.msg:empty { min-height: 0; margin: 0; }
.msg.err { color: var(--err); font-weight: 600; }
.msg.ok { color: var(--ok); font-weight: 600; }
.login-body { max-width: 420px; margin-top: 14px; }
.login > .small { margin: 14px 0 0; }

/* ----- Tus publicaciones ----- */
.anchor { scroll-margin-top: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-between h2 { margin: 0; }
.mine-hint { margin: 6px 0 0; }
.items { display: grid; gap: 14px; margin-top: 14px; }
.item { border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: grid; gap: 12px; background: var(--surface); }
.item.is-featured { border: 2px solid var(--gold-ring); background: linear-gradient(180deg, var(--gold-tint), var(--surface) 60%); }
.item-head { display: flex; gap: 12px; align-items: center; }
.item-head img, .item-head .ph, .rv-item img, .rv-item .ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex: none; }
.item-head > div { min-width: 0; }
.item-title { font-weight: 800; margin: 1px 0 3px; line-height: 1.3; overflow-wrap: anywhere; }
.item-type { font-size: 12px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .05em; }
.item-state { color: var(--text-soft); }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice-box { display: flex; flex-direction: column; align-items: center; text-align: center; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 4px 9px; background: var(--surface); height: 100%; transition: border-color .15s, background-color .15s; }
.choice-days { font-size: 13px; font-weight: 700; }
.choice-price { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.choice-day { font-size: 11px; color: var(--text-soft); line-height: 1.3; white-space: nowrap; }
.choice-tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; white-space: nowrap; pointer-events: none; }
.choice input:checked + .choice-box { border: 2px solid var(--primary); background: var(--primary-tint); box-shadow: 0 0 0 3px rgba(30, 99, 214, .12); }
.choice input:checked + .choice-box .choice-price { color: var(--primary); }
.choice input:focus-visible + .choice-box { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ----- Revisa antes de pagar ----- */
.sheet {
  padding: 0;
  border: none;
  width: 100%;
  max-width: 100%;
  max-height: 94vh;
  margin: auto auto 0;
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 -10px 40px rgba(8, 25, 70, .25);
  overflow: auto;
  overscroll-behavior: contain;
}
.sheet:not([open]) { display: none; }
.sheet[open] { animation: sheet-up .22s ease-out; }
.sheet::backdrop { background: rgba(20, 34, 79, .55); }
/* Navegadores sin <dialog>: hoja fija con fondo oscuro hecho con la sombra. */
.sheet.is-fallback { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: block; box-shadow: 0 0 0 100vmax rgba(20, 34, 79, .55); }
.sheet-in { padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 21px; }
.rv-item { display: flex; gap: 12px; align-items: center; }
.rv-item img, .rv-item .ph { width: 52px; height: 52px; }
.rv-item-txt { min-width: 0; }
.rv-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--primary-tint); font-weight: 700; }
.rv-total strong { font-size: 24px; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; white-space: nowrap; }
.rv-facts { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 9px; font-size: 14px; line-height: 1.45; }
.rv-facts li { display: flex; gap: 10px; align-items: flex-start; }
.rv-facts .ico { width: 20px; height: 20px; color: var(--ok); margin-top: 1px; }
.rv-facts li:nth-child(2) .ico, .rv-facts li:nth-child(4) .ico { color: var(--text-soft); }
.rv-facts .is-warn { background: var(--gold-tint); border-radius: 12px; padding: 10px 12px; margin: 2px 0; }
.rv-facts .is-warn .ico { color: var(--warn-text); }
.accept {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 2px solid var(--orange);
  border-radius: 14px;
  background: var(--orange-tint);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.accept input { position: absolute; opacity: 0; width: 26px; height: 26px; margin: 0; left: 14px; top: 14px; cursor: pointer; }
.accept-box { width: 26px; height: 26px; flex: none; border-radius: 7px; border: 2px solid var(--text-soft); background: #fff; display: grid; place-items: center; transition: background-color .15s, border-color .15s; }
.accept-box svg { width: 20px; height: 20px; fill: #fff; opacity: 0; }
.accept input:checked + .accept-box { background: var(--ok); border-color: var(--ok); }
.accept input:checked + .accept-box svg { opacity: 1; }
.accept input:focus-visible + .accept-box { outline: 3px solid var(--primary); outline-offset: 2px; }
.accept.is-checked { border-color: var(--ok); background: var(--ok-bg); }
.accept.is-missing { border-color: var(--err); background: var(--err-bg); }
.accept.is-missing .accept-box { border-color: var(--err); }
.accept.shake { animation: shake .4s ease; }
.sheet .msg { margin-top: 10px; }
.sheet-actions { display: grid; gap: 6px; margin-top: 14px; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ----- Resultado del pago ----- */
.result { margin-top: 16px; }
.result h2 { font-size: 19px; }
.result.ok { background: var(--ok-bg); border-color: #b9dfc6; }
.result.err { background: var(--err-bg); border-color: #f2c4c4; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Preguntas frecuentes ----- */
.faq details { border-top: 1px solid var(--border); }
.faq h2 { margin-bottom: 6px; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { color: var(--text-soft); transition: transform .2s; }
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq details p { margin: 0 0 14px; color: var(--text-soft); max-width: 64ch; }

/* ----- Pie ----- */
.foot { padding: 24px 0 40px; text-align: center; font-size: 14px; }
.foot p { margin: 4px 0; }

/* ----- Condiciones ----- */
.doc-hero { background: linear-gradient(160deg, #2b74ea 0%, var(--primary) 50%, var(--primary-dark) 100%); color: #fff; }
.doc-hero .wrap { padding-top: 28px; padding-bottom: 28px; }
.doc-hero h1 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.doc-hero p { margin: 0; color: rgba(255, 255, 255, .85); font-size: 14px; }
.toc ol { margin: 8px 0 0; padding-left: 22px; columns: 2 220px; column-gap: 24px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.doc section.card { scroll-margin-top: 12px; }
.doc section.card ul { padding-left: 20px; margin: 0; }
.doc section.card li + li { margin-top: 6px; }
.doc section.card p:last-child { margin-bottom: 0; }
.sec-n { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 4px; margin-right: 6px; border-radius: 50%; background: var(--primary-tint); color: var(--primary); font-size: 15px; vertical-align: 1px; }
.doc .is-key { border: 2px solid var(--orange); background: var(--orange-tint); }
.doc .is-key .sec-n { background: var(--orange); color: var(--text); }
.doc-back { display: flex; justify-content: center; margin: 24px 0 8px; }
.doc-back .btn { width: auto; text-decoration: none; padding: 13px 22px; }

/* ----- Tamaños ----- */
@media (min-width: 600px) {
  .hero .btn-hero { width: auto; }
  .sheet { max-width: 460px; margin: auto; border-radius: 22px; box-shadow: 0 20px 60px rgba(8, 25, 70, .35); }
  .sheet-in { padding: 22px; }
  .sheet-actions { grid-template-columns: auto 1fr; }
  .sheet-actions #go { order: 2; }
  .sheet-actions .btn-ghost { order: 1; width: auto; padding: 13px 18px; }
  .items { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
}
@media (min-width: 720px) {
  .perks { grid-template-columns: repeat(3, 1fr); padding: 6px 4px; }
  .perks li { padding: 14px 16px; }
  .perks li + li { border-top: none; border-left: 1px solid var(--border); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .steps li { flex-direction: column; gap: 8px; }
  .steps p { margin: 0; }
  .card { padding: 24px; }
}
@media (min-width: 820px) {
  .hero-inner { grid-template-columns: 1.1fr .9fr; align-items: center; padding: 52px 16px 92px; gap: 40px; }
  .hero h1 { font-size: 46px; }
  .hero .lead { font-size: 18px; }
  .mock { max-width: 360px; }
  .phone { width: 250px; }
  .map-tile { width: 164px; height: 142px; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 30px; }
  .card { padding: 16px; }
  .plan { padding: 16px 6px 10px; }
  .plan-price { font-size: 19px; }
  .choice-price { font-size: 15px; }
  .choice-tag { font-size: 9.5px; padding: 1px 5px; }
  .phone { width: 216px; }
  .map-tile { width: 136px; height: 118px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet[open], .accept.shake { animation: none; }
  * { transition: none !important; }
}
