/* =====================================================================
   SPEIN — Sistema de diseño del sitio público
   -----------------------------------------------------------------
   Concepto: la línea de ruta de un viaje en carretera. El motivo que
   se repite en todo el sitio es la línea punteada con paraderos (●),
   y las tarjetas con muesca perforada de un boleto de bus real.
   ===================================================================== */

:root {
  /* Color — asfalto nocturno + línea de carretera color ámbar */
  /*
  --asfalto-950: #12161c;
  --asfalto-800: #1b2430;
  --asfalto-600: #303c4d;
  --papel-100: #f4f2ec;
  --ambar-500: #e8823d;
  --ambar-400: #f0a15f;
  --verde-confirmacion: #2f6f5e;
  --texto-tenue: #93a0b3;
  */
  --asfalto-950: darkblue;
  --asfalto-800: deepskyblue;
  --asfalto-600: #333;
  --papel-100: #f4f2ec;
  --ambar-500: darkblue;
  --ambar-400: white;
  --verde-confirmacion: #2f6f5e;
  --texto-tenue: #93a0b3;
  /* Tipografía */
  --fuente-display: 'Space Grotesk', sans-serif;
  --fuente-cuerpo: 'IBM Plex Sans', sans-serif;
  --fuente-utilitaria: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--papel-100);
  color: var(--asfalto-950);
  font-family: var(--fuente-cuerpo);
  line-height: 1.5;
  /* Las muescas de .tarjeta-boleto y los paraderos de .linea-ruta sobresalen
     unos px a los lados; sin esto aparece una barra de scroll horizontal. */
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--fuente-display);
  letter-spacing: -0.01em;
  margin: 0;
}

.mono { font-family: var(--fuente-utilitaria); }

a { color: inherit; }

.contenedor {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Encabezado ---------- */
.encabezado {
  background: var(--ambar-500);
  color: var(--papel-100);
  padding: 18px 0;
}
.encabezado .contenedor { display: flex; align-items: center; justify-content: space-between; }
.marca { font-family: var(--fuente-display); font-weight: 700; font-size: 1.4rem; letter-spacing: 0.02em; }
.marca span { color: var(--texto-tenue); }
.nav-encabezado a { margin-left: 24px; text-decoration: none; color: var(--texto-tenue); font-size: 0.95rem; }
.nav-encabezado a:hover { color: var(--papel-100); }

/* ---------- Línea de ruta (motivo de firma) ---------- */
.linea-ruta {
  position: relative;
  height: 2px;
  background: repeating-linear-gradient(
    to right, var(--ambar-500) 0 10px, transparent 10px 20px
  );
  margin: 48px 0;
}
.linea-ruta::before, .linea-ruta::after {
  content: '';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ambar-500);
}
.linea-ruta::before { left: -4px; }
.linea-ruta::after { right: -4px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ambar-500);
  color: var(--papel-100);
  padding: 72px 0 96px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  max-width: 14ch;
}
.hero h1 em { font-style: normal; color: var(--asfalto-800); }
.hero p.subtitulo {
  color: var(--texto-tenue);
  font-size: 1.15rem;
  max-width: 46ch;
  margin-top: 16px;
}

/* Tarjeta de búsqueda estilo "boleto" con muesca perforada a los lados */
.tarjeta-boleto {
  position: relative;
  background: var(--papel-100);
  color: var(--asfalto-950);
  border-radius: 4px;
  padding: 28px;
  margin-top: 40px;
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.4);
}
.tarjeta-boleto::before, .tarjeta-boleto::after {
  content: '';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--asfalto-950);
}
.tarjeta-boleto::before { left: -12px; }
.tarjeta-boleto::after { right: -12px; }

.form-busqueda {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}
@media (max-width: 720px) {
  .form-busqueda { grid-template-columns: 1fr; }
}
.campo label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--asfalto-600);
  margin-bottom: 6px;
  font-family: var(--fuente-utilitaria);
}
.campo input, .campo select {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--asfalto-800);
  background: transparent;
  padding: 8px 2px;
  font-size: 1.05rem;
  font-family: var(--fuente-cuerpo);
  color: var(--asfalto-950);
}
.campo input:focus, .campo select:focus { outline: none; border-color: var(--ambar-500); }
.campo input:focus-visible, .campo select:focus-visible { outline: 2px solid var(--ambar-500); outline-offset: 2px; }
.boton-primary{
    background-color: var(--ambar-950) !important;
    color:  var(--asfalto-950) !important;
}
.bg-maestra{
    background-color: var(--asfalto-950) !important;
    color:  var(--asfalto-950) !important;
}
.boton {
  background: var(--ambar-500);
  color: var(--asfalto-800);
  border: none;
  border-radius: 4px;
  padding: 14px 28px;
  font-family: var(--fuente-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.boton:hover { background: var(--ambar-400); }
.boton:focus-visible { outline: 2px solid var(--asfalto-950); outline-offset: 2px; }
.boton:disabled { opacity: 0.5; cursor: not-allowed; }
.boton-secundario {
  background: transparent;
  border: 1px solid var(--asfalto-600);
  color: var(--papel-100);
}
.boton-secundario:hover { border-color: var(--ambar-500); color: var(--ambar-500); }

/* ---------- Franja de confianza ---------- */
.franja-datos {
  padding: 40px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.franja-datos .contenedor {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 720px) { .franja-datos .contenedor { grid-template-columns: repeat(2, 1fr); } }
.dato-numero { font-family: var(--fuente-display); font-size: 2rem; color: var(--ambar-500); }
.dato-etiqueta { font-size: 0.85rem; color: var(--asfalto-600); font-family: var(--fuente-utilitaria); }

/* ---------- Destinos ---------- */
.seccion { padding: 64px 0; }
.seccion h2 { font-size: 1.8rem; margin-bottom: 8px; }
.seccion .intro { color: var(--asfalto-600); max-width: 56ch; margin-bottom: 32px; }

.grid-destinos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.tarjeta-destino {
  background: var(--asfalto-950);
  color: var(--papel-100);
  border-radius: 4px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.tarjeta-destino::after {
  content: ' ';
  position: absolute;
  right: 16px; bottom: 12px;
  color: var(--ambar-500);
  font-size: 1.4rem;
}
.tarjeta-destino .ruta { font-family: var(--fuente-utilitaria); color: var(--texto-tenue); font-size: 0.8rem; }
.tarjeta-destino .nombre { font-family: var(--fuente-display); font-size: 1.3rem; margin-top: 4px; }
.tarjeta-destino .precio-desde { margin-top: 12px; font-size: 0.9rem; color: var(--ambar-500); }

/* ---------- Resultados de búsqueda ---------- */
.lista-viajes { display: flex; flex-direction: column; gap: 12px; }
.item-viaje {
  display: flex; align-items: center; justify-content: space-between;
  background: white; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 4px; padding: 18px 20px;
}
.item-viaje .hora { font-family: var(--fuente-display); font-size: 1.4rem; }
.item-viaje .detalle { color: var(--asfalto-600); font-size: 0.9rem; }
.item-viaje .precio { font-family: var(--fuente-utilitaria); font-size: 1.2rem; color: var(--ambar-500); }

/* ---------- Asientos ---------- */
.pestanas-piso { display: none; gap: 8px; margin-bottom: 16px; }

/* ---------- Carrocería del bus (marco decorativo de la grilla) ---------- */
.carroceria-bus {
  position: relative;
  border: 6px solid var(--asfalto-950);
  border-radius: 28px 28px 14px 14px;
  padding: 30px 20px 18px;
  margin: 20px 0 32px;
  background: var(--papel-100);
  max-width: fit-content;
}
/* Parabrisas panorámico: franja curva arriba, como el frente del bus */
.carroceria-bus::before {
  content: '';
  position: absolute;
  top: -6px; left: 14%; right: 14%;
  height: 16px;
  background: linear-gradient(180deg, #d7ecff, #f3faff);
  border: 3px solid var(--asfalto-950);
  border-bottom: none;
  border-radius: 40px 40px 0 0;
}
/* Espejos retrovisores, uno a cada lado */
.espejo {
  position: absolute;
  top: 14px;
  width: 16px; height: 28px;
  background: var(--asfalto-950);
  border-radius: 6px;
  z-index: 1;
}
.espejo-izq { left: -11px; }
.espejo-der { right: -11px; }
.pestana-piso {
  padding: 8px 20px; border: 2px solid var(--asfalto-800); border-radius: 4px;
  background: white; font-family: var(--fuente-display); font-weight: 700; cursor: pointer;
}
.pestana-piso.activa { background: var(--asfalto-950); color: var(--papel-100); }

.grid-asientos {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 100%; overflow-x: auto; margin: 24px 0; padding-bottom: 4px;
}
.fila-bus { display: flex; gap: 10px; }
.asiento {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 6px; border: 2px solid var(--asfalto-800);
  background: white; font-family: var(--fuente-utilitaria); cursor: pointer;
}
.asiento.hueco {
  border-style: dashed; border-color: #d1d5db; color: #9ca3af;
  display: flex; align-items: center; justify-content: center; cursor: default; font-size: 0.8rem;
}
.asiento[disabled] { background: #e5e1d6; color: var(--texto-tenue); border-color: #d8d4c8; cursor: not-allowed; }
.asiento.elegido { background: var(--ambar-500); border-color: var(--ambar-500); color: var(--asfalto-950); }

/* ---------- Pie ---------- */
.pie { background: var(--asfalto-950); color: var(--texto-tenue); padding: 40px 0; font-size: 0.9rem; }
.pie .contenedor { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

.uppercase{
     text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
