/* =============================================
   MONOPOLÍTICA 2026 — CSS Principal
   CasaMacondo · Periodismo de datos
   ============================================= */

/* === TOKENS === */
:root {
  --green:        #00A850;
  --green-dark:   #007A3A;
  --green-deep:   #003D1E;
  --green-bg:     #0e5c2c;
  --pink:         #E8415A;
  --pink-hot:     #FF3C8E;
  --yellow:       #FFD234;
  --lime:         #90FF62;
  --amber:        #F5A623;
  --black:        #0D0D0D;
  --white:        #FFFFFF;
  --gray:         #6B7280;

  --font:         'Poppins', sans-serif;
  --radius:       8px;
  --radius-lg:    16px;
  --max-w:        820px;
  --max-w-wide:   1100px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--green-bg); color: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* =============================================
   NAV — split red / dark-green
   ============================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  height: 48px;
  overflow: hidden;
  background: rgba(6, 22, 10, 0.97);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
  background: rgba(6, 22, 10, 0.97);
  padding: 0 20px;
}
.nav-logo {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.80);
}
.nav-sep { color: rgba(255,255,255,0.40); font-size: 14px; font-weight: 300; }
.nav-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav-elecciones {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.18);
  padding: 2px 8px;
  border-radius: 100px;
}

/* Ticker (desktop) */
.nav-ticker {
  flex: 1;
  overflow: hidden;
  background: rgba(6, 22, 10, 0.97);
  display: flex;
  align-items: center;
  padding: 0 16px;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.nav-ticker-track {
  display: flex;
  gap: 32px;
  animation: ticker 22s linear infinite;
  width: max-content;
}
.nav-ticker-track span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  white-space: nowrap;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Nav links (desktop) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 0 12px;
}
.nav-link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.70);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--lime);
  background: rgba(144,255,98,0.10);
}

/* Hamburger (mobile) */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--green-bg);
  color: var(--white);
  font-size: 22px;
  width: 56px;
  height: 100%;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  margin-left: auto;
}

/* Mobile menu */
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 44px;
  left: 0; right: 0;
  background: var(--green-dark);
  border-bottom: 2px solid var(--lime);
  z-index: 999;
  padding: 8px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.nav-mobile-menu.open {
  display: flex;
}
.nav-mobile-link {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.80);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.15s, background 0.15s;
}
.nav-mobile-link:hover, .nav-mobile-link:active {
  color: var(--lime);
  background: rgba(144,255,98,0.08);
}
.nav-mobile-link--brand {
  color: rgba(255,210,52,0.80);
  border-bottom: none;
}

/* =============================================
   HERO — dark green + red card + hot-pink CTA
   ============================================= */
.hero {
  background-color: var(--green-bg);
  background-image: url('../assets/illustrations/head.svg');
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: 100% 44vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Trama diagonal sutil */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 20px,
    rgba(0,0,0,0.025) 20px, rgba(0,0,0,0.025) 40px
  );
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 32px;
  width: 100%;
}

/* Tarjeta roja central */
.hero-card {
  background: rgba(6, 22, 10, 0.91);
  border-radius: 20px;
  padding: 28px 5% 24px;
  /* Escala con el viewport en pantallas grandes para alinearse con el arco del SVG */
  max-width: clamp(780px, 56vw, 1040px);
  width: calc(100% - 80px);
  text-align: center;
}

.hero-kicker {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 10px;
  font-style: normal;
}

.hero-title {
  font-size: clamp(40px, 8vw, 88px);
  font-weight: 900;
  font-style: normal;
  line-height: 0.88;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  text-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.hero-title-accent { color: var(--yellow); }

.hero-subtitle {
  font-size: clamp(14px, 2.4vw, 18px);
  font-weight: 600;
  color: rgba(255,255,255,0.90);
  line-height: 1.35;
}

.hero-desc {
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 400;
  color: rgba(255,255,255,0.82);
  line-height: 1.55;
  margin-top: 12px;
  text-align: justify;
}

/* CTA bajo la ilustración */
.hero-cta {
  position: relative;
  z-index: 2;
  display: inline-block;
  background: var(--pink-hot);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 40px;
  border-radius: 100px;
  margin-bottom: 40px;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 20px rgba(255,60,142,0.45);
}
.hero-cta:hover { background: #e0006e; transform: translateY(-2px); }

/* Espacio para la ilustración — debe coincidir con background-size height */
.hero-spacer { height: 44vh; flex-shrink: 0; }

.hero-illustration { display: none; }

/* =============================================
   INTRO — verde oscuro, centrado, lima/amber
   ============================================= */
.intro {
  background: var(--green-bg);
  padding: 48px 24px 60px;
  text-align: center;
  border-top: 4px solid rgba(0,0,0,0.20);
}
.intro-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.intro-kicker {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--amber);
  margin-bottom: 14px;
  font-style: italic;
}
.intro-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  color: var(--lime);
  margin-bottom: 22px;
  line-height: 1.2;
}
.intro-text {
  font-size: 17px;
  line-height: 1.80;
  color: rgba(255,255,255,0.82);
}
.intro-question { display: none; } /* merged into intro-text */

/* =============================================
   CANDIDATO
   ============================================= */
.candidato { border-bottom: 4px solid rgba(0,0,0,0.14); }
.candidato--azul  { background: #65A1D5; }
.candidato--rosa  { background: #D55368; }
.candidato--verde { background: #64AF5D; }

/* Layout principal: retrato IZQ + contenido DER */
.candidato-banda-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 28px 28px 20px;
  display: flex;
  align-items: flex-end;
  gap: 28px;
}

/* Círculo avatar con ring blanco */
.candidato-avatar {
  flex-shrink: 0;
  width: 185px;
  height: 185px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.40), 0 4px 24px rgba(0,0,0,0.22);
}
.candidato-ilustracion {
  width: 170px;
  height: auto;
  display: block;
  object-fit: contain;
}
.avatar-placeholder {
  width: 185px;
  height: 185px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 6px solid rgba(255,255,255,0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar-initials {
  font-size: 52px;
  font-weight: 900;
  color: rgba(255,255,255,0.40);
}

/* Contenido */
.candidato-content { flex: 1; min-width: 0; padding-bottom: 20px; }

.candidato-nombre {
  font-size: clamp(24px, 4.5vw, 42px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 4px;
}
.candidato-nombre::before { content: none; }

.candidato-partido {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}

/* Stats — caja lima */
.candidato-stats {
  display: flex;
  background: var(--lime);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
  max-width: 400px;
}
.stat {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  border-right: 1.5px solid rgba(0,0,0,0.10);
}
.stat:last-child { border-right: none; }
.stat-icon { width: 26px; height: 26px; object-fit: contain; display: block; margin: 0 auto 3px; }
.stat-num { display: block; font-size: 22px; font-weight: 900; color: var(--black); line-height: 1.1; }
.stat-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(0,0,0,0.55); margin-top: 2px; line-height: 1.25; }

/* Stats extra — fuera del box */
.candidato-stats-extra {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
  max-width: 400px;
}
.stat-extra { display: flex; align-items: center; gap: 7px; }
.stat-extra .stat-icon { margin: 0; }
.stat-extra .stat-num { font-size: 22px; font-weight: 900; color: var(--white); }
.stat-extra .stat-label { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255,255,255,0.70); line-height: 1.3; }

/* Botón mapa — lima */
.btn-mapa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: var(--black);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 100px;
  transition: filter 0.2s;
}
.btn-mapa:hover { filter: brightness(0.88); }
.btn-mapa--sm { font-size: 11px; padding: 8px 18px; }

/* Artículos — lista vertical, fondo transparente, texto oscuro */
.candidato-articulos {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 28px 28px;
}
.articulo-card {
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.22);
  background: transparent;
  display: flex;
  flex-direction: column;
}
.articulo-card .articulo-link {
  margin-top: auto;
  align-self: flex-start;
}
.articulo-card:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.22);
}

.articulo-tipo {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-style: italic;
  color: var(--amber);
  margin-bottom: 6px;
}
.articulo-tipo--hallazgo { color: var(--yellow); }

.articulo-titulo {
  font-size: 21px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 8px;
  line-height: 1.2;
}
.articulo-excerpt {
  font-size: 15px;
  line-height: 1.60;
  font-style: normal;
  font-weight: 400;
  color: rgba(0,0,0,0.75);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.articulo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: var(--black);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: 100px;
  transition: filter 0.2s;
}
.articulo-link:hover { filter: brightness(0.88); }

/* =============================================
   FÓRMULA VICEPRESIDENCIAL
   ============================================= */
.formula { border-bottom: 3px solid rgba(0,0,0,0.14); }
.formula--azul  { background: #4e88bc; }
.formula--rosa  { background: #b8445a; }
.formula--verde { background: #4e9448; }

.formula-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 16px 28px;
  display: grid;
  grid-template-columns: 185px 1fr;
  grid-template-rows: auto auto;
  column-gap: 28px;
  row-gap: 10px;
}
.formula-avatar {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
}
.formula-info  { grid-column: 2; grid-row: 1; align-self: end; }
.formula-bottom {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  align-self: start;
}

.formula-avatar { flex-shrink: 0; }
.formula-ilustracion {
  width: 170px;
  height: 200px;
  object-fit: contain;
  object-position: bottom;
  display: block;
}

.avatar-placeholder--sm {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 5px solid rgba(255,255,255,0.40);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-placeholder--sm .avatar-initials {
  font-size: 24px;
  font-weight: 900;
  color: rgba(255,255,255,0.50);
}

.formula-info { flex: 1; min-width: 0; padding-bottom: 4px; }

.formula-nombre {
  font-size: clamp(22px, 3.2vw, 38px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  white-space: nowrap;
  margin-bottom: 3px;
}
.formula-nombre::before { content: none; }

.formula-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-top: 2px;
}

.formula-datos {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.formula-dato {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.90);
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 6px 14px;
  white-space: nowrap;
}
.formula-dato strong {
  font-size: 16px;
  font-weight: 900;
  color: var(--lime);
}
.formula-dato-sep {
  color: rgba(255,255,255,0.30);
  font-size: 16px;
}

/* Bloque de descripción al pie de la fórmula */
.formula-resumen {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 28px 20px;
}
.formula-resumen-titulo {
  font-size: 17px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  margin-bottom: 4px;
  line-height: 1.3;
}
.formula-resumen-texto {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
}
.formula-resumen-link {
  margin-top: 14px;
}

/* =============================================
   TABLERO DE PROPIEDADES
   ============================================= */
.tablero { background: var(--green-deep); padding: 60px 24px; }
.tablero-inner { max-width: var(--max-w-wide); margin: 0 auto; }

.tablero-kicker {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--pink); margin-bottom: 6px;
}
.tablero-title {
  font-size: clamp(24px, 4.5vw, 40px);
  font-weight: 900; color: var(--lime); margin-bottom: 10px;
}
.tablero-desc {
  font-size: 14px; color: rgba(255,255,255,0.65);
  max-width: 500px; line-height: 1.65; margin-bottom: 6px;
}
.tablero-question {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 28px; font-style: italic;
}

.tablero-stats {
  display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 28px;
}
.tablero-stat { text-align: center; }
.tablero-stat-num {
  display: block;
  font-size: clamp(30px, 5.5vw, 50px);
  font-weight: 900; color: var(--white); line-height: 1;
}
.tablero-stat-label {
  display: block; font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); margin-top: 4px;
}

/* Filtros */

/* Toggle candidatos */
.candidatos-toggle { margin-bottom: 22px; }
.toggle-hint {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.35); margin-bottom: 8px;
}
.toggle-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle-chip {
  font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.4); background: transparent;
  transition: all 0.18s;
}
.toggle-chip[data-candidato="espriella"].active { background: #5BA3D9; border-color: #5BA3D9; color: var(--white); }
.toggle-chip[data-candidato="restrepo"].active  { background: #4ECDC4; border-color: #4ECDC4; color: var(--black); }
.toggle-chip[data-candidato="cepeda"].active    { background: #E8415A; border-color: #E8415A; color: var(--white); }
.toggle-chip[data-candidato="quilcue"].active   { background: #FF8833; border-color: #FF8833; color: var(--white); }
.toggle-chip[data-candidato="valencia"].active  { background: #90FF62; border-color: #90FF62; color: var(--black); }
.toggle-chip[data-candidato="oviedo"].active    { background: #FFD234; border-color: #FFD234; color: var(--black); }
.toggle-chip[data-candidato="fajardo"].active,
.toggle-chip[data-candidato="bonilla"].active { background: #64AF5D; border-color: #64AF5D; color: var(--white); }
.toggle-chip[data-candidato="barreras"].active,
.toggle-chip[data-candidato="zamora"].active { background: #D55368; border-color: #D55368; color: var(--white); }
.toggle-chip[data-candidato="lopez"].active,
.toggle-chip[data-candidato="huertas"].active { background: #64AF5D; border-color: #64AF5D; color: var(--white); }

/* Otros investigados */
.toggle-hint--otros {
  margin-top: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}
.toggle-chip--otros[data-candidato="caicedo"].active,
.toggle-chip--otros[data-candidato="torres"].active,
.toggle-chip--otros[data-candidato="caycedo"].active,
.toggle-chip--otros[data-candidato="villegas"].active,
.toggle-chip--otros[data-candidato="alarcon"].active,
.toggle-chip--otros[data-candidato="lizcano"].active,
.toggle-chip--otros[data-candidato="botero"].active,
.toggle-chip--otros[data-candidato="macollins"].active {
  background: #D4A853; border-color: #D4A853; color: #1a1a1a;
}

/* Popup del mapa */
.popup-candidato { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.popup-municipio { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.9); margin-bottom: 6px; }
.popup-total { font-size: 12px; color: rgba(255,255,255,0.6); }
.popup-num { font-size: 20px; font-weight: 800; color: #fff; margin-right: 4px; }
.popup-tipos { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 2px; }
.popup-tipo { font-size: 10px; background: rgba(255,255,255,0.12); border-radius: 4px; padding: 2px 7px; color: rgba(255,255,255,0.85); }
.popup-tipo-num { font-weight: 700; color: #fff; margin-right: 2px; }
.popup-vendidas-bloque { margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 11px; color: rgba(255,255,255,0.45); }
.popup-vendidas-num { font-weight: 700; color: rgba(255,255,255,0.6); }
.popup-tipos--vend .popup-tipo { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.45); }
.popup-tipos--vend .popup-tipo-num { color: rgba(255,255,255,0.55); }

/* Mapa */
.mapa-wrapper {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 2px solid rgba(255,255,255,0.07);
  position: relative;
}
.mapa { height: 460px; width: 100%; background: #1a2e1a; }
.mapa-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 30, 15, 0.82);
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.mapa-empty span {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 260px;
  line-height: 1.5;
}

/* =============================================
   LÍNEA DEL PODER
   ============================================= */
/* =============================================
   LÍNEA DEL PODER — tabla comparativa
   ============================================= */
.linea-poder { background: var(--green-dark); padding: 60px 24px; }
.linea-inner { max-width: var(--max-w-wide); margin: 0 auto; }

.linea-kicker {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 6px;
}
.linea-title {
  font-size: clamp(24px, 4.5vw, 40px);
  font-weight: 900; color: var(--lime); margin-bottom: 6px;
}
.linea-desc { font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 28px; }

/* ---- PESTAÑAS ---- */
.tl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tl-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.18s;
}
.tl-tab:hover {
  color: var(--lime);
  border-color: rgba(144,255,98,0.35);
  background: rgba(144,255,98,0.08);
}
.tl-tab.active {
  color: var(--black);
  background: var(--lime);
  border-color: var(--lime);
  font-weight: 800;
}

/* ---- PANELES ---- */
.tl-panel { display: none; }
.tl-panel.active { display: block; }

/* ---- TABLA ---- */
.tl-table-wrapper { /* kept for backwards compat */ }

.tl-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(144,255,98,0.12);
}

/* Header row */
.tl-table thead th {
  background: rgba(0,0,0,0.4);
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(144,255,98,0.2);
}
.tl-th-year {
  color: rgba(255,255,255,0.4);
  width: 70px;
  text-align: center;
}
.tl-th-sub-trans { color: rgba(144,255,98,0.8); }
.tl-th-sub-cargo  { color: rgba(255,210,52,0.8); }

/* Body rows */
.tl-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.12s;
}
.tl-table tbody tr:last-child { border-bottom: none; }
.tl-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.03); }
.tl-table tbody tr:hover { background: rgba(144,255,98,0.06); }

/* Year cell */
.tl-td-year {
  font-size: 17px;
  font-weight: 900;
  color: var(--lime);
  padding: 12px 16px;
  text-align: center;
  white-space: nowrap;
  width: 70px;
  border-right: 1px solid rgba(144,255,98,0.12);
}

/* Data cells */
.tl-td {
  padding: 12px 16px;
  vertical-align: top;
  line-height: 1.5;
}
.tl-td-trans {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  width: 40%;
}
.tl-td-cargo {
  color: rgba(255,210,52,0.85);
  font-style: italic;
  font-weight: 400;
  vertical-align: middle;
}

/* Corchete lateral para cargos que abarcan varios años */
.tl-td-cargo--bracket {
  position: relative;
  border-left: 3px solid rgba(255,210,52,0.55);
  padding-left: 14px;
}
.tl-td-cargo--bracket::before,
.tl-td-cargo--bracket::after {
  content: '';
  position: absolute;
  left: -3px;
  width: 8px;
  border-top: 3px solid rgba(255,210,52,0.55);
}
.tl-td-cargo--bracket::before { top: 0; }
.tl-td-cargo--bracket::after  { bottom: 0; }

/* Empty state */
.tl-empty {
  color: rgba(255,255,255,0.3);
  font-size: 13px;
  padding: 24px 0;
  font-style: italic;
}

/* ---- LEYENDA ---- */
.tl-leyenda {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.tl-leyenda-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
}
.tl-leyenda-dot {
  width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
}
.tl-leyenda-dot--trans { background: rgba(255,255,255,0.6); }
.tl-leyenda-dot--cargo  { background: rgba(255,210,52,0.7); }

/* =============================================
   CIERRE — verde oscuro, stats lima, centrado
   ============================================= */
.cierre {
  background: var(--green-deep);
  padding: 60px 24px;
  text-align: center;
  border-top: 4px solid rgba(0,0,0,0.30);
}
.cierre-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.cierre-stats {
  display: flex;
  flex-direction: row;
  gap: 14px;
  width: 100%;
  max-width: 600px;
  justify-content: center;
}
.cierre-stats .cierre-stat {
  flex: 1;
}
.cierre-stat {
  background: var(--lime);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
}
.cierre-stat-num {
  display: block;
  font-size: clamp(32px, 7vw, 52px);
  font-weight: 900;
  color: var(--green-bg);
  line-height: 1;
  margin-bottom: 6px;
}
.cierre-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(0,61,30,0.65);
  line-height: 1.4;
}
.cierre-texto {
  text-align: center;
  max-width: 620px;
}
.cierre-titulo {
  font-size: clamp(18px, 3.5vw, 26px);
  font-weight: 800;
  color: var(--yellow);
  line-height: 1.25;
  margin-bottom: 16px;
}
.cierre-texto p {
  font-size: 15px;
  line-height: 1.80;
  color: rgba(255,255,255,0.82);
  margin-bottom: 12px;
}

/* Botones cierre */
.cierre-acciones {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.cierre-btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 22px;
  border-radius: 100px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity 0.2s;
}
.cierre-btn:hover { opacity: 0.82; }
.cierre-btn--lime { background: var(--lime); color: var(--black); }
.cierre-btn--outline { background: transparent; border-color: rgba(255,255,255,0.30); color: rgba(255,255,255,0.80); }
.cierre-btn--pink { background: var(--pink-hot); color: var(--white); }

/* =============================================
   FRASES PARA REDES
   ============================================= */
.frases-redes {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: center;
  margin: 48px 0 40px;
}
.frase-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(144,255,98,0.25);
  border-left: 3px solid var(--lime);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  max-width: 260px;
  text-align: center;
}

/* =============================================
   DONANTES
   ============================================= */
.donantes {
  margin: 0 0 48px;
  text-align: center;
}
.donantes-titulo {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 800;
  color: var(--lime);
  margin-bottom: 14px;
  text-align: center;
}
.donantes-frase {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.60);
  max-width: 600px;
  margin: 0 auto 28px;
  font-style: italic;
}
.donantes-lista {
  list-style: none;
  display: flex; flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: center;
  max-width: 680px;
  margin: 0 auto;
}
.donantes-lista li {
  font-size: 13px;
  color: rgba(255,255,255,0.50);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.donantes-lista li::before {
  content: '·';
  margin-right: 6px;
  color: var(--lime);
}

/* =============================================
   CRÉDITOS
   ============================================= */
.creditos {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 40px;
  margin-bottom: 48px;
}
.creditos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 48px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.credito-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.credito-item--solo {
  grid-column: 1 / -1;
}
.credito-rol {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.credito-nombre {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.80);
}

/* =============================================
   FOOTER
   ============================================= */
.footer { background: var(--black); padding: 40px 24px; }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; flex-direction: column;
  gap: 20px; align-items: center; text-align: center;
}
.footer-brand {
  font-size: 17px; font-weight: 800; color: var(--white);
  display: block; margin-bottom: 3px;
}
.footer-especial {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime);
}
.footer-acciones { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.footer-btn {
  display: inline-block; font-family: var(--font);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 100px;
  background: var(--pink); color: var(--white);
  cursor: pointer; transition: opacity 0.2s;
  border: 1.5px solid transparent;
}
.footer-btn--outline {
  background: transparent;
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.65);
}
.footer-btn:hover { opacity: 0.80; }
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.25); }
.footer-edicion { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 6px; }
.footer-edicion a { color: rgba(255,210,52,0.7); text-decoration: none; }
.footer-edicion a:hover { color: #FFD234; text-decoration: underline; }

/* =============================================
   RESPONSIVE — DESKTOP
   ============================================= */
@media (min-width: 640px) {
  /* Artículos: 2 columnas side-by-side en desktop */
  .candidato-articulos {
    flex-direction: row;
    align-items: stretch;
    gap: 24px;
  }
  .articulo-card { flex: 1; }
}

@media (min-width: 768px) {
  /* HERO desktop: compacto — card arriba, ilustración abajo sin hueco */
  .hero {
    min-height: 0;
    background-size: 100% 900px;
    background-position: center bottom;
    overflow: hidden;
    position: relative;
  }
  .hero-inner {
    flex: none;
    justify-content: flex-start;
    align-items: center;
    padding: 30px 24px 30px;
  }
  /* Spacer muestra la franja baja del SVG (donde están los edificios) */
  .hero-spacer { height: 490px; }

  /* CANDIDATOS desktop: sin overflow de héroe, padding normal */
  .candidato-banda-inner {
    padding-top: 28px;
  }

  .tablero-stats { gap: 40px; }
}

@media (min-width: 1024px) {
  .candidato-body { max-width: var(--max-w-wide); margin: 0 auto; }
}

/* =============================================
   RESPONSIVE — MOBILE (< 640px)
   ============================================= */
@media (max-width: 639px) {

  /* NAV mobile: sin pill en ELECCIONES, separador | via CSS */
  .nav-ticker { display: none; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-logo { display: none; }
  .nav-sep { display: none; }
  .nav-elecciones {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.80);
    letter-spacing: 0.06em;
  }
  .nav-elecciones::before {
    content: ' | ';
    color: rgba(255,255,255,0.40);
    font-weight: 300;
  }

  /* HERO mobile: card al TOPE, ilustración justo abajo */
  .hero {
    min-height: 0;
    background-size: 100% 200px;
    background-position: center bottom;
    position: relative;
    overflow: hidden;
  }
  .hero-inner {
    flex: none;
    justify-content: flex-start;
    padding: 25px 0;
    align-items: stretch;
  }
  .hero-card {
    width: 100%;
    max-width: 100%;
    border-radius: 0 0 28px 28px;
    padding: 22px 20px 30px;
    text-align: left;
  }
  .hero-kicker { font-size: 17px; margin-bottom: 8px; }
  .hero-title { font-size: clamp(34px, 10.5vw, 48px); line-height: 0.88; }
  .hero-subtitle { font-size: 15px; line-height: 1.3; }
  .hero-spacer { height: 110px; }
  /* CTA absoluto en la parte baja de la ilustración */
  .hero-cta {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 340px;
    margin: 0;
    font-size: 14px;
  }

  /* CANDIDATO mobile: column, centered */
  .candidato-banda-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* padding-top 100px: acomoda los 96px que la ilustración sobresale del oval */
    padding: 100px 20px 16px;
    gap: 16px;
  }
  .candidato-avatar {
    width: 180px;
    height: 180px;
    margin-bottom: 4px;
  }
  .candidato-content {
    width: 100%;
    padding-bottom: 0;
  }
  .candidato-nombre {
    font-size: 30px;
    justify-content: center;
  }
  .candidato-nombre::before {
    font-size: 0.45em;
  }
  .candidato-partido { margin-bottom: 16px; }

  /* Stats mobile: vertical stack in lime box, centrado */
  .candidato-stats {
    flex-direction: column;
    max-width: 100%;
    border-radius: var(--radius);
    align-items: center;
  }
  .stat {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 16px;
    gap: 6px;
    border-right: none;
    border-bottom: 1.5px solid rgba(0,0,0,0.10);
    width: 100%;
  }
  .stat:last-child { border-bottom: none; }
  .stat-icon { width: 36px; height: 36px; margin: 0 auto; display: block; flex-shrink: 0; }
  .stat-num { display: block; text-align: center; }
  .stat-num { font-size: 28px; line-height: 1; }
  .stat-label { font-size: 9px; line-height: 1.3; }

  /* Extra stats mobile: centrado */
  .candidato-stats-extra {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
    max-width: 100%;
    margin-bottom: 18px;
  }
  .stat-extra {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }
  .stat-extra .stat-icon { width: 36px; height: 36px; margin: 0 auto; display: block; }
  .stat-extra .stat-num { font-size: 28px; display: block; text-align: center; }
  .stat-extra .stat-label { font-size: 9px; text-align: center; }
  .stat-extra > div { display: flex; justify-content: center; }

  /* Botón mapa — full width mobile */
  .btn-mapa {
    width: 100%;
    padding: 13px 20px;
    font-size: 13px;
    border-radius: 100px;
  }
  .btn-mapa--sm { font-size: 13px; padding: 13px 20px; }

  /* Articles mobile */
  .candidato-articulos { padding: 0 20px 24px; }
  .articulo-titulo { font-size: 22px; }
  .articulo-excerpt { -webkit-line-clamp: 6; }
  .articulo-link {
    width: 100%;
    padding: 12px 20px;
    font-size: 12px;
    border-radius: 100px;
  }

  /* TABLERO mobile: stats stacked vertically */
  .tablero-stats {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
  }
  .tablero-stat-num { font-size: 48px; }
  .candidatos-toggle { width: 100%; }
  .toggle-hint { font-style: italic; }
  .toggle-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }

  /* INTRO mobile: espacio arriba respira sin ser excesivo */
  .intro { padding: 32px 20px 40px; }

  /* CIERRE mobile: keep row but smaller */
  .cierre-stats {
    gap: 8px;
    max-width: 100%;
  }
  .cierre-stat { padding: 14px 8px; }
  .cierre-titulo { font-size: 24px; }
  .cierre-acciones {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .cierre-btn {
    width: 100%;
    text-align: center;
  }

  /* VP FORMULA mobile: column, centered, large ring */
  .formula-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    justify-items: center;
    text-align: center;
    padding: 28px 20px 20px;
    row-gap: 10px;
  }
  .formula-avatar { grid-column: 1; grid-row: 1; align-self: center; }
  .formula-info   { grid-column: 1; grid-row: 2; }
  .formula-bottom { grid-column: 1; grid-row: 3; flex-direction: column; align-items: center; }
  .formula-nombre { white-space: normal; }
  .avatar-placeholder--sm {
    width: 160px;
    height: 160px;
    border-width: 6px;
  }
  .avatar-placeholder--sm .avatar-initials {
    font-size: 42px;
  }
  .formula-info { text-align: center; }
  .formula-nombre { font-size: 32px; }
  .formula-stats {
    justify-content: center;
    gap: 8px;
  }
  .stat--sm { padding: 8px 14px; }
  .stat--sm .stat-num { font-size: 16px; }
}

/* =============================================
   UTILIDADES
   ============================================= */
.fade-in {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Leaflet overrides */
.leaflet-container { font-family: var(--font) !important; background: var(--green-deep) !important; }
.leaflet-popup-content-wrapper {
  background: var(--green-deep); color: var(--white);
  border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.leaflet-popup-tip { background: var(--green-deep); }
.leaflet-popup-content { margin: 12px 16px; font-family: var(--font); font-size: 13px; }
.popup-nombre { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.popup-tipo { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--yellow); margin-bottom: 5px; }
.popup-valor { font-size: 13px; color: rgba(255,255,255,0.7); }
