/* Directorio (inc/directorio.php). Se carga después de style.css y solo en /paraguayos-en-espana/. */

/* ---------- Cabecera: buscar cerca es la acción principal ---------- */
.jd { padding-top: clamp(1.5rem, 3vw, 2.75rem); }
.jd .jd-head { align-items: stretch; display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr); margin-bottom: 1.5rem; }
.jd .jd-head__copy { align-self: center; }
.jd .jd-head h1 { font-size: clamp(2.4rem, 5.2vw, 4.3rem); letter-spacing: -.055em; line-height: .98; margin: .5rem 0 .9rem; }
.jd .jd-head__copy > p:last-child { font-size: 1.08rem; line-height: 1.55; max-width: 46ch; }
.jd-head__cta { background: var(--juky-atlantic); border-radius: 1.4rem; color: #fff; display: grid; gap: .7rem; overflow: hidden; padding: clamp(1.1rem, 2.4vw, 1.6rem); position: relative; }
.jd-head__cta::after { background: var(--juky-red); border-radius: 55% 45% 62% 38%; content: ""; height: 3.4rem; opacity: .95; position: absolute; right: -2rem; top: -1.5rem; transform: rotate(-12deg); width: 9rem; }
.jd-head__cta > * { position: relative; z-index: 1; }
.jd .jd-head__cta .jd-near {
  background: #fff; border: 0; border-radius: 99px; box-shadow: 0 10px 24px rgba(8, 44, 62, .28); color: var(--juky-atlantic);
  font-size: 1.08rem; height: auto; justify-content: center; min-height: 3.6rem; padding: .8rem 1.4rem; width: 100%;
}
.jd .jd-head__cta .jd-near:hover { background: var(--juky-yellow); color: var(--juky-ink); }
.jd .jd-head__cta .jd-near.is-active { background: var(--juky-ink); color: #fff; }
.jd-head__privacy { color: rgba(255, 255, 255, .86); font-size: .82rem; line-height: 1.45; margin: 0; }
.jd .jd-head__cta .jd-suggest { background: transparent; border: 0; border-top: 1px solid rgba(255, 255, 255, .28); border-radius: 0; box-shadow: none; color: #fff; display: flex; font-size: .9rem; justify-content: flex-start; margin-top: .2rem; padding: .85rem 0 0; }
.jd .jd-head__cta .jd-suggest:hover { color: var(--juky-yellow); transform: none; }

/* ---------- Buscador y filtros ---------- */
.jd .jd-tools { background: #fff; border: 1px solid var(--juky-line); border-radius: 1.2rem; box-shadow: 0 10px 30px rgba(23, 33, 29, .06); padding: 1rem 1.1rem 1.1rem; }
.jd .jd-search { grid-template-columns: minmax(0, 1fr) minmax(11rem, .35fr); }
.jd .jd-search input[type="search"], .jd .jd-search select { background-color: var(--juky-paper); border-radius: 99px; height: 3.1rem; }
.jd .jd-search select { padding-left: 1.1rem; }
.jd .jd-field label { color: var(--juky-muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.jd .jd-filter-heading > span { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.jd .jd-chips button { background: var(--juky-paper); border-radius: 99px; }
.jd .jd-chips button.is-active { background: var(--juky-atlantic); border-color: var(--juky-atlantic); }

/* ---------- Lista ---------- */
.jd .jd-status { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.jd .jd-service-note { background: none; border: 0; color: var(--juky-muted); font-size: .78rem; margin: -.2rem 0 .9rem; padding: 0; }
.jd .jd-cards { gap: .8rem; }
.jd .jd-card {
  align-items: start; border-color: transparent; border-radius: 1.1rem; box-shadow: 0 1px 0 var(--juky-line), 0 0 0 1px var(--juky-line);
  gap: .2rem 1rem; grid-template-columns: 3.4rem minmax(0, 1fr); padding: 1.05rem 1.1rem 1rem; transition: transform .15s, box-shadow .15s;
}
.jd .jd-card:hover { box-shadow: 0 0 0 1px rgba(23, 33, 29, .3), 0 12px 26px rgba(23, 33, 29, .1); transform: translateY(-2px); }
.jd .jd-card.is-selected { box-shadow: 0 0 0 2px var(--juky-atlantic), 0 12px 26px rgba(12, 105, 148, .18); }
.jd .jd-card.is-featured { border: 0; box-shadow: 0 0 0 2px #d9a84b, 0 8px 22px rgba(92, 65, 20, .12); }
.jd .jd-card__media { border-radius: 50%; font-size: 1.55rem; height: 3.4rem; width: 3.4rem; }
.jd .jd-card__meta { color: var(--juky-atlantic); font-size: .68rem; letter-spacing: .07em; margin: .1rem 0 .25rem; }
.jd .jd-card__meta span + span { color: var(--juky-muted); }
.jd .jd-card__dist { background: var(--juky-yellow); color: var(--juky-ink); font-size: .74rem; font-weight: 800; padding: .15rem .6rem; }
.jd .jd-card__name { font-size: 1.14rem; letter-spacing: -.025em; line-height: 1.25; margin-bottom: .25rem; }
.jd .jd-card__addr { margin-bottom: .1rem; }
.jd .jd-card__actions { gap: .45rem; grid-column: 1 / -1; margin: .8rem 0 0; padding: 0; }
.jd .jd-card__actions > a, .jd .jd-card__more, .jd .jd-card__map {
  background: var(--juky-paper); border: 1px solid var(--juky-line); border-radius: 99px; color: var(--juky-ink); font-size: .82rem;
  font-weight: 800; min-height: 2.6rem; padding: .35rem .95rem; text-decoration: none;
}
.jd .jd-card__actions > a.jd-card__go:first-child { background: var(--juky-atlantic); border-color: var(--juky-atlantic); color: #fff; }
.jd .jd-card__actions > a.jd-card__go:first-child:hover { background: var(--juky-ink); border-color: var(--juky-ink); color: #fff; }
.jd .jd-card__more:hover, .jd .jd-card__map:hover { border-color: var(--juky-ink); color: var(--juky-ink); }
.jd .jd-fav { background: transparent; border: 0; font-size: 1.35rem; right: .45rem; top: .45rem; }
.jd .jd-fav:hover { background: #fbe4e7; }
.jd .jd-pagination button { border-radius: 99px; padding-inline: 1.5rem; }
.jd .jd-invite { border-radius: 1.1rem; }

/* ---------- Mapa ---------- */
.jd .jd-mapwrap { border-radius: 1.3rem; box-shadow: 0 16px 40px rgba(23, 33, 29, .12); height: clamp(24rem, calc(100svh - var(--jd-top) - 2rem), 46rem); }
.jd .jd-map-heading { padding: .8rem 1.1rem; }
.jd.is-near .jd-map-heading { background: var(--juky-atlantic); border-bottom: 0; color: #fff; }
.jd.is-near .jd-map-heading span { color: rgba(255, 255, 255, .85); }
.jd.is-near .jd-map-heading strong::before { content: "📍 "; }
/* Punto del visitante, con pulso. */
.jd-me { background: var(--juky-cyan); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(23, 33, 29, .35); height: 1.15rem; width: 1.15rem; }
.jd-me::after { animation: jd-pulso 1.8s ease-out infinite; border: 2px solid var(--juky-cyan); border-radius: 50%; content: ""; inset: -3px; position: absolute; }
@keyframes jd-pulso { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(3.4); } }
@media (prefers-reduced-motion: reduce) { .jd-me::after { animation: none; opacity: .5; transform: scale(2); } .jd .jd-card { transition: none; } }

.jd .jd-guides a { border-radius: 1rem; padding: 1rem 1.1rem; }
.jd .jd-guides a:hover { background: var(--juky-atlantic); border-color: var(--juky-atlantic); color: #fff; }
.jd .jd-guides a:hover span { color: rgba(255, 255, 255, .85); }

@media (max-width: 899px) {
  .jd .jd-head { grid-template-columns: minmax(0, 1fr); margin-bottom: 1rem; }
  .jd .jd-head h1 { font-size: clamp(2.3rem, 10.5vw, 3rem); }
  .jd .jd-head__copy > p:last-child { font-size: .98rem; }
  .jd .jd-head .jd-suggest { display: none; }
  .jd-head__cta { border-radius: 1.2rem; }
  .jd .jd-search { grid-template-columns: minmax(0, 1fr); }
  .jd .jd-field--city label { clip-path: none; height: auto; overflow: visible; position: static; width: auto; }
  .jd .jd-card { grid-template-columns: 2.9rem minmax(0, 1fr); padding: .95rem .95rem .9rem; }
  .jd .jd-card__media { font-size: 1.3rem; height: 2.9rem; width: 2.9rem; }
  .jd .jd-card__actions { margin-left: 0; }
  .jd .jd-card__actions > a, .jd .jd-card__more, .jd .jd-card__map { flex: 1 1 auto; justify-content: center; }

  /* Cerca de mí: mapa arriba, fijo, y la lista por cercanía debajo. */
  .jd.is-near:not(.is-map) .jd-split { display: flex; flex-direction: column-reverse; }
  .jd.is-near:not(.is-map) .jd-mapwrap {
    align-self: stretch; display: flex; height: min(48dvh, 26rem); margin-bottom: 1rem; min-height: 17rem; position: sticky; top: calc(var(--jd-top) + .5rem); width: 100%; z-index: 6;
  }
  /* Ficha del pin, compacta para un mapa pequeño. */
  .jd.is-near:not(.is-map) .jd-pop__addr, .jd.is-near:not(.is-map) .jd-pop__note { display: none; }
  .jd.is-near:not(.is-map) .maplibregl-popup-content { padding: .8rem; }
  .jd.is-near:not(.is-map) .jd-pop__actions { margin-top: .6rem; padding-top: .6rem; }
  .jd.is-near:not(.is-map) .jd-map__note, .jd.is-near:not(.is-map) .jd-follow { display: none; }
}

/* ==========================================================================
   0.17 · Ciudades a un toque, fichas más claras y destacados con «Cerca de mí»
   ========================================================================== */
.jd .jd-field--city { display: none; }
.jd .jd-search { grid-template-columns: minmax(0, 1fr); }
.jd-cities { display: flex; flex-wrap: wrap; gap: .4rem; }
.jd-cities button {
  background: var(--juky-paper); border: 1px solid var(--juky-line); border-radius: 99px; color: var(--juky-ink); cursor: pointer; flex: none;
  font: inherit; font-size: .86rem; font-weight: 700; min-height: 2.75rem; padding: .4rem .9rem; white-space: nowrap;
}
.jd-cities button:hover { border-color: var(--juky-ink); }
.jd-cities button.is-active { background: var(--juky-ink); border-color: var(--juky-ink); color: #fff; }
.jd-cities small { font-size: .78em; margin-left: .15rem; opacity: .75; }

/* Fichas: toda la tarjeta abre la ficha; datos en una línea limpia. */
.jd .jd-card { cursor: pointer; }
.jd .jd-card__meta { gap: .2rem .55rem; }
.jd .jd-card__meta span + span::before { content: none; }
.jd .jd-card__meta span:first-child { background: #edf5f8; border-radius: .3rem; padding: .12rem .4rem; }
.jd .jd-card.is-featured { background: #fffaf0; }
.jd .jd-card.is-featured .jd-card__featured { background: #d9a84b; color: #2e1f04; }
.jd .jd-card.is-featured .jd-card__featured::before { content: "★ "; white-space: pre; }
.jd .jd-results-head { align-items: flex-start; }
.jd .jd-status { line-height: 1.35; }

/* Destacado sobre el mapa. */
.jd-map-featured {
  align-items: center; background: #fffaf0; border: 2px solid #d9a84b; border-radius: 1rem; bottom: .7rem; box-shadow: 0 10px 26px rgba(92, 65, 20, .22);
  display: flex; gap: .7rem; left: .7rem; padding: .6rem .7rem; position: absolute; right: .7rem; z-index: 3;
}
.jd-map-featured[hidden] { display: none; }
.jd-map-featured__icon { align-items: center; background: #f5e2ae; border-radius: 50%; display: grid; flex: none; font-size: 1.25rem; height: 2.6rem; justify-items: center; width: 2.6rem; }
.jd-map-featured__text { display: grid; flex: 1; min-width: 0; }
.jd-map-featured small { color: #7a5410; font-size: .66rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.jd-map-featured small::before { content: "★ "; white-space: pre; }
.jd-map-featured strong { font-size: .98rem; letter-spacing: -.02em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jd-map-featured em { color: var(--juky-muted); font-size: .76rem; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jd .jd-map-featured button { background: var(--juky-ink); border: 0; border-radius: 99px; color: #fff; cursor: pointer; flex: none; font: inherit; font-size: .82rem; font-weight: 800; min-height: 2.75rem; padding: .4rem 1rem; }
.jd .jd-map-featured button:hover { background: var(--juky-atlantic); }
.jd .jd-map-stage:has(.jd-map-featured:not([hidden])) .maplibregl-ctrl-bottom-right, .jd .jd-map-stage:has(.jd-map-featured:not([hidden])) .maplibregl-ctrl-bottom-left { bottom: 4.6rem; }

@media (min-width: 900px) {
  .jd .jd-card__actions { justify-content: flex-start; }
}
@media (max-width: 899px) {
  /* Filtros en una fila que se desliza: sin desplegar nada. */
  .jd .jd-types-toggle { display: none !important; }
  .jd .jd-chips, .jd-cities { flex-wrap: nowrap; margin-right: -.8rem; overflow-x: auto; padding: 0 .8rem .2rem 0; scrollbar-width: none; }
  .jd .jd-chips::-webkit-scrollbar, .jd-cities::-webkit-scrollbar { display: none; }
  .jd .jd-chips button:not([hidden]) { display: inline-flex !important; flex: none; }
  .jd .jd-card__actions { display: flex; flex-wrap: nowrap; gap: .4rem; }
  .jd .jd-card__actions > a, .jd .jd-card__more, .jd .jd-card__map { flex: 1 1 0; font-size: .8rem; min-width: 0; padding-inline: .4rem; white-space: nowrap; }
  .jd .jd-card__actions > a.jd-card__go:first-child { flex: 1.6 1 0; }
  .jd-map-featured { bottom: .5rem; left: .5rem; padding: .5rem .55rem; right: .5rem; }
  .jd-map-featured__icon { height: 2.2rem; width: 2.2rem; }
}

/* 0.17.1 · Bajo el destacado del mapa, cómo conseguir ese espacio. */
.jd-map-featured { flex-wrap: wrap; row-gap: .45rem; }
.jd .jd-map-featured__cta { border-top: 1px solid rgba(175, 118, 35, .35); color: #7a5410; flex: 1 0 100%; font-size: .82rem; font-weight: 800; padding: .5rem .1rem .05rem; text-align: center; text-decoration: none; }
.jd .jd-map-featured__cta:hover { color: var(--juky-ink); text-decoration: underline; }
.jd .jd-map-stage:has(.jd-map-featured:not([hidden])) .maplibregl-ctrl-bottom-right, .jd .jd-map-stage:has(.jd-map-featured:not([hidden])) .maplibregl-ctrl-bottom-left { bottom: 6.6rem; }
