/* =============================================================
   CICERONE HIKING — Ficha de ruta
   Estilos específicos: stats, mapa, elevación, pills dificultad
   Las clases cicerone-detail-* las provee shortcodes.css
   ============================================================= */

/* ── Pills de dificultad en el header ─────────────────────── */
.cicerone-detail-pill--easy     { background: #dcfce7; color: #16a34a; }
.cicerone-detail-pill--moderate { background: #fef9c3; color: #854d0e; }
.cicerone-detail-pill--hard     { background: #fee2e2; color: #dc2626; }

/* ── Botón outline CTA ────────────────────────────────────── */
.cicerone-detail-cta--outline {
    background: transparent;
    border: 2px solid var(--main-color, #0d8c7a);
    color: var(--main-color, #0d8c7a);
}
.cicerone-detail-cta--outline:hover {
    background: var(--main-color, #0d8c7a);
    color: #fff;
}

/* ══════════════════════════════════════════════════════════
   ROUTE DATA — bloque a ancho completo debajo del main
   40% stats (2fr)  |  60% mapa (3fr)
══════════════════════════════════════════════════════════ */
.hiking-route-data-section { margin-top: 32px; }

.hiking-route-data-wrap {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 32px;
    align-items: start;
    margin-top: 20px;
}
@media (max-width: 860px) {
    .hiking-route-data-wrap { grid-template-columns: 1fr; }
}

/* ── Stats: grid 2 columnas, cada stat como card ─────────── */
.cicerone-hiking-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.cicerone-hiking-stat {
    background: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0px;
}

/* Label: uppercase pequeño, color muted */
.cicerone-hiking-stat__label {
    font-weight: 700;
    color: var(--main-color,#94a3b8);
    line-height: 1;
}

/* Valor: grande, bold */
.cicerone-hiking-stat__value {
    font-size: 22px;
    font-weight: 900;
    color:#000;
    line-height: 1.1;
}

.cicerone-hiking-stat__value small {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-left: 2px;
}

/* Elevación positiva/negativa en color acento */
#hkStatElePos .cicerone-hiking-stat__value,
#hkStatEleNeg .cicerone-hiking-stat__value {
    color: var(--main-color, #0d8c7a);
}

/* Colores de dificultad */
.cicerone-hiking-difficulty-easy     { color: #16a34a; }
.cicerone-hiking-difficulty-moderate { color: #d97706; }
.cicerone-hiking-difficulty-hard     { color: #dc2626; }

/* ── Gráfica de elevación ─────────────────────────────────── */
.cicerone-hiking-elevation-wrap {
    margin-top: 20px;
    width: 100%;
    height: 160px;   /* altura fija para que Chart.js renderice */
    position: relative;
}
.cicerone-hiking-elevation-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
.hiking-btn-start {
color:#fff!important;
background-color:var(--main-color)!important;
width: 100%!important;
}
/* ── Mapa ─────────────────────────────────────────────────── */
.hiking-route-data-map {
    display: flex;
    gap:20px;
    flex-direction: column;
}

.hiking-map {
    width: 100%;
    height: 420px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background: #e8f0e8;
    z-index: 0;
}
@media (max-width: 860px) {
    .hiking-map { height: 300px; }
}

.hiking-map-filters {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
}

/* ── Botón Start route ────────────────────────────────────── */
.hiking-map-footer { padding: 0; }

.hiking-btn-start {
    display: block;
    width: 100%;
    padding: 15px 24px;
    background: var(--main-color, #0d8c7a);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 0 0 10px 10px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .02em;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
}
.hiking-btn-start:hover { opacity: .88; color: #fff; text-decoration: none; }

/* ── Marcadores START / END ───────────────────────────────── */
.hk-marker-start,
.hk-marker-end {
    background: transparent;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.4;
    text-align: center;
}

/* ── Modal QR ─────────────────────────────────────────────── */
.hiking-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.hiking-modal__inner {
    background: #fff;
    border-radius: 14px;
    padding: 32px;
    max-width: 360px;
    width: 90%;
    position: relative;
    text-align: center;
}
.hiking-modal__inner h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.hiking-modal__inner p  { font-size: 14px; color: #64748b; margin: 0 0 20px; }
.hiking-modal__close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; font-size: 24px;
    cursor: pointer; color: #64748b; padding: 0;
}
.hiking-modal__close:hover { color: #1e293b; }
#hikingQrCode img { display: block; margin: 0 auto; }

/* ══════════════════════════════════════════════════════════
   MODAL FULLSCREEN — "Iniciar ruta" GPX viewer
══════════════════════════════════════════════════════════ */
.hiking-route-modal {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 99999;
    /* NO display aquí — el JS lo controla con style="display:none/flex" */
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}
/* Cuando el JS lo muestra */
.hiking-route-modal.is-open {
    display: flex;
}

.hiking-route-modal__inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
}

/* Columna izquierda */
.hiking-route-modal__left {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 24px 20px;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid #e2e8f0;
}

.hiking-route-modal__title {
    font-size: 34px !important;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 20px;
    line-height: 1.3;
}
.hiking-route-modal__close
{
    width: 50px!important;
    height: 50px!important;
    color: var(--main-color)!important;
    font-size: 20px!important;
    padding: 0px!important;
}
.hiking-route-modal__close:hover
{
    color: #FFF!important;
}
.hiking-route-modal__stats-title {
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 12px;
}

.hiking-route-modal__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.hiking-route-modal__stat:last-of-type { border-bottom: none; }

.hiking-route-modal__stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #94a3b8;
}

.hiking-route-modal__stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
}
.hiking-route-modal__stat-value small {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.hiking-route-modal__download {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--main-color, #0d8c7a);
    text-decoration: none;
}
.hiking-route-modal__download:hover { opacity: .8; }
.hiking-route-modal__download .material-symbols-outlined { font-size: 18px; }

/* Mapa */
.hiking-route-modal__map-wrap {
    position: relative;
    flex: 1;
}

.hiking-route-modal__map {
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hiking-route-modal__filters {
    position: absolute;
    top: 12px;
    left: 65px;
    right: 48px;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}
.hiking-route-modal__filters .hk-filter-btn,
.hiking-route-modal__filters .hiking-filter-chip {
    pointer-events: all;
}

/* Botón cerrar */
.hiking-route-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    width: 36px;
    height: 36px;
    background: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    color: #1e293b;
    transition: background .15s;
}
.hiking-route-modal__close:hover { background: var(--main-color); }
.hiking-filter-chip {
	padding:8px!important;
	border-radius: 8px!important;
}
.hiking-filter-chip.is-active {
	padding:8px!important;
	border-radius: 8px!important;
}
.hiking-filter-chip {
    color: var(--main-color) !important;
    background-color: #fff !important;
    border: 1.5px solid var(--main-color) !important;
}

.hiking-filter-chip.is-active {
    color: #fff !important;
    background-color: var(--main-color) !important;
    border-color: var(--main-color) !important;
}
/* Responsive */
/* Responsive */
@media (max-width: 700px) {
    .hiking-route-modal__inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: 95vh;
    }
    .hiking-route-modal__left {
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        max-height: 200px;
        overflow-y: auto;
    }
    .hiking-route-modal__map { min-height: 300px; }

    .hiking-route-modal__filters {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        align-content: flex-start !important;
        gap: 6px !important;
        width: auto !important;
        top: 12px !important;
        left: 59px !important;
        right: 68px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 4px !important;
        scrollbar-width: none !important;
    }
    .hiking-route-modal__filters::-webkit-scrollbar {
        display: none !important;
    }
    .hiking-filters-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        width: max-content !important;
    }
}

/* ══════════════════════════════════════════════════════════
   RECOMENDADOS — mismo comportamiento que single-poi
   (el CSS del slider de cards está inline en single-poi
    pero no en shortcodes.css, así que lo añadimos aquí)
══════════════════════════════════════════════════════════ */

/* ── Ancho completo en single-hiking (idéntico a single-punto_de_interes) ── */
@media (min-width: 1200px) {
  :root { --cicerone-gutter: 128px; }

  /* 1) Liberar contenedor del tema */
  body.single-cicerone-hiking .site-content,
  body.single-cicerone-hiking .content-area,
  body.single-cicerone-hiking .entry-content,
  body.single-cicerone-hiking .elementor,
  body.single-cicerone-hiking .elementor-section-wrap {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* 2) Gutter 128px dentro del layout */
  body.single-cicerone-hiking .cicerone-detail-page {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: var(--cicerone-gutter) !important;
    padding-right: var(--cicerone-gutter) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* 3) Evitar que hijos vuelvan a limitar a 1200px */
  body.single-cicerone-hiking .cicerone-detail-page .cicerone-carousel,
  body.single-cicerone-hiking .cicerone-detail-page .cicerone-detail-header,
  body.single-cicerone-hiking .cicerone-detail-page .cicerone-detail-hero,
  body.single-cicerone-hiking .cicerone-detail-page .cicerone-detail-main,
  body.single-cicerone-hiking .cicerone-detail-page .cicerone-detail-tags,
  body.single-cicerone-hiking .cicerone-detail-page .cicerone-detail-recommended,
  body.single-cicerone-hiking .cicerone-detail-page .hiking-route-data-section {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Slider interno de cards en recomendados (idéntico al de single-poi inline) */
.cicerone-detail-recommended .place-card-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    touch-action: pan-y;
    cursor: grab;
}

.cicerone-detail-recommended .place-card-slider::-webkit-scrollbar {
    display: none;
}

.cicerone-detail-recommended .place-card-slide {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    scroll-snap-align: start;
}

.cicerone-detail-recommended .place-card-slider.is-dragging {
    cursor: grabbing;
}

.cicerone-detail-recommended .place-card-slider,
.cicerone-detail-recommended .place-card-slide img {
    user-select: none;
    -webkit-user-drag: none;
}

.cicerone-detail-recommended .place-card-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Cursor drag en el viewport */
.cicerone-detail-recommended .places-strip-recommended {
    cursor: grab;
}
.cicerone-detail-recommended .places-strip-recommended.is-dragging {
    cursor: grabbing;
}

/* place-card-link debe cubrir el body completo */
.cicerone-detail-recommended .place-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
}

/* ── Thumb clickable sin romper el slider ─────────────────── */
.cicerone-detail-recommended .place-card[data-href] .place-card-thumb {
    cursor: pointer;
}
/* ── Marcadores START / END — estilo Figma ────────────────── */
.hk-marker-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,.30));
}
.hk-marker-bubble__text {
    background: transparent;
    color: #fff;
    border-radius: 8px;
    padding: 7px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    min-width: 80px;
    text-align: center;
}
.hk-marker-bubble__line1,
.hk-marker-bubble__line2 {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.hk-marker-bubble__pin {
    width: 20px;
    height: 10px;
    margin-top: -1px;
}
.hk-marker-bubble__pin path {
    fill: var(--main-color, #0d8c7a);
}
.hk-marker-end .hk-marker-bubble__text { background: transparent; }
.hk-marker-end .hk-marker-bubble__pin path { fill: #1e293b; }


/* ── Marcadores START / END — layout en fila ─────────────── */
/* START: [texto] [pin]    END: [pin] [texto] */
.hk-marker-bubble {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,.80);
}
 
.hk-marker-bubble__text {
    background: transparent;
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.15;
    white-space: nowrap;
    text-align: center;
}
 
.hk-marker-bubble__line1,
.hk-marker-bubble__line2 {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
}
 
/* Círculo que contiene el SVG pin */
.hk-marker-bubble__pin-wrap {
    background: var(--main-color, #0d8c7a);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2.5px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
 
/* END: fondo oscuro */
.hk-marker-end .hk-marker-bubble__text    { background: transparent; }
.hk-marker-end .hk-marker-bubble__pin-wrap { background: #1e293b; }
/* ── pin-wrap sin fondo — pin.svg tiene su propia forma ───── */
.hk-marker-bubble__pin-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    width: 36px;
    height: 42px;
}
.hiking-filter-chip:focus {
    outline: none;
}

.hiking-filter-chip:focus:not(:focus-visible) {
    background-color: var(--main-color) !important;
    color: #fff !important;
}

.hiking-filter-chip.is-active:focus:not(:focus-visible) {
    background-color: #fff !important;
    color: #000 !important;
}