/* ---- Rutas por el término: [xihuela_rutas] ---- */
.xh-rutas{margin:0 0 36px}
.xh-rutas *,.xh-rutas *::before,.xh-rutas *::after{box-sizing:border-box}
.xh-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.xh-rutas-nota{color:var(--wp--preset--color--muted);margin:0 0 20px;font-size:.78rem;line-height:1.5}

/* selector */
.xh-rutas-panel{margin:0 0 8px}
.xh-rutas-selector{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px;padding:12px 0;border-top:1px solid var(--xh-line-ink);border-bottom:1px solid var(--xh-line-ink)}
.xh-rutas-btn{font:inherit;font-family:var(--wp--preset--font-family--mono);font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;line-height:1.3;padding:8px 12px;min-height:40px;border:1px solid var(--wp--preset--color--ink);background:transparent;color:var(--wp--preset--color--ink);cursor:pointer;border-radius:2px;display:inline-flex;align-items:center;gap:8px}
.xh-rutas-btn:hover{background:var(--wp--preset--color--parch)}
.xh-rutas-btn[aria-pressed="true"]{background:var(--wp--preset--color--ink);color:var(--wp--preset--color--parch)}
.xh-rutas-btn:focus-visible,.xh-parada-ver:focus-visible,.xh-ruta-gpx:focus-visible,.xh-perfil-in:focus-visible{outline:3px solid var(--wp--preset--color--gold-dark);outline-offset:2px}
.xh-rutas-btn-km{opacity:.75;letter-spacing:.02em}
.xh-rutas-sw{display:inline-block;width:14px;height:4px;border-radius:2px;flex:none;vertical-align:middle;box-shadow:0 0 0 1px rgba(255,255,255,.6)}

/* mapa */
.xh-rutas-mapa{height:540px;max-height:75vh;border:1px solid var(--xh-line-ink);background:var(--wp--preset--color--parch-2);margin:0 0 8px;z-index:0}
.xh-rutas-leyenda{display:flex;flex-wrap:wrap;gap:6px 16px;margin:0 0 6px;font-size:.8rem;color:var(--wp--preset--color--muted)}
.xh-rutas-ley{display:inline-flex;align-items:center;gap:6px}
.xh-rutas-ley i{display:inline-block;flex:none}
.xh-rutas-ley-salida{width:14px;height:14px;border-radius:50%;background:var(--wp--preset--color--ink);box-shadow:0 0 0 2px var(--wp--preset--color--gold-2)}
.xh-rutas-ley-num{width:16px;height:16px;border-radius:50%;background:var(--wp--preset--color--muted);color:#fff;font-style:normal;font-family:var(--wp--preset--font-family--mono);font-size:.6rem;line-height:16px;text-align:center}
.xh-rutas-ley-cruce{width:14px;height:12px;background:var(--wp--preset--color--gold-2);clip-path:polygon(50% 0,100% 100%,0 100%)}
.xh-rutas-ley-line{width:22px;height:0;border-top:3px solid}
.xh-rutas-ley-rio{border-color:#6E9FBF}
.xh-rutas-ley-canada{border-top-style:dashed;border-color:#5B7B3A}
.xh-rutas-ley-limite{border-top:2px dashed #5A6172}

/* marcadores */
.xh-rutas-mk span{display:block;width:24px;height:24px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.5);color:#fff;font-family:var(--wp--preset--font-family--mono);font-size:12px;font-weight:600;line-height:20px;text-align:center}
.xh-rutas-mk-aprox span{border-style:dashed}
.xh-rutas-mk-salida span{width:26px;height:26px;line-height:22px;background:var(--wp--preset--color--ink);color:var(--wp--preset--color--parch);box-shadow:0 0 0 3px var(--wp--preset--color--gold-2),0 1px 5px rgba(0,0,0,.5)}
.xh-rutas-mk-cruce{filter:drop-shadow(0 0 1px #0F1E3A) drop-shadow(0 1px 2px rgba(0,0,0,.45))}
.xh-rutas-mk-cruce span{width:22px;height:20px;border:0;border-radius:0;box-shadow:none;background:var(--wp--preset--color--gold-2);color:var(--wp--preset--color--ink);clip-path:polygon(50% 0,100% 100%,0 100%);line-height:24px;font-size:11px;font-weight:700}
.xh-rutas-pop-tipo{display:block;font-family:var(--wp--preset--font-family--mono);font-size:.66rem;letter-spacing:.08em;text-transform:uppercase;color:var(--wp--preset--color--gold-dark)}
.xh-rutas-pop-meta{display:block;font-family:var(--wp--preset--font-family--mono);font-size:.68rem;color:var(--wp--preset--color--muted)}

/* tabla comparativa */
.xh-rutas-h2{margin-top:40px}
.xh-rutas-tabla-wrap{max-width:100%;overflow-x:auto;margin:0 0 28px}
.xh-rutas-tabla{width:100%;border-collapse:collapse;font-size:.92rem}
.xh-rutas-tabla th,.xh-rutas-tabla td{text-align:left;padding:10px 12px 10px 0;border-bottom:1px solid var(--xh-line-ink);vertical-align:top}
.xh-rutas-tabla thead th{font-family:var(--wp--preset--font-family--mono);font-size:.66rem;letter-spacing:.1em;text-transform:uppercase;font-weight:400;color:var(--wp--preset--color--gold-dark);border-bottom:1px solid var(--wp--preset--color--ink)}
.xh-rutas-tabla tbody th{font-weight:600}
.xh-rutas-tabla tbody th a{text-decoration:none}
.xh-rutas-tabla tbody th .xh-rutas-sw{margin-right:8px;width:18px}

/* ficha de ruta */
.xh-rutas-lista{display:block}
.xh-ruta{margin:0 0 40px;padding:22px 0 0;border-top:3px solid var(--xh-ruta-color,var(--wp--preset--color--ink))}
.xh-ruta[hidden]{display:none}
.xh-ruta.is-activa{border-top-width:6px;padding-top:19px}
.xh-ruta-kicker{font-family:var(--wp--preset--font-family--mono);font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--wp--preset--color--gold-dark);margin:0 0 4px}
.xh-ruta-h{font-family:var(--wp--preset--font-family--display);font-weight:500;font-size:clamp(1.45rem,1.1rem + 1.4vw,1.9rem);line-height:1.15;margin:0 0 8px;color:var(--wp--preset--color--ink)}
.xh-ruta-h:focus{outline:none}
.xh-ruta-resumen{font-size:1.06rem;line-height:1.55;margin:0 0 16px;max-width:68ch}
.xh-ruta-datos{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;margin:0 0 10px;border-top:1px solid var(--xh-line-ink);border-bottom:1px solid var(--xh-line-ink)}
.xh-ruta-datos>div{padding:10px 12px 10px 0}
.xh-ruta-datos dt{font-family:var(--wp--preset--font-family--mono);font-size:.62rem;letter-spacing:.1em;text-transform:uppercase;color:var(--wp--preset--color--gold-dark);margin:0 0 2px}
.xh-ruta-datos dd{margin:0;font-family:var(--wp--preset--font-family--display);font-size:1.15rem;line-height:1.25;color:var(--wp--preset--color--ink)}
.xh-ruta-firme{font-size:.88rem;color:var(--wp--preset--color--muted);margin:0 0 18px;max-width:72ch}

/* perfil */
.xh-ruta-perfil{margin:0 0 20px;padding:14px 12px 8px;background:var(--wp--preset--color--paper);border:1px solid var(--xh-line-ink)}
.xh-ruta-perfil figcaption{color:var(--wp--preset--color--muted);font-size:.72rem;margin-top:6px}
.xh-perfil{padding:4px 4px 22px 38px}
.xh-perfil-in{position:relative;height:130px;touch-action:pan-y}
.xh-rutas-js .xh-perfil-in{cursor:crosshair}
.xh-perfil-svg{display:block;width:100%;height:100%;overflow:visible}
.xh-perfil-grid{stroke:rgba(15,30,58,.14);stroke-width:1;vector-effect:non-scaling-stroke}
.xh-perfil-area{fill-opacity:.16}
.xh-perfil-linea{fill:none;stroke-width:2;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.xh-perfil-parada{stroke:rgba(15,30,58,.35);stroke-width:1;stroke-dasharray:2 3;vector-effect:non-scaling-stroke}
.xh-perfil-parada.is-cruce{stroke:var(--wp--preset--color--gold-dark)}
.xh-perfil-cursor{stroke:var(--wp--preset--color--ink);stroke-width:1.5;vector-effect:non-scaling-stroke}
.xh-perfil-y,.xh-perfil-x{position:absolute;font-family:var(--wp--preset--font-family--mono);font-size:.66rem;line-height:1;color:var(--wp--preset--color--muted);white-space:nowrap;pointer-events:none}
.xh-perfil-y{right:calc(100% + 6px);transform:translateY(-50%)}
.xh-perfil-x{top:calc(100% + 6px);transform:translateX(-50%)}
.xh-perfil-dot{position:absolute;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:#fff;border:3px solid var(--wp--preset--color--ink);pointer-events:none}
.xh-perfil-dot[hidden]{display:none}
.xh-perfil-lectura{margin:6px 0 0;font-size:.74rem;color:var(--wp--preset--color--text);min-height:1.3em}

/* texto */
.xh-ruta-texto p{margin:0 0 12px;max-width:72ch}
.xh-ruta-inspirada{font-size:.9rem;color:var(--wp--preset--color--text);padding:10px 14px;background:var(--wp--preset--color--parch);border-left:3px solid var(--wp--preset--color--gold)}
.xh-ruta-inspirada span{font-family:var(--wp--preset--font-family--mono);font-size:.66rem;letter-spacing:.1em;text-transform:uppercase;color:var(--wp--preset--color--gold-dark);margin-right:4px}
.xh-ruta-sub{font-family:var(--wp--preset--font-family--mono);font-size:.74rem;font-weight:400;letter-spacing:.14em;text-transform:uppercase;color:var(--wp--preset--color--ink);margin:26px 0 8px}

/* paradas */
.xh-ruta-paradas{list-style:none;margin:0;padding:0;position:relative}
.xh-ruta-paradas::before{content:"";position:absolute;left:13px;top:14px;bottom:14px;border-left:2px solid var(--xh-ruta-color,var(--wp--preset--color--ink));opacity:.35}
.xh-parada{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);gap:14px;padding:10px 0;border-bottom:1px solid var(--xh-line-ink)}
.xh-parada-marca{position:relative;z-index:1;width:28px;height:28px;border-radius:50%;background:var(--xh-ruta-color,var(--wp--preset--color--ink));color:#fff;font-family:var(--wp--preset--font-family--mono);font-size:.78rem;font-weight:600;line-height:28px;text-align:center;box-shadow:0 0 0 3px var(--wp--preset--color--paper,#F7F1E3)}
.xh-parada-salida .xh-parada-marca{background:var(--wp--preset--color--ink);color:var(--wp--preset--color--parch);box-shadow:0 0 0 2px var(--wp--preset--color--gold-2),0 0 0 4px var(--wp--preset--color--paper,#F7F1E3)}
.xh-parada-cruce .xh-parada-marca{background:var(--wp--preset--color--gold-2);color:var(--wp--preset--color--ink);border-radius:0;clip-path:polygon(50% 0,100% 100%,0 100%);line-height:34px;font-size:.72rem;box-shadow:none}
.xh-parada-body{min-width:0}
.xh-parada-h{margin:3px 0 4px;line-height:1.35}
.xh-parada-h strong{color:var(--wp--preset--color--ink)}
.xh-parada-cruce .xh-parada-h strong{color:var(--wp--preset--color--text)}
.xh-parada-km,.xh-parada-aprox{display:inline-block;font-family:var(--wp--preset--font-family--mono);font-size:.66rem;letter-spacing:.05em;text-transform:uppercase;color:var(--wp--preset--color--muted);margin-left:4px;white-space:nowrap}
.xh-parada-aprox{border:1px dashed var(--wp--preset--color--muted);padding:0 5px;border-radius:2px}
.xh-parada-nota{margin:0 0 4px;font-size:.94rem;max-width:72ch}
.xh-parada-links{margin:0;font-size:.85rem}
.xh-parada-ver{font:inherit;font-size:.85rem;padding:0;border:0;background:none;color:var(--wp--preset--color--ink);text-decoration:underline;text-decoration-color:var(--wp--preset--color--gold);text-underline-offset:2px;cursor:pointer}
.xh-parada-ver:hover{color:var(--wp--preset--color--red)}

/* avisos y descarga */
.xh-ruta-avisos{margin:0;padding-left:20px}
.xh-ruta-avisos li{margin:0 0 6px;max-width:72ch}
.xh-ruta-acciones{margin:22px 0 0}
.xh-ruta-gpx{display:inline-flex;align-items:center;gap:8px;font-family:var(--wp--preset--font-family--mono);font-size:.74rem;letter-spacing:.08em;text-transform:uppercase;text-decoration:none;padding:10px 16px;min-height:44px;background:var(--wp--preset--color--ink);color:var(--wp--preset--color--parch);border-radius:2px}
.xh-ruta-gpx:hover{background:var(--wp--preset--color--red);color:#fff}
.xh-ruta-gpx span{opacity:.75}

/* avisos generales */
.xh-rutas-avisos{margin:24px 0 36px}
.xh-rutas-avisos dl{margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:0 28px}
.xh-rutas-avisos dl>div{padding:12px 0;border-top:1px solid var(--xh-line-ink)}
.xh-rutas-avisos dt{font-family:var(--wp--preset--font-family--mono);font-size:.68rem;letter-spacing:.12em;text-transform:uppercase;color:var(--wp--preset--color--gold-dark);margin:0 0 4px}
.xh-rutas-avisos dd{margin:0;font-size:.93rem}

@media (max-width:900px){
  .xh-ruta-datos{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:600px){
  .xh-rutas-mapa{height:420px}
  .xh-rutas-btn{flex:1 1 calc(50% - 8px);justify-content:center}
  .xh-ruta-datos{grid-template-columns:repeat(2,minmax(0,1fr))}
  .xh-perfil{padding-left:32px}
  .xh-perfil-in{height:110px}
  .xh-rutas-tabla thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .xh-rutas-tabla,.xh-rutas-tabla tbody,.xh-rutas-tabla tr,.xh-rutas-tabla th,.xh-rutas-tabla td{display:block;width:100%}
  .xh-rutas-tabla tr{padding:10px 0;border-bottom:1px solid var(--wp--preset--color--ink)}
  .xh-rutas-tabla tbody th,.xh-rutas-tabla td{border:0;padding:3px 0}
  .xh-rutas-tabla td{display:flex;justify-content:space-between;gap:12px}
  .xh-rutas-tabla td::before{content:attr(data-label);font-family:var(--wp--preset--font-family--mono);font-size:.66rem;letter-spacing:.08em;text-transform:uppercase;color:var(--wp--preset--color--gold-dark);padding-top:2px}
}
@media (prefers-reduced-motion:reduce){.xh-rutas *{scroll-behavior:auto!important}}
@media print{.xh-rutas-panel,.xh-parada-ver{display:none!important}.xh-ruta[hidden]{display:block!important}}
