/* APP MARCO — estilos (los colores reales llegan de la API como variables) */
:root {
  --primario: #172047;
  --texto-primario: #ffffff;
  --fondo: #f2f5fb;
  --carta: #ffffff;
  --borde: #e3e8f4;
  --txt: #14203f;
  --txt2: #5b6b93;
  --radio: 14px;
  --sombra: 0 2px 10px rgba(20, 32, 63, .07);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--fondo);
  color: var(--txt);
  overscroll-behavior-y: none;
}

.oculto { display: none !important; }

/* ---------- Encabezado ---------- */
#cabecera {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  background: var(--primario);
  color: var(--texto-primario);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px 12px;
}
#cabecera .titulo {
  flex: 1;
  font-size: 17px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 8px;
}
#cabecera .titulo img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.btn-icono {
  background: rgba(255,255,255,.14);
  border: none; color: inherit;
  width: 38px; height: 38px;
  border-radius: 10px;
  font-size: 17px;
  cursor: pointer;
  flex-shrink: 0;
}

#barraBusqueda { padding: 10px 14px; background: var(--primario); }
#barraBusqueda input {
  width: 100%;
  padding: 11px 14px;
  border: none; border-radius: 11px;
  font-size: 15px;
  outline: none;
}

/* ---------- Contenido ---------- */
#contenido {
  padding: 14px 14px calc(env(safe-area-inset-bottom, 0px) + 20px);
  max-width: 720px;
  margin: 0 auto;
  animation: aparecer .18s ease;
}
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

.cargando { display: flex; justify-content: center; padding: 60px 0; }
.girador {
  width: 34px; height: 34px;
  border: 3px solid var(--borde);
  border-top-color: var(--primario);
  border-radius: 50%;
  animation: girar .8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Rejillas y tarjetas ---------- */
.rejilla { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rejilla-3 { grid-template-columns: repeat(3, 1fr); }

.tarjeta {
  background: var(--carta);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: transform .08s;
}
.tarjeta:active { transform: scale(.97); }
.tarjeta img.portada { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.tarjeta .icono-grande {
  width: 54px; height: 54px;
  object-fit: contain;
  margin: 16px auto 0;
  display: block;
}
.tarjeta .nombre {
  padding: 10px 8px 14px;
  font-size: 13.5px; font-weight: 600;
  line-height: 1.25;
}
.tarjeta .sub { font-size: 11.5px; color: var(--txt2); font-weight: 400; padding: 0 8px 12px; margin-top: -8px; }

/* Lista (fichas, enlaces, lugares) */
.lista { display: flex; flex-direction: column; gap: 10px; }
.renglon {
  display: flex; align-items: center; gap: 12px;
  background: var(--carta);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 10px 12px;
  cursor: pointer;
  border: none;
  text-align: left;
  width: 100%;
}
.renglon:active { transform: scale(.98); }
.renglon img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--fondo); flex-shrink: 0; }
.renglon .info { flex: 1; min-width: 0; }
.renglon .info .n { font-weight: 600; font-size: 14.5px; }
.renglon .info .s { font-size: 12.5px; color: var(--txt2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.renglon .flecha { color: var(--txt2); font-size: 18px; }

.titulo-seccion { font-size: 13px; font-weight: 700; color: var(--txt2); text-transform: uppercase; letter-spacing: .04em; margin: 18px 2px 10px; }
.vacio { text-align: center; color: var(--txt2); padding: 50px 20px; font-size: 14.5px; }

/* ---------- Detalle de ficha ---------- */
.hero { border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); margin-bottom: 14px; }
.hero img { width: 100%; display: block; max-height: 340px; object-fit: cover; }

.bloque-texto {
  background: var(--carta);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 16px;
  margin-bottom: 12px;
  font-size: 14.5px;
  line-height: 1.55;
  overflow-wrap: break-word;
}
.bloque-texto img { max-width: 100%; height: auto; border-radius: 8px; }

.boton-accion {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  background: var(--primario);
  color: var(--texto-primario);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px; font-weight: 600;
  margin-bottom: 10px;
  cursor: pointer;
  text-decoration: none;
}
.boton-accion.secundario { background: var(--carta); color: var(--primario); box-shadow: var(--sombra); }
.boton-accion:active { opacity: .85; }

.rejilla-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.rejilla-fotos img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 10px; cursor: pointer;
  box-shadow: var(--sombra);
}

.video-marco { border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); margin-bottom: 12px; aspect-ratio: 16/9; }
.video-marco iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Cupones / noticias / eventos */
.carta-ancha {
  background: var(--carta);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
  margin-bottom: 12px;
}
.carta-ancha img.banner { width: 100%; display: block; }
.carta-ancha .cuerpo { padding: 14px; }
.carta-ancha .cuerpo h3 { font-size: 15.5px; margin-bottom: 4px; }
.carta-ancha .cuerpo p { font-size: 13.5px; color: var(--txt2); line-height: 1.45; }
.etiqueta {
  display: inline-block;
  background: var(--fondo);
  color: var(--txt2);
  font-size: 11.5px; font-weight: 600;
  border-radius: 20px;
  padding: 3px 10px;
  margin-top: 8px;
}

/* ---------- Visor de imágenes ---------- */
#visorImagen {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 10, 20, .93);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
#visorImagen img { max-width: 100%; max-height: 92vh; border-radius: 8px; }

/* ---------- Aviso offline ---------- */
#avisoOffline {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  left: 50%; transform: translateX(-50%);
  background: #2c2c2e; color: #fff;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 22px;
  z-index: 90;
  white-space: nowrap;
}

/* ---------- Portada de inicio ---------- */
.portada-app {
  margin: -14px -14px 16px;
  padding: calc(env(safe-area-inset-top, 0px) + 30px) 18px 24px;
  background: linear-gradient(165deg, var(--primario) 0%, color-mix(in srgb, var(--primario), #4a5da8 45%) 100%);
  color: var(--texto-primario);
  text-align: center;
  border-radius: 0 0 26px 26px;
}
.portada-app .logo-app {
  width: 74px; height: 74px;
  border-radius: 20px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  margin-bottom: 10px;
}
.portada-app h1 { font-size: 20px; margin-bottom: 16px; }
.caja-buscar {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.caja-buscar span { font-size: 15px; }
.caja-buscar input {
  flex: 1;
  border: none; outline: none;
  font-size: 15px;
  color: var(--txt);
  background: transparent;
}

/* ---------- Slider de portada ---------- */
.slider { position: relative; margin-bottom: 16px; }
.slider-pista {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  scrollbar-width: none;
}
.slider-pista::-webkit-scrollbar { display: none; }
.slider-pista img {
  width: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  aspect-ratio: 1080/1152;   /* proporción real de los banners: se ven completos */
  object-fit: cover;
  cursor: pointer;
}
.slider-puntos {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
}
.slider-puntos span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  transition: all .2s;
}
.slider-puntos span.on { background: #fff; width: 18px; border-radius: 4px; }

/* ---------- Modo web (vista previa en navegador de escritorio) ---------- */
@media (min-width: 560px) {
  html.modo-web { background: #1a2033; overflow: hidden; }
  html.modo-web body {
    max-width: 400px;
    margin: 24px auto;
    height: calc(100vh - 48px);
    border-radius: 34px;
    overflow-y: auto;          /* el contenido se desplaza DENTRO del marco */
    overflow-x: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,.55), 0 0 0 10px #0d1120;
    position: relative;
    scrollbar-width: none;
  }
  html.modo-web body::-webkit-scrollbar { display: none; }

  /* Navegación con mouse: arrastre en pistas deslizables y puntos clicables */
  html.modo-web .slider-pista,
  html.modo-web .paginas { cursor: grab; }
  html.modo-web .slider-pista.arrastrando,
  html.modo-web .paginas.arrastrando { cursor: grabbing; scroll-snap-type: none; }
  html.modo-web .slider-puntos span,
  html.modo-web .puntos-secciones span { cursor: pointer; }
}

/* Flechas ‹ › para pasar páginas/banners con mouse (solo modo web en escritorio) */
.flecha-nav { display: none; }
@media (min-width: 560px) {
html.modo-web .flecha-nav {
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px;
  border: none; border-radius: 50%;
  background: rgba(10, 14, 28, .45); color: #fff;
  font-size: 18px; line-height: 1;
  cursor: pointer;
  z-index: 5;
  opacity: .75;
}
html.modo-web .flecha-nav:hover { opacity: 1; }
.flecha-nav.izq { left: 8px; }
.flecha-nav.der { right: 8px; }
}
#rejillaHome { position: relative; }


/* ---------- DSALUD: identidad visual exclusiva ---------- */
body.tpl-dsalud { --ds-navy:#063b5b; --ds-blue:#087da9; --ds-cyan:#18a6bd; --ds-mint:#dff5f4; --ds-ink:#133247; --ds-muted:#60798a; background:#f3f8fa; color:var(--ds-ink); }
.tpl-dsalud #contenido { padding:0; }
.tpl-dsalud .ds-home { min-height:100%; padding-bottom:28px; }
.tpl-dsalud .ds-hero { position:relative; overflow:hidden; padding:calc(env(safe-area-inset-top,0px) + 28px) 20px 26px; color:#fff; background:radial-gradient(circle at 92% 10%,rgba(75,214,219,.42),transparent 34%),linear-gradient(145deg,#053d5d 0%,#087da9 58%,#16a7b7 100%); border-radius:0 0 30px 30px; box-shadow:0 14px 34px rgba(5,61,93,.2); }
.tpl-dsalud .ds-hero::after { content:""; position:absolute; right:-50px; bottom:-72px; width:190px; height:190px; border:30px solid rgba(255,255,255,.08); border-radius:50%; }
.tpl-dsalud .ds-brand { position:relative; z-index:1; display:inline-flex; align-items:baseline; gap:8px; margin-bottom:24px; font-size:18px; font-weight:900; letter-spacing:.08em; }
.tpl-dsalud .ds-brand span { font-size:10px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; opacity:.78; }
.tpl-dsalud .ds-hero h1 { position:relative; z-index:1; max-width:300px; margin:0 0 8px; font-size:clamp(29px,8vw,38px); line-height:1.02; letter-spacing:-.035em; }
.tpl-dsalud .ds-hero p { position:relative; z-index:1; max-width:330px; margin:0 0 20px; font-size:13.5px; line-height:1.45; opacity:.88; }
.tpl-dsalud .ds-search { position:relative; z-index:1; display:flex; align-items:center; gap:10px; min-height:50px; padding:0 15px; background:rgba(255,255,255,.98); color:var(--ds-blue); border-radius:16px; box-shadow:0 10px 25px rgba(0,39,63,.18); }
.tpl-dsalud .ds-search input { min-width:0; flex:1; border:0; outline:0; background:transparent; color:var(--ds-ink); font:inherit; font-size:13px; }
.tpl-dsalud .ds-search input::placeholder { color:#79909e; }
.tpl-dsalud .ds-results { padding:14px 14px 0; }
.tpl-dsalud .ds-section { padding:22px 14px 0; }
.tpl-dsalud .ds-section-title { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin:0 2px 12px; }
.tpl-dsalud .ds-section-title span { color:var(--ds-navy); font-size:17px; font-weight:800; letter-spacing:-.015em; }
.tpl-dsalud .ds-section-title small { color:var(--ds-muted); font-size:10.5px; }
.tpl-dsalud .ds-quick-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.tpl-dsalud .ds-quick-card,.tpl-dsalud .ds-service-card { border:0; font:inherit; cursor:pointer; transition:transform .15s ease,box-shadow .15s ease; }
.tpl-dsalud .ds-quick-card:active,.tpl-dsalud .ds-service-card:active { transform:scale(.97); }
.tpl-dsalud .ds-quick-card { display:flex; min-width:0; min-height:132px; flex-direction:column; align-items:flex-start; padding:14px 11px; text-align:left; color:#fff; background:linear-gradient(155deg,#087da9,#075878); border-radius:18px; box-shadow:0 10px 22px rgba(7,88,120,.18); }
.tpl-dsalud .ds-quick-card:nth-child(2) { background:linear-gradient(155deg,#0795a8,#08708b); }
.tpl-dsalud .ds-quick-card:nth-child(3) { background:linear-gradient(155deg,#18a6a7,#087c8f); }
.tpl-dsalud .ds-quick-card img,.tpl-dsalud .ds-icon-fallback { width:42px; height:42px; margin-bottom:auto; object-fit:contain; }
.tpl-dsalud .ds-quick-card img { filter:brightness(0) invert(1); }
.tpl-dsalud .ds-icon-fallback { display:grid; place-items:center; border-radius:12px; background:rgba(8,125,169,.12); color:var(--ds-blue); font-weight:900; }
.tpl-dsalud .ds-quick-card .ds-icon-fallback { color:#fff; background:rgba(255,255,255,.14); }
.tpl-dsalud .ds-quick-card > span:not(.ds-icon-fallback) { overflow:hidden; max-width:100%; margin-top:12px; font-size:11.5px; font-weight:800; text-overflow:ellipsis; }
.tpl-dsalud .ds-quick-card small { margin-top:3px; font-size:8.5px; opacity:.74; }
.tpl-dsalud .ds-home #rejillaHome > .slider { margin:22px 14px 0; }
.tpl-dsalud .ds-home .slider-pista { border-radius:20px; box-shadow:0 12px 28px rgba(23,73,96,.13); }
.tpl-dsalud .ds-services-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.tpl-dsalud .ds-service-card { display:flex; min-width:0; min-height:112px; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:13px 8px; color:var(--ds-ink); background:#fff; border:1px solid rgba(8,125,169,.08); border-radius:17px; box-shadow:0 7px 20px rgba(29,75,96,.08); }
.tpl-dsalud .ds-service-card img { width:44px; height:44px; object-fit:contain; }
.tpl-dsalud .ds-service-card > span:not(.ds-icon-fallback) { overflow:hidden; width:100%; font-size:10.5px; font-weight:750; line-height:1.25; text-align:center; text-overflow:ellipsis; }
.tpl-dsalud .carta-ancha { margin:0 14px 14px; border:1px solid rgba(8,125,169,.08); border-radius:20px; box-shadow:0 9px 26px rgba(19,67,89,.09); }
.tpl-dsalud .carta-ancha:first-child { margin-top:14px; }
.tpl-dsalud .carta-ancha .banner { border-radius:20px 20px 0 0; }
.tpl-dsalud .boton-accion { border-radius:13px; background:linear-gradient(135deg,var(--ds-blue),var(--ds-cyan)); }
.tpl-dsalud .boton-accion.secundario { color:var(--ds-blue); background:var(--ds-mint); }
.tpl-dsalud .hero,.tpl-dsalud .bloque-texto,.tpl-dsalud .rejilla-fotos,.tpl-dsalud .video-marco { margin-left:14px; margin-right:14px; }
.tpl-dsalud .bloque-texto { padding:20px; color:var(--ds-ink); background:#fff; border-radius:20px; box-shadow:0 8px 24px rgba(19,67,89,.08); }
@media (min-width:700px) { .tpl-dsalud .ds-quick-card{min-height:145px} .tpl-dsalud .ds-services-grid{grid-template-columns:repeat(4,1fr)} }

/* DSALUD evolution: editorial cover + signature dock + scrollable menu */
body.tpl-dsalud { --ds-blue:#0876a1; --ds-deep:#065878; --ds-paper:#f5f3f2; --ds-red:#ef473a; font-family:Dosis,"Arial Narrow","Segoe UI",sans-serif; }
body.tpl-dsalud.ds-menu-visible { overflow:hidden; }
.tpl-dsalud #contenido { width:100%; max-width:720px; min-height:100dvh; padding:0; overflow:hidden; }
.tpl-dsalud .sr-only { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.tpl-dsalud .ds-evolution { position:relative; min-height:100dvh; background:linear-gradient(155deg,#1593bd,#0876a1 58%,#075777); }
.tpl-dsalud .ds-stage { position:absolute; inset:0 0 calc(62px + env(safe-area-inset-bottom,0px)); overflow:hidden; }
.tpl-dsalud .ds-cover,.tpl-dsalud .ds-cover .slider,.tpl-dsalud .ds-cover .slider-pista { width:100%; height:100%; margin:0; }
.tpl-dsalud .ds-cover .slider-pista { border-radius:0; box-shadow:none; }
.tpl-dsalud .ds-cover .slider-pista img { flex:0 0 100%; width:100%; height:100%; object-fit:cover; object-position:center; pointer-events:none; }
.tpl-dsalud .ds-cover .slider-puntos { bottom:18px; }
.tpl-dsalud .ds-cover .slider-puntos span { width:5px; height:5px; background:rgba(255,255,255,.55); }
.tpl-dsalud .ds-cover .slider-puntos span.on { width:18px; border-radius:8px; background:#fff; }
.tpl-dsalud .ds-cover-fallback { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#fff; background:radial-gradient(circle at 50% 75%,rgba(255,255,255,.22),transparent 32%); }
.tpl-dsalud .ds-cover:has(.slider) + .ds-cover-fallback { display:none; }
.tpl-dsalud .ds-cover-fallback strong { font-size:42px; letter-spacing:.06em; }
.tpl-dsalud .ds-cover-fallback span { margin-top:5px; font-size:15px; letter-spacing:.18em; text-transform:uppercase; }
.tpl-dsalud .ds-dock { position:fixed; z-index:80; left:50%; bottom:0; display:grid; grid-template-columns:1fr 1fr 74px 1fr 1fr; width:min(100%,720px); min-height:calc(62px + env(safe-area-inset-bottom,0px)); padding:4px 5px env(safe-area-inset-bottom,0px); transform:translateX(-50%); background:rgba(245,243,242,.97); border-top:1px solid rgba(6,88,120,.16); box-shadow:0 -7px 24px rgba(3,48,70,.13); backdrop-filter:blur(16px); }
.tpl-dsalud .ds-dock-item { display:flex; min-width:0; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:3px 1px; border:0; color:var(--ds-blue); background:transparent; font:inherit; cursor:pointer; }
.tpl-dsalud .ds-dock-item img,.tpl-dsalud .ds-dock-item .ds-icon-fallback { width:29px; height:29px; margin:0; object-fit:contain; }
.tpl-dsalud .ds-dock-item:first-child { color:var(--ds-red); }
.tpl-dsalud .ds-dock-item:first-child img { filter:none; }
.tpl-dsalud .ds-dock-item span:last-child { overflow:hidden; max-width:100%; font-size:9px; font-weight:650; line-height:1.1; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.tpl-dsalud .ds-menu-trigger { position:relative; align-self:start; width:74px; height:74px; margin-top:-21px; border:1px solid rgba(6,88,120,.35); border-radius:50% 50% 43% 43%; color:var(--ds-blue); background:var(--ds-paper); box-shadow:0 -7px 18px rgba(3,56,83,.14); cursor:pointer; }
.tpl-dsalud .ds-menu-trigger svg { width:43px; height:43px; fill:none; stroke:currentColor; stroke-width:2.4; }
.tpl-dsalud .ds-menu-trigger svg path { stroke-width:3.8; }
.tpl-dsalud .ds-menu-trigger img { width:43px; height:43px; object-fit:contain; }

/* Directorios DSALUD: lectura compacta como en la aplicación original. */
.tpl-dsalud .ds-directory-list { display:flex; flex-direction:column; margin:14px; overflow:hidden; background:#fff; border:1px solid rgba(8,118,161,.14); border-radius:18px; box-shadow:0 8px 24px rgba(19,67,89,.08); }
.tpl-dsalud .ds-directory-row { display:grid; grid-template-columns:44px minmax(0,1fr) 22px; min-height:64px; align-items:center; gap:11px; width:100%; padding:9px 12px; border:0; border-bottom:1px solid rgba(8,118,161,.18); color:var(--ds-ink); background:#fff; font:inherit; text-align:left; cursor:pointer; }
.tpl-dsalud .ds-directory-row:last-child { border-bottom:0; }
.tpl-dsalud .ds-directory-row:active { background:#eef8fa; }
.tpl-dsalud .ds-directory-icon { display:grid; width:42px; height:42px; place-items:center; overflow:hidden; border-radius:9px; background:#eaf7f8; }
.tpl-dsalud .ds-directory-icon img { display:block; width:36px; height:36px; object-fit:contain; }
.tpl-dsalud .ds-directory-icon svg { width:26px; height:26px; fill:none; stroke:var(--ds-blue); stroke-width:1.8; }
.tpl-dsalud .ds-directory-copy { display:flex; min-width:0; flex-direction:column; gap:2px; }
.tpl-dsalud .ds-directory-copy strong { overflow:hidden; color:var(--ds-ink); font-size:14px; font-weight:800; line-height:1.15; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.tpl-dsalud .ds-directory-copy small { overflow:hidden; color:var(--ds-muted); font-size:11px; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.tpl-dsalud .ds-directory-arrow { color:var(--ds-blue); font:700 29px/1 Arial,sans-serif; text-align:right; }
.tpl-dsalud .ds-menu { position:fixed; z-index:70; inset:0; display:grid; place-items:center; visibility:hidden; opacity:0; transition:opacity .22s ease,visibility .22s; }
.tpl-dsalud .ds-menu.abierto { visibility:visible; opacity:1; }
.tpl-dsalud .ds-menu-backdrop { position:absolute; inset:0; background:rgba(8,20,28,.55); backdrop-filter:blur(6px); }
.tpl-dsalud .ds-menu-panel { position:absolute; top:max(14px,env(safe-area-inset-top,0px)); bottom:calc(62px + env(safe-area-inset-bottom,0px)); left:50%; display:flex; width:min(calc(100% - 22px),680px); flex-direction:column; overflow:hidden; transform:translate(-50%,18px) scale(.98); background:rgba(245,243,242,.96); border:1px solid rgba(255,255,255,.75); border-radius:25px 25px 0 0; box-shadow:0 24px 70px rgba(0,30,44,.34); transition:transform .25s cubic-bezier(.2,.8,.2,1); }
.tpl-dsalud .ds-menu.abierto .ds-menu-panel { transform:translate(-50%,0) scale(1); }
.tpl-dsalud .ds-menu-head { display:flex; align-items:center; justify-content:space-between; padding:15px 15px 10px 18px; color:var(--ds-blue); }
.tpl-dsalud .ds-menu-head > div { display:flex; flex-direction:column; }
.tpl-dsalud .ds-menu-head strong { font-size:20px; letter-spacing:.06em; }
.tpl-dsalud .ds-menu-head span { margin-top:1px; color:#617783; font-size:10px; letter-spacing:.08em; text-transform:uppercase; }
.tpl-dsalud .ds-menu-close { display:grid; width:43px; height:43px; place-items:center; border:0; border-radius:50%; color:#fff; background:var(--ds-blue); font:300 34px/1 Arial,sans-serif; cursor:pointer; }
.tpl-dsalud .ds-menu-panel .ds-search { display:flex; min-height:44px; align-items:center; gap:9px; margin:0 14px 11px; padding:0 13px; color:var(--ds-blue); background:#fff; border:1px solid rgba(8,118,161,.14); border-radius:13px; box-shadow:none; }
.tpl-dsalud .ds-search svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; }
.tpl-dsalud .ds-search input { flex:1; min-width:0; border:0; outline:0; color:#183746; background:transparent; font:inherit; font-size:13px; }
.tpl-dsalud .ds-results { padding:0 14px; overflow:auto; }
.tpl-dsalud .ds-menu-scroll { flex:1; min-height:0; padding:0 11px 22px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:rgba(8,118,161,.35) transparent; }
.tpl-dsalud .ds-services-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.tpl-dsalud .ds-service-card { display:flex; min-width:0; min-height:111px; flex-direction:column; align-items:center; justify-content:center; gap:9px; padding:11px 5px; border:1px solid rgba(8,118,161,.10); border-radius:11px; color:var(--ds-blue); background:rgba(255,255,255,.94); box-shadow:0 5px 14px rgba(6,88,120,.08); font:inherit; cursor:pointer; transition:transform .14s ease,background .14s ease,box-shadow .14s ease; }
.tpl-dsalud .ds-service-card:active { transform:scale(.96); background:#edf8fa; box-shadow:none; }
.tpl-dsalud .ds-service-card img,.tpl-dsalud .ds-service-card .ds-icon-fallback { width:39px; height:39px; margin:0; object-fit:contain; }
.tpl-dsalud .ds-service-card > span:last-child { overflow:hidden; width:100%; min-height:25px; display:grid; place-items:center; color:var(--ds-blue); font-size:9.5px; font-weight:650; line-height:1.25; text-align:center; text-overflow:ellipsis; text-transform:uppercase; }
.tpl-dsalud .ds-icon-fallback { display:grid; place-items:center; border-radius:50%; color:#fff; background:var(--ds-blue); font-weight:700; }
.tpl-dsalud .ds-menu-hint { margin:15px 0 3px; color:#718591; font-size:10px; text-align:center; text-transform:uppercase; letter-spacing:.06em; }
@media (max-width:360px) { .tpl-dsalud .ds-dock{grid-template-columns:1fr 1fr 66px 1fr 1fr}.tpl-dsalud .ds-menu-trigger{width:66px;height:68px}.tpl-dsalud .ds-dock-item span:last-child{font-size:8px}.tpl-dsalud .ds-service-card{min-height:101px} }

.tpl-dsalud .ds-emergency { padding:14px 0 24px; }
.tpl-dsalud .ds-emergency-head { margin:0 14px 13px; padding:17px 18px; color:#fff; background:linear-gradient(135deg,#d92f34,#ef473a); border-radius:17px; box-shadow:0 9px 22px rgba(190,35,42,.2); }
.tpl-dsalud .ds-emergency-head span { font-size:18px; font-weight:750; }
.tpl-dsalud .ds-emergency-head p { margin-top:3px; font-size:11px; opacity:.88; }
.tpl-dsalud .ds-emergency-list { display:grid; gap:8px; margin:0 14px; }
.tpl-dsalud .ds-emergency-item { display:grid; grid-template-columns:46px minmax(0,1fr) 18px; min-height:70px; align-items:center; gap:10px; padding:9px 13px 9px 10px; color:var(--ds-deep); text-decoration:none; background:#fff; border:1px solid rgba(8,118,161,.10); border-radius:14px; box-shadow:0 5px 16px rgba(6,88,120,.08); }
.tpl-dsalud .ds-phone-icon { display:grid; width:43px; height:43px; place-items:center; color:#fff; background:var(--ds-red); border-radius:50%; }
.tpl-dsalud .ds-phone-icon svg { width:22px; height:22px; fill:currentColor; }
.tpl-dsalud .ds-emergency-item > span:nth-child(2) { display:flex; min-width:0; flex-direction:column; gap:3px; }
.tpl-dsalud .ds-emergency-item strong { font-size:11.5px; line-height:1.25; }
.tpl-dsalud .ds-emergency-item small { color:#718591; font-size:10px; letter-spacing:.04em; }
.tpl-dsalud .ds-emergency-item i { color:var(--ds-blue); font:26px/1 Arial,sans-serif; }




/* ---------- Secciones en páginas deslizables (4 por página) ---------- */
.paginas {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.paginas::-webkit-scrollbar { display: none; }
.pagina {
  width: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
}
.pagina .rejilla { grid-template-rows: 1fr 1fr; }
.puntos-secciones {
  position: static;
  display: flex; justify-content: center; gap: 6px;
  margin-top: 12px;
}
.puntos-secciones span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(20, 32, 63, .18);
  transition: all .2s;
}
.puntos-secciones span.on { background: var(--primario); width: 18px; border-radius: 4px; }

/* DSALUD 2026: portada editorial y navegaciÃ³n fija aprobada */
.tpl-dsalud #contenido { padding-bottom:calc(92px + env(safe-area-inset-bottom,0px)); overflow:visible; }
.tpl-dsalud .ds-evolution { min-height:100%; padding:14px 14px 24px; background:linear-gradient(180deg,#eef8fb 0%,#f4f8fb 72%,#edf3f7 100%); }
.tpl-dsalud .ds-stage { position:relative; inset:auto; overflow:visible; }
.tpl-dsalud .ds-cover { width:100%; height:auto; }
.tpl-dsalud .ds-cover .slider { width:100%; height:auto; margin:0; }
.tpl-dsalud .ds-cover .slider-pista { width:100%; height:auto; aspect-ratio:9/15.65; overflow-x:auto; border-radius:28px; background:var(--ds-blue); box-shadow:0 16px 36px rgba(6,88,120,.16); }
.tpl-dsalud .ds-cover .slider-pista img { flex:0 0 100%; width:100%; height:100%; object-fit:cover; object-position:center; }
.tpl-dsalud .ds-cover .slider-puntos { position:relative; bottom:auto; height:34px; display:flex; align-items:center; justify-content:center; gap:7px; }
.tpl-dsalud .ds-cover .slider-puntos span { width:8px; height:8px; background:#d2e9ee; }
.tpl-dsalud .ds-cover .slider-puntos span.on { width:34px; height:8px; background:var(--ds-blue); }
.tpl-dsalud .ds-cover-fallback { position:relative; min-height:520px; border-radius:28px; }
.tpl-dsalud .ds-home-directory { display:grid; gap:10px; padding:3px 0 8px; }
.tpl-dsalud .ds-home-row { display:grid; width:100%; min-height:88px; grid-template-columns:62px minmax(0,1fr) 24px; align-items:center; gap:13px; padding:11px 16px 11px 10px; border:1px solid rgba(8,118,161,.10); border-radius:24px; color:var(--ds-ink); background:rgba(255,255,255,.94); box-shadow:0 6px 16px rgba(6,88,120,.055); text-align:left; font:inherit; cursor:pointer; }
.tpl-dsalud .ds-home-row:active { transform:scale(.985); background:#f1fafb; }
.tpl-dsalud .ds-home-row-icon { display:grid; width:58px; height:58px; place-items:center; border-radius:20px; background:#edfafa; }
.tpl-dsalud .ds-home-row-icon img,.tpl-dsalud .ds-home-row-icon .ds-icon-fallback { width:46px; height:46px; margin:0; object-fit:contain; }
.tpl-dsalud .ds-home-row-copy { display:flex; min-width:0; flex-direction:column; gap:3px; }
.tpl-dsalud .ds-home-row-copy strong { overflow:hidden; font-size:17px; font-weight:800; line-height:1.15; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.tpl-dsalud .ds-home-row-copy small { overflow:hidden; color:#657d87; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.tpl-dsalud .ds-home-row-arrow { color:var(--ds-blue); font:700 36px/1 Arial,sans-serif; }
.tpl-dsalud .ds-dock { position:fixed; z-index:80; left:50%; bottom:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); width:min(calc(100% - 16px),704px); min-height:calc(76px + env(safe-area-inset-bottom,0px)); padding:7px 5px calc(6px + env(safe-area-inset-bottom,0px)); transform:translateX(-50%); background:rgba(255,255,255,.96); border:1px solid rgba(8,118,161,.13); border-bottom:0; border-radius:28px 28px 0 0; box-shadow:0 -10px 30px rgba(6,88,120,.12); backdrop-filter:blur(16px); }
.tpl-dsalud .ds-dock-item { min-height:60px; padding:5px 2px; border-radius:19px; color:var(--ds-deep); transition:background .15s ease,color .15s ease,transform .15s ease; }
.tpl-dsalud .ds-dock-item:first-child { color:#b52d32; }
.tpl-dsalud .ds-dock-item svg { width:31px; height:31px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.tpl-dsalud .ds-dock-item span:last-child { font-size:9px; font-weight:800; text-transform:none; }
.tpl-dsalud .ds-dock-item.activo { color:var(--ds-blue); background:#eaf8fa; transform:translateY(-3px); }
.tpl-dsalud .ds-dock-item:first-child.activo { color:#b52d32; background:#fff0ef; }
.tpl-dsalud #cabecera { padding-bottom:10px; }
@media (max-width:360px) {
  .tpl-dsalud .ds-evolution{padding-left:10px;padding-right:10px}
  .tpl-dsalud .ds-dock{grid-template-columns:repeat(5,minmax(0,1fr))}
  .tpl-dsalud .ds-dock-item span:last-child{font-size:8px}
  .tpl-dsalud .ds-home-row-copy strong{font-size:15px}
}

/* DSALUD: menú inferior completo, desplazable y sin contenido bajo el slider */
.tpl-dsalud .ds-evolution { min-height:calc(100dvh - 90px); padding-bottom:0; }
.tpl-dsalud .ds-stage { min-height:calc(100dvh - 112px); }
.tpl-dsalud .ds-home-directory { display:none; }
.tpl-dsalud .ds-dock {
  display:flex;
  justify-content:flex-start;
  gap:5px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x proximity;
  scrollbar-width:none;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}
.tpl-dsalud .ds-dock::-webkit-scrollbar { display:none; }
.tpl-dsalud .ds-dock-item { flex:0 0 76px; scroll-snap-align:start; }
.tpl-dsalud .ds-dock-item img { width:34px; height:34px; object-fit:contain; image-rendering:auto; }
.tpl-dsalud .ds-dock-item span:last-child { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Listados interiores: logos contenidos, nunca ampliados como banners */
.tpl-dsalud .ds-places-list { display:grid; gap:10px; padding:14px; }
.tpl-dsalud .ds-place-card { display:grid; width:100%; min-height:92px; grid-template-columns:82px minmax(0,1fr) 24px; align-items:center; gap:13px; padding:9px 14px 9px 9px; border:1px solid rgba(8,118,161,.11); border-radius:20px; color:var(--ds-ink); background:#fff; box-shadow:0 7px 20px rgba(6,88,120,.07); text-align:left; font:inherit; cursor:pointer; }
.tpl-dsalud .ds-place-card:active { transform:scale(.985); background:#f4fbfc; }
.tpl-dsalud .ds-place-logo { display:grid; width:82px; height:72px; place-items:center; overflow:hidden; border-radius:15px; background:#f8fbfc; }
.tpl-dsalud .ds-place-logo img { display:block; max-width:72px; max-height:62px; width:auto; height:auto; object-fit:contain; image-rendering:auto; }
.tpl-dsalud .ds-place-copy { display:flex; min-width:0; flex-direction:column; align-items:center; gap:5px; text-align:center; }
.tpl-dsalud .ds-place-copy strong { font-size:14px; font-weight:800; line-height:1.2; }
.tpl-dsalud .ds-place-copy small { color:#69808b; font-size:11px; line-height:1.3; }
.tpl-dsalud .ds-place-arrow { color:var(--ds-blue); font:700 34px/1 Arial,sans-serif; }

/* DSALUD: las fichas fueron diseñadas editorialmente con texto centrado. */
.tpl-dsalud .bloque-texto,
.tpl-dsalud .bloque-texto p,
.tpl-dsalud .bloque-texto div,
.tpl-dsalud .bloque-texto h1,
.tpl-dsalud .bloque-texto h2,
.tpl-dsalud .bloque-texto h3,
.tpl-dsalud .bloque-texto h4,
.tpl-dsalud .carta-ancha .cuerpo { text-align:center; }
.tpl-dsalud .bloque-texto ul,
.tpl-dsalud .bloque-texto ol { display:inline-block; text-align:left; }

/* DSALUD final: cinco accesos fijos y menú central superpuesto */
.tpl-dsalud .ds-dock { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; overflow:visible; }
.tpl-dsalud .ds-dock-item { min-width:0; width:auto; flex:auto; scroll-snap-align:none; }
.tpl-dsalud .ds-dock-menu { position:relative; transform:translateY(-13px); min-height:72px; border:1px solid rgba(8,118,161,.22); border-radius:50% 50% 22px 22px; color:var(--ds-blue); background:#fff; box-shadow:0 -8px 20px rgba(6,88,120,.15); }
.tpl-dsalud .ds-dock-menu:active { transform:translateY(-11px) scale(.97); }
.tpl-dsalud .ds-dock-menu svg { width:35px; height:35px; }
.tpl-dsalud .ds-dock-menu img { width:40px; height:40px; }
.tpl-dsalud .ds-menu { z-index:70; }
.tpl-dsalud .ds-menu-backdrop { width:100%; border:0; }
.tpl-dsalud .ds-menu-panel { bottom:calc(76px + env(safe-area-inset-bottom,0px)); }
.tpl-dsalud .ds-menu-scroll { padding:4px 12px 22px; }
.tpl-dsalud .ds-services-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.tpl-dsalud .ds-service-card { min-height:112px; }
.tpl-dsalud .ds-service-card svg { width:39px; height:39px; fill:none; stroke:currentColor; stroke-width:1.7; }
html.modo-web .tpl-dsalud .ds-menu-panel { width:min(calc(100% - 22px),378px); }
