/* ==========================================================================
   Observatorio Económico de Caldas — hoja de estilos
   Sin dependencias: fuentes locales, sin frameworks.
   ========================================================================== */

@font-face {
  font-family: "Cabin";
  src: url("../fonts/cabin-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunitosans-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Marca OEC (tomados del sitio original) */
  --navy-900: #0a1f33;
  --navy-800: #0e2b45;
  --blue-700: #22577a;
  --blue-500: #0494cc;
  --blue-100: #e3f3fa;
  --teal-500: #38a3a5;
  --green-400: #80ed99;
  --green-100: #dcfbe2;
  --lime-500: #8dc63f;

  --ink: #14212e;
  --ink-2: #33475b;
  --muted: #5f7184;
  --line: #e1e8ef;
  --bg: #ffffff;
  --bg-soft: #f3f7fa;

  --font-head: "Cabin", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(10, 31, 51, .06), 0 1px 3px rgba(10, 31, 51, .08);
  --shadow: 0 10px 30px -12px rgba(10, 31, 51, .25);
  --shadow-lg: 0 22px 44px -18px rgba(10, 31, 51, .35);
  --container: 1200px;
  --header-h: 76px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
/* Las animaciones que entran de lado no deben generar scroll horizontal (clip no rompe los elementos fijos) */
main { overflow-x: hidden; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-500); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-700); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
mark { background: #fff1a8; color: inherit; border-radius: 3px; padding: 0 1px; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container--narrow { max-width: 1040px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Botones (efecto "flotar" como en el sitio anterior) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font: 700 .98rem/1 var(--font-head);
  padding: .95em 1.4em; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease-out), box-shadow .3s;
}
.btn:hover { transform: translateY(-4px); box-shadow: 0 12px 22px -12px rgba(10, 31, 51, .45); }
.btn .icon { transition: transform .3s var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary { background: var(--blue-500); color: #fff; }
.btn--primary:hover { background: var(--blue-700); color: #fff; }
.btn--light { background: #fff; color: var(--navy-900); }
.btn--light:hover { background: var(--green-100); color: var(--navy-900); }
.btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); color: #fff; }
.btn--outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--blue-500); color: var(--blue-700); }
.btn--sm { padding: .7em 1.1em; font-size: .9rem; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(10, 31, 51, .35); }
.brand { display: flex; align-items: center; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative; font: 600 .95rem/1 var(--font-head); color: var(--ink-2); text-decoration: none;
  padding: 10px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--blue-700); background: var(--bg-soft); }
.nav a[aria-current="page"] { color: var(--blue-700); background: var(--blue-100); }
.nav .nav-cta { background: var(--navy-900); color: #fff; margin-left: 6px; padding-inline: 18px; }
.nav .nav-cta:hover, .nav .nav-cta[aria-current="page"] { background: var(--blue-500); color: #fff; }
.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; margin-right: -8px; color: var(--ink); cursor: pointer;
}
.nav-toggle .icon { width: 28px; height: 28px; }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; padding: 12px 20px 24px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 14px; font-size: 1.05rem; border-radius: var(--radius-sm); }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Botón "Subir" ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 45;
  display: inline-flex; align-items: center; gap: 6px;
  font: 700 .88rem/1 var(--font-head); color: #fff; background: var(--blue-500);
  border: 0; border-radius: 999px; padding: 12px 16px; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .3s, transform .3s var(--ease-out), visibility .3s, background .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--blue-700); }
.to-top:hover .icon { animation: nudge-up .6s ease infinite alternate; }
@keyframes nudge-up { to { transform: translateY(-3px); } }

/* ---------- Hero portada ---------- */
.hero {
  position: relative; z-index: 2; isolation: isolate;
  color: #dbe7f1; background: var(--navy-900);
  padding: clamp(40px, 5vw, 76px) 0 clamp(34px, 4vw, 56px);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__bg::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/fotos/177200.webp") center / cover no-repeat;
  opacity: .3; transform-origin: 70% 40%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 80% at 85% 20%, rgba(4, 148, 204, .45), transparent 70%),
    linear-gradient(100deg, var(--navy-900) 35%, rgba(10, 31, 51, .55));
}
.hero__inner { max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font: 700 .9rem/1 var(--font-head); letter-spacing: .01em;
  color: var(--blue-500); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.hero .eyebrow { color: var(--green-400); }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero h1 span { color: var(--green-400); }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 620px; margin-bottom: 28px; }
/* Accesos de la portada: dos tarjetas que llevan directo al Explorador y a las Fichas municipales
   (en teléfono van una debajo de la otra, con el ícono a la izquierda) */
.accesos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 620px; }
.acceso {
  display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; border-radius: var(--radius);
  text-decoration: none; color: #b7c9d8;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16);
  transition: transform .35s var(--ease-out), background .35s, box-shadow .35s;
}
.acceso:hover, .acceso:focus-visible {
  color: #cfe0ee; transform: translateY(-3px); border-color: transparent;
  background: linear-gradient(rgba(10, 31, 51, .88), rgba(10, 31, 51, .88)) padding-box, var(--grad) border-box;
  box-shadow: 0 18px 36px -18px rgba(56, 163, 165, .7);
}
.acceso__icono {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: rgba(4, 148, 204, .18); color: var(--blue-500); transition: background .35s, color .35s;
}
.acceso--fichas .acceso__icono { background: rgba(128, 237, 153, .14); color: var(--green-400); }
.acceso:hover .acceso__icono { background: var(--grad); color: #0a1f33; }
.acceso__icono .icon { width: 22px; height: 22px; }
.acceso__texto { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.acceso__texto strong { display: flex; align-items: center; gap: 8px; font: 700 1.08rem/1.25 var(--font-head); color: #fff; }
.acceso__texto strong .icon { width: 18px; height: 18px; color: var(--green-400); transition: transform .35s var(--ease-out); }
.acceso:hover .acceso__texto strong .icon { transform: translateX(4px); }
.acceso__texto > span { font-size: .93rem; line-height: 1.45; }
@media (max-width: 560px) {
  .accesos { grid-template-columns: minmax(0, 1fr); }
  .acceso { flex-direction: row; align-items: center; padding: 16px; }
}

/* ---------- Buscador predictivo de municipios ---------- */
.combo { position: relative; z-index: 30; }
.combo__field {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 0 6px 0 14px; transition: border-color .2s, box-shadow .2s;
}
.combo__field:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 4px var(--blue-100); }
.combo__field > .icon { color: var(--muted); }
.combo__field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: 600 1rem var(--font-body); color: var(--ink); padding: 13px 0;
}
.combo__toggle {
  border: 0; background: none; cursor: pointer; color: var(--muted); padding: 8px; border-radius: 8px; display: grid; place-items: center;
}
.combo__toggle:hover { background: var(--bg-soft); color: var(--ink); }
.combo__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  max-height: 340px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); animation: drop-in .18s var(--ease-out);
}
@keyframes drop-in { from { transform: translateY(-6px); } }
.combo__list [role="option"] {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--ink);
}
.combo__list [role="option"]:hover, .combo__list [aria-selected="true"] { background: var(--blue-100); }
.combo__name { font-weight: 700; }
.combo__region { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.combo__hint, .combo__empty { padding: 10px 12px; font-size: .88rem; color: var(--muted); }
.combo__hint { font-weight: 700; }

/* ---------- Encabezado de páginas internas ---------- */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #cfe0ee; background: var(--navy-900);
  padding: clamp(34px, 4vw, 54px) 0 clamp(30px, 3.4vw, 46px);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../img/fotos/544.webp") center / cover no-repeat; opacity: .22;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--navy-900) 40%, rgba(14, 43, 69, .6));
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .3em; }
.page-hero p { max-width: 680px; font-size: 1.1rem; margin: 0; }
.page-hero p a { color: var(--green-400); font-weight: 700; text-underline-offset: 3px; }
.page-hero p a:hover { color: #fff; }
.breadcrumb { display: flex; gap: 8px; font-size: .9rem; margin-bottom: 14px; color: #9fb6ca; }
.breadcrumb a { color: #cfe0ee; text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

/* ---------- Secciones ---------- */
.section { padding: clamp(32px, 3.8vw, 50px) 0; }
.page-hero + .section, .hero + .section { padding-top: clamp(28px, 3vw, 38px); }
/* Dos secciones seguidas con el mismo fondo no suman dos márgenes (la oscura tiene otro fondo: conserva los suyos
   y la que viene después también) */
.section:not(.section--soft):not(.section--dark) + .section:not(.section--soft):not(.section--dark),
.section--soft + .section--soft { padding-top: 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-top: clamp(26px, 2.8vw, 34px); }
.section-head { max-width: 760px; margin-bottom: 26px; }
.section-head > :last-child { margin-bottom: 0; }
.section-head--center { text-align: center; margin-inline: auto; }
.section-head--center .eyebrow { justify-content: center; }
.section-head p { font-size: 1.08rem; color: var(--muted); margin-bottom: 0; }
.section-head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; max-width: none; }
.section-head--row > div { max-width: 640px; }
.section-head--row .combo { flex: 0 1 380px; }
.lead { font-size: 1.15rem; color: var(--ink-2); }

.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
  transition: box-shadow .35s, transform .35s var(--ease-out), border-color .35s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-8px); border-color: transparent; }
.card p:last-child { margin-bottom: 0; }
.card > h2 { font-size: 1.3rem; }
.card--flat, .card--flat:hover { box-shadow: none; transform: none; border-color: var(--line); }
.card__icon {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px;
  background: var(--blue-100); color: var(--blue-700); margin-bottom: 20px;
  transition: background .35s, color .35s, transform .45s var(--ease-out);
}
.card__icon .icon { width: 26px; height: 26px; }
.card:hover .card__icon { background: var(--blue-500); color: #fff; transform: rotate(-8deg) scale(1.08); }
.card--accent .card__icon { background: var(--green-100); color: #1d7a52; }
.card--accent:hover .card__icon { background: #1d7a52; color: #fff; }
.card--teal .card__icon { background: #dff3f3; color: #1f7576; }
.card--teal:hover .card__icon { background: var(--teal-500); color: #fff; }

/* Bloque texto + imagen */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5.5vw, 72px); align-items: center; }
.split--reverse > :first-child { order: 2; }
.split { align-items: stretch; }
.split__media { position: relative; min-height: 340px; }
.split__media img {
  position: absolute; inset: 0; border-radius: 20px; width: 100%; height: 100%; object-fit: cover; box-shadow: var(--shadow);
  transition: transform .8s var(--ease-out), box-shadow .8s;
}
.split__media:hover img { transform: scale(1.025) rotate(-.4deg); box-shadow: var(--shadow-lg); }
.split__badge {
  position: absolute; left: -18px; bottom: 28px; background: var(--navy-900); color: #fff;
  padding: 18px 22px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 260px;
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.split__badge strong { display: block; font: 700 2rem/1 var(--font-head); color: var(--green-400); }
.split__badge span { font-size: .92rem; line-height: 1.4; display: block; margin-top: 6px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .split__media { min-height: 0; aspect-ratio: 16 / 10; }
  .split__badge { left: 16px; }
}

.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; color: var(--ink); }
.check-list li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d7a52' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- Cifras ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stat { background: #fff; padding: 26px 24px; transition: background .3s; }
.stat:hover { background: var(--bg-soft); }
.stat__value { font: 700 clamp(2.4rem, 4vw, 3.2rem)/1 var(--font-head); color: var(--blue-700); display: flex; align-items: baseline; gap: 2px; }
.stat__value small { font-size: .45em; color: var(--blue-500); }
.stat__label { margin-top: 10px; font-size: .98rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Aliados ---------- */
.partners { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(28px, 6vw, 72px); }
.partners img { height: 64px; width: auto; object-fit: contain; }
.partners img.is-tall { height: 78px; }
.partners--hover img { transition: transform .45s var(--ease-out); }
.partners--hover img:hover { transform: translateY(-4px) scale(1.04); }
.partners--start { justify-content: flex-start; gap: 32px; margin-top: 28px; }
.partners--start img { height: 46px; }
.partners--start img.is-tall { height: 58px; }

/* ---------- Línea de tiempo (Logros) ---------- */
.year-nav {
  position: sticky; top: var(--header-h); z-index: 20; display: flex; gap: 6px; justify-content: center;
  overflow-x: auto; scrollbar-width: none; padding: 10px 4px; margin-bottom: 28px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.year-nav::-webkit-scrollbar { display: none; }
.year-nav a {
  flex: none; font: 700 .92rem/1 var(--font-head); color: var(--muted); text-decoration: none;
  padding: 9px 14px; border-radius: 999px; transition: background .25s, color .25s;
}
.year-nav a:hover { color: var(--blue-700); background: var(--bg-soft); }
.year-nav a[aria-current="true"] { background: var(--blue-500); color: #fff; }

.tl { --progress: 0; position: relative; list-style: none; margin: 0; padding: 0; }
.tl::before, .tl::after {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; border-radius: 4px;
}
.tl::before { background: var(--line); }
.tl::after {
  background: linear-gradient(var(--blue-500), var(--teal-500), var(--green-400));
  transform-origin: top; transform: scaleY(var(--progress));
}
.tl-item {
  position: relative; display: grid; grid-template-columns: 1fr 72px 1fr; align-items: center; padding: 12px 0;
  scroll-margin-top: calc(var(--header-h) + 90px);
}
.tl-card, .tl-year, .tl-marker { grid-row: 1; }
.tl-item:nth-child(odd) .tl-card { grid-column: 1; }
.tl-item:nth-child(odd) .tl-year { grid-column: 3; justify-self: start; }
.tl-item:nth-child(even) .tl-card { grid-column: 3; }
.tl-item:nth-child(even) .tl-year { grid-column: 1; justify-self: end; }
.tl-marker {
  grid-column: 2; justify-self: center; z-index: 1; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 4px solid var(--line); transition: border-color .4s, transform .4s var(--ease-out), background .4s;
}
.tl-item.is-active .tl-marker { border-color: var(--blue-500); background: var(--green-400); transform: scale(1.25); }
.tl-year {
  font: 700 clamp(2rem, 4vw, 3.2rem)/1 var(--font-head); color: var(--line); letter-spacing: -.02em;
  transition: color .5s;
}
.tl-item.is-active .tl-year { color: var(--blue-700); }
.tl-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-sm); transition: box-shadow .4s, border-color .4s, transform .4s var(--ease-out);
}
.tl-card::after {
  content: ""; position: absolute; top: 50%; width: 14px; height: 14px; background: #fff; transform: translateY(-50%) rotate(45deg);
  border: 1px solid var(--line); transition: border-color .4s;
}
.tl-item:nth-child(odd) .tl-card::after { right: -8px; border-left: 0; border-bottom: 0; }
.tl-item:nth-child(even) .tl-card::after { left: -8px; border-right: 0; border-top: 0; }
.tl-item.is-active .tl-card { border-color: var(--blue-500); box-shadow: var(--shadow-lg); }
.tl-item.is-active .tl-card::after { border-color: var(--blue-500); }
.tl-card:hover { transform: translateY(-4px); }
.tl-card__year { display: none; font: 700 .85rem/1 var(--font-head); color: var(--blue-500); letter-spacing: .1em; margin-bottom: 8px; }
.tl-card h2 { font-size: 1.2rem; margin-bottom: .45em; }
.tl-card p { margin-bottom: .7em; }
.tl-card p:last-child { margin-bottom: 0; }
.tl-more {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; border: 0; background: none; padding: 0; cursor: pointer;
  font: 700 .92rem var(--font-head); color: var(--blue-500);
}
.tl-more .icon { transition: transform .3s; }
.tl-more[aria-expanded="true"] .icon { transform: rotate(180deg); }
@media (max-width: 760px) {
  .tl::before, .tl::after { left: 11px; }
  .tl-item { grid-template-columns: 22px 1fr; column-gap: 20px; align-items: start; }
  .tl-item:nth-child(n) .tl-card { grid-column: 2; }
  .tl-item:nth-child(n) .tl-marker { grid-column: 1; margin-top: 26px; }
  .tl-year { display: none; }
  .tl-card__year { display: block; }
  .tl-item:nth-child(n) .tl-card::after { left: -8px; right: auto; top: 34px; transform: rotate(45deg); border: 1px solid var(--line); border-right: 0; border-top: 0; }
  .year-nav { flex-wrap: wrap; justify-content: center; gap: 4px; overflow: visible; padding: 8px 0; }
  .year-nav a { padding: 7px 10px; font-size: .85rem; }
  .tl-item { scroll-margin-top: calc(var(--header-h) + 110px); }
}

/* ---------- Descargables ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.toolbar--sticky {
  position: sticky; top: var(--header-h); z-index: 20; margin: 0 -20px 24px; padding: 14px 20px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input {
  width: 100%; font: 600 1rem var(--font-body); color: var(--ink);
  padding: 13px 16px 13px 44px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.search input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px var(--blue-100); }
.chips { display: flex; gap: 8px; }
.chip {
  flex: none; font: 600 .9rem/1 var(--font-head); padding: 10px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); transition: all .2s;
}
.chip:hover { border-color: var(--blue-500); color: var(--blue-700); }
.chip[aria-pressed="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.toolbar__count { font-size: .9rem; color: var(--muted); margin-left: auto; }
@media (max-width: 760px) {
  .chips { width: 100%; flex-wrap: wrap; gap: 6px; }
  .chip { padding: 8px 11px; font-size: .85rem; }
  .toolbar--sticky { position: static; }
  .doc-group { scroll-margin-top: calc(var(--header-h) + 16px); }
  /* Fichas: selector de precios, subregión y buscador a todo el ancho */
  .toolbar .segmented { width: 100%; }
  .toolbar .segmented button { flex: 1; padding: 10px 8px; font-size: .9rem; }
  .toolbar .select, .toolbar .combo { flex: 1 1 100%; max-width: none; }
  .section-head--row .combo { flex: 1 1 100%; }
  .search { max-width: none; }
  .toolbar__count { display: none; }
}

.doc-group {
  display: grid; grid-template-columns: 340px 1fr; gap: 36px; padding: 30px 0; border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + var(--toolbar-h, 80px) + 20px);
}
.doc-group:first-child, .doc-group--solo { border-top: 0; padding-top: 0; }
.doc-group__intro h2 { font-size: 1.45rem; }
.doc-group__intro p { color: var(--muted); font-size: .98rem; }
.doc-group__intro details summary { cursor: pointer; color: var(--blue-500); font-weight: 700; font-size: .95rem; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: start; }
.doc {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; transition: border-color .25s, box-shadow .25s, transform .3s var(--ease-out);
}
.doc:hover { border-color: var(--blue-500); box-shadow: var(--shadow); transform: translateX(4px); }
.doc__type {
  flex: none; width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
  font: 700 .72rem/1 var(--font-head); letter-spacing: .04em; transition: transform .35s var(--ease-out);
}
.doc:hover .doc__type { transform: rotate(-6deg) scale(1.06); }
.doc__type--pdf { background: #fde8e6; color: #b42318; }
.doc__type--xlsx { background: #e3f6ea; color: #17733f; }
.doc__body { flex: 1; min-width: 0; }
.doc__title { font: 700 1.02rem/1.35 var(--font-head); color: var(--ink); margin: 0; }
.doc__meta { font-size: .86rem; color: var(--muted); }
.doc__dl {
  flex: none; display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font: 700 .9rem/1 var(--font-head); color: var(--blue-700); padding: 10px 14px; border-radius: 999px; background: var(--blue-100);
  transition: background .25s, color .25s;
}
.doc__dl:hover { background: var(--blue-500); color: #fff; }
.doc__dl:hover .icon { animation: nudge-down .5s ease infinite alternate; }
@keyframes nudge-down { to { transform: translateY(3px); } }
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.downloads--spaced { margin: 0 0 32px; }
.empty { color: var(--muted); font-style: italic; }
.no-results { text-align: center; padding: 48px 0; color: var(--muted); }
@media (max-width: 900px) { .doc-group { grid-template-columns: 1fr; gap: 20px; } }
@media (max-width: 520px) {
  .doc { flex-wrap: wrap; }
  .doc__dl { width: 100%; justify-content: center; }
}

/* ---------- Fichas municipales ---------- */
.segmented {
  display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line);
}
.segmented button {
  font: 700 .95rem/1 var(--font-head); border: 0; background: none; color: var(--ink-2);
  padding: 11px 18px; border-radius: 999px; cursor: pointer; transition: background .25s, color .25s;
}
.segmented button[aria-pressed="true"] { background: var(--blue-500); color: #fff; box-shadow: var(--shadow-sm); }
.select {
  font: 600 .98rem var(--font-body); color: var(--ink); padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff;
}
.toolbar .combo { flex: 1 1 260px; max-width: 380px; }
.fichas-note { font-size: .95rem; color: var(--muted); margin: -10px 0 20px; }
.ficha-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.ficha {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; color: inherit;
  transition: box-shadow .35s, transform .35s var(--ease-out), border-color .35s;
  animation: card-in .5s var(--ease-out) both;
}
@keyframes card-in { from { transform: translateY(12px) scale(.98); } }
.ficha:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); border-color: transparent; }
.ficha img { width: 100%; aspect-ratio: 1200 / 1142; object-fit: cover; background: var(--bg-soft); transition: transform .6s var(--ease-out); }
.ficha:hover img { transform: scale(1.05); }
.ficha__body { position: relative; padding: 14px 16px 16px; border-top: 1px solid var(--line); background: #fff; }
.ficha__name { font: 700 1.08rem/1.2 var(--font-head); color: var(--ink); }
.ficha__region { font-size: .85rem; color: var(--muted); }
.ficha--dept { border-color: var(--blue-500); }
.ficha--dept .ficha__body { background: var(--blue-100); }

/* ---------- Fuentes ---------- */
.source { font-size: .88rem; color: var(--muted); margin: 16px 0 0; }
.source .icon { vertical-align: -3px; }

.embed { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); box-shadow: var(--shadow-sm); }
.embed iframe { display: block; width: 100%; height: clamp(520px, 75vw, 900px); border: 0; }
.embed--map iframe { height: 100%; min-height: 380px; }

/* ---------- Visor de imágenes ---------- */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 94vh; width: 100%;
}
.lightbox::backdrop { background: rgba(6, 18, 30, .86); backdrop-filter: blur(4px); }
.lightbox[open] { animation: pop-in .35s var(--ease-out); }
@keyframes pop-in { from { transform: scale(.97) translateY(10px); } }
.lightbox__frame { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; max-height: 94vh; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.lightbox__title { font: 700 1.05rem/1.2 var(--font-head); color: var(--ink); margin: 0; }
.lightbox__actions { display: flex; gap: 8px; align-items: center; }
.lightbox__close {
  background: var(--bg-soft); border: 0; border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.lightbox__close:hover { background: var(--line); }
.share { position: relative; }
.share__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; min-width: 230px; padding: 6px;
  display: grid; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  animation: drop-in .18s var(--ease-out);
}
.share__menu > * {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 8px;
  font: 600 .95rem var(--font-body); color: var(--ink); text-decoration: none; cursor: pointer; text-align: left;
}
.share__menu > *:hover { background: var(--blue-100); color: var(--blue-700); }
.share__menu .icon { color: var(--blue-500); }
@media (max-width: 560px) {
  .lightbox__actions .btn > span { display: none; }
  .lightbox__actions .btn { padding: .7em; }
}
.lightbox__img { overflow: auto; background: var(--bg-soft); }
.lightbox__img img { margin: 0 auto; max-height: calc(94vh - 70px); width: auto; object-fit: contain; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; display: flex; justify-content: space-between; pointer-events: none; padding: 0 8px; }
.lightbox__nav button {
  pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-sm);
}

/* ---------- Aviso emergente (portada) ---------- */
.promo {
  border: 0; padding: 0; background: transparent; overflow: visible;
  width: min(560px, 92vw, calc(92vh - 64px)); max-width: none; max-height: none;
}
.promo::backdrop { background: rgba(6, 18, 30, .72); backdrop-filter: blur(3px); }
/* Solo movimiento, sin opacidad: si el navegador no corre la animación, el aviso igual se ve */
.promo[open] { animation: promo-in .5s ease-out; }
@keyframes promo-in { from { transform: translateY(16px) scale(.97); } to { transform: none; } }
.promo__frame { position: relative; border-radius: 18px; overflow: hidden; background: #0f2c4c; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.promo__frame:focus { outline: none; }
.promo__frame img { width: 100%; height: auto; }
.promo__close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.promo__close:hover { background: #fff; }
.promo__bar { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 14px; background: #0f2c4c; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: stretch; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .35s, transform .35s var(--ease-out);
}
.contact-item:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.contact-item .card__icon { margin: 0; flex: none; }
.contact-item:hover .card__icon { background: var(--blue-500); color: #fff; transform: rotate(-8deg) scale(1.08); }
.contact-item h2 { font-size: 1rem; margin: 2px 0 4px; color: var(--muted); font-weight: 600; }
.contact-item p, .contact-item a { margin: 0; font: 700 1.08rem/1.4 var(--font-head); color: var(--ink); text-decoration: none; word-break: break-word; }
.contact-item a:hover { color: var(--blue-500); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Banda de llamado (página 404) ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--blue-700), var(--blue-500)); color: #e6f4fb; border-radius: 22px;
  padding: clamp(28px, 4vw, 44px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band p { margin: 0; max-width: 560px; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--navy-900); color: #9fb3c6; padding: 0; font-size: .97rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding-bottom: 32px; }
.footer-grid > * { min-width: 0; }
.footer-brand img { height: 50px; width: auto; margin-bottom: 16px; }
.site-footer h2 { font-size: 1rem; letter-spacing: 0; color: #fff; margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer a { color: #cfe0ee; text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--green-400); }
.footer-links a { display: inline-block; transition: color .2s, transform .25s var(--ease-out); }
.footer-links a:hover { transform: translateX(4px); }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; }
.footer-contact .icon { margin-top: 3px; color: var(--green-400); }
/* Aliados con los colores de sus escudos, sobre una franja azul muy clara de lado a lado (no una caja blanca) */
.footer-partners { background: linear-gradient(180deg, #edf3f8, #e2ecf4); border-top: 1px solid var(--line); margin-bottom: 40px; }
.footer-partners .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding-block: 26px;
}
.footer-partners p { margin: 0; font: 700 .95rem/1.3 var(--font-head); letter-spacing: .01em; color: var(--blue-700); }
.footer-partners .partners { gap: clamp(28px, 5vw, 64px); }
.footer-partners .partners img { height: 64px; transition: transform .3s var(--ease-out); }
.footer-partners .partners img.is-tall { height: 78px; }
.footer-partners .partners img:hover { transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 20px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .88rem; }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-partners .partners { justify-content: flex-start; gap: 24px 32px; }
  .footer-partners .partners img { height: 48px; }
  .footer-partners .partners img.is-tall { height: 58px; }
}

/* ==========================================================================
   Animaciones (inspiradas en las de Elementor del sitio anterior: fadeInUp, fadeInLeft, float)
   Todas se desactivan si el sistema pide reducir el movimiento.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* Entrada de la portada y de los encabezados de página */
  .hero__inner > *, .page-hero .container > * { animation: fade-in-up .9s var(--ease-out) both; }
  .hero__inner > :nth-child(2), .page-hero .container > :nth-child(2) { animation-delay: .12s; }
  .hero__inner > :nth-child(3), .page-hero .container > :nth-child(3) { animation-delay: .24s; }
  .hero__inner > :nth-child(4) { animation-delay: .36s; }
  .hero__inner > :nth-child(5) { animation-delay: .48s; }
  .hero__bg::before { animation: ken-burns 26s ease-in-out infinite alternate; }
  .hero::after { animation: glow 9s ease-in-out infinite alternate; }

  /* Aparición al hacer scroll: solo si el JS activó el observador (clase js-reveal) */
  .js-reveal .reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
  .js-reveal .reveal--left { transform: translateX(-48px); }
  .js-reveal .reveal--right { transform: translateX(48px); }
  .js-reveal .reveal--zoom { transform: scale(.92); }
  .js-reveal .reveal.is-visible { opacity: 1; transform: none; }
  .js-reveal .tl-item:nth-child(odd) .tl-card.reveal:not(.is-visible) { transform: translateX(-48px); }
  .js-reveal .tl-item:nth-child(even) .tl-card.reveal:not(.is-visible) { transform: translateX(48px); }
}
@keyframes fade-in-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.12) translate(-1.5%, 1%); } }
@keyframes glow { to { opacity: .8; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Identidad tecnológica: encabezado oscuro, portada con mapa de datos,
   encabezados con retícula y acentos en degradado de la marca
   ========================================================================== */
:root {
  --grad: linear-gradient(100deg, #0494cc 0%, #38a3a5 52%, #80ed99 100%);
  --navy-950: #0a1f33;
  --vidrio: rgba(255, 255, 255, .06);
  --vidrio-borde: rgba(255, 255, 255, .12);
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Menú blanco (como el sitio publicado) con el botón de contacto en el degradado de la marca */
.nav .nav-cta { background: var(--grad); color: #0a1f33; }
.nav .nav-cta:hover, .nav .nav-cta[aria-current="page"] { background: var(--grad); color: #0a1f33; filter: brightness(1.08); }
.pill-ia {
  display: inline-block; margin-left: 4px; padding: 3px 6px; border-radius: 6px; vertical-align: 1px;
  font: 700 .66rem/1 var(--mono); letter-spacing: .06em; color: #0a1f33; background: var(--grad);
}

/* Sello de IA */
.badge-ia {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 7px 14px 7px 10px; border-radius: 999px; max-width: 100%;
  font: 700 .82rem/1.25 var(--font-head); color: #dbe7f1; text-decoration: none;
  background: linear-gradient(rgba(10, 31, 51, .85), rgba(10, 31, 51, .85)) padding-box, var(--grad) border-box;
  border: 1px solid transparent; box-shadow: 0 0 0 4px rgba(4, 148, 204, .08), 0 8px 24px -12px rgba(56, 163, 165, .6);
}
a.badge-ia:hover { color: #fff; box-shadow: 0 0 0 5px rgba(56, 163, 165, .16), 0 8px 24px -10px rgba(56, 163, 165, .8); }
.badge-ia .icon { color: #80ed99; }
.btn--grad { background: var(--grad); color: #0a1f33; }
.btn--grad:hover { color: #0a1f33; filter: brightness(1.06); box-shadow: 0 14px 30px -12px rgba(56, 163, 165, .75); }

/* Portada y encabezados de página sin foto ni retícula: azul noche con luces de la marca que flotan
   lento (aurora). El velo de la izquierda mantiene el texto legible. */
.hero, .page-hero { background: var(--navy-950); }
.hero__bg::before { content: none; }
.hero__bg::after, .page-hero::before {
  filter: blur(28px);
  background:
    radial-gradient(22% 26% at 58% 36%, rgba(4, 148, 204, .95), transparent 70%),
    radial-gradient(20% 24% at 76% 56%, rgba(56, 163, 165, .9), transparent 70%),
    radial-gradient(18% 22% at 64% 74%, rgba(128, 237, 153, .6), transparent 70%),
    radial-gradient(24% 26% at 40% 80%, rgba(34, 87, 122, .9), transparent 70%);
}
.hero__bg::after { content: ""; position: absolute; inset: -25%; z-index: -1; }
/* Los encabezados son bajos: la caja de las luces sobresale arriba y abajo para que no queden aplastadas */
.page-hero::before { inset: -60% -10% -60% 25%; opacity: 1; }
.hero::after, .page-hero::after { background: linear-gradient(100deg, rgba(10, 31, 51, .8) 18%, rgba(10, 31, 51, 0) 52%); }
@media (prefers-reduced-motion: no-preference) {
  .hero__bg::after, .page-hero::before { animation: aurora 16s ease-in-out infinite alternate; }
}
@keyframes aurora {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(5%, -4%) rotate(10deg) scale(1.1); }
  100% { transform: translate(-4%, 3%) rotate(-8deg) scale(1.02); }
}
@media (max-width: 900px) {
  .hero::after, .page-hero::after { background: linear-gradient(180deg, rgba(10, 31, 51, .8) 30%, rgba(10, 31, 51, .25)); }
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero__inner { max-width: 640px; }
.hero__mapa svg { width: 100%; height: auto; overflow: visible; }
/* Mapa real de Caldas (el de las fichas del OEC): cada municipio es una forma que se ilumina en onda */
.hm-tile path {
  fill: rgba(255, 255, 255, .06); stroke: rgba(207, 224, 238, .45); stroke-width: 1; stroke-linejoin: round;
  transition: fill .3s, stroke .3s, transform .3s var(--ease-out); transform-box: fill-box; transform-origin: center;
}
.hm-tile:hover path { fill: url(#hm-grad); stroke: #fff; transform: scale(1.04); }
@media (prefers-reduced-motion: no-preference) {
  .hm-tile path { animation: tile-pulso 3.6s ease-in-out infinite; animation-delay: var(--d); }
  .hm-tile:hover path { animation: none; }
}
@keyframes tile-pulso {
  0%, 100% { fill: rgba(255, 255, 255, .06); stroke: rgba(207, 224, 238, .45); }
  45% { fill: rgba(4, 148, 204, .45); stroke: rgba(128, 237, 153, .75); }
}
/* Nombre del municipio bajo el cursor (mismo recuadro del Explorador, un poco más grande porque el mapa es más chico) */
.hero__mapa .mapa__etiqueta text { font-size: 15px; }
/* Ida suave al Explorador al elegir un municipio: el mapa se acerca a él, los demás se apagan y un velo azul noche cubre
   la página; ya en el Explorador, el velo se desvanece sobre el mapa y el detalle de ese municipio */
.hero { overflow-x: clip; }
.hm-tile { outline: none; }
.hm-tile.is-elegido path { fill: url(#hm-grad); stroke: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .hero__mapa svg { transition: transform .7s var(--ease-out); }
  .hero__mapa.is-yendo svg { transform: scale(1.35); }
  .hero__mapa.is-yendo .hm-tile path { animation: none; transition: fill .3s, stroke .3s, opacity .45s; }
  .hero__mapa.is-yendo .hm-tile:not(.is-elegido) path { opacity: .2; }
  html.saliendo::after, html.llegando::after {
    content: ""; position: fixed; inset: 0; z-index: 1000; background: var(--navy-950); pointer-events: none;
  }
  html.saliendo::after { animation: velo-cubre .45s .25s ease-in both; }
  /* El velo de llegada lo retira explorador.js; si no llegara a correr, se va solo */
  html.llegando::after { animation: velo-descubre .6s 1.5s ease-out both; }
  html.llegando.llegando--fin::after { animation: velo-descubre-ya .6s ease-out both; }
  .mapa__contorno--sel.is-llegada { animation: contorno-llegada 1.1s ease-in-out 2; }
}
@keyframes velo-cubre { from { opacity: 0; } to { opacity: 1; } }
@keyframes velo-descubre { from { opacity: 1; } to { opacity: 0; } }
@keyframes velo-descubre-ya { from { opacity: 1; } to { opacity: 0; } }
@keyframes contorno-llegada { 50% { stroke-width: 6; } }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__mapa { max-width: 460px; width: 100%; margin: 4px auto 0; }
}
@media (max-width: 640px) { .hero__mapa .mapa__etiqueta text { font-size: 19px; } }


/* Detalles con identidad: subrayado en degradado, cifras y tarjetas */
.eyebrow::before { background: var(--grad); height: 3px; }
.stat__value span { background: linear-gradient(100deg, #0494cc, #22577a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card:hover, .contact-item:hover, .doc:hover, .tl-card:hover {
  background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border-color: transparent;
}
.section--dark { background: var(--navy-950); color: #cfe0ee; position: relative; isolation: isolate; overflow: hidden; }
/* Más aire en la franja oscura: arriba, abajo, bajo el título y entre las tarjetas */
.section.section--dark { padding: clamp(52px, 6vw, 84px) 0; }
.section--dark .section-head { margin-bottom: clamp(30px, 3.4vw, 44px); }
.section--dark .grid { gap: clamp(20px, 2.4vw, 30px); }
.section--dark .card { padding: clamp(26px, 2.6vw, 34px); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .section-head p { color: #9fb3c6; }
.section--dark .eyebrow { color: #80ed99; }
.section--dark .card { background: var(--vidrio); border-color: var(--vidrio-borde); box-shadow: none; color: #cfe0ee; }
.section--dark .card:hover { background: linear-gradient(rgba(10, 31, 51, .92), rgba(10, 31, 51, .92)) padding-box, var(--grad) border-box; }
.section--dark .card__icon { background: rgba(4, 148, 204, .16); color: var(--blue-500); }
.section--dark .card--teal .card__icon { background: rgba(56, 163, 165, .18); color: var(--teal-500); }
.section--dark .card--accent .card__icon { background: rgba(128, 237, 153, .14); color: #80ed99; }

/* ==========================================================================
   Explorador de datos
   ========================================================================== */
.explorer-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.explorer-bar .combo { flex: 1 1 280px; max-width: 380px; }
.segmented--scroll { max-width: 100%; flex-wrap: wrap; }
.segmented--scroll button { white-space: nowrap; }
.segmented--sm button { padding: 8px 12px; font-size: .85rem; }
@media (max-width: 640px) {
  .segmented--scroll { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 14px; gap: 4px; }
  .segmented--scroll button { border-radius: 10px; white-space: normal; padding: 10px 8px; font-size: .88rem; }
  .explorer-bar .combo { max-width: none; }
}
.explorer-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px; margin-bottom: 20px; align-items: start; }
.explorer-grid--parejo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .explorer-grid, .explorer-grid--parejo { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); min-width: 0; }
.panel__cab { margin-bottom: 14px; }
.panel__cab--fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.panel__titulo { font-size: 1.15rem; margin: 0 0 4px; }
.panel__nota { font-size: .88rem; color: var(--muted); margin: 0; }
/* Encabezado del mapa con el botón "Ver todo Caldas" (marcado cuando se ve el departamento completo) */
.panel__cab--mapa { align-items: flex-start; }
.panel__cab--mapa > div { flex: 1 1 260px; min-width: 0; }
.boton-caldas { flex: none; gap: .45em; }
.boton-caldas .icon { width: 16px; height: 16px; }
.boton-caldas[aria-pressed="true"], .boton-caldas[aria-pressed="true"]:hover { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }

/* Mapa real de Caldas del Explorador: formas coloreadas, contorno del municipio elegido y nombre al pasar el cursor */
.mapa svg { width: 100%; height: auto; display: block; overflow: visible; }
.mapa .muni { cursor: pointer; outline: none; }
.mapa .muni path { stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; transition: fill .3s, filter .2s; }
.mapa .muni:hover path, .mapa .muni:focus-visible path { filter: brightness(.9); }
.mapa__contorno { fill: none; stroke: var(--navy-900); stroke-width: 1.6; stroke-linejoin: round; pointer-events: none; }
.mapa__contorno--sel { stroke-width: 2.6; }
.mapa__etiqueta { pointer-events: none; }
.mapa__etiqueta rect { fill: #fff; stroke: var(--navy-900); stroke-width: .8; }
.mapa__etiqueta text { font: 700 13px var(--font-body); fill: var(--navy-900); }
@media (max-width: 640px) { .mapa__etiqueta text { font-size: 18px; } }
.leyenda { margin-top: 14px; }
.leyenda__titulo { font-size: .85rem; color: var(--ink-2); font-weight: 700; margin: 0 0 6px; }
.leyenda__barra { display: flex; gap: 2px; height: 10px; }
.leyenda__barra span { flex: 1; border-radius: 3px; }
.leyenda__etiquetas { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }

.detalle__cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.detalle__nombre { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 0; }
.detalle__region { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.detalle__subtitulo { font-size: 1rem; margin: 18px 0 8px; }
.cifras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cifra { background: var(--bg-soft); border-radius: 12px; padding: 12px 14px; }
.cifra__cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.cifra__etiqueta { margin: 0; font-size: .8rem; color: var(--muted); font-weight: 700; }
/* Marca de periodo: a qué año o rango corresponde la cifra */
.periodo { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--blue-100); color: var(--blue-700); font: 700 .72rem/1 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cifra__valor { margin: 2px 0 0; font: 700 1.35rem/1.2 var(--font-head); color: var(--ink); }
.cifra__valor.is-sube { color: #17733f; }
.cifra__valor.is-baja { color: #b42318; }
.cifra__nota { margin: 0; font-size: .78rem; color: var(--muted); }

.resumen-ia {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-100), var(--green-100)) padding-box, var(--grad) border-box; border: 1px solid transparent;
}
.resumen-ia__tag { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font: 700 .85rem/1 var(--font-head); color: var(--blue-700); }
.resumen-ia__texto { margin: 0; color: var(--ink); font-size: .97rem; }
.resumen-ia__estado { margin: 8px 0 0; font-size: .78rem; color: var(--muted); font-style: italic; }
.hallazgos { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hallazgos li { position: relative; padding-left: 18px; font-size: .95rem; color: var(--ink-2); }
.hallazgos li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--grad); }

.grafica { width: 100%; min-height: 220px; }
.grafica svg { display: block; max-width: 100%; height: auto; outline: none; }
.grafica svg:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 4px; border-radius: 6px; }
.lineas .rejilla { stroke: var(--line); stroke-width: 1; }
.lineas .eje { stroke: #cfe0ee; stroke-width: 1; }
.lineas .tick { fill: var(--muted); font: 12px var(--font-body); font-variant-numeric: tabular-nums; }
.lineas .guia { stroke: #0a1f33; stroke-opacity: .35; stroke-width: 1; }
.lineas .etiqueta-final { fill: var(--ink-2); font: 700 12px var(--font-body); }
.lineas .base { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.lineas .base-texto { fill: var(--muted); font: 700 11px var(--font-body); }
.lineas .marca__pastilla { fill: var(--navy-900); }
.lineas .marca__anio { fill: #fff; font: 700 12px var(--font-body); font-variant-numeric: tabular-nums; }

.barras { display: grid; gap: 6px; }
.barra {
  display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; padding: 4px 6px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-align: left;
}
button.barra { cursor: pointer; }
.barra:hover, .barra:focus-visible { background: var(--bg-soft); }
.barra__nombre { font-size: .88rem; color: var(--ink-2); overflow-wrap: anywhere; }
.barra.is-sel .barra__nombre { color: var(--ink); font-weight: 800; }
.barra__pista { height: 14px; display: flex; align-items: center; }
.barra__valor { display: block; height: 14px; min-width: 2px; border-radius: 0 4px 4px 0; transition: width .5s var(--ease-out); }
.barra__num { font-size: .85rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.barras--ranking .barra { grid-template-columns: minmax(0, 30%) minmax(0, 1fr) auto; }
@media (max-width: 560px) {
  .barra, .barras--ranking .barra { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .barra__pista { grid-column: 1 / -1; grid-row: 2; }
}

.comparador-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
/* Explicación en lenguaje sencillo debajo de una gráfica */
.aclaracion { margin-top: 16px; padding: 16px 20px; border-left: 4px solid var(--blue-500); border-radius: 0 12px 12px 0; background: var(--blue-100); }
.aclaracion__titulo { margin: 0 0 6px; font-size: 1rem; color: var(--navy-900); }
.aclaracion p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.aclaracion p + p { margin-top: 8px; }
.aclaracion strong { color: var(--ink); }
/* El ranking repite el selector de indicador para no tener que volver al mapa */
.ranking-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.ranking-puesto { margin: 0; font-weight: 700; color: var(--ink); }
.ranking-puesto strong { color: var(--blue-700); }
.comparador-bar .combo { flex: 0 1 300px; }
.chips-serie { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-serie {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: .88rem; font-weight: 700; color: var(--ink);
}
.chip-serie__clave { width: 16px; height: 3px; border-radius: 2px; }
.chip-serie__quitar { border: 0; background: var(--bg-soft); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; color: var(--ink); font-size: 1rem; line-height: 1; }
.chip-serie__quitar:hover { background: var(--line); }

.viz-tip {
  position: fixed; z-index: 60; pointer-events: none; min-width: 120px; max-width: 280px; padding: 10px 12px; border-radius: 10px;
  background: var(--navy-900); color: #dbe7f1; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); font-size: .85rem;
}
.viz-tip__periodo { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.viz-tip__periodo span { color: #9fb3c6; font-size: .75rem; }
.viz-tip__periodo strong { padding: 2px 8px; border-radius: 999px; background: var(--blue-500); color: #fff; font-size: .78rem; font-variant-numeric: tabular-nums; }
.viz-tip__titulo { margin: 0 0 4px; font-weight: 700; color: #fff; font-size: .85rem; }
.viz-tip__fila { margin: 2px 0 0; display: flex; align-items: center; gap: 8px; }
.viz-tip__fila strong { color: #fff; font-variant-numeric: tabular-nums; }
.viz-tip__fila span:last-child { color: #9fb3c6; }
.viz-tip__clave { width: 14px; height: 3px; border-radius: 2px; flex: none; }
.viz-tip__detalle { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid rgba(207, 224, 238, .2); color: #9fb3c6; font-size: .78rem; }

.tabla-datos { margin-top: 16px; }
.tabla-datos summary { cursor: pointer; font-weight: 700; color: var(--blue-500); }
.tabla-datos__scroll { overflow-x: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; }
.tabla-datos table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 760px; }
.tabla-datos th, .tabla-datos td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.tabla-datos thead th { background: var(--bg-soft); font-size: .8rem; color: var(--muted); }
.tabla-datos td { font-variant-numeric: tabular-nums; }
.tabla-datos tbody th { font-weight: 700; color: var(--ink); }
