/* ==========================================================================
   app.css — Sistema de diseño de los portales de centros
   Un solo CSS para los dos portales; los colores llegan por variables
   (--brand, --accent, --surface...) inyectadas en el <body> desde el config.
   Mobile-first: se diseña para 360 px y se ensancha con min-width.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */

:root {
  --card: #ffffff;

  --r-sm: var(--radius-sm, 10px);
  --r-md: var(--radius-md, 13px);
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  --sh-1: 0 1px 2px rgba(14, 42, 51, .05), 0 2px 8px rgba(14, 42, 51, .05);
  --sh-2: 0 2px 6px rgba(14, 42, 51, .06), 0 14px 30px rgba(14, 42, 51, .09);
  --sh-3: 0 10px 28px rgba(14, 42, 51, .10), 0 28px 64px rgba(14, 42, 51, .10);

  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
          "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;

  --t-fast: 140ms cubic-bezier(.4, 0, .2, 1);
  --t-med:  240ms cubic-bezier(.4, 0, .2, 1);

  --wrap: 1120px;
}

/* ---------- 2. Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s-4); }

/* ---------- 3. Tipografía ---------- */

h1 { font-size: clamp(1.75rem, 1.22rem + 2.2vw, 2.75rem); letter-spacing: -.021em; line-height: 1.14; font-weight: 700; }
h2 { font-size: clamp(1.25rem, 1.13rem + .5vw, 1.625rem); letter-spacing: -.014em; line-height: 1.25; font-weight: 700; }
h3 { font-size: clamp(1.0625rem, 1.02rem + .2vw, 1.1875rem); letter-spacing: -.011em; line-height: 1.32; font-weight: 600; }
h4 { font-size: 1rem; letter-spacing: -.008em; line-height: 1.35; font-weight: 600; }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
}
.kicker::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor;
}

.lead { font-size: clamp(1rem, .96rem + .2vw, 1.12rem); color: var(--muted); line-height: 1.6; max-width: 62ch; }
.meta { font-size: .86rem; color: var(--muted); }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- 4. Barra superior ---------- */

.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); min-height: 66px;
}
.marca { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.marca:hover { color: var(--ink); }
.marca-svg, .marca-fallback {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--brand) 28%, transparent);
}
.marca-svg { padding: 6px; }
.marca-texto { display: flex; flex-direction: column; line-height: 1.1; }
.marca-nombre { font-weight: 700; font-size: 1.02rem; letter-spacing: -.02em; }
.marca-sub { font-size: .74rem; color: var(--muted); }

.nav { display: none; align-items: center; gap: 2px; }
.nav a {
  position: relative; padding: 9px 13px; border-radius: var(--r-sm);
  font-size: .92rem; font-weight: 600; color: var(--muted);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--brand) 7%, transparent); }
.nav a.on { color: var(--brand); }
.nav a.on::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.topbar-cta { display: none; }

/* ---------- 5. Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 1px solid transparent;
  border-radius: var(--r-sm); font-weight: 700; font-size: .94rem;
  cursor: pointer; white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 26%, transparent); }
.btn-primary:hover { background: var(--brand-ink); box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 32%, transparent); }
.btn-accent { background: var(--accent); color: var(--ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-accent:hover { filter: brightness(1.04); }
.btn-outline { background: var(--card); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 32%, transparent); }
.btn-outline:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.btn-wa { background: #1f9d55; color: #fff; }
.btn-wa:hover { background: #1a8446; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .86rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.ico { width: 18px; height: 18px; flex: 0 0 18px; }
.ico-lg { width: 22px; height: 22px; }

/* ---------- 6. Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--hero);
  color: #fff;
  padding: var(--s-6) 0 var(--s-7);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 88% 8%, rgba(255, 255, 255, .22), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5; pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; gap: var(--s-6); align-items: center;
}
.hero-copy { max-width: 34ch; }
.hero .kicker { color: rgba(255, 255, 255, .88); }
.hero h1 { margin: var(--s-3) 0 var(--s-3); color: #fff; text-wrap: balance; }
.hero .lead { color: rgba(255, 255, 255, .9); max-width: 46ch; }
.hero-art { display: none; justify-self: end; width: 100%; max-width: 460px; }
.hero-art img, .hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .22)); }

.hero-badges { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-5); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 600; color: rgba(255, 255, 255, .9);
}
.hero-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 255, 255, .12);
}

/* ---------- 7. Consola de búsqueda ---------- */

.buscador {
  position: relative; z-index: 2;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-3);
  padding: var(--s-4); margin-top: var(--s-5);
  display: grid; gap: var(--s-3);
}
.buscador-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding-bottom: var(--s-3); border-bottom: 1px solid var(--line);
}
.buscador-tabs { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: var(--r-sm); }
.buscador-tab {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 14px; border-radius: 8px; font-size: .87rem; font-weight: 700; color: var(--muted);
}
.buscador-tab[aria-selected="true"] { background: var(--card); color: var(--brand); box-shadow: var(--sh-1); }
.buscador-grid { display: grid; gap: var(--s-3); }
.campo { display: grid; gap: 6px; min-width: 0; }
.campo label { font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.campo-control { position: relative; display: flex; align-items: center; }
.campo-control .ico {
  position: absolute; left: 13px; color: var(--muted); pointer-events: none; width: 19px; height: 19px;
}
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.campo-control input { padding-left: 42px; }
.campo select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23587984' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.campo input:hover, .campo select:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.campo input:focus, .campo select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.campo textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.buscador-acciones { display: grid; gap: var(--s-2); }
.buscador-acciones .btn { justify-self: start; }
.hero-art-fallback {
  width: 100%; max-width: 420px; aspect-ratio: 4 / 3; border-radius: var(--r-xl);
  background:
    radial-gradient(38% 38% at 28% 30%, rgba(255,255,255,.30), transparent 70%),
    radial-gradient(30% 30% at 72% 62%, rgba(255,255,255,.18), transparent 70%),
    linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.22);
}
.buscador-nota { font-size: .78rem; color: var(--muted); text-align: center; }

/* ---------- 8. Franja de datos ---------- */

.stats { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, 1fr); }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-4); text-align: center;
}
.stat-num {
  display: block; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 700;
  letter-spacing: -.03em; color: var(--brand); line-height: 1.1;
}
.stat-label { font-size: .82rem; color: var(--muted); }

/* ---------- 9. Secciones ---------- */

.seccion { padding: var(--s-7) 0; }
.seccion-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); flex-wrap: wrap; }
.seccion-cab .lead { max-width: 60ch; }
.seccion-alt { background: var(--surface-2); }

.grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

/* ---------- 10. Tarjeta de centro ---------- */

.card-centro {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-4);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.card-centro:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  box-shadow: var(--sh-2);
}
.card-cab { display: flex; align-items: flex-start; gap: var(--s-3); }
.card-avatar {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 10%, var(--card));
  color: var(--brand); font-weight: 700; font-size: 1.1rem;
  border: 1px solid color-mix(in srgb, var(--brand) 14%, transparent);
}
.card-titulo { display: grid; gap: 2px; min-width: 0; }
.card-enlace { color: var(--ink); }
.card-enlace:hover { color: var(--brand); }
.card-enlace h3 { font-size: 1.04rem; }
.card-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: .84rem; color: var(--muted);
}
.card-meta .ico { width: 15px; height: 15px; color: color-mix(in srgb, var(--muted) 80%, transparent); }
.card-dir {
  font-size: .9rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.card-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.card-acciones { display: flex; gap: var(--s-2); margin-top: auto; padding-top: var(--s-3); flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid transparent;
  font-size: .79rem; font-weight: 600; color: var(--ink);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
a.chip:hover { border-color: color-mix(in srgb, var(--brand) 30%, transparent); color: var(--brand); }
.chip.on { background: var(--brand); color: #fff; }
.chip-mas { background: transparent; border: 1px dashed var(--line); color: var(--muted); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: var(--r-pill);
  font-size: .73rem; font-weight: 700; letter-spacing: .01em;
  background: var(--surface-2); color: var(--muted);
}
.badge-24h { background: #fdeceb; color: #b42318; }
.badge-verif { background: color-mix(in srgb, var(--accent) 16%, #fff); color: color-mix(in srgb, var(--accent) 75%, #000); }
.badge-nota { background: color-mix(in srgb, var(--star) 16%, #fff); color: color-mix(in srgb, var(--star) 72%, #000); }
.badge-abierto { background: #e7f6ee; color: #157f4c; }
.badge-cerrado { background: #f1f3f5; color: #66737d; }

.filtros { display: flex; gap: var(--s-2); overflow-x: auto; padding-bottom: var(--s-2); scrollbar-width: thin; }
.filtros::-webkit-scrollbar { height: 6px; }
.filtros::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.filtros .chip { flex: 0 0 auto; background: var(--card); border-color: var(--line); }
.filtros .chip:hover { border-color: var(--brand); color: var(--brand); }
.filtros .chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.zonas { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.zonas a {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 9px 14px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line);
  font-size: .88rem; font-weight: 600; color: var(--ink);
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.zonas a:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.zonas .n { font-size: .76rem; color: var(--muted); font-weight: 600; }

/* ---------- 11. Estrellas ---------- */

.estrellas { color: var(--star); letter-spacing: 1px; font-size: .95rem; }
.estrella.vacia { color: color-mix(in srgb, var(--star) 28%, var(--line)); }
.estrellas-numero { margin-left: 6px; font-size: .84rem; font-weight: 700; color: var(--ink); }

/* ---------- 12. Resultados ---------- */

.layout { display: grid; gap: var(--s-5); padding: var(--s-5) 0 var(--s-8); }
.resultado-cab {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-4);
}
.resultado-cab h1 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); }
.cuenta { font-size: .88rem; color: var(--muted); font-weight: 600; }
.col-mapa { display: none; }
.col-mapa.sticky { position: sticky; top: 86px; }

.mapa {
  height: 300px; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--sh-2);
  background: var(--surface-2); z-index: 1;
}
.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-control-attribution { font-size: 10px; }
.mapa-marker { position: relative; width: 30px; height: 38px; }
.mapa-marker::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 28px; height: 28px; background: var(--brand);
  border: 3px solid #fff; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .3);
}
.mapa-marker::after {
  content: ""; position: absolute; top: 9px; left: 9px;
  width: 10px; height: 10px; border-radius: 50%; background: #fff;
}
.mapa-marker.emergencia { background: #d92d20; }
.leaflet-popup-content-wrapper { border-radius: var(--r-md); box-shadow: var(--sh-2); }
.leaflet-popup-content { margin: 12px 14px; font-size: .9rem; }
.leaflet-popup-content b { display: block; font-size: .96rem; margin-bottom: 2px; }
.popup-meta { color: var(--muted); font-size: .82rem; }
.popup-accion { display: inline-block; margin-top: 8px; font-weight: 700; }

/* ---------- 13. Ficha ---------- */

.ficha { padding: var(--s-5) 0 var(--s-8); }
.miga { font-size: .82rem; color: var(--muted); margin-bottom: var(--s-3); display: flex; gap: 6px; align-items: center; }
.ficha-grid { display: grid; gap: var(--s-5); }
.ficha-cab { display: grid; gap: var(--s-3); margin-bottom: var(--s-5); }
.ficha-cab h1 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.35rem); }
.ficha-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; color: var(--muted); font-size: .92rem; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5); box-shadow: var(--sh-1); margin-bottom: var(--s-4);
}
.panel h2 { font-size: 1.06rem; margin-bottom: var(--s-3); }
.panel h3 { font-size: .98rem; margin-bottom: var(--s-2); }
.panel-texto { color: var(--muted); line-height: 1.65; max-width: 62ch; }
.resena p { max-width: 62ch; }
.stat-num, .dato dd, .card-meta, .horarios td { font-variant-numeric: tabular-nums; }

.acciones { display: grid; gap: var(--s-2); }
.acciones-fija {
  position: sticky; bottom: 0; z-index: 20;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: var(--s-3) 0;
  display: flex; gap: var(--s-2); flex-wrap: wrap;
  margin: var(--s-4) 0 0;
}
.acciones-fija .btn { flex: 1 1 auto; }

.datos { display: grid; gap: var(--s-3); margin: 0; }
.dato { display: grid; grid-template-columns: 38px 1fr; gap: var(--s-3); align-items: start; }
.dato-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 9%, var(--card));
  color: var(--brand);
}
.dato-ico .ico { width: 19px; height: 19px; }
.dato dd { margin: 0; font-weight: 600; word-break: break-word; }
.dato dt { margin: 0; font-size: .76rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.dato .suave { font-weight: 400; color: var(--muted); font-size: .88rem; }

.horarios { width: 100%; border-collapse: collapse; font-size: .94rem; }
.horarios th, .horarios td { padding: 10px 0; text-align: left; border-bottom: 1px solid var(--line); }
.horarios th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.horarios td:last-child { text-align: right; color: var(--muted); }
.horarios tr:last-child td { border-bottom: 0; }
.horarios tr.hoy td { color: var(--ink); font-weight: 700; }
.horarios tr.hoy td:first-child::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; vertical-align: middle;
}
.estado-linea { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s-3); }

.resena { padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.resena:first-of-type { border-top: 0; padding-top: 0; }
.resena-cab { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.resena-autor { font-weight: 700; }
.resena-fecha { font-size: .8rem; color: var(--muted); }
.resena p { margin-top: 6px; color: var(--ink); }
.form-resena { display: grid; gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px dashed var(--line); }
.form-resena .campo input, .form-resena .campo select, .form-resena .campo textarea { width: 100%; }

/* ---------- 14. Estados ---------- */

.vacio {
  text-align: center; padding: var(--s-7) var(--s-4);
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--r-lg);
  color: var(--muted);
}
.vacio h3 { color: var(--ink); margin-bottom: 6px; }
.aviso {
  background: color-mix(in srgb, var(--star) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--star) 30%, transparent);
  color: color-mix(in srgb, var(--star) 72%, #000);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md); font-size: .9rem; margin-bottom: var(--s-4);
}

/* ---------- 15. Paginador ---------- */

.paginador { display: flex; align-items: center; justify-content: center; gap: var(--s-3); padding: var(--s-5) 0 0; }
.pag {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-weight: 700; font-size: .9rem;
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.pag:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.pag-info { font-size: .86rem; color: var(--muted); }

/* ---------- 16. Pie ---------- */

.site-footer { background: var(--brand-ink); color: rgba(255, 255, 255, .78); margin-top: var(--s-7); }
.footer-grid { display: grid; gap: var(--s-5); padding: var(--s-6) 0 var(--s-4); }
.footer-marca { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; letter-spacing: -.02em; }
.footer-nota { font-size: .88rem; line-height: 1.6; max-width: 42ch; }
.footer-grid nav { display: grid; gap: 10px; font-size: .9rem; }
.footer-grid nav a { color: rgba(255, 255, 255, .82); font-weight: 600; }
.footer-grid nav a:hover { color: #fff; }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: var(--s-4) 0 var(--s-5);
  font-size: .8rem; color: rgba(255, 255, 255, .6);
  display: grid; gap: 6px;
}
.footer-datos { display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: .82rem; }

/* ---------- 17. Utilidades ---------- */

.oculto { display: none !important; }
.centrado { text-align: center; }
.pila { display: grid; gap: var(--s-3); }
.fila { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.crece { flex: 1 1 auto; }

/* ---------- 18. Responsive ---------- */

@media (min-width: 560px) {
  .buscador-grid { grid-template-columns: 1fr 1fr; }
  .buscador-acciones { grid-template-columns: 1fr 1fr; }
  .acciones { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .footer-legal { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 760px) {
  .nav { display: flex; }
  .topbar-cta { display: inline-flex; }
  .hero { padding: var(--s-7) 0 var(--s-8); }
  .hero-inner { grid-template-columns: 1.05fr .95fr; gap: var(--s-7); }
  .hero-copy { max-width: none; }
  .hero-art { display: flex; }
  .buscador { padding: var(--s-5); margin-top: calc(var(--s-6) * -1); }
  .buscador-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .buscador-acciones { grid-template-columns: auto auto 1fr; align-items: center; }
  .buscador-acciones .buscador-nota { text-align: left; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .ficha-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .col-lista { order: 1; }
  .col-mapa { display: block; order: 2; }
  .mapa { height: 420px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1.3fr; }
}

@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 400px; }
  .mapa { height: 480px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .card-centro:hover, .btn:hover, .pag:hover, .zonas a:hover { transform: none; }
}
