
  :root {
    --verde: #0F3D2E;
    --verde-claro: #1B5E47;
    --crema: #F5F0E6;
    --crema-oscuro: #E8DFCC;
    --dorado: #B89968;
    --dorado-claro: #D4B98A;
    --tinta: #1A1A1A;
    --papel: #FAF7F1;
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--papel);
    color: var(--tinta);
    overflow-x: hidden;
  }

  /* Textura de grano sutil — evita que se sienta "plano digital" */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  h1, h2, h3, .serif {
    font-family: 'Fraunces', Georgia, serif;
    font-feature-settings: "ss01", "ss02";
    letter-spacing: -0.02em;
  }

  .text-shadow-soft { text-shadow: 0 2px 12px rgba(0,0,0,0.15); }

.hero-bg {
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-claro) 100%);
  position: relative;
  height: 100vh;
  height: 100svh;          /* ← height en vez de min-height */
  display: flex;
  align-items: center;
  overflow: hidden;        /* ← evita que la imagen desborde */
}

  .hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 80% 20%, rgba(184,153,104,0.18), transparent 50%);
    pointer-events: none;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    align-items: center;
  }
  /* En mobile la imagen va arriba, el texto abajo */
  .hero-grid > *:first-child { order: 2; }
  .hero-grid > *:last-child  { order: 1; }
  @media (min-width: 768px) {
    .hero-grid { grid-template-columns: 0.9fr 1.1fr; gap: 3rem; }
    .hero-grid > *:first-child { order: 1; }
    .hero-grid > *:last-child  { order: 2; }
  }
  .hero-image-wrap {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    aspect-ratio: 3 / 4;
    overflow: visible;
  }
  @media (min-width: 640px) {
    .hero-image-wrap { max-width: 360px; }
  }
  @media (min-width: 768px) {
    .hero-image-wrap { max-width: 420px; }
  }
  @media (min-width: 1024px) {
    .hero-image-wrap { max-width: 480px; }
  }
  @media (min-width: 1280px) {
    .hero-image-wrap { max-width: 520px; }
  }
  @media (min-width: 1536px) {
    .hero-image-wrap { max-width: 580px; }
  }
  .hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    filter: contrast(1.05);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  }
  /* Borde dorado siguiendo el recorte */
  .hero-image-border { display: none; }
  /* Tarjeta flotante con info del candidato */
  .hero-badge {
    position: absolute;
    bottom: 8%;
    left: -1rem;
    background: var(--crema);
    color: var(--verde);
    padding: 1rem 1.2rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    max-width: 240px;
    z-index: 5;
  }
  /* Acentos decorativos en esquinas */
  .hero-accent {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 1.5px solid var(--dorado);
    pointer-events: none;
    z-index: 2;
  }
  .hero-accent.tl { top: 1rem; left: 1rem; border-right: none; border-bottom: none; }
  .hero-accent.br { bottom: 1rem; right: 1rem; border-left: none; border-top: none; }

  /* Botones */
  .btn-primary {
    background: var(--dorado);
    color: var(--verde);
    font-weight: 600;
    transition: all 0.25s ease;
    border: 1px solid var(--dorado);
  }
  .btn-primary:hover {
    background: var(--dorado-claro);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -10px rgba(184,153,104,0.6);
  }

  .btn-ghost {
    border: 1.5px solid var(--crema);
    color: var(--crema);
    transition: all 0.25s ease;
  }
  .btn-ghost:hover {
    background: var(--crema);
    color: var(--verde);
  }

  /* Pirámide jerárquica */
  .pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }
  .pyramid-level {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
  }
  .pyramid-level::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: 0;
  }
  .pyramid-level:hover::before { transform: translateX(0); }
  .pyramid-level:hover { transform: translateY(-3px); }
  .pyramid-level > * { position: relative; z-index: 1; }

  /* Tabs de propuestas */
  .tab-btn {
    transition: all 0.25s ease;
    border-bottom: 2px solid transparent;
  }
  .tab-btn.active {
    border-bottom-color: var(--dorado);
    color: var(--verde);
  }

  /* Acordeón plan de gobierno */
  .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  .accordion-content.open { max-height: 800px; }
  .accordion-icon { transition: transform 0.3s ease; }
  .accordion-icon.open { transform: rotate(45deg); }

  /* Cards */
  .card {
    background: white;
    border: 1px solid rgba(15,61,46,0.08);
    transition: all 0.3s ease;
  }
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(15,61,46,0.25);
    border-color: var(--dorado);
  }

  /* ===== ENCUESTAS estilo card blanca centrada (mockup) ===== */
  .poll-card {
    background: #ffffff;
    color: var(--tinta);
    border-radius: 16px;
    padding: 2.25rem 2rem;
    box-shadow: 0 25px 60px -25px rgba(15,61,46,0.18), 0 4px 14px -6px rgba(0,0,0,0.06);
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    min-height: 380px;
    display: flex;
    flex-direction: column;
  }
  .poll-segments {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 1.5rem;
  }
  .poll-seg {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    transition: background 0.4s ease;
  }
  .poll-seg.active { background: var(--dorado); }
  .poll-counter {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
  }
  .poll-question {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1.3;
    color: var(--verde);
    margin-bottom: 1.75rem;
  }
  .poll-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  @media (max-width: 520px) {
    .poll-grid { grid-template-columns: 1fr; }
  }
  .poll-opt {
    cursor: pointer;
    background: #fafaf9;
    border: 1.5px solid #e5e7eb;
    border-radius: 999px;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    color: #374151;
    transition: all 0.2s ease;
    text-align: center;
    user-select: none;
  }
  .poll-opt:hover { border-color: var(--verde); color: var(--verde); }
  .poll-opt.selected {
    background: var(--verde);
    border-color: var(--verde);
    color: #ffffff;
  }
  .poll-final {
    text-align: center;
    padding: 1rem 0;
    margin: auto;
  }
  .poll-final-icon {
    width: 72px; height: 72px;
    margin: 0 auto 1.25rem;
    background: #fff;
    border: 2.5px solid var(--verde);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
  }
  .poll-final-icon svg { width: 32px; height: 32px; color: var(--verde); }
  .poll-final h3 {
    font-family: 'Fraunces', serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--verde);
    margin-bottom: 0.5rem;
  }
  .poll-final p { color: #6b7280; font-size: 0.95rem; }
  .poll-cta-final {
    margin-top: 1.5rem;
    background: transparent;
    border: none;
    color: var(--dorado);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  .poll-cta-final:hover { color: var(--verde); }
  .poll-progress {
    height: 3px;
    background: rgba(15,61,46,0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1.25rem;
  }
  .poll-progress-bar {
    height: 100%;
    background: var(--verde);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  /* (legacy styles de la versión anterior — ya no se usan, pero los dejo para no romper nada) */
  .poll-stage {
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 8px;
    padding: 1.75rem;
    box-shadow: 0 25px 50px -20px rgba(0,0,0,0.4);
    position: relative;
    min-height: 420px;
  }
  .poll-counter {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dorado);
    font-weight: 600;
    margin-bottom: 0.5rem;
  }
  .poll-question {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1.35;
    color: var(--verde);
    margin-bottom: 1.5rem;
  }
  .poll-options { display: grid; gap: 1rem; }
  .poll-item { cursor: pointer; }
  .poll-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: #4a4a4a;
    transition: color 0.2s;
  }
  .poll-item.user-vote .poll-item-head {
    color: var(--verde);
    font-weight: 700;
  }
  .poll-item-label { flex: 1; }
  .poll-item-tag {
    font-size: 0.7rem;
    color: var(--verde);
    font-weight: 600;
    margin-left: 0.4rem;
  }
  .poll-item-pct {
    font-weight: 700;
    color: #4a4a4a;
    font-variant-numeric: tabular-nums;
  }
  .poll-item.user-vote .poll-item-pct { color: var(--verde); }
  .poll-bar-track {
    height: 8px;
    background: rgba(15,61,46,0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
  }
  .poll-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .poll-item.user-vote .poll-bar-fill { background: var(--verde); }
  .poll-item.show-results:not(.user-vote) .poll-bar-fill { background: #9ca3af; }
  .poll-item:not(.show-results):hover .poll-item-head { color: var(--verde); }
  .poll-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(15,61,46,0.08);
  }
  .poll-cta {
    background: var(--verde);
    color: white;
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.25s ease;
  }
  .poll-cta:hover:not(:disabled) {
    background: var(--verde-claro);
    transform: translateY(-1px);
  }
  .poll-cta:disabled { opacity: 0.4; cursor: not-allowed; }
  .poll-skip {
    color: #999;
    font-size: 0.8rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
  }
  .poll-skip:hover { color: var(--verde); }
  .poll-counter-mini {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  /* Mensaje de éxito */
  .poll-success {
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: #ecfdf5;
    color: #047857;
    border-radius: 4px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    animation: slideIn 0.4s ease;
  }
  @keyframes slideIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
  }
  /* Animación de entrada entre preguntas */
  .poll-stage.entering .poll-question,
  .poll-stage.entering .poll-item { opacity: 0; transform: translateY(8px); }
  .poll-stage .poll-question,
  .poll-stage .poll-item { transition: opacity 0.35s ease, transform 0.35s ease; }
  .poll-stage .poll-item:nth-child(1) { transition-delay: 0.04s; }
  .poll-stage .poll-item:nth-child(2) { transition-delay: 0.08s; }
  .poll-stage .poll-item:nth-child(3) { transition-delay: 0.12s; }
  .poll-stage .poll-item:nth-child(4) { transition-delay: 0.16s; }
  /* Final screen */
  .poll-final { text-align: center; padding: 1rem 0; }
  .poll-final-icon {
    width: 72px; height: 72px;
    margin: 0 auto 1rem;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #047857;
  }
  .poll-mini-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem; margin-top: 1.25rem;
  }
  .poll-mini-stat {
    background: rgba(15,61,46,0.04);
    padding: 0.6rem; border-radius: 4px; text-align: center;
  }
  .poll-mini-stat-num {
    font-family: 'Fraunces', serif; font-weight: 800; font-size: 1.3rem; color: var(--verde);
  }
  .poll-mini-stat-label {
    font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: #999;
  }

  /* Etiquetas categorías */
  .tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 2px;
  }
  .tag-seguridad { background: #FEE2E2; color: #991B1B; }
  .tag-educacion { background: #DBEAFE; color: #1E3A8A; }
  .tag-salud { background: #D1FAE5; color: #065F46; }
  .tag-empleo { background: #FEF3C7; color: #92400E; }
  .tag-ambiente { background: #D1FAE5; color: #047857; }
  .tag-default { background: #E5E7EB; color: #374151; }

  /* Foto con marco de color */
  .photo-frame {
    position: relative;
    display: inline-block;
  }
  .photo-frame::after {
    content: "";
    position: absolute;
    inset: -10px -10px 10px 10px;
    border: 2px solid var(--dorado);
    z-index: -1;
  }

  /* Navbar */
  .nav-link {
    position: relative;
    transition: color 0.2s ease;
  }
  .nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: var(--dorado);
    transition: width 0.3s ease;
  }
  .nav-link:hover::after { width: 100%; }

  /* Admin panel */
  #admin-panel {
    position: fixed;
    bottom: 1rem; right: 1rem;
    z-index: 50;
    max-width: 380px;
    max-height: 70vh;
    overflow-y: auto;
    display: none;
  }
  #admin-panel.visible { display: block; }

  /* Scroll con colores/estilos naturales del navegador (sin custom) */
  /* (Se omiten reglas ::-webkit-scrollbar y scrollbar-color a propósito) */
  html { scrollbar-color: auto; }

  /* Acento decorativo */
  .accent-line {
    width: 60px; height: 3px;
    background: var(--dorado);
  }

  /* Mapa */
  #mapa-problemas { height: 460px; border-radius: 4px; z-index: 0; }

  /* Calendario overrides */
  .fc { font-family: 'Inter', sans-serif; }
  .fc-event { cursor: pointer; }
  .fc .fc-button-primary {
    background: var(--verde);
    border: none;
  }
  .fc .fc-button-primary:hover { background: var(--verde-claro); }
  .fc .fc-button-primary:disabled { background: #999; }

  /* Subrayado hand-drawn */
  .hand-underline {
    background-image: linear-gradient(transparent 70%, rgba(184,153,104,0.4) 70%, rgba(184,153,104,0.4) 90%, transparent 90%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }

  /* ================== NUEVOS ESTILOS REESTRUCTURADOS ================== */

  /* Selector de Nivel (Candidatos + Propuestas) */
  .level-select-btn {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .level-select-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .level-select-btn.active {
    border-color: var(--dorado);
    background-color: var(--verde) !important;
  }
  .level-panel {
    animation: fadeIn 0.45s ease;
  }

  /* Pestañas de Participación */
  .participa-tab-btn {
    background: white;
    border: 1px solid rgba(15, 61, 46, 0.1);
    color: var(--verde);
    font-weight: 600;
    transition: all 0.3s ease;
  }
  .participa-tab-btn:hover {
    background: var(--crema);
    transform: translateY(-1px);
  }
  .participa-tab-btn.active {
    background: var(--verde);
    color: var(--crema);
    border-color: var(--verde);
    box-shadow: 0 4px 12px rgba(15, 61, 46, 0.2);
  }
  .participa-panel {
    animation: fadeIn 0.45s ease;
  }

  /* Pestañas de Redes Sociales (Agenda) */
  .social-tab-btn {
    color: #6b7280;
    transition: all 0.25s ease;
  }
  .social-tab-btn.active {
    background: white;
    color: var(--verde);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  .social-panel {
    animation: fadeIn 0.45s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Ajustar tamaño de embeds de Instagram para evitar overflow en columnas angostas */
  .instagram-media, .instagram-media iframe {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Barra de scroll delgada y discreta para el listado de propuestas */
  .custom-scrollbar::-webkit-scrollbar {
    width: 5px;
  }
  .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 99px;
  }
  .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(184, 153, 104, 0.25);
    border-radius: 99px;
  }
  .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 153, 104, 0.5);
  }
  .custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 153, 104, 0.25) rgba(255, 255, 255, 0.03);
  }

 