/* =====================================================================
   PUEBLER — Comunidad (mapa, radar, parches, baúl, rutas, destinos, verde)
   Pantalla completa, sin tarjetas flotantes ni degradados.
   ===================================================================== */
.min-w-0 { min-width: 0; }
.pb-cm-title { font-size: 1rem; font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.pb-cm-title i { color: var(--puebler-blue-dark); }
.pb-cm-count { margin-left: auto; font-size: .74rem; background: var(--puebler-blue-light); color: var(--puebler-blue-dark); border-radius: 20px; padding: 2px 9px; }

/* Barra de filtros a ancho completo */
.pb-cm-filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 24px; border-top: 1px solid var(--puebler-border-soft); }
.pb-cm-filter { display: inline-flex; align-items: center; gap: 6px; margin: 0; border: 1px solid var(--puebler-border); border-radius: 50px; padding: 0 12px; height: 38px; font-size: .86rem; font-weight: 600; color: var(--puebler-text); background: var(--puebler-surface); }
.pb-cm-filter i { color: var(--puebler-text-muted); }
.pb-cm-filter input, .pb-cm-filter select { border: 0; outline: 0; background: transparent; color: var(--puebler-text); font-size: .86rem; max-width: 190px; }
.pb-cm-filter-check input { accent-color: var(--puebler-blue); }

/* Columnas feed + lateral */
.pb-cm-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.pb-cm-split > .pb-feed { border-right: 1px solid var(--puebler-border); min-height: 60vh; }
.pb-cm-side { position: sticky; top: var(--topbar-h); max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; }
.pb-cm-side-section { padding: 20px 22px; border-bottom: 1px solid var(--puebler-border); }
.pb-myparche { padding: 12px 0; border-bottom: 1px dashed var(--puebler-border); }
.pb-myparche:last-child { border-bottom: 0; }
.pb-feed-center { max-width: 760px; margin: 0 auto; border-left: 1px solid var(--puebler-border); border-right: 1px solid var(--puebler-border); }
@media (max-width: 991px) { .pb-cm-split { grid-template-columns: 1fr; } .pb-cm-side { position: static; max-height: none; } .pb-cm-split > .pb-feed { border-right: 0; } }

/* ---------------------------------------------------------------------
   El Gran Mapa
   --------------------------------------------------------------------- */
body.pb-map-body { overflow: hidden; }
.pb-bigmap { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); }
.pb-bigmap-panel { background: var(--puebler-surface); border-right: 1px solid var(--puebler-border); overflow-y: auto; }
.pb-bigmap-panel-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 18px 12px; border-bottom: 1px solid var(--puebler-border); }
.pb-bigmap-block { padding: 14px 18px; border-bottom: 1px solid var(--puebler-border-soft); }
.pb-bigmap-pct { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: var(--puebler-mountain); }
.pb-layer { display: flex; align-items: center; gap: 10px; font-size: .88rem; padding: 5px 0; cursor: pointer; margin: 0; }
.pb-layer input { accent-color: var(--puebler-blue); width: 16px; height: 16px; }
.pb-layer-sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.pb-layer-sw-round { border-radius: 50%; }
.pb-sublegend { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.pb-sublegend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 4px 8px; align-items: center; font-size: .84rem; }
.pb-sublegend-dot { width: 12px; height: 12px; border-radius: 50%; }
.pb-sublegend-pct { font-weight: 800; font-size: .78rem; color: var(--puebler-text-muted); }
.pb-sublegend-bar { grid-column: 2 / 4; height: 4px; background: var(--puebler-border); border-radius: 4px; overflow: hidden; }
.pb-sublegend-bar span { display: block; height: 100%; }
.pb-bigmap-canvas { position: relative; min-width: 0; }
.pb-bigmap-canvas .pb-map { height: 100%; }
.pb-map-bar {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1000;
  background: var(--puebler-surface); border: 1px solid var(--puebler-border); border-radius: 50px;
  padding: 6px 14px; box-shadow: var(--puebler-shadow-lg); display: flex; align-items: center; gap: 8px;
}
.pb-map-bar-item { background: transparent; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--puebler-text); font-size: .7rem; font-weight: 700; padding: 4px 8px; border-radius: 12px; }
.pb-map-bar-item i { font-size: 1.1rem; color: var(--puebler-blue-dark); }
.pb-map-bar-item:hover { background: var(--puebler-blue-light); color: var(--puebler-blue-dark); }
.pb-map-bar-add { width: 48px; height: 48px; border-radius: 50%; background: var(--puebler-coral); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 4px 14px rgba(241,91,99,.4); margin: 0 4px; }
.pb-map-bar-add:hover { color: #fff; background: var(--puebler-coral-hover); }
.pb-dot { display: block; border-radius: 50%; border: 2px solid var(--dc); background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.pb-dot.is-filled { background: var(--dc); border-color: #fff; }
.pb-me-dot { display: block; width: 20px; height: 20px; border-radius: 50%; background: #1D4ED8; border: 4px solid #fff; box-shadow: 0 0 0 6px rgba(29,78,216,.25); }
.pb-map-pop { display: flex; flex-direction: column; gap: 3px; min-width: 180px; font-size: .84rem; }
.pb-map-pop img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.pb-map-pop small { color: var(--puebler-text-muted); }
.pb-map-pop a { font-weight: 700; margin-top: 2px; }
@media (max-width: 991px) {
  .pb-bigmap { grid-template-columns: 1fr; height: calc(100dvh - var(--topbar-h) - var(--bottom-nav-h)); }
  .pb-bigmap-panel { position: absolute; z-index: 1100; left: 0; right: 0; bottom: 0; max-height: 70%; border-right: 0; border-top: 1px solid var(--puebler-border); border-radius: 18px 18px 0 0; transform: translateY(105%); transition: transform .25s ease; box-shadow: var(--puebler-shadow-lg); }
  .pb-bigmap-panel.open { transform: none; }
  .pb-bigmap { position: relative; }
  .pb-map-bar { bottom: 14px; width: calc(100% - 24px); justify-content: space-between; padding: 6px 10px; }
}

/* ---------------------------------------------------------------------
   Radar
   --------------------------------------------------------------------- */
.pb-radar-head { display: flex; gap: 22px; align-items: center; }
.pb-radar-scope { position: relative; width: 84px; height: 84px; border-radius: 50%; background: #16253B; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pb-radar-scope i { color: var(--puebler-yellow); font-size: 1.5rem; position: relative; z-index: 2; }
.pb-radar-scope span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(246,196,83,.55); animation: pbPulse 2.4s ease-out infinite; }
.pb-radar-scope span:nth-child(2) { animation-delay: .8s; }
.pb-radar-scope span:nth-child(3) { animation-delay: 1.6s; }
@keyframes pbPulse { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.1); opacity: 0; } }
.pb-radar-consent { border-left: 4px solid var(--puebler-blue); padding: 6px 0 6px 18px; max-width: 760px; margin-bottom: 18px; }
.pb-radar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--puebler-border); }
.pb-radar-cols > section { padding: 0 0 20px; }
@media (max-width: 767px) { .pb-radar-head { flex-direction: column; align-items: flex-start; } .pb-radar-scope { width: 64px; height: 64px; } }

/* ---------------------------------------------------------------------
   El Baúl
   --------------------------------------------------------------------- */
.pb-capsule-row { display: flex; gap: 14px; align-items: center; }
.pb-capsule-ico.is-open { background: var(--puebler-mountain); }
.pb-capsule-list .pb-capsule-ico { width: 46px; height: 46px; font-size: 1.2rem; }

/* ---------------------------------------------------------------------
   Rutas temáticas
   --------------------------------------------------------------------- */
.pb-route-list { list-style: none; padding: 0; margin: 0; background: var(--puebler-surface); }
.pb-route-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 180px; gap: 20px; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--puebler-border); }
.pb-route-stops { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-route-stop { font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--puebler-border); color: var(--puebler-text-muted); }
.pb-route-stop.is-done { background: #E7F6EC; color: #1F7A3A; border-color: #BFE3CB; }
.pb-route-progress strong { font-family: var(--font-heading); font-size: 1.3rem; display: block; margin-bottom: 4px; }
.pb-route-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.pb-route-stamps { padding: 24px; border-right: 1px solid var(--puebler-border); background: #F7F0DF; }
.pb-route-stamps .pb-cm-title { color: #5E3A20; }
.pb-route-map-wrap .pb-map { height: 100%; min-height: 460px; }
.pb-cm-stamp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 18px 10px; }
.pb-cm-stamp-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .8rem; font-weight: 700; color: #3A2E22; }
.pb-cm-stamp-cell:hover { color: var(--puebler-blue-dark); }
.pb-cm-stamp-cell:hover .pb-stamp { transform: scale(1.06) !important; }
.pb-route-num { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid #16253B; color: #16253B; font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.pb-route-num.is-done { background: #2D6A4F; border-color: #fff; color: #fff; }
@media (max-width: 991px) {
  .pb-route-row { grid-template-columns: 72px 1fr; }
  .pb-route-row .pb-route-progress { grid-column: 1 / -1; }
  .pb-route-detail { grid-template-columns: 1fr; }
  .pb-route-stamps { border-right: 0; }
  .pb-route-map-wrap .pb-map { min-height: 320px; }
}

/* ---------------------------------------------------------------------
   Destinos
   --------------------------------------------------------------------- */
.pb-dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px; background: var(--puebler-border); }
.pb-dest-tile { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #16253B; color: #fff; }
.pb-dest-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pb-dest-tile:hover img { transform: scale(1.06); }
.pb-dest-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 52%; background: rgba(16, 28, 45, .62); }
.pb-dest-badges { position: absolute; top: 12px; left: 12px; right: 48px; display: flex; flex-wrap: wrap; gap: 6px; }
.pb-dest-chip { font-size: .7rem; font-weight: 800; color: #fff; padding: 4px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; }
.pb-dest-gem { background: #FBF1D3; color: #8B6914; }
.pb-dest-seed { background: #fff; color: #16253B; }
.pb-dest-visited { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--puebler-gold); color: #16253B; display: flex; align-items: center; justify-content: center; }
.pb-dest-info { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; }
.pb-dest-info strong { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; line-height: 1.1; color: #fff; }
.pb-dest-info small { opacity: .9; font-size: .8rem; margin-top: 3px; }

.pb-dest-hero { position: relative; height: 380px; overflow: hidden; background: #16253B; }
.pb-dest-hero > img { width: 100%; height: 100%; object-fit: cover; }
.pb-dest-hero-shade { position: absolute; inset: 0; background: rgba(16, 28, 45, .55); }
.pb-dest-hero-inner { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; color: #fff; }
.pb-dest-hero h1 { color: #fff; font-size: 2.6rem; font-weight: 800; letter-spacing: -1px; margin: 0; }
.pb-dest-hero p { margin: 4px 0 0; color: #E2E8F0; font-size: 1.05rem; }
.pb-dest-back { color: #E2E8F0; font-size: .86rem; font-weight: 700; display: inline-block; margin-bottom: 10px; }
.pb-dest-back:hover { color: #fff; }
.pb-dest-hero .pb-btn-ghost { border-color: rgba(255,255,255,.6); }
.pb-dest-hero .pb-btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }
.pb-dest-hero .js-save-dest.is-saved { background: var(--puebler-coral); border-color: var(--puebler-coral); }
.pb-dest-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; background: var(--puebler-surface); }
.pb-dest-main { border-right: 1px solid var(--puebler-border); min-width: 0; }
.pb-dest-about { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 26px 24px; border-bottom: 1px solid var(--puebler-border); background: #F7F0DF; color: #0F1A14; }
.pb-dest-about .pb-cm-title, .pb-dest-about p { color: #0F1A14; }
.pb-dest-stamp { display: flex; justify-content: center; align-items: flex-start; }
.pb-dest-facts { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .86rem; color: #5E3A20; }
.pb-faces { display: flex; align-items: center; }
.pb-faces a + a { margin-left: -8px; }
.pb-faces img { border: 2px solid #F7F0DF; }
.pb-dest-section { padding: 20px 24px; border-bottom: 1px solid var(--puebler-border); }
.pb-exp-thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.pb-dest-side { position: sticky; top: var(--topbar-h); }
.pb-dest-side .pb-map { height: 300px; }
@media (max-width: 991px) {
  .pb-dest-layout { grid-template-columns: 1fr; }
  .pb-dest-main { border-right: 0; }
  .pb-dest-side { position: static; order: -1; }
  .pb-dest-side .pb-map { height: 220px; }
  .pb-dest-hero { height: 320px; }
  .pb-dest-hero h1 { font-size: 1.9rem; }
}
@media (max-width: 575px) { .pb-dest-about { grid-template-columns: 1fr; } .pb-dest-hero-inner { padding: 18px 14px; } }

/* QR imprimible */
.pb-qr-print { max-width: 640px; margin: 0 auto; padding: 32px 20px 48px; text-align: center; }
.pb-qr-actions { display: flex; justify-content: space-between; margin-bottom: 24px; }
.pb-qr-logo { border-radius: 18px; margin-bottom: 10px; }
.pb-qr-box { display: inline-flex; padding: 18px; background: #fff; border: 3px solid #16253B; border-radius: 18px; margin: 18px 0 8px; }
.pb-qr-box img, .pb-qr-box canvas { display: block; }
.pb-qr-slogan { font-family: var(--font-serif); font-weight: 800; font-size: 1.2rem; color: #16253B; }
.pb-qr-meta { text-align: left; border-top: 1px solid var(--puebler-border); padding-top: 14px; margin-top: 18px; font-size: .88rem; }
@media print {
  .pb-topbar, .pb-bottom-nav, .pb-footer, .no-print, .pb-toasts, .pb-offline-banner { display: none !important; }
  body.pb-body { background: #fff; padding: 0; }
  .pb-qr-print { padding-top: 0; }
}

/* Empacados: destinos */
.pb-saved-dests { background: var(--puebler-surface); }
.pb-saved-dests > li { display: flex; align-items: center; gap: 14px; padding: 14px 24px; }
.pb-saved-thumb { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }

/* ---------------------------------------------------------------------
   Puebler Verde
   --------------------------------------------------------------------- */
.pb-green-hero { background: #EEF8F1; }
.pb-green-stats { display: flex; gap: 28px; }
.pb-green-stats div { display: flex; flex-direction: column; }
.pb-green-stats strong { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; color: #15603A; line-height: 1; }
.pb-green-stats span { font-size: .78rem; color: var(--puebler-text-muted); max-width: 140px; }
.pb-green-list { list-style: none; padding: 0; margin: 0; background: var(--puebler-surface); }
.pb-green-row { display: flex; align-items: center; gap: 18px; padding: 18px 24px; border-bottom: 1px solid var(--puebler-border); flex-wrap: wrap; }
.pb-green-row > div { min-width: 220px; }
:root[data-theme="dark"] .pb-green-hero { background: #10291D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pb-green-hero { background: #10291D; } }

/* ---------------------------------------------------------------------
   Portada de reemplazo (destinos sin foto): color del departamento + motivo
   --------------------------------------------------------------------- */
.pb-cover-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%;
  background-color: var(--ph-bg, #1B4332); color: var(--ph-ink, #D4A017); overflow: hidden; }
.pb-cover-ph svg { width: 34%; max-width: 150px; min-width: 32px; height: auto; opacity: .9; }
.pb-cover-ph-name { font-family: var(--font-serif); font-weight: 800; letter-spacing: .14em; font-size: clamp(.6rem, 1.4vw, .9rem); color: var(--ph-ink, #D4A017); opacity: .85; text-align: center; padding: 0 8px; }
.pb-dest-tile .pb-cover-ph { position: absolute; inset: 0; }
.pb-dest-tile .pb-cover-ph svg { margin-top: -30px; }
.pb-dest-hero > .pb-cover-ph, .pb-dest-hero > .pb-dest-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pb-dest-hero > .pb-cover-ph svg { width: 160px; margin-top: -90px; }
.pb-dest-hero > .pb-cover-ph .pb-cover-ph-name { display: none; }
.pb-saved-thumb.pb-cover-ph { width: 72px; height: 72px; border-radius: 14px; flex-shrink: 0; }
.pb-saved-thumb.pb-cover-ph .pb-cover-ph-name { display: none; }
.pb-saved-thumb.pb-cover-ph svg { width: 60%; }
.pb-map-pop-ph { display: flex; align-items: center; justify-content: center; height: 60px; border-radius: 8px; margin-bottom: 4px; color: #fff; font-size: 1.4rem; }

/* Escala de marcadores según zoom */
.pb-z-far .pb-dot { transform: scale(.6); }
.pb-z-far .pb-pin { transform: rotate(-45deg) scale(.7); }
.pb-z-mid .pb-dot { transform: scale(.8); }

/* Negocios en la ficha del destino */
.pb-biz-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pb-biz-row > .flex-grow-1 { min-width: 200px; }
.pb-biz-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; }
.pb-biz-official { display: inline-flex; width: 44px; height: 44px; flex-shrink: 0; }
.pb-cm-empty-note { font-size: .88rem; color: var(--puebler-text-muted); background: var(--puebler-surface-2); border-left: 3px solid var(--puebler-blue); padding: 10px 14px; margin: 10px 0; }
.pb-cm-empty-note i { color: var(--puebler-blue); margin-right: 4px; }
@media (max-width: 575px) { .pb-biz-point { width: 100%; justify-content: center; } }

/* Paginación */
.pb-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; padding: 22px 16px 34px; }
.pb-pager-num { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--puebler-border); color: var(--puebler-text); font-weight: 700; font-size: .88rem; }
.pb-pager-num:hover { background: var(--puebler-blue-light); color: var(--puebler-blue-dark); }
.pb-pager-num.active { background: var(--puebler-blue); border-color: var(--puebler-blue); color: #fff; }
