:root {
  --noche: #10283a;
  --mar: #0d5c8a;
  --ambar: #f2b705;
  --papel: #f5f3ee;
  --blanco: #fff;
  --texto: #1d2a33;
  --suave: #566672;
  --linea: #d9d6cd;
  --error: #a3341f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--texto);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--mar); }
h1, h2, h3 { line-height: 1.2; color: var(--noche); }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 0 0 .5rem; letter-spacing: -.02em; }
h2 { font-size: 1.6rem; margin: 0 0 1rem; }
h3 { font-size: 1.1rem; margin: 0 0 .3rem; }

.contenedor { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

.aviso-demo {
  background: var(--ambar);
  color: var(--noche);
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
  padding: .3rem 1rem;
}

.cabecera { background: var(--noche); color: var(--blanco); }
.cabecera .contenedor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-top: .9rem;
  padding-bottom: .9rem;
}
.marca { color: var(--blanco); font-weight: 700; text-decoration: none; }
.cabecera nav a { color: var(--blanco); font-weight: 600; }

.portada { background: var(--noche); color: #dbe5ec; padding: 2rem 0 3rem; }
.portada h1 { color: var(--blanco); }
.portada p { max-width: 42rem; margin: 0 0 1.5rem; }

.calculadora {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 1rem;
  align-items: stretch;
}

.panel {
  background: var(--blanco);
  color: var(--texto);
  border-radius: 10px;
  padding: 1.25rem;
}

#mapa {
  min-height: 420px;
  height: 100%;
  border-radius: 10px;
  background: #d6e3ea;
  z-index: 0;
}

.campo { position: relative; margin-bottom: .85rem; }
.campo label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .2rem; }
.campo input, .campo select {
  width: 100%;
  min-height: 46px;
  padding: .55rem .7rem;
  font: inherit;
  border: 1px solid #a9b3b9;
  border-radius: 6px;
  background: var(--blanco);
}
.dos-campos { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .75rem; }
.casilla { display: flex; align-items: center; gap: .55rem; min-height: 44px; margin-bottom: .6rem; font-weight: 600; font-size: .92rem; cursor: pointer; }
.casilla input { flex: none; width: 20px; height: 20px; margin: 0; }

.sugerencias {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  max-height: 290px;
  overflow-y: auto;
  background: var(--blanco);
  border: 1px solid #a9b3b9;
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(16, 40, 58, .2);
}
.sugerencias button {
  display: block;
  width: 100%;
  padding: .6rem .7rem;
  font: inherit;
  font-size: .95rem;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--linea);
  cursor: pointer;
}
.sugerencias button:hover, .sugerencias button:focus { background: #eaf2f7; }

.boton {
  display: inline-block;
  min-height: 46px;
  padding: .65rem 1.1rem;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: var(--noche);
  background: var(--ambar);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.boton:hover { background: #ffc91f; }
.boton.secundario { background: none; color: var(--mar); border: 1px solid var(--mar); }
#calcular .boton { width: 100%; }

.resultado { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--linea); }
.resultado[data-estado="no"] #resultado-texto { color: var(--error); font-weight: 600; }
#resultado-texto { margin: 0; }
.resultado .precio-grande { margin: .3rem 0 0; font-size: 2.5rem; font-weight: 800; line-height: 1.1; color: var(--noche); }
.resultado .etiqueta { margin: .5rem 0 0; font-weight: 600; font-size: .92rem; }
.resultado small { display: block; color: var(--suave); margin-top: .35rem; font-size: .88rem; line-height: 1.4; }
.reservar { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.reservar .boton { flex: 1 1 8rem; display: flex; align-items: center; justify-content: center; }

section.bloque { padding: 3rem 0; }
section.bloque.claro { background: var(--blanco); }

.rutas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.ruta {
  display: block;
  padding: 1.1rem;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-left: 5px solid var(--mar);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}
.ruta:hover { border-left-color: var(--ambar); }
.ruta p { margin: 0; color: var(--suave); font-size: .95rem; }
.ruta strong { color: var(--noche); }

.pasos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.pasos p { margin: 0; }

.tabla-envoltura { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--blanco); }
th, td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--linea); }
th { color: var(--noche); font-size: .92rem; }
td.num, th.num { text-align: right; white-space: nowrap; }
th.num { white-space: normal; }

.preguntas details { padding: .8rem 0; border-bottom: 1px solid var(--linea); }
.preguntas summary { font-weight: 600; cursor: pointer; }
.preguntas p { margin: .5rem 0 0; }

.pagina-ruta { max-width: 780px; }
.nota { color: var(--suave); font-size: .92rem; }

.pie { background: var(--noche); color: #dbe5ec; padding: 2rem 0; font-size: .95rem; }
.pie a { color: var(--blanco); }
.pie p { margin: .2rem 0; }

@media (max-width: 820px) {
  .calculadora { grid-template-columns: 1fr; }
  #mapa { min-height: 280px; height: 280px; }
}

.whatsapp-fijo {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.whatsapp-fijo:hover { background: #1ebe5b; color: #fff; }
.pie { padding-bottom: 5rem; }

.mi-ubicacion {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .4rem;
  padding: .35rem .1rem;
  border: 0;
  background: none;
  color: var(--mar);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.mi-ubicacion:disabled { color: var(--suave); cursor: wait; }
.aviso-campo { margin: .25rem 0 0; color: var(--error); font-size: .9rem; }
