/* ══ COMPATIBILIDAD TEMA INSPIRO ══
   El header de Inspiro usa z-index ~100 con position:fixed/sticky.
   Reglas para que el mapa quede DEBAJO del menú y no lo tape. */

/* Header del tema siempre encima del mapa */
#site-header,
.site-header,
#masthead,
.navbar,
#inicio_principal {
  z-index: 1000 !important;
  position: relative;
}

/* Capas de Leaflet por debajo del header */
.leaflet-pane         { z-index: 400; }
.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }
.leaflet-top,
.leaflet-bottom       { z-index: 800; }

/* Modal del plugin encima de todo */
#nds-modal { z-index: 99999; }

/* ── VARIABLES BRANDBOOK NdS ── */
#nds-wrap{
  --negro:#2A2A1C; --rojo:#B83D26; --salmon:#E56751;
  --cafe:#532A22;  --dorado:#D59929; --crema:#F3D2A1;
  --azul:#435465;  --gris:#A3AAAD;  --fondo:#F5F0E8;
  font-family:'DM Sans','Segoe UI',Arial,sans-serif;
  width:100%; display:flex; flex-direction:column;
  color:var(--negro);
}
/* Solo box-sizing — NO margin/padding:0 aquí porque #nds-wrap tiene mayor
   especificidad que cualquier clase (.nds-tb etc.) y los aplasta */
#nds-wrap *,#nds-wrap *::before,#nds-wrap *::after{
  box-sizing:border-box;
}
/* Reset selectivo solo donde realmente se necesita */
#nds-wrap h1,#nds-wrap h2,#nds-wrap h3,#nds-wrap h4,
#nds-wrap p,#nds-wrap ul,#nds-wrap ol{
  margin:0; padding:0;
}

/* ══ HERO (ultra-compacto — Standalone) ══ */
#nds-hero{
  background:var(--rojo);
  padding:8px 16px;
  position:relative; overflow:hidden;
  display:flex; align-items:center; gap:12px;
}
#nds-hero::before{ display:none; }
#nds-hero::after{ display:none; }
.nds-hero-tag{ display:none; }
.nds-hero-pre{
  font-size:10px; color:rgba(255,255,255,.7);
  text-transform:uppercase; letter-spacing:1.5px;
  font-weight:500; display:none;
}
#nds-hero h1,
.nds-hero-title{
  font-size:18px; font-weight:700; color:#fff;
  line-height:1.2; letter-spacing:-.3px;
  margin:0;
}
#nds-hero h1 em{ font-style:normal; color:var(--crema); }
.nds-hero-sub{ display:none; }
.nds-hero-stats{ display:none; }
.nds-hstat{ display:none; }
.nds-hstat-num{ display:none; }
.nds-hstat-lbl{ display:none; }
.nds-hstat-sep{ display:none; }

/* ── BARRA ÁMBITO (alineada a la izquierda, fondo oscuro) ── */
.nds-ambito-bar{
  display:flex; gap:8px;
  align-items:center; flex-shrink:0;
  margin-left:5px;
}
.nds-ab{
  display:flex; align-items:center; gap:6px;
  padding:6px 14px;
  border:none;
  border-radius:25px; 
  background:#2a2a1c; /* Fondo oscuro */
  color:rgba(255,255,255,.9); 
  cursor:pointer;
  font-size:12px; font-family:inherit; font-weight:600;
  transition:all .3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space:nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.nds-ab i{ font-size:12px; color:var(--dorado); }
.nds-ab:hover{ background:#3a3a2c; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.3); }
.nds-ab.active{
  background:var(--dorado); 
  color:var(--negro);
  font-weight:700;
  box-shadow: 0 4px 12px rgba(212,175,55,.4);
}
.nds-ab.active i{ color:var(--negro); }

/* ── AVISO DE ACCESO ── */
.nds-access-note{
  background:#fff7e8;
  border-bottom:1px solid #e9dcc5;
  padding:8px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.nds-access-note-text{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--cafe);
  font-size:12px;
  font-weight:600;
}
.nds-access-note-text i{ color:var(--dorado); }
.nds-access-note-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:var(--negro);
  color:var(--crema);
  border:1px solid var(--negro);
  border-radius:20px;
  padding:6px 12px;
  font-size:11px;
  font-weight:600;
  text-decoration:none;
}
.nds-access-note-btn:hover{
  background:var(--cafe);
  border-color:var(--cafe);
}

/* ══ MAPA CONTAINER ══ */
#nds-mapa{
  display:flex; flex-direction:column;
  height:88vh; min-height:560px;
  background:var(--fondo); position:relative;
}

/* ── BARRA FILTROS ── */
#nds-bar{
  background:#fff;
  border-bottom:1px solid #ece6dc;
  padding:0 16px;
  display:flex; align-items:center;
  gap:12px; flex-wrap:wrap;
  min-height:52px; flex-shrink:0;
}
.nds-bar-label{
  font-size:10px; text-transform:uppercase;
  letter-spacing:1.5px; color:var(--cafe);
  font-weight:700; white-space:nowrap;
}
.nds-bar-sep{ width:1px; height:20px; background:#ece6dc; }

.nds-sel{
  padding:6px 28px 6px 10px;
  border:1.5px solid #e0d8cc; border-radius:8px;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23532A22' d='M5 7L0 2h10z'/%3E%3C/svg%3E") no-repeat right 8px center;
  font-size:12px; font-family:inherit; color:var(--negro);
  outline:none; cursor:pointer; appearance:none;
  min-width:160px;
}
.nds-sel:focus{ border-color:var(--dorado); }

.nds-geo-btn{
  padding:6px 12px; background:var(--negro);
  color:var(--crema); border:none; border-radius:8px;
  font-size:11px; font-family:inherit; cursor:pointer;
  display:flex; align-items:center; gap:5px;
  white-space:nowrap; transition:background .2s;
}
.nds-geo-btn:hover{ background:var(--cafe); }
.nds-geo-btn i{ color:var(--dorado); }

.nds-tipos-bar{ display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.nds-tb{
  display:flex; align-items:center; gap:6px;
  padding:6px 14px;
  border:1.5px solid #e0d8cc;
  border-radius:20px; background:#fff; cursor:pointer;
  font-size:11px; font-family:inherit; color:var(--negro);
  transition:all .18s ease; white-space:nowrap;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.nds-tb i{
  font-size:12px;
  color:var(--gris);
  transition:color .18s;
}
.nds-tb:hover{
  border-color:var(--dorado);
  box-shadow:0 2px 8px rgba(213,153,41,.18);
}
.nds-tb:hover i{ color:var(--dorado); }
/* Color del icono según categoría (data-color usamos via JS o clase) */
.nds-tb[data-color="#B83D26"] i{ color:#B83D26; }
.nds-tb[data-color="#435465"] i{ color:#435465; }
.nds-tb[data-color="#4a7c3f"] i{ color:#4a7c3f; }
.nds-tb[data-color="#532A22"] i{ color:#532A22; }
.nds-tb[data-color="#2A2A1C"] i{ color:#2A2A1C; }

.nds-tb.active{
  background:var(--negro); color:var(--crema);
  border-color:var(--negro);
  box-shadow:0 2px 10px rgba(42,42,28,.22);
}
.nds-tb.active i{ color:var(--dorado) !important; }
.nds-tb-lbl{ font-weight:600; }
.nds-tb-n{
  background:rgba(0,0,0,.08); border-radius:10px;
  padding:1px 7px; font-size:10px; font-weight:700;
  line-height:1.6;
}
.nds-tb.active .nds-tb-n{ background:rgba(255,255,255,.15); }




/* ── BODY ── */
#nds-body{ display:flex; flex:1; overflow:hidden; }

/* LISTA */
#nds-list-panel{
  width:260px; background:#fff;
  display:flex; flex-direction:column;
  border-right:1px solid #ece6dc;
  flex-shrink:0;
}
.nds-list-hdr{
  padding:8px 14px;
  font-size:10px; color:var(--gris);
  border-bottom:1px solid #f0ebe3;
  display:flex; justify-content:space-between;
  letter-spacing:.5px;
}
.nds-list-hdr span{ color:var(--rojo); font-weight:700; }
#nds-list{ overflow-y:auto; flex:1; }
#nds-list::-webkit-scrollbar{ width:3px; }
#nds-list::-webkit-scrollbar-thumb{ background:var(--crema); }

.nds-item{
  padding:10px 14px;
  border-bottom:1px solid #f8f4ee;
  cursor:pointer;
  display:flex; gap:9px;
  border-left:3px solid transparent;
  transition:background .12s;
}
.nds-item:hover{ background:#fdf8f0; }
.nds-item.active{ background:var(--fondo); border-left-color:var(--dorado); }
.nds-item-ico{
  width:30px; height:30px; border-radius:7px;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; flex-shrink:0; color:#fff;
}
.nds-item-name{
  font-size:11px; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  color:var(--negro);
}
.nds-item-sub{ font-size:10px; color:var(--gris); margin-top:1px; }
.nds-item-tag{
  font-size:9px; padding:1px 5px; border-radius:3px;
  background:var(--fondo); color:var(--cafe);
  text-transform:uppercase; letter-spacing:.3px; font-weight:600;
  display:inline-block; margin-top:3px;
}

/* Estado vacío en lista */
.nds-empty{
  padding:28px 16px; text-align:center;
  color:var(--gris); font-size:12px;
}
.nds-empty i{ font-size:22px; display:block; margin-bottom:8px; opacity:.4; }

/* MAPA */
#nds-map{ flex:1; position:relative; }
.leaflet-container{ background:#e8e0d0!important; }

/* GEO BADGE */
.nds-geo-badge{
  position:absolute; bottom:14px; left:14px;
  background:var(--negro); color:var(--crema);
  border-radius:20px; padding:5px 12px;
  font-size:11px; display:none; align-items:center; gap:5px;
  z-index:500; box-shadow:0 2px 12px rgba(0,0,0,.2);
}
.nds-geo-badge i{ color:var(--dorado); }
.nds-geo-badge.show{ display:flex; }

/* BOTÓN SINCRONIZAR (discreto) */
#nds-sync-btn{
  position:absolute; bottom:14px; left:14px;
  background:var(--negro); color:var(--crema);
  border:none; border-radius:50%;
  width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  z-index:500; cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.25);
  opacity:.6; transition:all .25s;
  font-size:14px;
}
#nds-sync-btn:hover{ opacity:1; background:var(--dorado); color:var(--negro); }
#nds-sync-btn.spinning i{ animation:ndsSpin .6s linear infinite; }

/* LOADING */
#nds-loading{
  position:absolute; inset:0;
  background:rgba(245,240,232,.94);
  display:flex; align-items:center; justify-content:center;
  z-index:2000; flex-direction:column; gap:12px;
}
.nds-spinner{
  width:38px; height:38px;
  border:3px solid var(--crema);
  border-top-color:var(--dorado);
  border-radius:50%;
  animation:ndsSpin .8s linear infinite;
}
@keyframes ndsSpin{ to{ transform:rotate(360deg); } }
.nds-loading-txt{
  font-size:11px; color:var(--cafe);
  letter-spacing:2px; text-transform:uppercase;
}

/* ══ POPUP — diseño hero foto + cuerpo limpio ══ */
.leaflet-popup-content-wrapper{
  border-radius:16px!important;
  padding:0!important;
  overflow:hidden;
  box-shadow:
    0 8px 16px rgba(42,42,28,.15),
    0 20px 48px rgba(42,42,28,.28),
    0 4px 8px rgba(42,42,28,.10) !important;
  min-width:300px!important;
}
.leaflet-popup-content{ margin:0!important; width:100%!important; }
.leaflet-popup-tip-container{ margin-top:-1px; }
.leaflet-popup-tip{ background:#fff!important; }
.leaflet-popup-close-button{
  color:#fff!important; top:10px!important; right:10px!important;
  font-size:16px!important; font-weight:400!important;
  background:rgba(42,42,28,.5)!important;
  border-radius:50%!important;
  width:24px!important; height:24px!important;
  display:flex!important; align-items:center!important;
  justify-content:center!important; line-height:1!important;
  z-index:10!important;
}

.nds-popup{ font-family:'DM Sans',sans-serif; width:300px; }

/* ── MITAD SUPERIOR: foto hero ── */
.nds-pp-hero{
  height:165px;
  position:relative; overflow:hidden;
  background:var(--negro);
}
/* Imagen de fondo — ocupa todo el bloque */
.nds-pp-hero-img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover; display:block;
  transition:transform .4s ease;
}
.nds-popup:hover .nds-pp-hero-img{ transform:scale(1.04); }

/* Gradiente sobre la foto para legibilidad del badge */
.nds-pp-hero-overlay{
  position:absolute; inset:0;
  background:linear-gradient(
    to bottom,
    rgba(42,42,28,.55) 0%,
    rgba(42,42,28,.1) 45%,
    rgba(42,42,28,.0) 100%
  );
}
/* Placeholder sin foto */
.nds-pp-placeholder{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  opacity:.1;
}

/* Badge tipo — arriba izquierda sobre la foto */
.nds-pp-tipo-badge{
  position:absolute; top:12px; left:12px; z-index:2;
  display:inline-flex; align-items:center; gap:5px;
  background:rgba(42,42,28,.72);
  border:1px solid rgba(255,255,255,.18);
  border-radius:6px; padding:4px 10px;
  font-size:9px; font-weight:700;
  text-transform:uppercase; letter-spacing:1.2px;
  color:var(--crema);
  backdrop-filter:blur(4px);
}
.nds-pp-tipo-badge i{ font-size:9px; }

/* ── MITAD INFERIOR: cuerpo blanco ── */
.nds-pp-body{
  background:#fff;
  padding:16px 18px 12px;
  display:flex; flex-direction:column; gap:6px;
}
.nds-pp-nombre{
  font-size:14px; font-weight:700;
  color:var(--negro); line-height:1.4;
  margin-bottom:2px;
}
.nds-pp-meta{
  display:flex; align-items:flex-start; gap:8px;
  font-size:12px; color:#555; line-height:1.5;
}
.nds-pp-meta i{
  color:var(--dorado); font-size:11px;
  margin-top:2px; flex-shrink:0; width:12px; text-align:center;
}
.nds-pp-meta-mun{
  display:flex; align-items:center; gap:8px;
  font-size:12px; color:#888;
}
.nds-pp-meta-mun i{
  color:var(--azul); font-size:11px;
  flex-shrink:0; width:12px; text-align:center;
}
.nds-pp-decl-badge{
  display:inline-flex; align-items:center; gap:4px;
  background:var(--dorado); color:var(--cafe);
  border-radius:4px; padding:2px 8px;
  font-size:9px; font-weight:700;
  text-transform:uppercase; letter-spacing:.8px;
  margin-top:2px; align-self:flex-start;
}
.nds-pp-decl-badge i{ font-size:8px; }

/* ── Footer ── */
.nds-pp-foot{
  padding:10px 18px 14px;
  background:var(--fondo);
  border-top:1px solid #ece6dc;
  display:flex; justify-content:flex-end;
}
.nds-pp-cta{
  background:var(--negro); color:var(--crema);
  border:none; border-radius:8px;
  padding:9px 18px;
  font-size:11px; font-family:inherit; cursor:pointer;
  font-weight:600; letter-spacing:.3px;
  display:flex; align-items:center; gap:7px;
  transition:background .2s, box-shadow .2s;
  box-shadow:0 2px 8px rgba(42,42,28,.2);
}
.nds-pp-cta i{ font-size:10px; color:var(--dorado); }
.nds-pp-cta:hover{
  background:var(--cafe);
  box-shadow:0 4px 14px rgba(42,42,28,.28);
}
.nds-pp-edit{
  display:flex; align-items:center; justify-content:center;
  width:32px; height:32px; margin-left:7px;
  background:transparent; color:var(--cafe);
  border:1px solid #d9cfbf; border-radius:8px;
  font-size:13px; text-decoration:none;
  transition:all .2s; opacity:.6;
}
.nds-pp-edit:hover{
  background:var(--negro); color:var(--dorado);
  border-color:var(--negro); opacity:1;
}

/* ══ MODAL FICHA ══ */
#nds-modal{
  display:none; position:fixed; inset:0;
  background:rgba(42,42,28,.7); z-index:99999;
  align-items:center; justify-content:center;
  backdrop-filter:blur(6px);
}
#nds-modal.open{ display:flex; }
#nds-mbox{
  background:#fff; border-radius:16px;
  width:92%; max-width:640px; max-height:88vh;
  overflow-y:auto;
  box-shadow:0 24px 64px rgba(42,42,28,.4);
  animation:ndsUp .3s ease;
}
#nds-mbox::-webkit-scrollbar{ width:4px; }
#nds-mbox::-webkit-scrollbar-thumb{ background:var(--crema); border-radius:2px; }
@keyframes ndsUp{ from{transform:translateY(28px);opacity:0} to{transform:translateY(0);opacity:1} }
#nds-mhero{
  min-height:220px; background:var(--negro);
  display:flex; align-items:flex-end;
  padding:24px; position:relative; overflow:hidden;
  background-size:cover; background-position:center;
}
#nds-mhero.no-image{
  background:linear-gradient(135deg, #8B1A1A 0%, #B83D26 50%, #a33420 100%) !important;
}
.nds-mhero-overlay{
  position:absolute; inset:0;
  background:linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.5) 40%, rgba(0,0,0,.15) 100%);
}
.nds-mpattern{
  position:absolute; inset:0; opacity:.05;
  background-image:radial-gradient(circle,var(--dorado) 1.5px,transparent 1.5px);
  background-size:20px 20px;
}
.nds-m-edit{
  position:absolute; top:14px; right:52px; z-index:5;
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(42,42,28,.85); color:var(--dorado);
  border:1px solid rgba(243,210,161,.3); border-radius:8px;
  padding:7px 14px; font-size:13px; font-family:inherit;
  font-weight:500; text-decoration:none; cursor:pointer;
  transition:all .25s; backdrop-filter:blur(6px);
}
.nds-m-edit:hover{
  background:var(--negro); color:#fff;
  border-color:var(--dorado); box-shadow:0 4px 16px rgba(0,0,0,.3);
}
.nds-m-edit i{ font-size:13px; }

#nds-mclose{
  position:absolute; top:12px; right:12px;
  background:rgba(255,255,255,.15); border:none;
  color:#fff; width:28px; height:28px; border-radius:50%;
  cursor:pointer; font-size:14px;
  display:flex; align-items:center; justify-content:center;
  z-index:2;
}
#nds-mclose:hover{ background:rgba(255,255,255,.25); }
.nds-mhinfo{ position:relative; z-index:1; text-shadow:0 2px 12px rgba(0,0,0,.5); }
.nds-mtipo{
  font-size:11px; text-transform:uppercase;
  letter-spacing:4px; color:#F3D2A1;
  margin-bottom:8px; font-weight:700;
  text-shadow:0 1px 8px rgba(0,0,0,.4);
}
.nds-mnombre{ font-size:24px; font-weight:700; color:#fff; line-height:1.3; text-shadow:0 2px 12px rgba(0,0,0,.5); }
.nds-mmun{ font-size:14px; color:rgba(255,255,255,.9); margin-top:6px; display:flex; align-items:center; gap:6px; text-shadow:0 1px 8px rgba(0,0,0,.4); }
.nds-mmun i{ color:#F3D2A1; font-size:14px; }

@media (max-width:480px){
  #nds-mhero{ min-height:170px; padding:16px; }
  .nds-mtipo{ font-size:9px; letter-spacing:2px; }
  .nds-mnombre{ font-size:18px; }
  .nds-mmun{ font-size:12px; }
}
#nds-mbody{ padding:22px; }
.nds-msec{ margin-bottom:18px; }
.nds-msec h4{
  font-size:9px; text-transform:uppercase;
  letter-spacing:2px; color:var(--rojo);
  margin-bottom:9px; font-weight:700;
  padding-bottom:5px; border-bottom:1px solid var(--fondo);
}
.nds-mgrid{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; }
@media (max-width:500px){ .nds-mgrid{ grid-template-columns:1fr; } }
.nds-mf label{ font-size:10px; color:var(--gris); display:block; margin-bottom:2px; text-transform:uppercase; letter-spacing:.5px; }
.nds-mf p{ font-size:13px; color:var(--negro); font-weight:500; }
.nds-mtxt{ font-size:13px; color:#444; line-height:1.8; }
.nds-coords-copy{
  background:none; border:1px solid var(--rojo); color:var(--rojo);
  border-radius:6px; padding:4px 10px; font-size:11px; cursor:pointer;
  font-family:inherit; margin-top:4px;
}
.nds-coords-copy:hover{ background:var(--rojo); color:#fff; }
.nds-mdecl{
  background:var(--fondo); border-radius:10px;
  padding:12px; display:flex; gap:10px;
  border-left:3px solid var(--dorado);
}
.nds-mdecl i{ font-size:18px; color:var(--dorado); margin-top:2px; }
.nds-mdecl strong{ font-size:12px; color:var(--negro); }
.nds-mdecl p{ font-size:11px; color:#666; margin-top:1px; }
.nds-mdecl small{ font-size:10px; color:var(--gris); }

/* ── MODAL TABS ─────────────────────────────── */
.nds-mtabs{
  display:flex; border-bottom:2px solid var(--fondo);
  margin-bottom:0; padding:0 22px;
}
.nds-mtab{
  flex:1; background:none; border:none; border-bottom:3px solid transparent;
  margin-bottom:-2px; padding:14px 8px; font-size:13px; font-weight:500;
  font-family:inherit; color:var(--gris); cursor:pointer; transition:all .2s;
  text-align:center;
}
.nds-mtab i{ margin-right:6px; font-size:14px; }
.nds-mtab.active{ color:var(--rojo); border-bottom-color:var(--rojo); font-weight:700; }
.nds-mtab:hover:not(.active){ color:var(--negro); background:rgba(42,42,28,.03); }

/* ── TAB CONTENTS ───────────────────────────── */
.nds-mtab-content{ display:none; padding:22px; }
.nds-mtab-content.active{ display:block; }

/* ── GALLERY GRID ───────────────────────────── */
.nds-gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(120px, 1fr));
  gap:8px;
}
.nds-gallery-card{
  border-radius:10px; overflow:hidden;
  cursor:pointer; position:relative;
  aspect-ratio:4/3; background:var(--fondo);
  border:1px solid #e5ddd0;
  transition:box-shadow .2s, transform .2s;
}
.nds-gallery-card:hover{
  box-shadow:0 4px 16px rgba(0,0,0,.15);
  transform:translateY(-2px);
}
.nds-gallery-card img{
  width:100%; height:100%; object-fit:cover; display:block;
}
.nds-gallery-label{
  position:absolute; bottom:0; left:0; right:0;
  background:linear-gradient(to top, rgba(42,42,28,.85), transparent);
  color:#fff; font-size:9px; padding:16px 6px 4px;
  font-weight:600; text-transform:uppercase; letter-spacing:.5px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.nds-gallery-meta{
  position:absolute; bottom:0; left:0; right:0;
  background:rgba(42,42,28,.9); color:rgba(255,255,255,.8);
  font-size:9px; padding:2px 6px 4px; display:none;
}
.nds-gallery-card:hover .nds-gallery-meta{ display:block; }
.nds-gallery-card:hover .nds-gallery-label{ padding-top:18px; }
.nds-gallery-empty{
  grid-column:1/-1; text-align:center; padding:48px 16px;
  color:var(--gris);
}
.nds-gallery-empty i{ font-size:32px; display:block; margin-bottom:12px; opacity:.5; }
.nds-gallery-empty p{ margin:0; font-size:13px; }

/* ── LIGHTBOX ────────────────────────────────── */
.nds-lightbox{ position:fixed; inset:0; z-index:999999; }
.nds-lightbox-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.95); }
.nds-lightbox-content{
  position:absolute; top:50%; left:50%;
  transform:translate(-50%,-50%);
  display:flex; flex-direction:column; align-items:center;
  max-width:95vw; max-height:95vh;
}
.nds-lightbox-content img{
  max-width:90vw; max-height:75vh;
  border-radius:10px;
  box-shadow:0 8px 32px rgba(0,0,0,.5);
}
.nds-lightbox-close{
  position:fixed; top:16px; right:16px;
  background:rgba(255,255,255,.15); border:none;
  color:#fff; font-size:24px; cursor:pointer;
  border-radius:50%; width:44px; height:44px;
  z-index:1000000; display:flex; align-items:center; justify-content:center;
}
.nds-lightbox-close:hover{ background:rgba(255,255,255,.3); }
.nds-lightbox-nav{
  position:fixed; top:50%; transform:translateY(-50%);
  background:rgba(255,255,255,.12); border:none; color:#fff;
  font-size:28px; cursor:pointer; border-radius:50%;
  width:50px; height:50px; z-index:1000000;
  display:flex; align-items:center; justify-content:center;
}
.nds-lightbox-nav:hover{ background:rgba(255,255,255,.25); }
.nds-lightbox-prev{ left:16px; }
.nds-lightbox-next{ right:16px; }
.nds-lightbox-caption{
  color:#fff; text-align:center; margin-top:14px;
  font-size:13px; max-width:600px; line-height:1.6;
}
.nds-lightbox-caption strong{ display:block; font-size:15px; margin-bottom:4px; }
.nds-lightbox-caption small{ color:rgba(255,255,255,.7); }
.nds-lightbox-caption .nds-lightbox-tipo{
  display:inline-block; background:var(--rojo); color:#fff;
  padding:2px 10px; border-radius:999px; font-size:10px;
  font-weight:700; text-transform:uppercase; letter-spacing:.5px;
  margin-bottom:6px;
}
.nds-gallery-card.nds-gallery-portada{ border-color:var(--rojo); }
.nds-gallery-img-wrap{ position:relative; overflow:hidden; border-radius:8px 8px 0 0; background:#f0ece6; }
.nds-gallery-img-wrap img{ width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
.nds-gallery-portada-badge{
  position:absolute; top:6px; right:6px;
  background:var(--rojo); color:#fff;
  font-size:9px; font-weight:700; padding:2px 7px;
  border-radius:4px; text-transform:uppercase; letter-spacing:.5px;
}
.nds-gallery-fallback{
  height:100px; display:flex; align-items:center; justify-content:center;
  color:#a09688; font-size:20px;
}

/* ── BOTÓN COLAPSAR LISTA ── */
#nds-list-toggle{
  display:none;
  width:100%;
  padding:10px 14px;
  background:var(--negro);
  color:var(--crema);
  border:none; border-bottom:1px solid rgba(255,255,255,.1);
  font-family:inherit; font-size:12px; font-weight:600;
  cursor:pointer;
  align-items:center; justify-content:space-between;
  letter-spacing:.3px; flex-shrink:0;
}
#nds-list-toggle i{ color:var(--dorado); font-size:11px; transition:transform .25s; }
#nds-list-toggle.collapsed i.arrow{ transform:rotate(180deg); }

/* ══ RESPONSIVE ══ */
@media(max-width:700px){

  /* ── Header institucional compacto ── */
  #nds-inst-header{ padding:6px 10px; }
  .nds-inst-logo{ height:24px !important; }
  .nds-inst-title span{ font-size:8px !important; }
  .nds-inst-title strong{ font-size:11px !important; }
  .nds-inst-search input{ width:100px !important; font-size:11px !important; padding:5px 10px 5px 26px !important; }
  .nds-inst-search input:focus{ width:140px !important; }

  /* ── Hero: compacto en móvil con ámbito ── */
  #nds-hero{ padding:6px 10px !important; flex-wrap:wrap; gap:4px !important; }
  .nds-hero-title{ font-size:14px !important; }
  .nds-ambito-bar{ margin-left:0; width:100%; gap:4px; }
  .nds-ab{ font-size:10px; padding:3px 8px; }
  .nds-access-note{
    padding:8px 10px;
    flex-direction:column;
    align-items:flex-start;
  }
  .nds-access-note-btn{
    width:100%;
    justify-content:center;
  }

  /* ── Barra filtros: scroll horizontal, sin wrapping ── */
  #nds-bar{
    gap:6px; padding:6px 8px;
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  #nds-bar::-webkit-scrollbar{ display:none; }
  .nds-bar-label{ display:none; }
  .nds-bar-sep{ display:none; }
  .nds-sel{ min-width:120px; flex:none; font-size:11px; }
  .nds-geo-btn span{ display:none; }
  .nds-geo-btn{ padding:5px 8px; flex-shrink:0; }
  .nds-tipos-bar{
    display:flex; gap:4px; flex-wrap:nowrap;
    flex-shrink:0;
  }
  .nds-tb{
    font-size:10px; padding:4px 8px;
    flex-shrink:0; white-space:nowrap;
  }
  .nds-tb-lbl{ display:none; }
  .nds-bar-search{ display:none; }

  /* ── Layout: columna invertida (mapa arriba, lista abajo) ── */
  #nds-body{ flex-direction:column-reverse; }

  /* ── Mapa: máximo espacio posible ── */
  #nds-mapa{
    height:100svh; min-height:unset;
    display:flex; flex-direction:column;
  }
  #nds-map{ flex:1; min-height:200px; }

  /* ── Panel lista: bottom sheet colapsable ── */
  #nds-list-panel{
    width:100%;
    border-right:none;
    border-top:2px solid var(--dorado);
    flex-shrink:0;
    max-height:35vh;
    transition:max-height .3s ease;
    overflow:hidden;
    display:flex; flex-direction:column;
    box-shadow:0 -4px 16px rgba(0,0,0,.12);
  }
  #nds-list-panel.collapsed{ max-height:40px; }
  #nds-list-toggle{
    display:flex;
    border-bottom:none;
    border-top:none;
  }

  /* Ocultar header de conteo en móvil */
  .nds-list-hdr{ display:none; }

  .leaflet-bottom{ padding-bottom:env(safe-area-inset-bottom, 12px) !important; }
  .nds-geo-badge{ bottom:env(safe-area-inset-bottom, 14px); }

  /* ── Modal: fullscreen bottom sheet ── */
  #nds-mbox{
    width:100%; max-width:100%;
    max-height:92vh;
    border-radius:16px 16px 0 0;
    margin-top:auto;
  }
  #nds-modal{ align-items:flex-end; }
  .nds-mgrid{ grid-template-columns:1fr; }

  /* ── Popups más pequeños ── */
  .leaflet-popup-content-wrapper{ min-width:240px !important; }
  .nds-popup{ width:240px; }
  .nds-pp-hero{ height:120px; }
  .nds-pp-body{ padding:10px 12px 8px; }
  .nds-pp-nombre{ font-size:12px; }

  .nds-gallery-grid{ grid-template-columns:repeat(auto-fill, minmax(90px, 1fr))!important; gap:6px!important; }
  .nds-gallery-card .photo-thumb{ height:70px!important; }
}
