@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato-regular-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato-bold-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --papel: #f4f4ee;
  --tinta: #273933;
  --suave: #69736d;
  --linea: #d8ddd5;
  --verde: #496c5e;
  --gastronomia: #c16b4a;
  --alojamiento: #4e7880;
  --atractivos: #879353;
  --pendiente: #655d78;
  font-family: "Lato", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  overflow: hidden;
  background: var(--papel);
  color: var(--tinta);
}

button,
input,
select {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #9aa876;
  outline-offset: 2px;
}

.aplicacion {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
}

.panel-lateral {
  position: relative;
  z-index: 500;
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: auto;
  padding: 31px 26px 18px;
  border-right: 1px solid var(--linea);
  background:
    radial-gradient(ellipse at 0 0, rgba(164, 183, 157, 0.18), transparent 38%),
    var(--papel);
}

.encabezado {
  padding-bottom: 22px;
}

.sobrelinea {
  margin: 0 0 12px;
  color: var(--verde);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.encabezado h1 {
  margin: 0;
  color: #243a32;
  font-size: clamp(32px, 3vw, 39px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.bajada {
  max-width: 220px;
  margin: 14px 0 0;
  color: var(--suave);
  font-size: 13px;
  line-height: 1.5;
}

.resumen {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 8px;
  padding: 15px 0 17px;
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
}

.resumen-cifra,
.resumen-etiqueta,
.resumen-total {
  margin: 0;
}

.resumen-cifra {
  grid-row: span 2;
  color: var(--verde);
  font-size: 33px;
  letter-spacing: -0.04em;
  line-height: 1;
}

.resumen-cifra strong {
  font-weight: 700;
}

.resumen-etiqueta {
  align-self: end;
  font-size: 13px;
  font-weight: 700;
}

.resumen-total {
  align-self: start;
  color: var(--suave);
  font-size: 11px;
}

.filtros {
  display: grid;
  gap: 16px;
  padding: 22px 0 20px;
}

.campo {
  display: grid;
  gap: 7px;
  color: #4c5b53;
  font-size: 12px;
  font-weight: 700;
}

.campo input,
.campo select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d3d9d0;
  border-radius: 5px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--tinta);
  font-size: 13px;
  font-weight: 400;
}

.campo input::placeholder {
  color: #8a938d;
}

.campo input:hover,
.campo select:hover {
  border-color: #aab8ac;
}

.boton-limpiar {
  justify-self: start;
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--verde);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.boton-limpiar:hover {
  color: #2d5143;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sin-resultados {
  margin: -3px 0 17px;
  border-left: 2px solid #c28b67;
  padding: 2px 0 2px 10px;
  color: #62594d;
  font-size: 12px;
  line-height: 1.5;
}

.leyenda {
  padding: 17px 0 18px;
  border-top: 1px solid var(--linea);
}

.leyenda h2,
.ficha h2 {
  margin: 0;
  color: #3a4e43;
  font-size: 13px;
  font-weight: 700;
}

.leyenda ul {
  display: grid;
  gap: 10px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.leyenda li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #56635b;
  font-size: 12px;
}

.muestra {
  display: inline-block;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(39, 57, 51, 0.3);
}

.muestra-gastronomia {
  background: var(--gastronomia);
}

.muestra-alojamiento {
  background: var(--alojamiento);
}

.muestra-atractivos {
  background: var(--atractivos);
}

.muestra-pendiente {
  border: 1px dashed var(--pendiente);
  background: transparent;
  box-shadow: none;
}

.nota-leyenda {
  margin: 12px 0 0;
  color: #7a837d;
  font-size: 10px;
  line-height: 1.45;
}

.ficha {
  min-height: 85px;
  margin-top: auto;
  border-top: 1px solid var(--linea);
  padding: 17px 0 13px;
}

.ficha-titulo {
  overflow-wrap: anywhere;
}

.ficha-inicial {
  max-width: 230px;
  margin: 8px 0 0;
  color: #778078;
  font-size: 12px;
  line-height: 1.5;
}

.ficha-categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.ficha-categoria {
  border-radius: 20px;
  padding: 4px 8px;
  background: #e7ebe2;
  color: #42584b;
  font-size: 10px;
  line-height: 1.2;
}

.ficha-estado {
  margin: 9px 0 0;
  color: #5c665f;
  font-size: 11px;
  font-weight: 700;
}

.ficha-datos {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
}

.ficha-dato {
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
}

.ficha-dato dt {
  color: #7b857e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ficha-dato dd {
  margin: 0;
  color: #35473e;
  font-size: 12px;
  line-height: 1.45;
}

.ficha-dato a {
  color: #426957;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.aviso-aproximado {
  margin: 13px 0 0;
  border-left: 2px solid #c58a5c;
  padding: 3px 0 3px 9px;
  color: #6f5944;
  font-size: 11px;
  line-height: 1.45;
}

.atribucion-datos {
  margin: 11px 0 0;
  color: #77817a;
  font-size: 10px;
  line-height: 1.5;
}

.atribucion-datos a {
  color: #55685c;
}

.zona-mapa {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #e9ece5;
}

#mapa {
  width: 100%;
  height: 100%;
  background: #e8ece6;
}

.boton-encuadre {
  position: absolute;
  z-index: 650;
  top: 13px;
  right: 69px;
  min-height: 34px;
  border: 1px solid rgba(63, 79, 68, 0.18);
  border-radius: 4px;
  padding: 0 11px;
  background: rgba(250, 250, 246, 0.96);
  box-shadow: 0 1px 5px rgba(34, 47, 39, 0.18);
  color: #40564a;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.boton-encuadre:hover:not(:disabled) {
  background: #fff;
}

.boton-encuadre:disabled {
  cursor: wait;
  opacity: 0.7;
}

.estado-mapa,
.error-mapa,
.aviso-mapa {
  position: absolute;
  z-index: 700;
  left: 50%;
  max-width: min(380px, calc(100% - 32px));
  transform: translateX(-50%);
  border: 1px solid rgba(65, 82, 70, 0.12);
  border-radius: 5px;
  padding: 11px 15px;
  background: rgba(250, 250, 246, 0.96);
  box-shadow: 0 4px 16px rgba(35, 48, 40, 0.14);
  color: #4d5d52;
  font-size: 12px;
  line-height: 1.45;
}

.estado-mapa {
  top: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.estado-mapa[hidden],
.error-mapa[hidden],
.aviso-mapa[hidden] {
  display: none;
}

.indicador-carga {
  width: 12px;
  height: 12px;
  border: 2px solid #d2ddd2;
  border-top-color: var(--verde);
  border-radius: 50%;
  animation: giro 0.8s linear infinite;
}

.error-mapa {
  top: 18px;
  border-left: 3px solid #b75b48;
}

.aviso-mapa {
  right: 16px;
  bottom: 36px;
  left: auto;
  max-width: min(340px, calc(100% - 32px));
  transform: none;
  border-left: 3px solid #c08b55;
}

.leaflet-container {
  color: var(--tinta);
  font-family: "Lato", sans-serif;
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(63, 79, 68, 0.18) !important;
  border-radius: 4px !important;
  box-shadow: 0 1px 5px rgba(34, 47, 39, 0.16) !important;
}

.leaflet-control-zoom a {
  color: #40564a !important;
}

.leaflet-control-attribution {
  background: rgba(250, 250, 246, 0.88) !important;
  color: #48574d;
  font-size: 10px !important;
}

.leaflet-control-attribution a {
  color: #385c4b !important;
}

.visor-punto {
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(35, 48, 40, 0.55);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.visor-punto.categoria-gastronomia {
  background: var(--gastronomia);
}

.visor-punto.categoria-alojamiento {
  background: var(--alojamiento);
}

.visor-punto.categoria-atractivos_turisticos {
  background: var(--atractivos);
}

.visor-punto.punto-pendiente {
  border: 2px dashed #514a61;
  opacity: 0.82;
}

.visor-punto.punto-seleccionado {
  transform: scale(1.4);
  box-shadow: 0 0 0 3px rgba(250, 250, 246, 0.95), 0 2px 8px rgba(35, 48, 40, 0.55);
}

.visor-cluster {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(35, 48, 40, 0.35);
}

.visor-cluster span {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.visor-cluster.categoria-gastronomia {
  background: rgba(166, 82, 54, 0.89);
}

.visor-cluster.categoria-alojamiento {
  background: rgba(55, 103, 112, 0.9);
}

.visor-cluster.categoria-atractivos_turisticos {
  background: rgba(112, 128, 64, 0.9);
}

.visor-cluster.con-pendientes {
  border-style: dashed;
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(68, 60, 84, 0.65), 0 1px 5px rgba(35, 48, 40, 0.35);
}

@keyframes giro {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .aplicacion {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(275px, 42dvh) minmax(300px, 58dvh);
    min-height: 575px;
    height: 100dvh;
  }

  .panel-lateral {
    padding: 20px 21px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--linea);
  }

  .encabezado {
    padding-bottom: 14px;
  }

  .encabezado h1 {
    font-size: 31px;
  }

  .bajada {
    margin-top: 8px;
  }

  .resumen {
    padding: 11px 0;
  }

  .resumen-cifra {
    font-size: 28px;
  }

  .filtros {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 15px 0;
  }

  .campo:first-child {
    grid-column: 1 / -1;
  }

  .campo input,
  .campo select {
    min-height: 40px;
  }

  .boton-limpiar {
    align-self: end;
    min-height: 38px;
  }

  .leyenda {
    padding: 13px 0;
  }

  .leyenda ul {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .ficha {
    margin-top: 0;
    padding-top: 13px;
  }

  .atribucion-datos {
    margin-top: 4px;
  }
}

@media (max-width: 390px) {
  .panel-lateral {
    padding-right: 16px;
    padding-left: 16px;
  }

  .leyenda ul {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
