/* Guías de ciudad (portada/es|en/<id>/), generadas por scripts/build-city-pages.js.
   Misma paleta y tipografías que la portada. Estructura: portada a pantalla
   completa, imprescindibles en tarjetas deslizables, cómo funciona, rutas,
   niños, listado plegado, preguntas, cierre y barra fija en el móvil. */
:root {
  --bg: #FFFFFF; --bg-alt: #F4F7FB; --ink: #0B1426; --text: #1B2638; --muted: #5B6A80;
  --line: #E3E9F1; --blue: #2563EB; --teal: #0D9488; --mint: #5EEAD4;
  --grad: linear-gradient(135deg, #14B8A6, #2563EB);
  --shadow: 0 1px 2px rgba(15,27,45,.06), 0 12px 32px -14px rgba(15,27,45,.22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: Sora, Inter, system-ui, sans-serif; color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
a { color: var(--blue); }
/* height:auto: las <img> llevan width/height (evita saltos al cargar), pero
   al encogerlas por CSS el alto debe seguir la proporción, no quedarse fijo. */
img { max-width: 100%; height: auto; display: block; }
svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.block { padding: 72px 0 0; }
.block h2 { font-size: clamp(26px, 3.6vw, 38px); }
.sub { color: var(--muted); margin: 10px 0 0; font-size: 17px; }
.center { text-align: center; }

/* ---------- cabecera sobre la foto ---------- */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font: 700 18px/1 Sora, sans-serif; }
.brand img { border-radius: 8px; }
.lang { font: 600 14px/1 Inter, sans-serif; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 8px 14px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* ---------- portada ---------- */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; background: #0B1426 var(--hero, none) center/cover no-repeat; color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,15,30,.55) 0%, rgba(8,15,30,.10) 30%, rgba(8,15,30,.55) 62%, rgba(8,15,30,.92) 100%); }
.hero-in { position: relative; width: 100%; padding-top: 120px; padding-bottom: 56px; }
.eyebrow { margin: 0 0 14px; font: 600 13px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); }
.hero h1 { color: #fff; font-size: clamp(40px, 7.2vw, 78px); font-weight: 800; max-width: 860px; text-wrap: balance; }
.promise { font-size: clamp(18px, 2.2vw, 23px); color: rgba(255,255,255,.88); max-width: 640px; margin: 18px 0 0; line-height: 1.45; }
.stats { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.stats li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font: 600 14px/1 Inter, sans-serif; }
.stats svg { color: var(--mint); width: 17px; height: 17px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.stores.center { justify-content: center; }
.store { display: inline-flex; align-items: center; gap: 11px; min-width: 186px; padding: 10px 20px 10px 16px; border-radius: 13px; background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.28); font: 600 19px/1.05 Inter, sans-serif; transition: transform .15s; }
.store:hover { transform: translateY(-2px); }
.store svg { width: 28px; height: 28px; }
.store small { display: block; font-size: 11px; font-weight: 500; opacity: .85; margin-bottom: 2px; }
.try { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: rgba(255,255,255,.85); font-size: 15px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 2px; }
.try svg { width: 16px; height: 16px; }

/* ---------- imprescindibles ---------- */
.cards { list-style: none; margin: 28px 0 0; padding: 4px max(22px, calc((100vw - 1120px) / 2 + 22px)) 18px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.card { flex: 0 0 clamp(220px, 26vw, 280px); scroll-snap-align: start; }
.card a { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: #CBD5E1; text-decoration: none; }
.card img, .card .noimg { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card .noimg { display: block; background: var(--grad); }
.card a:hover img { transform: scale(1.05); }
.card a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(8,15,30,.88) 100%); }
.num { position: absolute; top: 12px; left: 12px; z-index: 1; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; font: 700 14px/1 Sora, sans-serif; }
.cap { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 1; color: #fff; }
.cap b { display: block; font: 700 18px/1.2 Sora, sans-serif; }
.cap small { display: block; margin-top: 5px; font-size: 13.5px; line-height: 1.35; color: rgba(255,255,255,.82); }

/* ---------- cómo funciona ---------- */
.answer { background: var(--bg-alt); border-left: 4px solid var(--teal); border-radius: 0 16px 16px 0; padding: 22px 26px; margin-bottom: 64px; }
.answer h2 { font-size: clamp(20px, 2.4vw, 24px); }
.answer p { margin: 8px 0 0; font-size: 17px; color: var(--text); }
.steps { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.steps li { text-align: center; position: relative; }
.steps img { width: 100%; max-width: 260px; margin: 0 auto 18px; border-radius: 20px; box-shadow: var(--shadow); }
.steps .n { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; align-items: center; justify-content: center; font: 700 14px/1 Sora, sans-serif; margin-bottom: 10px; }
.steps h3 { font-size: 20px; }
.steps p { color: var(--muted); margin: 8px auto 0; max-width: 300px; }

/* ---------- rutas ---------- */
.route-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-top: 28px; }
.route { position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px 18px; box-shadow: var(--shadow); overflow: hidden; background: #fff; }
.route::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--c); }
.route h3 { font-size: 21px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 0; color: var(--ink); font-weight: 600; font-size: 14.5px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { color: var(--c); width: 17px; height: 17px; }
.hook { color: var(--muted); margin: 12px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; }
.chips a, .chips span { font-size: 13px; padding: 6px 11px; border-radius: 999px; background: var(--bg-alt); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.chips span { color: var(--muted); background: transparent; border-style: dashed; }
.route details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.route summary { cursor: pointer; font-weight: 600; color: var(--blue); font-size: 14.5px; }
.route details p { color: var(--muted); font-size: 15px; }
.route details ol { margin: 8px 0 0; padding-left: 22px; font-size: 15px; }

/* ---------- niños ---------- */
.kids { margin-top: 72px; padding: 0; background: linear-gradient(135deg, #FFF7E6 0%, #FDEBD3 100%); }
.kids-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.kids .medal { width: 96px; height: 96px; margin-bottom: 18px; filter: drop-shadow(0 8px 16px rgba(180,110,20,.35)); }
.kids p { font-size: 18px; color: #4A3B26; margin: 14px 0 0; max-width: 480px; }
.kids-shot { width: 100%; max-width: 300px; justify-self: center; border-radius: 22px; box-shadow: 0 18px 40px -18px rgba(120,70,10,.5); }

/* ---------- listado completo ---------- */
.all-list { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; }
.all-list summary { cursor: pointer; font: 600 16px/1 Inter, sans-serif; color: var(--blue); padding: 16px 0; }
.all-list h3 { font-size: 17px; color: var(--teal); margin: 18px 0 8px; }
.all-list ul { list-style: none; margin: 0 0 10px; padding: 0; }
.all-list li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.all-list li b { color: var(--ink); }
.all-list li span { color: var(--muted); }

/* ---------- preguntas ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq h2 { margin-bottom: 8px; }
.faq summary { cursor: pointer; font: 600 17px/1.4 Inter, sans-serif; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font: 400 24px/1 Inter, sans-serif; color: var(--blue); }
.faq details[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- cierre ---------- */
.final { position: relative; margin-top: 80px; background: #0B1426 var(--hero, none) center/cover no-repeat; color: #fff; text-align: center; }
/* En el móvil, la portada de 800 px (--hero-m) en vez de la de 1280. */
@media (max-width: 820px) { .hero, .final { background-image: var(--hero-m, var(--hero, none)); } }
.final::before { content: ""; position: absolute; inset: 0; background: rgba(8,15,30,.78); }
.final-in { position: relative; padding-top: 84px; padding-bottom: 84px; }
.final h2 { color: #fff; font-size: clamp(32px, 5vw, 54px); }
.final p { color: rgba(255,255,255,.85); font-size: 19px; margin: 14px 0 0; }

/* ---------- otras ciudades ---------- */
.more-cities { padding-bottom: 60px; }
.more { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.more a { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 16px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 600 16px/1 Sora, sans-serif; box-shadow: var(--shadow); }
.more img { width: 52px; height: 52px; object-fit: cover; border-radius: 11px; }
.more .all-cities { padding: 22px 18px; gap: 6px; color: var(--blue); }

/* ---------- barra fija del móvil ---------- */
.sticky { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 16px; background: rgba(11,20,38,.94); color: #fff; box-shadow: 0 14px 34px -10px rgba(0,0,0,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transform: translateY(150%); transition: transform .3s; font: 600 15px/1.2 Inter, sans-serif; }
.sticky.on { transform: none; }
.sticky .btn { background: var(--grad); color: #fff; text-decoration: none; padding: 12px 18px; border-radius: 11px; white-space: nowrap; }

footer { padding: 30px 0 110px; border-top: 1px solid var(--line); background: var(--bg-alt); font-size: 14px; color: var(--muted); }
footer .brand { color: var(--ink); font-size: 15px; margin-right: 6px; vertical-align: middle; }
footer a { color: var(--muted); }
.credits summary { cursor: pointer; }
.credits ul { padding-left: 18px; font-size: 12.5px; }

@media (max-width: 820px) {
  .block { padding-top: 56px; }
  /* En el móvil los 3 pasos se deslizan de lado, como los imprescindibles. */
  .steps { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 26px -22px 0; padding: 4px 22px 14px; }
  .steps li { flex: 0 0 74%; scroll-snap-align: center; }
  .steps img { max-width: 100%; }
  .kids-in { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .kids .medal { margin: 0 auto 16px; }
  .kids p { margin-left: auto; margin-right: auto; }
  .kids-shot { max-width: 250px; }
  .route-grid { grid-template-columns: 1fr; }
  .sticky { display: flex; }
  .hero-in { padding-bottom: 40px; }
  .store { min-width: 0; flex: 1 1 160px; }
}
@media (min-width: 821px) { footer { padding-bottom: 40px; } }
