/* ================================================
   DESIGN SYSTEM · Elecciones Colombia 2026
   Sistema basado en variantes y tokens de diseño
   ================================================ */

/* ================================================
   TOKENS DE COLOR PRIMARIOS
   ================================================ */
:root {
  /* Colombia Brand Colors */
  --co-yellow: #fcd116;
  --co-blue: #003893;
  --co-red: #ce1126;

  /* Escalas de azul */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #003893;
  --blue-950: #172554;

  /* Escalas de gris */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #020617;

  /* Candidatos */
  --paloma: #3b82f6;
  --cepeda: #a855f7;
  --tigre: #ef4444;

  /* Semánticos */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Superficies */
  --surface-primary: #ffffff;
  --surface-secondary: #f8fafc;
  --surface-tertiary: #f1f5f9;

  /* Textos */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;

  /* Bordes */
  --border-light: rgba(226, 232, 240, 0.8);
  --border-medium: rgba(203, 213, 225, 1);

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* Focos */
  --focus-ring: 0 0 0 2px white, 0 0 0 4px var(--co-blue);
  --focus-ring-offset: 0 0 0 2px white, 0 0 0 4px var(--co-yellow);

  /* Radio de borde */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Tipografía */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ================================================
   NOTA DE ARQUITECTURA
   ------------------------------------------------
   El reset global, los estilos base (body, html, img,
   a) y las utilidades genéricas los provee output.css
   (Tailwind). Este archivo SOLO aporta los componentes
   del sistema de diseño (navbar, menús, botones BEM,
   cards, badges, inputs) y se carga DESPUÉS de
   output.css en todas las páginas.
   ================================================ */

/* ================================================
   COMPONENTE: NAVBAR
   Variantes: default, transparent, condensed
   ================================================ */

/* Navbar Base */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--co-yellow) 33%, var(--co-blue) 33%, var(--co-blue) 66%, var(--co-red) 66%);
}

/* Navbar Variantes */

/* Variante: Transparent (para heroes) */
.navbar--transparent {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

/* Variante: Condensed (para scroll) */
.navbar--condensed {
  padding-top: 0;
  padding-bottom: 0;
}

.navbar--condensed .navbar__inner {
  min-height: 56px;
}

/* Navbar Layout */
.navbar__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .navbar__inner {
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .navbar__inner {
    padding: 0 32px;
  }
}

/* ================================================
   COMPONENTE: BRAND
   ================================================ */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand__logo {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  line-height: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 56, 147, 0.18);
  transition: transform 0.25s ease;
}
.brand__logo svg {
  display: block;
  width: 100%;
  height: 100%;
}
.brand:hover .brand__logo {
  transform: scale(1.05) rotate(-3deg);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand__subtitle {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

/* ================================================
   COMPONENTE: NAVIGATION
   ================================================ */
.nav {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 4px;
  }
}

/* Nav Item Base */
.nav__item {
  position: relative;
  list-style: none;
}

/* Nav Link Base */
.nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.nav__link:hover {
  color: var(--text-primary);
  background: var(--surface-tertiary);
}

.nav__link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Variante: Active */
.nav__link--active {
  color: var(--blue-700);
  background: var(--blue-50);
  font-weight: 600;
}

/* Nav Link con Dropdown */
.nav__link--has-dropdown::after {
  content: '';
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.5;
  transition: transform 0.2s;
}

.nav__item:hover .nav__link--has-dropdown::after {
  transform: rotate(180deg);
  opacity: 1;
}

/* ================================================
   COMPONENTE: FLYOUT (dropdown + mega-menú)
   Sistema de navegación desplegable premium.
   El contenedor (.dropdown / .mega-menu) posiciona;
   el panel (.flyout) anima. --shift lo recoloca el JS
   para no salirse del viewport.
   ================================================ */

.dropdown,
.mega-menu {
  position: absolute;
  top: calc(100% + 11px);
  left: 50%;
  transform: translateX(calc(-50% + var(--shift, 0px)));
  z-index: 100;
  pointer-events: none;
}

/* Puente invisible sobre el espacio nav→panel para no perder el hover */
.dropdown::before,
.mega-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav__item:hover > .dropdown,
.nav__item:focus-within > .dropdown,
.nav__item:hover > .mega-menu,
.nav__item:focus-within > .mega-menu {
  pointer-events: auto;
}

/* Panel animado */
.flyout {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  box-shadow:
    0 1px 1px rgba(15, 23, 42, 0.04),
    0 14px 28px -10px rgba(15, 23, 42, 0.18),
    0 36px 64px -24px rgba(15, 23, 42, 0.26);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.985);
  transform-origin: top center;
  transition:
    opacity 0.22s ease,
    transform 0.34s cubic-bezier(0.2, 0.9, 0.3, 1),
    visibility 0.34s;
}

/* Barra tricolor superior (identidad Colombia) */
.flyout::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--co-yellow) 0 33%,
    var(--co-blue) 33% 66%,
    var(--co-red) 66%);
  z-index: 2;
}

.nav__item:hover .flyout,
.nav__item:focus-within .flyout {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* ---- Variante MEGA ---- */
.flyout--mega {
  width: 344px;
  padding: 14px;
}
.flyout--mega.flyout--has-feature {
  width: 600px;
  padding: 0;
  display: grid;
  grid-template-columns: 226px 1fr;
}
.flyout--mega.flyout--has-feature .flyout-list {
  padding: 14px;
}

/* ---- Variante DROPDOWN ---- */
.flyout--drop {
  width: 340px;
  padding: 12px;
}

/* Lista de filas */
.flyout-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Fila */
.flyout-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 10px 12px;
  border-radius: 13px;
  text-decoration: none;
  color: inherit;
  transition: background 0.16s ease;
}
.flyout-row:hover,
.flyout-row:focus-visible {
  background: color-mix(in srgb, var(--row-accent) 8%, white);
  outline: none;
}

/* Chip de icono */
.flyout-row__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--row-accent) 12%, white);
  color: var(--row-accent);
  border: 1px solid color-mix(in srgb, var(--row-accent) 16%, transparent);
  transition: transform 0.18s ease, background 0.16s ease;
}
.flyout-row__icon svg { width: 20px; height: 20px; }
.flyout-row:hover .flyout-row__icon {
  background: color-mix(in srgb, var(--row-accent) 18%, white);
  transform: scale(1.06);
}

/* Avatar (foto de candidato) con anillo de color de partido */
.flyout-row__avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 2px;
  background: var(--row-accent);
  box-shadow: 0 3px 9px -3px color-mix(in srgb, var(--row-accent) 65%, transparent);
  transition: transform 0.18s ease;
}
.flyout-row:hover .flyout-row__avatar { transform: scale(1.06); }
.flyout-row__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border: 2px solid #fff;
  background: var(--surface-tertiary);
}

/* Texto */
.flyout-row__text { min-width: 0; }
.flyout-row__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.flyout-row__desc {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.35;
}

/* Badge "Nuevo" */
.flyout-row__badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--co-blue);
  background: var(--blue-100);
}

/* Flecha (aparece al hover) */
.flyout-row__arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  color: var(--gray-300);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease;
}
.flyout-row__arrow svg { width: 18px; height: 18px; }
.flyout-row:hover .flyout-row__arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--row-accent);
}

/* ---- Panel destacado (mega) ---- */
.flyout-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  text-decoration: none;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(155deg,
      var(--feat-accent) 0%,
      color-mix(in srgb, var(--feat-accent) 76%, #0b1224) 100%);
}
.flyout-feature__glow {
  position: absolute;
  top: -42%;
  right: -32%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.30), transparent 70%);
  pointer-events: none;
}
.flyout-feature__eyebrow {
  position: relative;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.72);
}
.flyout-feature__title {
  position: relative;
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.flyout-feature__desc {
  position: relative;
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}
.flyout-feature__cta {
  position: relative;
  margin-top: auto;
  padding-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.flyout-feature__cta-arrow {
  display: inline-flex;
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}
.flyout-feature__cta-arrow svg { width: 15px; height: 15px; }
.flyout-feature:hover .flyout-feature__cta-arrow {
  transform: translate(2px, -2px);
}

/* Entrada escalonada de las filas */
.nav__item:hover .flyout-row,
.nav__item:focus-within .flyout-row {
  animation: flyout-row-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1) backwards;
}
.flyout-list .flyout-row:nth-child(1) { animation-delay: 0.03s; }
.flyout-list .flyout-row:nth-child(2) { animation-delay: 0.07s; }
.flyout-list .flyout-row:nth-child(3) { animation-delay: 0.11s; }
.flyout-list .flyout-row:nth-child(4) { animation-delay: 0.15s; }
@keyframes flyout-row-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Respeta prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .flyout,
  .flyout-row,
  .flyout-row__icon,
  .flyout-row__avatar,
  .flyout-row__arrow,
  .flyout-feature__cta-arrow {
    transition: none;
    animation: none;
  }
}

/* ================================================
   COMPONENTE: BOTONES
   Variantes: primary, secondary, ghost, danger
   Tamaños: sm, md, lg
   ================================================ */

/* Botón Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Tamaños */
.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--radius-md);
}

.btn--md {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: var(--radius-lg);
}

.btn--lg {
  padding: 14px 24px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

/* Variante: Primary */
.btn--primary {
  color: white;
  background: linear-gradient(135deg, var(--co-blue), var(--blue-800));
  box-shadow: 0 4px 14px rgba(0, 56, 147, 0.3);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 56, 147, 0.4);
}

.btn--primary:active {
  transform: translateY(0);
}

/* Variante: Secondary */
.btn--secondary {
  color: var(--text-primary);
  background: white;
  border: 1.5px solid var(--border-medium);
}

.btn--secondary:hover {
  background: var(--surface-tertiary);
  border-color: var(--gray-300);
}

/* Variante: Ghost */
.btn--ghost {
  color: var(--text-secondary);
  background: transparent;
}

.btn--ghost:hover {
  color: var(--text-primary);
  background: var(--surface-tertiary);
}

/* Variante: Danger */
.btn--danger {
  color: white;
  background: linear-gradient(135deg, var(--danger), #dc2626);
}

.btn--danger:hover {
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

/* ================================================
   COMPONENTE: CARDS
   Variantes: default, outlined, elevated
   ================================================ */

.card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.card--elevated {
  box-shadow: var(--shadow-lg);
  border: none;
}

.card--outlined {
  border: 2px solid var(--border-medium);
}

.card__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.card__body {
  padding: 24px;
}

.card__footer {
  padding: 16px 24px;
  background: var(--surface-secondary);
  border-top: 1px solid var(--border-light);
}

/* ================================================
   COMPONENTE: BADGES
   ================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.badge--blue {
  color: var(--blue-700);
  background: var(--blue-100);
}

.badge--green {
  color: #047857;
  background: #d1fae5;
}

.badge--red {
  color: #b91c1c;
  background: #fee2e2;
}

.badge--yellow {
  color: #92400e;
  background: #fef3c7;
}

.badge--gray {
  color: var(--text-secondary);
  background: var(--surface-tertiary);
}

/* ================================================
   COMPONENTE: INPUTS
   ================================================ */
.input {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: white;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  transition: all 0.15s;
}

.input::placeholder {
  color: var(--text-tertiary);
}

.input:hover {
  border-color: var(--gray-400);
}

.input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ================================================
   UTILIDADES
   ------------------------------------------------
   Las utilidades genéricas (.flex, .text-*, .bg-*,
   .p-*, .container, etc.) las genera Tailwind en
   output.css. No se redefinen aquí para no pisar
   la cascada de Tailwind.
   ================================================ */

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle__line {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.menu-toggle--active .menu-toggle__line:first-child {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle--active .menu-toggle__line:nth-child(2) {
  opacity: 0;
}

.menu-toggle--active .menu-toggle__line:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

/* ================================================
   COMPONENTE: MOBILE NAV
   ================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 40;
  overflow-y: auto;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--co-blue);
  color: white;
  padding: 8px 16px;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}

/* ================================================
   COMPONENTE: ACORDEÓN DE FUNCIONES (home)
   Lista colapsable para ahorrar espacio vertical.
   ================================================ */
.feat-acc {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feat-acc__item {
  --acc: var(--co-blue);
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
.feat-acc__item.open {
  border-color: color-mix(in srgb, var(--acc) 38%, var(--border-light));
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--acc) 50%, transparent);
}

.feat-acc__header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.16s ease;
}
.feat-acc__header:hover {
  background: color-mix(in srgb, var(--acc) 5%, white);
}
.feat-acc__header:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--acc) 45%, white);
}

.feat-acc__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--acc) 12%, white);
  color: var(--acc);
  border: 1px solid color-mix(in srgb, var(--acc) 16%, transparent);
  transition: transform 0.18s ease;
}
.feat-acc__icon svg { width: 20px; height: 20px; }
.feat-acc__item.open .feat-acc__icon,
.feat-acc__header:hover .feat-acc__icon { transform: scale(1.06); }

.feat-acc__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.feat-acc__chevron {
  flex-shrink: 0;
  display: flex;
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), color 0.2s ease;
}
.feat-acc__chevron svg { width: 20px; height: 20px; }
.feat-acc__item.open .feat-acc__chevron {
  transform: rotate(180deg);
  color: var(--acc);
}

/* Panel animado con grid-template-rows (sin medir alturas en JS) */
.feat-acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.feat-acc__item.open .feat-acc__panel {
  grid-template-rows: 1fr;
}
.feat-acc__panel-inner {
  overflow: hidden;
  min-height: 0;
}

.feat-acc__desc {
  margin: 0;
  padding: 2px 18px 0 72px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.feat-acc__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 18px 18px 72px;
  font-size: 14px;
  font-weight: 600;
  color: var(--acc);
}
.feat-acc__link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}
.feat-acc__link:hover svg { transform: translateX(3px); }

@media (max-width: 560px) {
  .feat-acc__desc { padding-left: 18px; }
  .feat-acc__link { margin-left: 18px; }
  .feat-acc__title { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .feat-acc__item,
  .feat-acc__panel,
  .feat-acc__chevron,
  .feat-acc__icon,
  .feat-acc__link svg {
    transition: none;
  }
}

/* ================================================
   COMPONENTE: FOOTER (rediseño)
   Sobrescribe el footer base de output.css.
   ================================================ */
.footer {
  position: relative;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(0, 56, 147, 0.28) 0%, transparent 55%),
    linear-gradient(180deg, #0c162e 0%, #0a0f1f 100%);
  color: #94a3b8;
  padding: 56px 5% 40px;
  margin-top: auto;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--co-yellow) 0 33%,
    var(--co-blue) 33% 66%,
    var(--co-red) 66%);
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 48px;
  grid-template-columns: 2.2fr 1fr 1fr 1.1fr;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-col--brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Marca */
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  margin-bottom: 16px;
}
.footer-brand__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease;
}
.footer-brand__logo svg { display: block; width: 100%; height: 100%; }
.footer-brand:hover .footer-brand__logo { transform: scale(1.06) rotate(-3deg); }
.footer-brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.footer-brand__title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.footer-brand__sub {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin-top: 2px;
}
.footer-mission {
  font-size: 13.5px;
  line-height: 1.65;
  color: #7c8aa3;
  max-width: 380px;
  margin: 0;
}

/* Columnas de enlaces */
.footer h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #cbd5e1;
  margin: 0 0 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 11px; }
.footer ul a {
  position: relative;
  font-size: 13.5px;
  color: #8a99b3;
  text-decoration: none;
  transition: color 0.16s ease, padding-left 0.16s ease;
}
.footer ul a::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--co-yellow);
  transform: translateY(-50%) scale(0);
  transition: transform 0.16s ease;
}
.footer ul a:hover {
  color: #fff;
  padding-left: 12px;
}
.footer ul a:hover::before { transform: translateY(-50%) scale(1); }

/* Barra inferior */
.footer-bottom {
  max-width: 1200px;
  margin: 44px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #5a6b85;
  text-align: center;
  line-height: 1.7;
}

/* ================================================
   COMPONENTE: BARRA DE DISCLAIMER (rediseño)
   El texto va en un solo <p> para que fluya como
   párrafo (antes era flex y partía el texto en columnas).
   ================================================ */
.disclaimer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 11px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 13px 24px;
  background: #fdf6e3;
  border-bottom: 1px solid #f1e3b8;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.55;
}
.disclaimer__icon {
  flex-shrink: 0;
  display: flex;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: #d97706;
}
.disclaimer__icon svg { width: 18px; height: 18px; }
.disclaimer__text {
  margin: 0;
  max-width: 820px;
}
.disclaimer__text strong {
  color: var(--text-primary);
  font-weight: 600;
}
.disclaimer__link {
  color: #b45309;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.disclaimer__link:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .disclaimer { padding: 12px 18px; font-size: 12.5px; }
}

/* ================================================
   PÁGINAS DE CANDIDATO (.cdetail-*, .position-*, .hist-*)
   Estos estilos faltaban por completo: el perfil del
   candidato se mostraba sin formato. --ccolor = color
   del partido (lo pone render.js por candidato).
   ================================================ */

/* Hero: breadcrumb arriba, contenido a lo ancho */
.hero-candidato .page-hero-inner {
  display: block;
  max-width: 1100px;
}
.cdetail-hero-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.cdetail-avatar {
  width: 132px;
  height: 132px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  background: var(--ccolor, var(--co-blue));
  box-shadow: 0 10px 28px -10px var(--ccolor, var(--co-blue));
}
.cdetail-avatar-photo { padding: 4px; background: var(--ccolor, var(--co-blue)); }
.cdetail-avatar-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid #fff;
  display: block;
}
.cdetail-party {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ccolor, var(--co-blue));
  background: color-mix(in srgb, var(--ccolor, var(--co-blue)) 13%, white);
  padding: 4px 12px;
  border-radius: 999px;
}
.cdetail-hero-inner h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 46px);
  margin: 12px 0 4px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.cdetail-slogan {
  font-size: 16px;
  font-style: italic;
  color: var(--text-secondary);
  margin: 0 0 16px;
}
.cdetail-stats {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}
.cdetail-stats > div { display: flex; flex-direction: column; }
.cdetail-stats .num {
  font-size: 25px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.cdetail-stats .lab {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Cuerpo: grid principal + aside */
.cdetail-grid {
  max-width: 1100px;
  margin: 32px auto 0;
  padding: 0 5%;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) { .cdetail-grid { grid-template-columns: 1fr; } }
.cdetail-main, .cdetail-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cdetail-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 24px;
}
.cdetail-card h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0 0 14px;
  color: var(--text-primary);
}
.cdetail-card > p { color: var(--text-secondary); line-height: 1.65; margin: 0; }

/* Meta bio (dl) */
.hist-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin: 18px 0 0;
}
.hist-meta div { display: flex; flex-direction: column; }
.hist-meta dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  font-weight: 700;
}
.hist-meta dd { margin: 3px 0 0; font-size: 14px; color: var(--text-primary); line-height: 1.4; }

/* Propuestas */
.proposal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.proposal-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 14.5px;
}
.proposal-list svg { flex-shrink: 0; margin-top: 3px; color: var(--success); }

/* Línea de tiempo */
.hist-timeline { list-style: none; margin: 0; padding: 0; }
.hist-timeline li {
  position: relative;
  padding: 0 0 18px 22px;
  border-left: 2px solid var(--border-light);
}
.hist-timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.hist-timeline li::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--co-blue);
}
.hist-year { display: block; font-weight: 700; color: var(--co-blue); font-size: 13px; }
.hist-event { display: block; color: var(--text-secondary); font-size: 14px; margin-top: 3px; line-height: 1.5; }

/* Curiosidades */
.hist-facts { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 11px; }
.hist-facts li { color: var(--text-secondary); font-size: 14px; line-height: 1.55; }

/* Posturas en las 10 inquietudes */
.positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 5%;
}
.position-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px;
}
.position-card.is-winner {
  border-color: color-mix(in srgb, var(--ccolor, var(--co-blue)) 45%, var(--border-light));
  box-shadow: 0 10px 24px -12px var(--ccolor, var(--co-blue));
}
.position-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.position-num { font-size: 12px; font-weight: 800; color: var(--ccolor, var(--co-blue)); }
.position-card h3 { font-size: 15px; margin: 0; flex: 1; color: var(--text-primary); line-height: 1.3; }
.position-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #047857;
  background: #d1fae5;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.position-card > p { font-size: 14px; color: var(--text-secondary); line-height: 1.55; margin: 0 0 14px; }
.position-card footer { display: flex; align-items: center; gap: 10px; }
.position-meter {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-tertiary);
  overflow: hidden;
}
.position-meter span { display: block; height: 100%; border-radius: 999px; }
.position-score { font-size: 13px; font-weight: 700; color: var(--text-primary); }

/* ================================================
   HERO · mini-maquetas de los slides 2–4
   Reemplazan el icono suelto por una vista que
   ilustra el mensaje de cada slide.
   ================================================ */
.hero-mock {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 22px;
  box-shadow:
    0 24px 48px -22px rgba(15, 23, 42, 0.28),
    0 2px 8px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.hero-mock__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}
.hmk-foot {
  font-size: 11.5px;
  color: var(--text-tertiary);
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

/* Slide 2 · candidatos */
.hmk-cand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--surface-secondary);
}
.hmk-cand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid var(--c, var(--co-blue));
  flex-shrink: 0;
}
.hmk-cand span { display: flex; flex-direction: column; min-width: 0; }
.hmk-cand strong { font-size: 14px; color: var(--text-primary); line-height: 1.2; }
.hmk-cand small { font-size: 12px; color: var(--text-tertiary); margin-top: 1px; }

/* Slide 3 · barras de solidez */
.hmk-bar { display: flex; align-items: center; gap: 10px; }
.hmk-bar .nm { font-size: 12.5px; color: var(--text-secondary); width: 76px; flex-shrink: 0; }
.hmk-bar .track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-tertiary);
  overflow: hidden;
}
.hmk-bar .track i { display: block; height: 100%; border-radius: 999px; }
.hmk-bar b { font-size: 13px; font-weight: 700; color: var(--text-primary); width: 26px; text-align: right; }

/* Slide 4 · feed en vivo */
.hmk-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ce1126;
  flex-shrink: 0;
  animation: hmk-pulse 1.8s infinite;
}
@keyframes hmk-pulse {
  0% { box-shadow: 0 0 0 0 rgba(206, 17, 38, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(206, 17, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(206, 17, 38, 0); }
}
.hmk-news { display: flex; align-items: center; gap: 12px; }
.hmk-news .src { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; opacity: 0.9; }
.hmk-news .ln { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.hmk-news .ln i { display: block; height: 8px; border-radius: 999px; background: var(--surface-tertiary); }

@media (prefers-reduced-motion: reduce) {
  .hmk-live { animation: none; }
}

/* ================================================
   CONTENIDO · artículos (.prose) y avisos (.callout)
   Faltaba el CSS: las páginas de texto (acerca,
   denuncias, datos, contacto) salían sin formato.
   ================================================ */
.prose {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 16.5px;
  line-height: 1.75;
}
.prose > h2 {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 50px 0 16px;
}
.prose > h2:first-child { margin-top: 4px; }
.prose > h2::before {
  content: '';
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--co-yellow), var(--co-blue), var(--co-red));
  margin-bottom: 16px;
}
.prose h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 30px 0 10px;
}
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose em { color: var(--text-primary); }
.prose a {
  color: var(--blue-600);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--blue-600) 35%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.prose a:hover { color: var(--blue-700); border-bottom-color: var(--blue-600); }
.prose hr {
  border: none;
  height: 1px;
  background: var(--border-light);
  margin: 44px 0;
}

/* Listas con marcadores propios */
.prose ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.prose ul > li {
  position: relative;
  padding-left: 26px;
  line-height: 1.65;
}
.prose ul > li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--co-blue);
}
.prose ol {
  padding-left: 24px;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.prose ol > li { padding-left: 6px; line-height: 1.65; }
.prose ol > li::marker { color: var(--co-blue); font-weight: 800; }

/* Avisos / callouts */
.callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--blue-50);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--co-blue);
  margin: 26px 0;
  line-height: 1.6;
  color: var(--text-secondary);
}
.callout > div:not(.callout-icon) { flex: 1; min-width: 0; }
.callout strong { color: var(--text-primary); }
.callout a { color: var(--blue-700); font-weight: 600; }
.callout-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--co-blue);
  color: #fff;
}
.callout.success { background: #ecfdf5; border-left-color: #10b981; }
.callout.success .callout-icon { background: #10b981; }
.callout.warning { background: #fffbeb; border-left-color: #f59e0b; }
.callout.warning .callout-icon { background: #f59e0b; }
.callout.danger { background: #fef2f2; border-left-color: #ef4444; }
.callout.danger .callout-icon { background: #ef4444; }
