/* =========================================================
   Cantabria, comarca a comarca — estilos públicos
   Paleta: mar Cantábrico, prados, piedra caliza y el rojo de la bandera
   ========================================================= */
:root {
  --mar: #0e3a4a;
  --mar-2: #1f6f8b;
  --prado: #3f7a4a;
  --caliza: #f5f2ec;
  --papel: #fffdf9;
  --tinta: #1b2a30;
  --gris: #5a686d;
  --linea: #e4ddd1;
  --rojo: #b5222d;
  --c: var(--mar-2);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 58, 74, .06), 0 8px 24px rgba(14, 58, 74, .07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--caliza); color: var(--tinta);
  font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--mar-2); text-underline-offset: 3px; }
a:hover { color: var(--mar); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--mar); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--mar); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 2px; border-radius: 4px; }

/* ---------- cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 249, .92);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--linea);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--mar); }
.brand strong { display: block; font-family: var(--serif); font-size: 1.15rem; line-height: 1.1; }
.brand small { display: block; font-size: .78rem; color: var(--gris); }
.logo-mark { width: 40px; height: 40px; flex: none; }
.site-nav { display: flex; gap: .3rem; }
.site-nav a {
  text-decoration: none; color: var(--tinta); font-weight: 500; font-size: .96rem;
  padding: .5rem .85rem; border-radius: 999px;
}
.site-nav a:hover { background: #ece6db; }
.site-nav a[aria-current="page"] { background: var(--mar); color: #fff; }
.nav-toggle { display: none; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .45rem; justify-content: center;
  font: 600 .95rem/1 var(--sans); padding: .85rem 1.25rem; border-radius: 999px;
  border: 1.5px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--mar); color: #fff; }
.btn-primary:hover { background: #0a2c39; color: #fff; }
.btn-ghost { background: transparent; color: var(--mar); border-color: currentColor; }
.btn-ghost:hover { background: rgba(14, 58, 74, .06); }
.btn-small { padding: .6rem 1rem; font-size: .88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.map-btn { background: var(--c); color: #fff; }
.map-btn::before, .map-link::before {
  content: ""; width: .9em; height: .9em; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.map-btn:hover { color: #fff; filter: brightness(1.08); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(640px, 82vh); display: flex; align-items: flex-start; overflow: hidden; background: #e6eeec; }
.hero-art, .hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 30, 38, .55), rgba(8, 30, 38, .15) 60%, rgba(8, 30, 38, .5)); }
.hero-content { position: relative; z-index: 2; padding: clamp(3rem, 8vw, 6rem) 0 12rem; max-width: 760px; margin-left: max(1.25rem, calc((100% - var(--wrap)) / 2)); }
.hero.has-photo h1, .hero.has-photo .lead, .hero.has-photo .eyebrow { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--rojo); margin-bottom: .8rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #33464d; max-width: 62ch; }
.hero-search { display: flex; gap: .5rem; margin-top: 1.6rem; background: #fff; padding: .4rem; border-radius: 999px; box-shadow: var(--shadow); max-width: 560px; }
.hero-search input { flex: 1; border: 0; background: transparent; font: inherit; padding: .6rem 1rem; min-width: 0; }
.hero-search input:focus { outline: none; }

/* ---------- cifras ---------- */
.stats {
  position: relative; z-index: 3; margin-top: -3.5rem; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--papel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.stats div { padding: 1.4rem 1rem; text-align: center; border-right: 1px solid var(--linea); }
.stats div:last-child { border-right: 0; }
.stats strong { display: block; font-family: var(--serif); font-size: 2.3rem; color: var(--mar); line-height: 1; }
.stats span { font-size: .9rem; color: var(--gris); }

.intro { padding: 4rem 0 1rem; max-width: 820px; text-align: center; }
.intro p { color: #3c4e55; font-size: 1.08rem; }

/* ---------- secciones ---------- */
.section { padding: 2.5rem 0 3.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; }
.section-lead { color: var(--gris); max-width: 70ch; margin-top: -.6rem; margin-bottom: 1.6rem; }
.link-more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-more::after { content: " →"; }
.band { background: #e9e3d8; padding: 3.5rem 0; margin: 1rem 0 0; }
.page-head { padding: 2rem 0 1rem; }

/* ---------- tarjetas ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-comarcas { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-munis { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-temas { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  display: flex; flex-direction: column; background: var(--papel); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  border: 1px solid rgba(14, 58, 74, .06);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(14, 58, 74, .08), 0 16px 34px rgba(14, 58, 74, .12); color: inherit; }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #dfe7e4; }
.card-media img, .card-media .ph-svg { width: 100%; height: 100%; object-fit: cover; }
.card-media-wrap { position: relative; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card-body h3 { margin-bottom: .25rem; }
.card-body p { font-size: .94rem; color: #4a5a60; margin: 0; }
.card-body .meta { font-size: .82rem; font-weight: 600; color: var(--c); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.card-head { display: flex; align-items: center; gap: .5rem; }
.mini-escudo { width: 26px; height: 32px; object-fit: contain; }
.num {
  position: absolute; left: 1rem; bottom: -1.1rem; width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  background: var(--c); color: #fff; border-radius: 50%; font: 700 .95rem var(--sans); box-shadow: 0 0 0 4px var(--papel);
}
.comarca-card .card-body { padding-top: 1.6rem; }
.comarca-card { border-top: 4px solid var(--c); }
.tema-card { border-bottom: 4px solid var(--c); }
.tema-card .card-media { aspect-ratio: 16 / 8; }

/* huecos de imagen */
.is-placeholder { position: relative; }
.ph-label {
  position: absolute; right: .7rem; bottom: .7rem; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  background: rgba(255, 255, 255, .85); color: var(--mar); padding: .25rem .6rem; border-radius: 999px;
}
.card .ph-label { display: none; }

/* ---------- fichas (comarca / municipio) ---------- */
.entity-head {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, #fff), var(--caliza));
  padding: 1.5rem 0 2.2rem; border-top: 6px solid var(--c);
}
.entity-title { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; margin-top: 1rem; }
.entity-title h1 { margin-bottom: .35rem; }
.entity-title .lead { margin-bottom: 1.2rem; }
.escudo {
  width: 132px; height: 158px; display: grid; place-items: center; background: #fff; border-radius: 18px;
  box-shadow: var(--shadow); padding: 12px;
}
.escudo-img { width: 100%; height: 100%; object-fit: contain; }
.escudo-ph { width: 100%; height: 100%; }
.foto { border-radius: var(--radius); overflow: hidden; background: #dfe7e4; }
.foto-hero { aspect-ratio: 21 / 8; margin: 0 0 2.5rem; box-shadow: var(--shadow); }
.foto-hero .foto-img, .foto-hero .ph-svg { width: 100%; height: 100%; object-fit: cover; }
.entity-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: start; }
.entity-aside { position: sticky; top: 92px; display: grid; gap: 1rem; }
.aside-card { background: var(--papel); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.aside-card h2 { font-size: 1.1rem; margin-bottom: .8rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: .6rem; padding: .35rem 0; text-decoration: none; color: var(--tinta); font-size: .92rem; line-height: 1.35;
  border-bottom: 1px dashed var(--linea);
}
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--c); font-weight: 700; font-size: .8rem; padding-top: .1rem; }
.toc a:hover { color: var(--c); }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem .9rem; font-size: .92rem; }
.facts dt { color: var(--gris); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.block { background: var(--papel); border-radius: var(--radius); padding: 1.8rem 2rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); border-left: 4px solid var(--c); }
.block h2 { font-size: 1.45rem; }

.prose { overflow-wrap: anywhere; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1em; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--c); }
.prose h3 { margin-top: 1.4em; }
.prose p.has-map { background: color-mix(in srgb, var(--c) 7%, #fff); border-radius: 10px; padding: .7rem .9rem; font-size: .95rem; }
.map-link { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.prose > :last-child { margin-bottom: 0; }

.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; }
.chip-list a {
  display: inline-block; padding: .38rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--linea);
  text-decoration: none; color: var(--tinta); font-size: .9rem;
}
.chip-list a:hover { border-color: var(--c); color: var(--c); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.gallery figcaption { font-size: .82rem; color: var(--gris); margin-top: .3rem; }

.map-embed { border-radius: var(--radius); overflow: hidden; margin: 0 0 1.2rem; background: #dde6e3; aspect-ratio: 16 / 8; position: relative; box-shadow: var(--shadow); }
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.map-consent { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 1.5rem; gap: .4rem;
  background: repeating-linear-gradient(45deg, #e3ebe8 0 14px, #dbe4e1 14px 28px); }
.map-consent .btn-row { justify-content: center; }

.guia-mini { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; }
.guia-mini a, .guia-aside a { display: block; text-decoration: none; color: var(--tinta); background: var(--papel); border-radius: 10px; padding: .8rem 1rem; border: 1px solid var(--linea); }
.guia-mini a:hover, .guia-aside a:hover { border-color: var(--c); }
.guia-mini span, .guia-aside span { display: block; font-size: .82rem; color: var(--gris); }
.guia-aside { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.guia-aside a { padding: .6rem .8rem; font-size: .92rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1rem 0 4rem; }
.pager a { display: block; background: var(--papel); border-radius: var(--radius); padding: 1rem 1.3rem; text-decoration: none; font-family: var(--serif); font-size: 1.15rem; color: var(--mar); box-shadow: var(--shadow); }
.pager a small { display: block; font: 600 .75rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--gris); }
.pager .next { text-align: right; }

/* ---------- migas ---------- */
.breadcrumbs ol { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .2rem; font-size: .86rem; color: var(--gris); }
.breadcrumbs li + li::before { content: "/"; margin: 0 .4rem; color: #b6ada0; }
.breadcrumbs a { color: var(--gris); text-decoration: none; }
.breadcrumbs a:hover { color: var(--mar); text-decoration: underline; }

/* ---------- listado de municipios ---------- */
.filters { margin-top: 1.5rem; }
.filters input {
  width: 100%; max-width: 520px; font: inherit; padding: .85rem 1.1rem; border-radius: 12px; border: 1.5px solid var(--linea); background: #fff;
}
.filters input:focus { border-color: var(--mar-2); outline: none; }
.chip-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.chip { font: 500 .86rem var(--sans); padding: .42rem .85rem; border-radius: 999px; border: 1.5px solid var(--linea); background: #fff; cursor: pointer; color: var(--tinta); }
.chip:hover { border-color: var(--c); }
.chip.is-active { background: var(--c); border-color: var(--c); color: #fff; }
.chip[data-comarca=""].is-active { background: var(--mar); border-color: var(--mar); }
.filter-count { font-size: .88rem; color: var(--gris); margin: .8rem 0 0; min-height: 1.4em; }
.az { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: 1rem; }
.az a { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 8px; background: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; border: 1px solid var(--linea); }
.az a:hover { background: var(--mar); color: #fff; }
.az-group { margin-bottom: 2.2rem; }
.az-letter { font-size: 2rem; color: var(--rojo); border-bottom: 1px solid var(--linea); padding-bottom: .3rem; margin-bottom: 1rem; }
.empty { text-align: center; color: var(--gris); padding: 2rem; }

/* ---------- guía ---------- */
.guia-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 2.5rem; align-items: start; padding-bottom: 2rem; }
.guia-toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
.guia-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.guia-item { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; background: var(--papel); border-radius: var(--radius); padding: 1.5rem 1.6rem; box-shadow: var(--shadow); }
.guia-num { font-family: var(--serif); font-size: 2.3rem; line-height: 1; color: var(--c); opacity: .9; }
.guia-body h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.guia-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .9rem; color: var(--gris); margin-bottom: .8rem; }
.guia-meta b { color: var(--tinta); font-weight: 600; }
.guia-img { float: right; width: 42%; max-width: 320px; margin: 0 0 1rem 1.2rem; border-radius: 10px; overflow: hidden; }
.guia-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.guia-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; clear: both; }
.guia .entity-head h1 { max-width: 22ch; }

.notfound { padding: 5rem 0; text-align: center; }
.notfound .btn-row, .notfound .lead { justify-content: center; margin-inline: auto; }

/* ---------- pie ---------- */
.site-footer { background: var(--mar); color: #cfe0e2; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: .8rem; }
.site-footer a { color: #e6f0f1; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.brand-footer { color: #fff; margin-bottom: 1rem; }
.brand-footer .logo-mark rect { fill: #fff; }
.brand-footer .logo-mark path:first-of-type { fill: var(--mar); }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; font-size: .92rem; }
.flag-stripe { height: 10px; background: linear-gradient(180deg, #fff 50%, var(--rojo) 50%); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .entity-layout { grid-template-columns: minmax(0, 1fr); }
  .entity-aside { position: static; }
  .guia-layout { grid-template-columns: minmax(0, 1fr); }
  .guia-toc { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle {
    display: inline-flex; font: 600 .9rem var(--sans); background: var(--mar); color: #fff; border: 0; border-radius: 999px; padding: .55rem 1rem; cursor: pointer;
  }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--papel);
    border-bottom: 1px solid var(--linea); padding: .6rem 1.25rem 1rem; display: none;
  }
  .site-nav.is-open { display: flex; }
  .brand small { display: none; }
  .brand strong { font-size: 1rem; }
  .hero-content { padding-bottom: 9rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--linea); }
  .entity-title { grid-template-columns: 1fr; gap: 1rem; }
  .escudo { width: 96px; height: 116px; padding: 8px; }
  .foto-hero { aspect-ratio: 16 / 10; }
  .block { padding: 1.3rem 1.2rem; }
  .guia-item { grid-template-columns: 1fr; padding: 1.2rem; }
  .guia-num { font-size: 1.6rem; }
  .guia-img { float: none; width: 100%; max-width: none; margin: 0 0 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .hero-search { border-radius: 16px; flex-direction: column; }
  .map-embed { aspect-ratio: 4 / 5; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}

/* =========================================================
   Parche 1.0.1 — escudos, cabecera en tablet y portada
   ========================================================= */

/* Escudos: la imagen siempre queda dentro del recuadro blanco */
.escudo {
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: none;
}
.escudo-img {
  display: block; width: 100%; height: 100%;
  max-width: 100%; max-height: 100%;
  object-fit: contain; object-position: center;
}
.escudo-ph { display: block; max-width: 100%; max-height: 100%; }
.mini-escudo { flex: none; object-fit: contain; }

/* Fondo de cabecera de fichas para navegadores sin color-mix (Safari antiguo) */
@supports not (background: color-mix(in srgb, red 50%, white)) {
  .entity-head { background: linear-gradient(180deg, #e7eeee, var(--caliza)); }
  .prose p.has-map { background: #eef3f2; }
}

/* Fotos principales: encuadre centrado también con fotos verticales */
.foto-hero .foto-img { object-position: center 40%; }

/* Menú: sin saltos de línea en los enlaces */
.site-nav a { white-space: nowrap; }
@media (max-width: 1100px) {
  .brand small { display: none; }
}
/* Tablet: menú desplegable antes de que no quepa */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; font: 600 .9rem var(--sans); background: var(--mar); color: #fff;
    border: 0; border-radius: 999px; padding: .55rem 1rem; cursor: pointer;
  }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--papel);
    border-bottom: 1px solid var(--linea); padding: .6rem 1.25rem 1rem; display: none;
    box-shadow: 0 12px 24px rgba(14, 58, 74, .08);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .7rem .9rem; }
}
@media (max-width: 760px) {
  .brand strong { font-size: .98rem; }
  .brand { min-width: 0; }
  .brand span { min-width: 0; }
}

/* Portada con ilustración: el texto ya no se monta sobre las montañas */
.hero:not(.has-photo) {
  display: flex; flex-direction: column; min-height: 0;
  background: linear-gradient(180deg, #d9e7e6, #edefe9);
}
.hero:not(.has-photo) .hero-content { order: 1; padding-bottom: 1.5rem; }
.hero:not(.has-photo) .hero-art {
  order: 2; position: relative; inset: auto; display: block; width: 100%;
  height: clamp(190px, 30vw, 380px); margin-top: -2rem;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%);
          mask-image: linear-gradient(180deg, transparent, #000 30%);
}
@media (max-width: 760px) {
  .hero:not(.has-photo) .hero-content { padding-top: 2.2rem; }
  .hero:not(.has-photo) .hero-art { height: 200px; margin-top: -1rem; }
}

/* Portada con foto: mejor lectura del texto en móvil */
@media (max-width: 760px) {
  .hero.has-photo { min-height: 0; }
  .hero.has-photo .hero-content { padding-bottom: 7rem; }
}

/* Migas de pan largas en móvil */
@media (max-width: 760px) {
  .breadcrumbs li[aria-current="page"] { display: none; }
  .breadcrumbs li:nth-last-child(2)::after { content: ""; }
}

/* =========================================================
   Parche 1.0.2 — escudo siempre contenido y comarcas sin escudo
   ========================================================= */
.escudo { position: relative; display: block; overflow: hidden; padding: 0; }
.escudo .escudo-img,
.escudo .escudo-ph {
  position: absolute; top: 12px; right: 12px; bottom: 12px; left: 12px;
  width: calc(100% - 24px); height: calc(100% - 24px);
  max-width: none; max-height: none; margin: 0;
  object-fit: contain; object-position: center;
}
@media (max-width: 760px) {
  .escudo .escudo-img, .escudo .escudo-ph { top: 8px; right: 8px; bottom: 8px; left: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
}
.entity-title.no-escudo { grid-template-columns: minmax(0, 1fr); }

/* =========================================================
   Versión 1.1.0 — mapas directos y barra de administración
   ========================================================= */
.map-block .map-embed { margin: .4rem 0 .8rem; box-shadow: none; aspect-ratio: 16 / 9; }
.map-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-foot { margin: 0; font-size: .95rem; }
@media (max-width: 760px) { .map-block .map-embed { aspect-ratio: 4 / 3; } }

.adminbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 40px;
  display: flex; align-items: center; gap: .1rem; padding: 0 .6rem;
  background: #10242c; color: #e8f0f1; font: 500 .86rem/1 var(--sans);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 4px 14px rgba(0, 0, 0, .18);
}
.adminbar .ab-item {
  display: inline-flex; align-items: center; gap: .4rem; height: 40px; padding: 0 .75rem;
  color: #e8f0f1; text-decoration: none; background: none; border: 0; cursor: pointer; font: inherit; white-space: nowrap;
}
.adminbar .ab-item:hover, .adminbar .ab-item:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; }
.adminbar .ab-brand svg { width: 22px; height: 22px; }
.adminbar .ab-brand { font-weight: 700; }
.adminbar .ab-edit { background: var(--rojo); color: #fff; border-radius: 6px; height: 30px; margin: 0 .3rem; }
.adminbar .ab-edit:hover { background: #9c1c26; }
.adminbar .ab-spacer { flex: 1; }
.adminbar .ab-user { opacity: .7; padding: 0 .6rem; font-size: .8rem; }
.adminbar .ab-new { position: relative; }
.adminbar .ab-menu {
  position: absolute; top: 40px; left: 0; min-width: 190px; background: #10242c; border-radius: 0 0 8px 8px;
  padding: .3rem 0; box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}
.adminbar .ab-menu a { display: block; padding: .6rem 1rem; color: #e8f0f1; text-decoration: none; }
.adminbar .ab-menu a:hover { background: rgba(255, 255, 255, .1); }
.adminbar [hidden] { display: none !important; }
body.has-adminbar { padding-top: 40px; }
body.has-adminbar .site-header { top: 40px; }
body.has-adminbar .entity-aside, body.has-adminbar .guia-toc { top: 132px; }
html:has(body.has-adminbar) { scroll-padding-top: 130px; }
@media (max-width: 760px) {
  .adminbar .ab-hide-m, .adminbar .ab-text { display: none; }
  .adminbar .ab-item { padding: 0 .6rem; }
}

/* =========================================================
   Versión 1.1.2 — filtros de municipios
   ========================================================= */
[hidden] { display: none !important; }
.az a { cursor: pointer; color: var(--mar); transition: background .15s, color .15s; }
.az a.is-active { background: var(--mar); color: #fff; border-color: var(--mar); }
.az a.is-empty { opacity: .35; pointer-events: none; }
.chip.is-active { box-shadow: 0 0 0 2px rgba(14, 58, 74, .12); }
.filter-status { display: flex; align-items: center; gap: 1rem; margin-top: .9rem; min-height: 1.6em; }
.filter-status .filter-count { margin: 0; }
.filter-reset {
  font: 600 .86rem var(--sans); color: var(--rojo); background: none; border: 0; padding: 0;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

/* =========================================================
   Versión 1.2.0 — logotipo, Quiénes somos y Planes
   ========================================================= */
.brand-logo { height: 46px; width: auto; max-width: 220px; object-fit: contain; flex: none; }
.brand.has-logo { gap: .8rem; }
.brand-logo-footer { height: 52px; max-width: 240px; background: #fff; border-radius: 8px; padding: 4px 8px; }
.site-nav a { padding: .5rem .75rem; font-size: .94rem; }
@media (max-width: 1250px) { .brand small { display: none; } }
@media (max-width: 1100px) {
  .nav-toggle {
    display: inline-flex; font: 600 .9rem var(--sans); background: var(--mar); color: #fff;
    border: 0; border-radius: 999px; padding: .55rem 1rem; cursor: pointer;
  }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--papel);
    border-bottom: 1px solid var(--linea); padding: .6rem 1.25rem 1rem; display: none;
    box-shadow: 0 12px 24px rgba(14, 58, 74, .08);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .7rem .9rem; font-size: 1rem; }
}
@media (max-width: 760px) { .brand-logo { height: 38px; max-width: 160px; } }

.footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.grid-planes { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.plan-cat-card { border-top: 4px solid var(--c); }
.plan-cat-card .card-media { aspect-ratio: 16 / 9; }
.plan-card .card-body .meta { margin-bottom: .2rem; }
.plan-card { border-bottom: 3px solid var(--c); }
.plan-preview { padding-top: 0; }
.aside-btn { margin: 1rem 0 0; }
.entity-head .filters { margin-top: 1.4rem; }

.wrap.narrow { width: min(860px, 100% - 2.5rem); }
.prose-page { font-size: 1.04rem; }
.prose-page h3 { font-size: 1.35rem; margin-top: 1.6em; }
.prose-page h3:first-child { margin-top: 0; }
.page-quienes .entity-head { border-top-color: var(--rojo); }
/* Con logotipo, en móvil se muestra solo el logotipo */
@media (max-width: 520px) { .site-header .brand.has-logo span { display: none; } }

/* =========================================================
   Versión 1.2.1 — filtro por categoría y Quiénes somos
   ========================================================= */
.filter-row { display: flex; align-items: flex-start; gap: .8rem; margin-top: 1rem; }
.filter-row .chip-filter { margin-top: 0; }
.filter-label { flex: none; width: 5.5rem; padding-top: .45rem; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
a.chip { text-decoration: none; display: inline-block; }
.chip-cats .chip { font-weight: 600; }
@media (max-width: 760px) {
  .filter-row { flex-direction: column; gap: .4rem; }
  .filter-label { width: auto; padding-top: 0; }
}

/* Quiénes somos */
.about-hero { background: linear-gradient(180deg, #e3ecec, var(--caliza)); border-top: 6px solid var(--rojo); padding: 1.5rem 0 3rem; }
.about-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 3rem; align-items: center; }
.about-hero-text h1 { margin-top: .2rem; }
.about-hero-text .lead { margin-bottom: 1.4rem; }
.about-hero-media { aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: #dfe7e4; }
.about-hero-media img, .about-hero-media .ph-svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--papel); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: -1.5rem; position: relative; overflow: hidden; }
.about-stats div { padding: 1.3rem 1rem; text-align: center; border-right: 1px solid var(--linea); }
.about-stats div:last-child { border-right: 0; }
.about-stats strong { display: block; font-family: var(--serif); font-size: 2.2rem; line-height: 1; color: var(--mar); }
.about-stats span { font-size: .88rem; color: var(--gris); }
.about-intro { max-width: 780px; margin-top: 3rem; font-size: 1.1rem; }
.about-num { display: inline-block; font: 700 .8rem var(--sans); letter-spacing: .1em; color: var(--rojo); margin-bottom: .6rem; }
.about-feature { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 3rem; padding: 3.5rem 0 2.5rem; border-bottom: 1px solid var(--linea); }
.about-feature-head h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.about-feature-body { font-size: 1.1rem; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; padding: 2.5rem 0 3.5rem; }
.about-card { background: var(--papel); border-radius: var(--radius); padding: 1.8rem 2rem; box-shadow: var(--shadow); border-top: 4px solid var(--mar-2); }
.about-card:nth-child(2n) { border-top-color: var(--prado); }
.about-card:nth-child(3n) { border-top-color: var(--rojo); }
.about-card h2 { font-size: 1.4rem; }
.about-card .prose > :last-child { margin-bottom: 0; }
.explore-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.explore-card { display: flex; flex-direction: column; gap: .35rem; background: var(--papel); border-radius: var(--radius); padding: 1.3rem 1.4rem; text-decoration: none; color: var(--tinta); box-shadow: var(--shadow); border-left: 5px solid var(--c); transition: transform .2s; }
.explore-card:hover { transform: translateY(-3px); color: var(--tinta); }
.explore-card strong { font-family: var(--serif); font-size: 1.25rem; color: var(--mar); }
.explore-card strong::after { content: " →"; color: var(--c); }
.explore-card span { font-size: .9rem; color: var(--gris); }
@media (max-width: 1000px) {
  .explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-feature { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 760px) {
  .about-hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-hero-media { aspect-ratio: 16 / 10; }
  .about-stats { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
  .about-stats div:nth-child(2) { border-right: 0; }
  .about-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--linea); }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { padding: 1.4rem 1.3rem; }
  .explore-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Versión 1.2.2 — tamaño de logotipo y cabecera configurables
   ========================================================= */
.header-inner { min-height: var(--header-h, 70px); }
.brand-logo { height: var(--logo-h, 46px); max-width: min(360px, 45vw); }
.site-nav a { font-size: var(--nav-fs, .94rem); }
html { scroll-padding-top: calc(var(--header-h, 70px) + 20px); }
.entity-aside, .guia-toc { top: calc(var(--header-h, 70px) + 22px); }
body.has-adminbar .entity-aside, body.has-adminbar .guia-toc { top: calc(var(--header-h, 70px) + 62px); }
.guia-toc { max-height: calc(100vh - var(--header-h, 70px) - 40px); }
@media (max-width: 760px) {
  .header-inner { min-height: min(var(--header-h, 70px), 84px); }
  .brand-logo { height: min(var(--logo-h, 46px), 56px); max-width: 60vw; }
  .site-nav a { font-size: 1rem; }
}

/* =========================================================
   Versión 1.4.0 — volver, pie de página editable y Quiénes somos
   ========================================================= */
.crumbs-row { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: .5rem; }
.crumbs-row .breadcrumbs ol { margin: 0; }
.back-link {
  display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .8rem; border-radius: 999px;
  background: rgba(255, 255, 255, .75); border: 1px solid var(--linea); color: var(--mar); font-size: .84rem; font-weight: 600; text-decoration: none;
}
.back-link:hover { background: #fff; border-color: var(--mar-2); color: var(--mar); }
@media (max-width: 760px) { .crumbs-row { gap: .5rem; } }

.footer-grid { grid-template-columns: minmax(240px, 1.4fr) repeat(var(--fcols, 3), minmax(0, 1fr)); }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-about p { margin-bottom: 1rem; }
.footer-contact { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .35rem; font-size: .92rem; }
.social { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); transition: background .15s; }
.social a:hover { background: rgba(255, 255, 255, .22); }
.social svg { width: 18px; height: 18px; fill: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 0; font-size: .84rem; color: #b9cdd0; }
.footer-bottom-inner p { margin: 0; }
.footer-legal { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }

.about-img { border-radius: 12px; overflow: hidden; margin-bottom: 1rem; aspect-ratio: 16 / 9; background: #dfe7e4; }
.about-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-feature-head .about-img { margin-top: 1rem; }
.about-team { padding: 3rem 0 1rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }
.team-card { background: var(--papel); border-radius: var(--radius); padding: 1.6rem 1.4rem; text-align: center; box-shadow: var(--shadow); }
.team-photo { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; margin: 0 auto 1rem; background: #e3ecec; display: grid; place-items: center; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo span { font-family: var(--serif); font-size: 2rem; color: var(--mar); }
.team-card h3 { margin-bottom: .2rem; }
.team-role { color: var(--rojo); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.team-card p:last-child { font-size: .92rem; color: #4a5a60; margin: 0; }
.about-gallery { padding: 1.5rem 0; }
.about-gallery .block { border-left: 0; }
.about-contact {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  background: var(--mar); color: #e6f0f1; border-radius: var(--radius); padding: 2rem 2.2rem; margin: 2rem auto 3rem;
}
.about-contact h2 { color: #fff; margin-bottom: .3rem; }
.about-contact p { margin: 0; max-width: 60ch; }
.about-contact .btn-primary { background: #fff; color: var(--mar); }
.about-contact .btn-ghost { color: #fff; }

/* =========================================================
   Versión 1.5.0 — Calendario de planes y Preguntas frecuentes
   ========================================================= */
/* Menú: un enlace más; se pliega un poco antes para que no se monte */
@media (max-width: 1180px) {
  .nav-toggle {
    display: inline-flex; font: 600 .9rem var(--sans); background: var(--mar); color: #fff;
    border: 0; border-radius: 999px; padding: .55rem 1rem; cursor: pointer;
  }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--papel);
    border-bottom: 1px solid var(--linea); padding: .6rem 1.25rem 1rem; display: none;
    box-shadow: 0 12px 24px rgba(14, 58, 74, .08);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .7rem .9rem; font-size: 1rem; }
}
@media (min-width: 1181px) and (max-width: 1320px) { .site-nav a { padding: .5rem .55rem; } .brand small { display: none; } }

/* Calendario */
.cal-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.4rem; }
.cal-nav .chip { text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; --c: var(--mar); }
.cal-nav .chip small { font-size: .72rem; font-weight: 700; background: #eef2f1; color: var(--gris); border-radius: 999px; padding: 0 .45rem; line-height: 1.5; }
.cal-nav .chip.is-active small { background: rgba(255, 255, 255, .22); color: #fff; }
.cal-nav .chip.is-now:not(.is-active) { border-color: var(--rojo); }
.cal-nav .cal-all { --c: var(--rojo); }
.cal-chip-short { display: none; }
.cal-month { scroll-margin-top: 100px; }
.cal-month + .cal-month { padding-top: 0; }
.cal-tabs .cal-month + .cal-month { padding-top: 2.5rem; }
.cal-month-head { display: flex; gap: 1.1rem; align-items: flex-start; margin-bottom: 1.4rem; }
.cal-month-head h2 { margin-bottom: .25rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.cal-month-head p { color: var(--gris); margin: 0; max-width: 70ch; }
.cal-num { flex: none; width: 3.2rem; height: 3.2rem; border-radius: 12px; background: var(--mar); color: #fff; display: grid; place-items: center; font: 600 1.2rem var(--serif); }
.cal-badge { font: 700 .72rem var(--sans); text-transform: uppercase; letter-spacing: .06em; background: var(--rojo); color: #fff; padding: .2rem .55rem; border-radius: 999px; }
.grid-cal { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.cal-card { border-top: 4px solid var(--c); }
.cal-card .card-media { aspect-ratio: 16 / 9; }
.cal-date { font-size: .8rem !important; font-weight: 700; color: var(--c) !important; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .35rem !important; }
.cal-card .card-body .meta { margin: .7rem 0 0; color: var(--gris); font-size: .74rem; }
div.cal-card:hover { transform: none; }
.cal-foot { text-align: center; max-width: 760px; }
.cal-foot p { color: var(--gris); }
.cal-foot .btn-row { justify-content: center; }
.band-cal { background: linear-gradient(180deg, #e9e3d8, #efe9df); }
.cal-callout { display: flex; align-items: center; gap: 1.1rem; background: var(--mar); color: #fff; text-decoration: none; border-radius: var(--radius); padding: 1.2rem 1.5rem; box-shadow: var(--shadow); transition: transform .2s; }
.cal-callout:hover { color: #fff; transform: translateY(-2px); }
.cal-callout strong { display: block; font: 600 1.25rem var(--serif); }
.cal-callout small { display: block; opacity: .85; font-size: .94rem; }
.cal-callout-icon { flex: none; width: 3rem; height: 3rem; border-radius: 12px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
.cal-callout-icon svg { width: 1.6rem; height: 1.6rem; }
.cal-callout-go { margin-left: auto; font-size: 1.5rem; }
@media (max-width: 760px) {
  .cal-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .3rem; margin-inline: -1.25rem; padding-inline: 1.25rem; }
  .cal-nav::-webkit-scrollbar { display: none; }
  .cal-nav .chip { flex: none; }
  .cal-chip-long { display: none; }
  .cal-chip-short { display: inline; }
  .cal-num { width: 2.6rem; height: 2.6rem; font-size: 1rem; }
  .cal-callout { padding: 1rem 1.1rem; }
  .cal-callout-go { display: none; }
}

/* Preguntas frecuentes */
.faq-list { display: grid; gap: .7rem; }
.faq-item { background: var(--papel); border: 1px solid var(--linea); border-radius: 12px; box-shadow: 0 1px 2px rgba(14, 58, 74, .04); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1rem 3rem 1rem 1.2rem; position: relative;
  font: 600 1.05rem/1.4 var(--sans); color: var(--mar);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 1.2rem; top: 50%; width: .6rem; height: .6rem; margin-top: -.4rem;
  border-right: 2px solid var(--mar-2); border-bottom: 2px solid var(--mar-2); transform: rotate(45deg); transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -.1rem; }
.faq-item summary:hover { color: var(--mar-2); }
.faq-item summary:focus-visible { outline: 2px solid var(--mar-2); outline-offset: 2px; border-radius: 12px; }
.faq-item[open] { border-color: #cfd9d6; }
.faq-answer { padding: 0 1.2rem 1.1rem; color: #3b4b51; }
.faq-answer p { margin: 0; }
.faq-search { margin-top: 1.4rem; }
.faq-search input { max-width: 560px; }
.faq-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2.2rem; align-items: start; }
.faq-layout.single { grid-template-columns: minmax(0, 860px); justify-content: center; }
.faq-toc { position: sticky; top: calc(var(--header-h, 70px) + 1rem); }
.faq-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.faq-toc a { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem .6rem; border-radius: 8px; text-decoration: none; color: var(--tinta); font-size: .94rem; }
.faq-toc a:hover { background: #f1ece3; color: var(--mar); }
.faq-toc small { color: var(--gris); }
.faq-group { scroll-margin-top: 100px; }
.faq-group + .faq-group { margin-top: 2.2rem; }
.faq-group h2 { font-size: 1.45rem; margin-bottom: .9rem; }
.home-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2.5rem; align-items: start; }
.home-faq-head p { color: var(--gris); }
@media (max-width: 900px) {
  .faq-layout, .home-faq { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .faq-toc { position: static; }
  .faq-toc ol { display: flex; flex-wrap: wrap; gap: .3rem; }
  .faq-toc a { border: 1px solid var(--linea); border-radius: 999px; padding: .35rem .8rem; }
}
@media (max-width: 560px) { .section-head { flex-wrap: wrap; row-gap: .4rem; } }
.cal-nav .chip { padding: .38rem .7rem; font-size: .84rem; }

/* =========================================================
   Versión 1.6.0 — Calendario con vista de mes y de año
   ========================================================= */
.cal-app { padding-top: 2rem; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cal-move { display: flex; align-items: center; gap: .6rem; }
.cal-title { margin: 0; min-width: 11ch; text-align: center; font: 600 1.7rem/1.2 var(--serif); color: var(--mar); }
.cal-arrow {
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--linea);
  background: var(--papel); color: var(--mar); text-decoration: none; font-size: 1.6rem; line-height: 1; padding-bottom: .15rem; transition: background .15s;
}
.cal-arrow:hover { background: var(--mar); color: #fff; border-color: var(--mar); }
.cal-arrow.is-off { opacity: .3; pointer-events: none; }
.cal-tools { display: flex; align-items: center; gap: .6rem; }
.cal-tools .btn[disabled] { opacity: .45; cursor: default; }
.cal-seg { display: inline-flex; border: 1px solid var(--linea); border-radius: 999px; overflow: hidden; background: var(--papel); }
.cal-seg button { border: 0; background: transparent; padding: .45rem 1rem; font: 600 .88rem var(--sans); color: var(--mar); cursor: pointer; }
.cal-seg button[aria-pressed="true"] { background: var(--mar); color: #fff; }
.cal-ley { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0 0 1rem; font-size: .82rem; color: var(--gris); }
.ley::before { content: ""; display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; background: var(--c); margin-right: .35rem; vertical-align: -.05rem; }

.calm-wrap { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.calm-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calm-table th { padding: .65rem .4rem; font: 700 .74rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--gris); background: #f6f2ea; border-bottom: 1px solid var(--linea); }
.calm-table td { vertical-align: top; height: 7.2rem; padding: .35rem .35rem .45rem; border-right: 1px solid #eee7da; border-bottom: 1px solid #eee7da; overflow: hidden; }
.calm-table td:last-child { border-right: 0; }
.calm-table tr:last-child td { border-bottom: 0; }
.calm-table td.we { background: #fcfaf6; }
.calm-table td.out { background: #f8f5ef; }
.calm-table td.out .calm-day { color: #c1bbb0; }
.calm-day { display: inline-grid; place-items: center; min-width: 1.8rem; height: 1.8rem; border-radius: 50%; font: 600 .9rem var(--sans); color: var(--tinta); margin-bottom: .2rem; }
.calm-table td.is-today { background: #eef5f4; box-shadow: inset 0 0 0 2px var(--mar-2); }
.calm-table td.is-today .calm-day { background: var(--rojo); color: #fff; }
.calm-ev {
  display: block; margin-top: .2rem; padding: .18rem .45rem; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, white);
  border-left: 3px solid var(--c); color: #22333a; font-size: .76rem; line-height: 1.3; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.calm-ev span { overflow: hidden; text-overflow: ellipsis; }
.calm-ev:hover { background: var(--c); color: #fff; }
.calm-more { display: block; margin-top: .2rem; font-size: .74rem; font-weight: 700; color: var(--mar-2); text-decoration: none; }
.calm-todo { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .9rem 0 0; font-size: .86rem; }
.calm-todo span { color: var(--gris); font-weight: 600; margin-right: .2rem; }
.calm-todo a { text-decoration: none; padding: .25rem .7rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 45%, white); color: var(--tinta); background: var(--papel); }
.calm-todo a:hover { background: var(--c); color: #fff; }

.calm-agenda { margin-top: 2.4rem; }
.calm-agenda h2 { margin-bottom: .4rem; }
.calm-agenda > h3 { margin: 1.8rem 0 .9rem; color: var(--gris); font-family: var(--sans); text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.agenda-item {
  display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) 9rem; gap: 1.1rem; align-items: center; background: var(--papel); border: 1px solid var(--linea);
  border-left: 5px solid var(--c); border-radius: 12px; padding: .9rem 1rem; scroll-margin-top: 120px;
}
.agenda-date { text-align: center; line-height: 1.1; }
.ad-wd, .ad-m { display: block; font: 700 .7rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--gris); }
.ad-d { display: block; font: 600 1.7rem var(--serif); color: var(--c); margin: .1rem 0; white-space: nowrap; }
.agenda-body h4 { margin: .15rem 0 .3rem; font: 600 1.15rem/1.3 var(--serif); }
.agenda-body h4 a { color: var(--mar); text-decoration: none; }
.agenda-body h4 a:hover { text-decoration: underline; }
.agenda-body p { margin: 0; color: #3b4b51; font-size: .94rem; }
.agenda-body .cal-date { margin-bottom: .1rem !important; }
.agenda-body .cal-date span { color: var(--gris); text-transform: none; letter-spacing: 0; font-weight: 600; }
.agenda-body .meta { margin-top: .4rem; font-size: .74rem; color: var(--gris); text-transform: uppercase; letter-spacing: .05em; }
.agenda-thumb .thumb { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; position: relative; }
.agenda-thumb .thumb img, .agenda-thumb .thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.agenda-thumb .ph-label { display: none; }
.cal-anchor { scroll-margin-top: 120px; display: flex; }
.cal-anchor > .card { flex: 1; }
@keyframes calflash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 4px var(--c, var(--mar-2)); } }
.is-flash, .is-flash > .card { animation: calflash 1.4s ease 2; }

/* Vista de año */
.caly-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.mini { display: block; background: var(--papel); border: 1px solid var(--linea); border-radius: 12px; padding: .8rem .8rem .6rem; text-decoration: none; color: var(--tinta); transition: box-shadow .15s, transform .15s; }
.mini:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--tinta); }
.mini.is-now { border-color: var(--rojo); }
.mini-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .4rem; }
.mini-head strong { font: 600 1.05rem var(--serif); color: var(--mar); }
.mini-head small { font-size: .72rem; color: var(--gris); }
.mini-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .74rem; text-align: center; }
.mini-table th { font-weight: 700; color: var(--gris); padding: .15rem 0; font-size: .66rem; }
.mini-table td { padding: .18rem 0; color: #4a5a60; position: relative; }
.mini-table td.has-ev { color: #fff; font-weight: 700; }
.mini-table td.has-ev::before { content: ""; position: absolute; inset: 1px 12%; border-radius: 6px; background: var(--mar-2); z-index: 0; }
.mini-table td.is-today { outline: 2px solid var(--rojo); outline-offset: -2px; border-radius: 6px; }
.mini-table td { z-index: 0; }
.mini-table td.has-ev { isolation: isolate; }
.mini-table td.has-ev::before { z-index: -1; }

@media (max-width: 1100px) { .caly-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cal-title { font-size: 1.35rem; min-width: 9.5ch; }
  .cal-toolbar { justify-content: center; }
  .calm-table th { padding: .5rem 0; font-size: .66rem; letter-spacing: .02em; }
  .calm-table td { height: 3.4rem; padding: .2rem .1rem; text-align: center; }
  .calm-day { min-width: 1.6rem; height: 1.6rem; font-size: .82rem; margin: 0; }
  .calm-ev { display: inline-block; width: .5rem; height: .5rem; padding: 0; margin: .05rem; border: 0; border-radius: 50%; background: var(--c); vertical-align: middle; }
  .calm-ev span { display: none; }
  .calm-more { font-size: .62rem; margin: 0; }
  .agenda-item { grid-template-columns: 3.6rem minmax(0, 1fr); padding: .8rem; gap: .8rem; }
  .agenda-thumb { display: none; }
  .ad-d { font-size: 1.35rem; }
  .caly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .mini { padding: .6rem .5rem .4rem; }
}
@media (max-width: 380px) { .caly-grid { grid-template-columns: minmax(0, 1fr); } }
.calendario .entity-head { padding-bottom: 1.5rem; }
.cal-app { padding-top: 1.5rem; }
.calm-table td.has-ev { cursor: pointer; }
@media (max-width: 760px) { .calendario .entity-head { padding-bottom: .5rem; } .cal-app { padding-top: 1rem; } }
.cal-aside .cal-next { margin: 0 0 .6rem; }
.cal-aside .cal-next span { display: block; font: 700 .72rem var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--gris); }
.cal-aside .cal-next strong { display: block; font: 600 1.2rem/1.3 var(--serif); color: var(--rojo); margin: .15rem 0; }
.cal-aside .cal-next small { display: block; color: var(--gris); font-size: .86rem; }
