/* =========================================================
   RESET BÁSICO
   ========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
}


/* =========================================================
   PALETA DE COLORES
   ========================================================= */

/*
   Azul principal:       #123B6D
   Azul institucional:   #010927
   Azul secundario:      #1E5A91
   Azul claro:           #EEF4FA
   Azul muy claro:       #F5F8FC
   Texto principal:      #1F2937
   Texto secundario:     #64748B
   Bordes:               #D9E2EC
*/


/* =========================================================
   HEADER
   ========================================================= */

.header {
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(1, 9, 39, 0.10);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.header__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #123B6D;
  background-color: #EEF4FA;
  flex-shrink: 0;
  transition: background-color 0.25s ease, color 0.25s ease,
    transform 0.25s ease, box-shadow 0.25s ease;
}

.header__back-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.header__back:hover {
  background-color: #123B6D;
  color: #ffffff;
  transform: translateX(-3px);
  box-shadow: 0 4px 10px rgba(18, 59, 109, 0.25);
}

.header__back:hover .header__back-icon {
  transform: translateX(-2px);
}

.header__back:active {
  transform: translateX(-1px) scale(0.94);
}

.header__logo-link {
  display: inline-block;
  line-height: 0;
  margin-right: auto;
}

.header__logo {
  height: 52px;
  width: auto;
  max-width: 100%;
  display: block;
}

/* =========================================================
   ICONOS DEL NAV
   ========================================================= */

.header__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}


.nav-icon {
  width: 18px;
  height: 18px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;

  flex-shrink: 0;

  transition: transform 0.25s ease;
}


/* Efecto al pasar el mouse */
.header__nav-link:hover .nav-icon {
  transform: translateY(-1px);
}


/* Icono de la opción activa */
.header__nav-link.is-active .nav-icon {
  stroke-width: 2.2;
}


/* =========================================================
   NAVEGACIÓN
   ========================================================= */

.header__nav-list {
  list-style: none;
  display: flex;
  gap: 30px;
}

.header__nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 16px;
  padding: 8px 4px;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.header__nav-link:hover {
  color: #123B6D;
}

.header__nav-link.is-active {
  color: #123B6D;
  border-bottom-color: #123B6D;
}


/* =========================================================
   BOTÓN HAMBURGUESA
   ========================================================= */

.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.header__toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #123B6D;
  border-radius: 2px;
}


/* =========================================================
   SECCIONES
   ========================================================= */

.section {
  display: none;
  padding: 60px 20px;
}

.section.is-active {
  display: block;
}

.section__container {
  max-width: 1200px;
  margin: 0 auto;
}

.section__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section__heading h1 {
  margin: 0;
}

.section__title {
  max-width: 560px;
}

.section__title p {
  margin-top: 8px;
  color: #64748B;
  font-size: 16px;
  line-height: 1.45;
}


/* =========================================================
   FILTROS
   ========================================================= */

.filtros-destinos {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 20px;
}

.campo-filtro {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campo-filtro--busqueda {
  flex: 1 1 420px;
  max-width: 520px;
}

.campo-filtro--dia {
  flex: 0 1 360px;
}

.campo-filtro span {
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.selector-dia {
  width: 100%;
  padding: 10px 14px;
  font-size: 16px;
  color: #1F2937;
  background-color: #fff;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  cursor: pointer;
}

.selector-dia:focus {
  outline: none;
  border-color: #123B6D;
  box-shadow: 0 0 0 3px rgba(18, 59, 109, 0.10);
}


/* =========================================================
   CONSULTA DE TARIFA
   ========================================================= */

.consulta-tarifa {
  width: 100%;
  max-width: 820px;
  padding: 28px;
  margin: 0 auto 28px;

  color: #1F2937;
  background-color: #ffffff;

  border: 1px solid #D9E2EC;
  border-radius: 12px;

  box-shadow: 0 12px 30px rgba(1, 9, 39, 0.08);
}


/* =========================================================
   ENCABEZADO
   ========================================================= */

.consulta-tarifa__paso {
  margin-bottom: 12px;

  color: #1E5A91;

  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.consulta-tarifa h2 {
  margin: 0;

  color: #010927;

  font-size: 27px;
  line-height: 1.2;
}

.consulta-tarifa__intro {
  margin: 10px 0 0;

  color: #64748B;

  font-size: 16px;
  line-height: 1.5;
}


/* =========================================================
   CAMPOS DE BÚSQUEDA
   ========================================================= */

.consulta-tarifa__campos {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 18px;
  margin-top: 24px;
}

.consulta-tarifa__campo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.consulta-tarifa__campo > span,
.consulta-tarifa__campo label > span {
  color: #334155;

  font-size: 16px;
  font-weight: 800;
}


/* =========================================================
   ORIGEN
   ========================================================= */

.consulta-tarifa__campo strong {
  display: flex;
  align-items: center;

  width: 100%;
  min-height: 58px;
  padding: 15px 18px;

  color: #010927;
  background-color: #F5F8FC;

  border: 1px solid #D9E2EC;
  border-radius: 8px;

  font-size: 20px;
  font-weight: 800;
}


/* =========================================================
   INPUT
   ========================================================= */

.consulta-tarifa__input-wrapper {
  position: relative;
}

.consulta-tarifa__campo input {
  width: 100%;
  min-height: 58px;

  padding: 15px 48px 15px 18px;

  color: #1F2937;
  background-color: #F5F8FC;

  border: 1px solid #D9E2EC;
  border-radius: 8px;

  font-family: inherit;
  font-size: 20px;
  font-weight: 700;

  text-transform: uppercase;
  box-sizing: border-box;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.consulta-tarifa__campo input::placeholder {
  color: #94A3B8;
  text-transform: none;
  font-weight: 500;
}

.consulta-tarifa__campo input:focus {
  outline: none;

  background-color: #ffffff;

  border-color: #123B6D;

  box-shadow: 0 0 0 3px rgba(18, 59, 109, 0.12);
}


/* =========================================================
   ICONO DE BÚSQUEDA
   ========================================================= */

.consulta-tarifa__icono {
  position: absolute;

  top: 50%;
  right: 17px;

  transform: translateY(-50%);

  color: #123B6D;

  font-size: 19px;

  pointer-events: none;
}


/* =========================================================
   SUGERENCIAS DE DESTINO
   ========================================================= */

.consulta-tarifa__sugerencias {
  position: absolute;

  top: calc(100% + 5px);
  left: 0;
  right: 0;

  z-index: 20;

  display: none;

  max-height: 230px;

  overflow-y: auto;

  background-color: #ffffff;

  border: 1px solid #D9E2EC;
  border-radius: 8px;

  box-shadow: 0 10px 25px rgba(1, 9, 39, 0.12);
}

.consulta-tarifa__sugerencias.is-visible {
  display: block;
}


/* Cada destino */

.consulta-tarifa__sugerencia {
  display: flex;
  align-items: center;
  gap: 10px;

  width: 100%;

  padding: 13px 16px;

  color: #1F2937;
  background-color: #ffffff;

  border: 0;
  border-bottom: 1px solid #EEF2F6;

  font-family: inherit;
  font-size: 15px;
  font-weight: 700;

  text-align: left;

  cursor: pointer;
  box-sizing: border-box;
}

.consulta-tarifa__sugerencia:last-child {
  border-bottom: none;
}

.consulta-tarifa__sugerencia:hover,
.consulta-tarifa__sugerencia:focus {
  outline: none;

  color: #123B6D;
  background-color: #EEF4FA;
}

.consulta-tarifa__sugerencia-icono {
  color: #123B6D;
  font-size: 15px;
}


/* =========================================================
   RESULTADOS
   ========================================================= */

.consulta-tarifa__resultados {
  display: grid;
  gap: 14px;

  margin-top: 24px;
}


/* =========================================================
   ESTADO INICIAL
   ========================================================= */

.consulta-tarifa__estado {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 18px;

  color: #64748B;
  background-color: #F5F8FC;

  border: 1px dashed #CBD5E1;
  border-radius: 10px;
}

.consulta-tarifa__estado-icono {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;
  flex: 0 0 42px;

  color: #123B6D;
  background-color: #ffffff;

  border: 1px solid #D9E2EC;
  border-radius: 50%;

  font-size: 20px;
}

.consulta-tarifa__estado strong {
  display: block;

  color: #1F2937;

  font-size: 16px;
}

.consulta-tarifa__estado p {
  margin: 4px 0 0;

  font-size: 14px;
  line-height: 1.4;
}


/* =========================================================
   TARJETA DE TARIFA
   ========================================================= */

.tarifa-card {
  overflow: hidden;

  background-color: #ffffff;

  border: 1px solid #D9E2EC;
  border-radius: 10px;

  box-shadow: 0 4px 12px rgba(1, 9, 39, 0.04);
}


/* =========================================================
   RUTA
   ========================================================= */

.tarifa-card__ruta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;

  padding: 18px 20px 12px;

  color: #010927;

  font-size: 18px;
  font-weight: 800;
}

.tarifa-card__origen {
  color: #1F2937;
}

.tarifa-card__destino {
  color: #123B6D;
}

.tarifa-card__flecha {
  color: #1E5A91;

  font-size: 20px;
}


/* =========================================================
   TERMINAL DE SALIDA
   ========================================================= */

.tarifa-card__terminal {
  display: flex;
  align-items: center;
  gap: 9px;

  width: fit-content;

  margin: 0 20px 18px;
  padding: 9px 13px;

  color: #123B6D;
  background-color: #EEF4FA;

  border: 1px solid #C9D9EA;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 800;
}

.tarifa-card__terminal-icono {
  color: #123B6D;
  font-size: 16px;
}


/* =========================================================
   PRECIOS
   ========================================================= */

.tarifa-card__valores {
  display: grid;
  grid-template-columns: 1fr 1fr;

  border-top: 1px solid #D9E2EC;
}

.tarifa-card__valor {
  padding: 20px;

  text-align: center;
}

.tarifa-card__valor + .tarifa-card__valor {
  border-left: 1px solid #D9E2EC;
}

.tarifa-card__label {
  display: block;

  color: #64748B;

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.3px;

  text-transform: uppercase;
}

.tarifa-card__precio {
  display: block;

  margin-top: 7px;

  color: #123B6D;

  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}


/* =========================================================
   SIN RESULTADOS
   ========================================================= */

.consulta-tarifa__sin-resultados {
  padding: 22px;

  text-align: center;

  background-color: #F5F8FC;

  border: 1px solid #D9E2EC;
  border-radius: 10px;
}

.consulta-tarifa__sin-resultados-icono {
  display: block;

  margin-bottom: 8px;

  color: #123B6D;

  font-size: 28px;
}

.consulta-tarifa__sin-resultados strong {
  display: block;

  color: #1F2937;

  font-size: 17px;
}

.consulta-tarifa__sin-resultados p {
  margin: 6px 0 0;

  color: #64748B;

  font-size: 14px;
}


/* =========================================================
   RUTA NO ENCONTRADA
   ========================================================= */

.consulta-tarifa__no-ruta {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 20px;

  background-color: #F5F8FC;

  border: 1px solid #C9D9EA;
  border-radius: 10px;
}

.consulta-tarifa__no-ruta-icono {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;
  flex: 0 0 42px;

  color: #123B6D;
  background-color: #EEF4FA;

  border: 1px solid #C9D9EA;
  border-radius: 50%;

  font-size: 20px;
  font-weight: 800;
}

.consulta-tarifa__no-ruta strong {
  display: block;

  color: #123B6D;

  font-size: 16px;
}

.consulta-tarifa__no-ruta p {
  margin: 4px 0 0;

  color: #64748B;

  font-size: 14px;
  line-height: 1.4;
}


/* =========================================================
   NOTA
   ========================================================= */

.consulta-tarifa__nota {
  margin: 18px 0 0;

  padding: 14px 16px;

  color: #334155;
  background-color: #EEF4FA;

  border: 1px solid #C9D9EA;
  border-radius: 8px;

  font-size: 14px;
  line-height: 1.5;
}


/* =========================================================
   SWITCH DE TERMINALES
   ========================================================= */

.terminal-switch {
  position: relative;

  display: grid;

  /* AHORA SON 3 OPCIONES */
  grid-template-columns: repeat(3, 1fr);

  width: min(100%, 700px);
  min-height: 50px;

  padding: 4px;

  background-color: #F1F5F9;

  border: 1px solid #D9E2EC;
  border-radius: 999px;
}


/* =========================================================
   OPCIONES DEL SWITCH
   ========================================================= */

.terminal-switch__option {
  position: relative;
  z-index: 1;

  border: 0;
  background: transparent;

  color: #64748B;

  font-family: inherit;
  font-size: 14px;
  font-weight: 700;

  line-height: 1.2;

  padding: 10px 14px;

  border-radius: 999px;

  cursor: pointer;

  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.terminal-switch__option:hover {
  color: #123B6D;
}

.terminal-switch__option.is-active {
  color: #ffffff;
}


/* =========================================================
   INDICADOR AZUL
   ========================================================= */

.terminal-switch__indicator {
  position: absolute;

  top: 4px;
  left: 4px;

  /*
     Ahora ocupa 1/3 del switch
  */
  width: calc(33.333333% - 4px);

  height: calc(100% - 8px);

  background-color: #123B6D;

  border-radius: 999px;

  box-shadow: 0 4px 10px rgba(18, 59, 109, 0.28);

  transition: transform 0.25s ease;
}


/* =========================================================
   POSICIÓN DEL INDICADOR
   ========================================================= */

/* Segundo elemento: Ingahurco */
.terminal-switch.is-cti .terminal-switch__indicator {
  transform: translateX(100%);
}


/* Tercer elemento: Consultar pasaje */
.terminal-switch.is-tarifa .terminal-switch__indicator {
  transform: translateX(200%);
}


/* =========================================================
   PANELES DE TERMINAL
   ========================================================= */

.terminal-panel {
  display: none;
}

.terminal-panel.is-active {
  display: block;
}

/* =========================================================
   CONTACTOS
   ========================================================= */

.contactos {
  margin-top: 18px;
}


/* =========================================================
   BUSCADOR
   ========================================================= */

.buscador {
  width: 100%;
  max-width: 400px;

  padding: 10px 14px;

  font-size: 16px;

  color: #1F2937;
  background-color: #ffffff;

  border: 1px solid #CBD5E1;
  border-radius: 6px;

  margin-bottom: 20px;

  display: block;
}

.campo-filtro .buscador {
  max-width: none;
  margin-bottom: 0;
}

.buscador:focus {
  outline: none;

  border-color: #123B6D;

  box-shadow: 0 0 0 3px rgba(18, 59, 109, 0.10);
}


/* =========================================================
   TABLA
   ========================================================= */

.tabla-wrapper {
  width: 100%;

  overflow-x: auto;
  max-height: 65vh;
  overflow-y: auto;

  border: 1px solid #D9E2EC;
  border-radius: 6px;
}

.tabla-datos {
  width: 100%;

  border-collapse: collapse;

  min-width: 600px;
}

.tabla-contactos {
  min-width: 420px;
}

.tabla-contactos th:first-child,
.tabla-contactos td:first-child {
  width: 72px;
  text-align: center;
}


/* =========================================================
   ENCABEZADO DE TABLA
   ========================================================= */

.tabla-datos thead th {
  background-color: #123B6D;

  color: #ffffff;

  text-align: left;

  padding: 12px 15px;

  font-size: 14px;

  position: sticky;
  top: 0;

  z-index: 1;
}


/* =========================================================
   CELDAS
   ========================================================= */

.tabla-datos tbody td {
  padding: 10px 15px;

  font-size: 14px;

  border-bottom: 1px solid #E8EDF3;
}


/* =========================================================
   FILAS
   ========================================================= */

.tabla-datos tbody tr:nth-child(even) {
  background-color: #F8FAFC;
}

.tabla-datos tbody tr:hover {
  background-color: #EEF4FA;
}


/* =========================================================
   RESULTADO DE TABLA
   ========================================================= */

.tabla-resultado {
  margin-top: 10px;

  font-size: 14px;

  color: #64748B;
}


/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 768px) {

  .header__logo {
    height: 44px;
  }

  .header__back {
    width: 34px;
    height: 34px;
  }

  .header__back-icon {
    width: 16px;
    height: 16px;
  }

  .header__toggle {
    display: flex;
  }

  .header__nav {
    position: absolute;

    top: 100%;
    left: 0;

    width: 100%;

    background-color: #ffffff;

    box-shadow: 0 4px 6px rgba(1, 9, 39, 0.10);

    max-height: 0;

    overflow: hidden;

    transition: max-height 0.3s ease;
  }

  .header__nav.is-open {
    max-height: 300px;
  }

  .header__nav-list {
    flex-direction: column;

    gap: 0;

    padding: 10px 20px;
  }

  .header__nav-link {
    display: block;

    padding: 12px 0;

    border-bottom: 1px solid #E8EDF3;
  }

  .header__container {
    position: relative;
  }

  .filtros-destinos {
    align-items: stretch;

    flex-direction: column;

    gap: 14px;
  }

  .campo-filtro--busqueda,
  .campo-filtro--dia {
    flex: 1 1 auto;

    max-width: none;

    width: 100%;
  }

  .consulta-tarifa {
    max-width: none;

    padding: 22px;
  }

  .consulta-tarifa__campos {
    grid-template-columns: 1fr;
  }

  /*
     En tablet reducimos un poco el tamaño
     del texto del switch para que las 3
     opciones entren cómodamente.
  */

  .terminal-switch {
    width: 100%;
    max-width: 100%;
  }

  .terminal-switch__option {
    font-size: 13px;
    padding: 10px 8px;
  }
}


/* =========================================================
   RESPONSIVE - MÓVIL
   ========================================================= */

@media (max-width: 480px) {

  .header__container {
    padding: 8px 15px;
  }

  .header__logo {
    height: 38px;
  }

  .header__back {
    width: 30px;
    height: 30px;
  }

  .header__back-icon {
    width: 14px;
    height: 14px;
  }

  .section {
    padding: 40px 15px;
  }

  .section__heading {
    align-items: stretch;

    flex-direction: column;

    gap: 16px;
  }


  /* =======================================================
     SWITCH EN MÓVIL
     ======================================================= */

  .terminal-switch {
    width: 100%;

    min-height: 46px;

    padding: 3px;
  }

  .terminal-switch__option {
    font-size: 11px;

    padding: 9px 5px;

    white-space: normal;
  }

  .terminal-switch__indicator {
    top: 3px;
    left: 3px;

    width: calc(33.333333% - 3px);

    height: calc(100% - 6px);
  }


  /* =======================================================
     CONSULTA DE TARIFA
     ======================================================= */

  .consulta-tarifa {
    padding: 18px;
  }

  .consulta-tarifa h2 {
    font-size: 22px;
  }

  .consulta-tarifa__intro {
    font-size: 15px;
  }

  .consulta-tarifa__campo strong,
  .consulta-tarifa__campo input {
    min-height: 52px;

    font-size: 17px;
  }


  /* =======================================================
     TARJETA DE TARIFA
     ======================================================= */

  .tarifa-card__ruta {
    font-size: 16px;
  }

  .tarifa-card__valores {
    grid-template-columns: 1fr;
  }

  .tarifa-card__valor + .tarifa-card__valor {
    border-top: 1px solid #D9E2EC;

    border-left: 0;
  }

  .tarifa-card__precio {
    font-size: 30px;
  }


  /* =======================================================
     TABLAS
     ======================================================= */

  .tabla-datos {
    min-width: 500px;
  }

  .tabla-datos thead th,
  .tabla-datos tbody td {
    padding: 8px 10px;

    font-size: 13px;
  }


  /* =======================================================
     TERMINAL
     ======================================================= */

  .consulta-tarifa__terminal {
    max-width: calc(100% - 40px);
  }

}