El INE bajo la lupa


<!-- LITERAL MÉXICO | ESPECIAL INE -->
<div id="literal-ine">

  <header class="li-header">
    <div class="li-wrap li-header-inner">
      <a href="https://literalmex.com/" class="li-brand"
         aria-label="Ir a la portada de Literal México">
        <img id="li-logo" alt="Literal México" hidden>
        <span id="li-brand-text">
          LITERAL <b>MÉXICO</b>
          <small>PERIODISMO Y ANÁLISIS</small>
        </span>
      </a>
      <a class="li-home" href="https://literalmex.com/">
        ⌂ &nbsp; INICIO
      </a>
    </div>
  </header>

  <nav class="li-nav" aria-label="Menú del especial">
    <div class="li-wrap li-nav-inner">
      <button data-filter="all" class="li-active">
        Toda la cobertura
      </button>
      <button data-filter="taddei">
        Guadalupe Taddei
      </button>
      <button data-filter="ine">INE</button>
      <button data-filter="proveedor">
        José Alfredo Hernández
      </button>
      <a href="#li-search-area">⌕ Buscar</a>
    </div>
  </nav>

  <section class="li-hero">
    <div class="li-wrap">
      <div class="li-eyebrow">
        <span></span> INVESTIGACIÓN ESPECIAL
      </div>
      <h1>EL INE<br><em>BAJO LA LUPA</em></h1>
      <p>
        Guadalupe Taddei, contratos, proveedores y poder político.
        Las investigaciones, controversias y decisiones
        que rodean al árbitro electoral mexicano.
      </p>
      <div class="li-hero-bottom">
        <span>PERIODISMO • INVESTIGACIÓN • OPINIÓN</span>
        <a href="#li-news">EXPLORAR COBERTURA ↓</a>
      </div>
    </div>
  </section>

  <main id="li-news" class="li-wrap li-main">

    <div class="li-section-top">
      <div>
        <span class="li-red-label">ARCHIVO PERIODÍSTICO</span>
        <h2 id="li-section-name">Toda la cobertura</h2>
      </div>
      <span id="li-count" class="li-count"></span>
    </div>

    <div id="li-search-area" class="li-tools">
      <input id="li-search" type="search"
        placeholder="Buscar noticias, nombres o investigaciones..."
        aria-label="Buscar publicaciones">
      <select id="li-sort" aria-label="Ordenar publicaciones">
        <option value="desc">Más recientes</option>
        <option value="asc">Más antiguas</option>
      </select>
    </div>

    <p id="li-status" role="status" aria-live="polite">
      Cargando publicaciones...
    </p>

    <div id="li-featured"></div>

    <div id="li-grid-heading" class="li-grid-heading" hidden>
      <h3>Más noticias y análisis</h3>
      <span>ARCHIVO DE INVESTIGACIÓN</span>
    </div>

    <div id="li-grid" class="li-grid"></div>

    <div class="li-load-wrap">
      <button id="li-more" hidden>Cargar más publicaciones ↓</button>
    </div>

  </main>

  <section class="li-editorial">
    <div class="li-wrap li-editorial-inner">
      <div>
        <span class="li-red-label">LITERAL MÉXICO</span>
        <h2>El poder debe rendir cuentas.</h2>
        <p>
          Información, contexto y análisis para entender
          las decisiones que afectan la democracia mexicana.
        </p>
      </div>
      <a href="https://literalmex.com/">IR A LA PORTADA ↗</a>
    </div>
  </section>

  <footer class="li-footer">
    <div class="li-wrap li-footer-inner">
      <strong>LITERAL MÉXICO</strong>
      <span>Periodismo y análisis</span>
      <a href="https://literalmex.com/">Volver al inicio ↑</a>
    </div>
  </footer>
</div>

<style>
#literal-ine {
  --red:#c62239;
  --dark:#111722;
  --gray:#657081;
  --line:#e3e6eb;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--dark);
  background:white;
  font-size:16px;
  line-height:1.6;
  width:100%;
}

#literal-ine *,
#literal-ine *:before,
#literal-ine *:after {box-sizing:border-box}

#literal-ine a {text-decoration:none}
#literal-ine button {cursor:pointer}
#literal-ine .li-wrap {
  max-width:1240px;
  width:92%;
  margin:auto;
}

/* LOGOTIPO Y CABECERA */
#literal-ine .li-header {
  background:#111722;
  color:white;
}
#literal-ine .li-header-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:25px;
  min-height:92px;
}
#literal-ine .li-brand {
  display:flex;
  align-items:center;
  color:white;
  font-weight:900;
  font-size:29px;
  letter-spacing:-1.2px;
  line-height:1;
}
#literal-ine .li-brand b {color:#ed4055}
#literal-ine .li-brand small {
  display:block;
  font-size:9px;
  font-weight:500;
  letter-spacing:3px;
  color:#b4bfcd;
  margin-top:9px;
}
#literal-ine #li-logo {
  max-height:66px;
  max-width:270px;
  width:auto;
  object-fit:contain;
}
#literal-ine .li-home {
  color:white;
  font-size:12px;
  font-weight:800;
  letter-spacing:1px;
  border:1px solid #505968;
  border-radius:5px;
  padding:10px 17px;
}

/* MENÚ */
#literal-ine .li-nav {background:#222c3b}
#literal-ine .li-nav-inner {
  display:flex;
  overflow-x:auto;
  align-items:stretch;
}
#literal-ine .li-nav button,
#literal-ine .li-nav a {
  display:flex;
  align-items:center;
  background:transparent;
  color:#cbd3de;
  border:0;
  border-bottom:3px solid transparent;
  white-space:nowrap;
  padding:16px 18px;
  font-size:13px;
  font-weight:700;
  font-family:inherit;
}
#literal-ine .li-nav a {margin-left:auto}
#literal-ine .li-nav button:hover,
#literal-ine .li-nav .li-active {
  color:white;
  border-bottom-color:#e23950;
}

/* HERO */
#literal-ine .li-hero {
  background:
    radial-gradient(ellipse at 85% 10%,
      rgba(206,35,59,.25),transparent 45%),
    linear-gradient(125deg,#1c293b,#0a0e17);
  color:white;
  padding:90px 0 55px;
  position:relative;
  overflow:hidden;
}
#literal-ine .li-hero:before {
  content:"INE";
  position:absolute;
  right:-25px;
  top:-70px;
  font-size:clamp(170px,31vw,450px);
  font-weight:900;
  color:rgba(255,255,255,.025);
  pointer-events:none;
}
#literal-ine .li-hero .li-wrap {
  position:relative;
}
#literal-ine .li-eyebrow {
  display:flex;
  align-items:center;
  gap:10px;
  color:#efb3bd;
  font-size:11px;
  font-weight:800;
  letter-spacing:2.5px;
}
#literal-ine .li-eyebrow span {
  height:8px;width:8px;
  border-radius:50%;
  background:#ec4055;
}
#literal-ine .li-hero h1 {
  font-family:Georgia,'Times New Roman',serif;
  font-size:clamp(55px,9vw,124px);
  font-weight:900;
  line-height:.96;
  letter-spacing:-3px;
  color:white;
  margin:31px 0;
}
#literal-ine .li-hero h1 em {
  color:#ee4458;
  font-style:normal;
}
#literal-ine .li-hero p {
  color:#c2cbda;
  font-size:clamp(17px,2vw,21px);
  max-width:730px;
  line-height:1.65;
  margin:0 0 55px;
}
#literal-ine .li-hero-bottom {
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:15px;
  border-top:1px solid #465165;
  padding-top:23px;
  font-size:11px;
  letter-spacing:1.6px;
  color:#aab5c6;
}
#literal-ine .li-hero-bottom a {
  color:white;
  font-weight:800;
  letter-spacing:0;
}

/* CONTENIDO */
#literal-ine .li-main {padding:68px 0 85px}
#literal-ine .li-section-top {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:25px;
  margin-bottom:28px;
}
#literal-ine .li-red-label {
  color:var(--red);
  font-size:11px;
  letter-spacing:2px;
  font-weight:800;
}
#literal-ine .li-section-top h2 {
  font-family:Georgia,serif;
  font-size:clamp(32px,4vw,48px);
  line-height:1.2;
  margin:8px 0 0;
  color:var(--dark);
}
#literal-ine .li-count {
  color:var(--gray);
  font-size:13px;
  white-space:nowrap;
  padding-bottom:7px;
}
#literal-ine .li-tools {
  display:grid;
  grid-template-columns:1fr 210px;
  gap:12px;
  background:#f5f6f8;
  border:1px solid var(--line);
  padding:15px;
  border-radius:8px;
  margin-bottom:35px;
}
#literal-ine .li-tools input,
#literal-ine .li-tools select {
  display:block;
  width:100%;
  min-width:0;
  padding:13px 15px;
  background:white;
  border:1px solid #dce0e6;
  border-radius:5px;
  color:#17202d;
  font:inherit;
  font-size:14px;
}
#literal-ine #li-status {
  color:var(--gray);
  font-size:14px;
  margin:15px 0;
}
#literal-ine #li-status:empty {display:none}

/* ARTÍCULO PRINCIPAL */
#literal-ine .li-feature {
  display:grid;
  grid-template-columns:1.2fr 1fr;
  background:#172131;
  color:white;
  border-radius:9px;
  overflow:hidden;
  margin-bottom:50px;
}
#literal-ine .li-feature-image {
  display:block;
  height:100%;
  min-height:380px;
  background:#344155;
  overflow:hidden;
}
#literal-ine .li-feature-image img {
  width:100%;
  height:100%;
  min-height:380px;
  display:block;
  object-fit:cover;
  transition:transform .3s;
}
#literal-ine .li-feature:hover img,
#literal-ine .li-card:hover img {
  transform:scale(1.035);
}
#literal-ine .li-feature-body {
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:clamp(25px,4vw,50px);
}
#literal-ine .li-category {
  color:#e3485b;
  font-size:11px;
  font-weight:800;
  letter-spacing:1.6px;
  text-transform:uppercase;
}
#literal-ine .li-feature h3 {
  font-family:Georgia,serif;
  font-size:clamp(26px,3vw,40px);
  line-height:1.17;
  margin:17px 0;
}
#literal-ine .li-feature h3 a {color:white}
#literal-ine .li-feature p {
  color:#c7d0dc;
  font-size:15px;
  line-height:1.7;
}
#literal-ine .li-date {
  color:#8c96a4;
  font-size:12px;
}
#literal-ine .li-feature .li-date {color:#c0cad8}
#literal-ine .li-read {
  display:inline-block;
  color:#df344b;
  font-size:13px;
  font-weight:800;
  margin-top:18px;
}

/* CUADRÍCULA */
#literal-ine .li-grid-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  border-bottom:2px solid #172131;
  padding-bottom:14px;
  margin-bottom:28px;
}
#literal-ine .li-grid-heading h3 {
  font-family:Georgia,serif;
  font-size:27px;
  margin:0;
}
#literal-ine .li-grid-heading span {
  color:#8992a0;
  font-size:10px;
  letter-spacing:1.5px;
}
#literal-ine .li-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:38px 25px;
}
#literal-ine .li-card {
  border-bottom:1px solid var(--line);
  padding-bottom:25px;
  min-width:0;
}
#literal-ine .li-card-image {
  display:block;
  aspect-ratio:16/10;
  background:#e3e8ef;
  border-radius:7px;
  overflow:hidden;
  margin-bottom:18px;
}
#literal-ine .li-card-image img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .3s;
}
#literal-ine .li-card h3 {
  font-family:Georgia,serif;
  font-size:23px;
  line-height:1.3;
  margin:11px 0;
}
#literal-ine .li-card h3 a {color:#151d29}
#literal-ine .li-card h3 a:hover {color:var(--red)}
#literal-ine .li-card p {
  color:#657081;
  font-size:14px;
  line-height:1.7;
}
#literal-ine .li-load-wrap {
  text-align:center;
  margin-top:45px;
}
#literal-ine #li-more {
  background:#172131;
  color:white;
  border:0;
  border-radius:5px;
  padding:15px 32px;
  font-weight:800;
  font-size:14px;
}
#literal-ine #li-more:hover {background:var(--red)}
#literal-ine .li-noimage {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  min-height:180px;
  padding:20px;
  background:#28374b;
  color:#b8c5d5;
  font-weight:800;
  font-size:16px;
  text-align:center;
  letter-spacing:2px;
}

/* CIERRE Y FOOTER */
#literal-ine .li-editorial {
  background:#f3f4f6;
  padding:60px 0;
  border-top:1px solid var(--line);
}
#literal-ine .li-editorial-inner {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:30px;
}
#literal-ine .li-editorial h2 {
  font-family:Georgia,serif;
  font-size:clamp(29px,4vw,43px);
  margin:12px 0;
}
#literal-ine .li-editorial p {
  color:#657081;
  max-width:650px;
}
#literal-ine .li-editorial a {
  background:var(--red);
  color:white;
  font-size:13px;
  font-weight:800;
  padding:16px 23px;
  border-radius:5px;
  white-space:nowrap;
}
#literal-ine .li-footer {
  background:#111722;
  padding:25px 0;
  color:#aeb8c7;
}
#literal-ine .li-footer-inner {
  display:flex;
  align-items:center;
  gap:20px;
  font-size:12px;
}
#literal-ine .li-footer strong {color:white}
#literal-ine .li-footer a {
  color:white;
  margin-left:auto;
}

/* RESPONSIVE */
@media(max-width:950px) {
  #literal-ine .li-feature {
    grid-template-columns:1fr;
  }
  #literal-ine .li-feature-image,
  #literal-ine .li-feature-image img {
    min-height:0;
    aspect-ratio:16/9;
  }
  #literal-ine .li-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:620px) {
  #literal-ine .li-header-inner {min-height:75px}
  #literal-ine .li-brand {font-size:21px}
  #literal-ine #li-logo {max-width:185px}
  #literal-ine .li-home {padding:8px 11px}
  #literal-ine .li-hero {padding:65px 0 38px}
  #literal-ine .li-hero h1 {
    font-size:clamp(47px,11vw,70px);
    letter-spacing:-2px;
  }
  #literal-ine .li-main {padding:40px 0 60px}
  #literal-ine .li-section-top {
    align-items:start;
    flex-direction:column;
  }
  #literal-ine .li-tools {
    grid-template-columns:1fr;
  }
  #literal-ine .li-grid {grid-template-columns:1fr}
  #literal-ine .li-card h3 {font-size:25px}
  #literal-ine .li-editorial-inner {
    flex-direction:column;
    align-items:start;
  }
  #literal-ine .li-footer-inner {flex-wrap:wrap}
  #literal-ine .li-grid-heading span {display:none}
}
</style>

<script>
(function() {
  "use strict";

  const root = document.getElementById("literal-ine");
  if (!root || root.dataset.ready) return;
  root.dataset.ready = "1";

  // CONFIGURACIÓN
  // Cambiar si WordPress está instalado en otro dominio.
  const API = location.origin + "/wp-json/wp/v2";
  const LOGO_URL = ""; // URL del logotipo oficial (opcional)
  const PAGE_SIZE = 12;

  const grupos = {
    taddei: ["Taddei", "Guadalupe Taddei"],
    ine: ["INE"],
    proveedor: [
      "José Alfredo Hernández",
      "José Alfredo Hernández Casillas"
    ]
  };

  const $ = s => root.querySelector(s);
  const lista = $("#li-grid");
  const principal = $("#li-featured");
  const estadoTexto = $("#li-status");
  const botonMas = $("#li-more");

  let tagIDs = {};
  let filtro = "all";
  let pagina = 1;
  let totalPaginas = 1;
  let orden = "desc";
  let busqueda = "";
  let generacion = 0;
  let cargando = false;

  function normal(texto) {
    return String(texto || "")
      .normalize("NFD")
      .replace(/[\u0300-\u036f]/g, "")
      .toLowerCase()
      .trim()
      .replace(/\s+/g, " ");
  }

  function quitarHTML(html) {
    const div = document.createElement("div");
    div.innerHTML = html || "";
    return (div.textContent || "").replace(/\s+/g, " ").trim();
  }

  function esc(t) {
    return String(t ?? "").replace(/[&<>"']/g, c => ({
      "&":"&amp;", "<":"&lt;", ">":"&gt;",
      '"':"&quot;", "'":"&#39;"
    })[c]);
  }

  function safeURL(url) {
    try {
      const u = new URL(url, location.origin);
      return ["https:", "http:"].includes(u.protocol)
        ? u.href : "#";
    } catch(e) { return "#"; }
  }

  function fechaPost(p) {
    if (!p.date) return "";
    const f = p.date.substring(0,10).split("-").map(Number);
    return new Intl.DateTimeFormat("es-MX", {
      day:"numeric", month:"long", year:"numeric"
    }).format(new Date(f[0], f[1]-1, f[2]));
  }

  function imagenPost(p) {
    const media = p._embedded?.["wp:featuredmedia"]?.[0];
    return safeURL(
      media?.media_details?.sizes?.large?.source_url ||
      media?.source_url || ""
    );
  }

  function categoria(p) {
    const ids = p.tags || [];
    if ((tagIDs.proveedor || []).some(id => ids.includes(id)))
      return "CONTRATOS Y PROVEEDORES";
    if ((tagIDs.taddei || []).some(id => ids.includes(id)))
      return "GUADALUPE TADDEI";
    return "INSTITUTO NACIONAL ELECTORAL";
  }

  function imagenHTML(p, grande) {
    const src = imagenPost(p);
    if (src === "#") {
      return '<div class="li-noimage">LITERAL MÉXICO</div>';
    }
    return '<img src="'+esc(src)+'" alt="'+
      esc(quitarHTML(p.title?.rendered))+
      '" loading="'+(grande ? "eager":"lazy")+'">';
  }

  function tarjeta(p, grande=false) {
    const titulo = quitarHTML(p.title?.rendered);
    const resumen = quitarHTML(p.excerpt?.rendered);
    const link = safeURL(p.link);
    const max = grande ? 245 : 150;
    const extracto = resumen.length > max
      ? resumen.slice(0,max).trimEnd()+"…" : resumen;

    if (grande) {
      return `
      <article class="li-feature">
        <a href="${esc(link)}" class="li-feature-image">
          ${imagenHTML(p,true)}
        </a>
        <div class="li-feature-body">
          <span class="li-category">${esc(categoria(p))}</span>
          <h3><a href="${esc(link)}">${esc(titulo)}</a></h3>
          <p>${esc(extracto)}</p>
          <span class="li-date">${fechaPost(p)}</span>
          <a class="li-read" href="${esc(link)}">
            LEER ARTÍCULO →
          </a>
        </div>
      </article>`;
    }

    return `
    <article class="li-card">
      <a href="${esc(link)}" class="li-card-image">
        ${imagenHTML(p,false)}
      </a>
      <span class="li-category">${esc(categoria(p))}</span>
      <h3><a href="${esc(link)}">${esc(titulo)}</a></h3>
      <p>${esc(extracto)}</p>
      <span class="li-date">${fechaPost(p)}</span>
      <div>
        <a class="li-read" href="${esc(link)}">LEER MÁS →</a>
      </div>
    </article>`;
  }

  // Detectar el logotipo configurado en el tema.
  function iniciarLogo() {
    const img = $("#li-logo");
    const text = $("#li-brand-text");

    let src = LOGO_URL;

    if (!src) {
      const logos = document.querySelectorAll(
        "header .custom-logo, .site-logo img, " +
        ".wp-block-site-logo img, .site-header .custom-logo"
      );
      const original = [...logos].find(x => !root.contains(x));
      if (original) src = original.currentSrc || original.src;
    }

    if (src) {
      img.onload = () => {
        img.hidden = false;
        text.hidden = true;
      };
      img.src = src;
    }
  }

  // Encontrar IDs reales de etiquetas.
  async function buscarEtiquetas() {
    const nombres = [...new Set(Object.values(grupos).flat())];
    const resultados = await Promise.all(nombres.map(async n => {
      const res = await fetch(
        API+"/tags?per_page=100&search="+encodeURIComponent(n),
        {credentials:"same-origin"}
      );
      if (!res.ok) throw new Error("Error al obtener etiquetas");
      const tags = await res.json();
      return tags.filter(t => normal(t.name) === normal(n));
    }));

    const mapa = new Map();
    resultados.flat().forEach(t => mapa.set(normal(t.name),t.id));

    for (const [grupo,nombresGrupo] of Object.entries(grupos)) {
      tagIDs[grupo] = nombresGrupo
        .map(n => mapa.get(normal(n)))
        .filter(Boolean);
    }
  }

  function idsSeleccionados() {
    const ids = filtro === "all"
      ? Object.values(tagIDs).flat()
      : (tagIDs[filtro] || []);
    return [...new Set(ids)];
  }

  async function cargar(reiniciar=false) {
    if (cargando && !reiniciar) return;

    if (reiniciar) {
      generacion++;
      pagina = 1;
      lista.innerHTML = "";
      principal.innerHTML = "";
      $("#li-grid-heading").hidden = true;
    }

    const actual = generacion;
    const pagActual = pagina;
    const ids = idsSeleccionados();

    if (!ids.length) {
      estadoTexto.textContent =
        "No se encontraron etiquetas para esta sección.";
      $("#li-count").textContent = "0 publicaciones";
      botonMas.hidden = true;
      return;
    }

    cargando = true;
    botonMas.disabled = true;
    botonMas.hidden = true;
    estadoTexto.textContent = "Consultando publicaciones...";

    try {
      const params = new URLSearchParams({
        tags:ids.join(","),
        page:String(pagActual),
        per_page:String(PAGE_SIZE),
        order:orden,
        orderby:"date",
        _embed:"wp:featuredmedia"
      });
      if (busqueda) params.set("search",busqueda);

      const res = await fetch(API+"/posts?"+params.toString(), {
        credentials:"same-origin"
      });
      if (!res.ok) throw new Error("Error HTTP "+res.status);

      const posts = await res.json();
      if (actual !== generacion) return;

      const total = Number(res.headers.get("X-WP-Total") || 0);
      totalPaginas = Number(
        res.headers.get("X-WP-TotalPages") || 1
      );

      $("#li-count").textContent = total+" publicaciones";

      if (reiniciar && posts.length) {
        principal.innerHTML = tarjeta(posts[0],true);
        lista.innerHTML = posts.slice(1).map(
          p => tarjeta(p)
        ).join("");
      } else {
        lista.insertAdjacentHTML(
          "beforeend",posts.map(p => tarjeta(p)).join("")
        );
      }

      $("#li-grid-heading").hidden = !lista.children.length;

      estadoTexto.textContent = posts.length
        ? "" : "No se encontraron publicaciones.";

      pagina = pagActual+1;
      botonMas.hidden = pagActual >= totalPaginas;

    } catch(e) {
      if (actual !== generacion) return;
      console.error(e);
      estadoTexto.textContent =
        "No fue posible recuperar las noticias. " +
        "Comprueba las etiquetas y el acceso a la API REST.";
    } finally {
      if (actual === generacion) {
        cargando = false;
        botonMas.disabled = false;
      }
    }
  }

  const titulos = {
    all:"Toda la cobertura",
    taddei:"Guadalupe Taddei",
    ine:"Instituto Nacional Electoral",
    proveedor:"José Alfredo Hernández"
  };

  root.querySelectorAll(".li-nav button").forEach(btn => {
    btn.addEventListener("click",() => {
      filtro = btn.dataset.filter;

      root.querySelectorAll(".li-nav button").forEach(b =>
        b.classList.toggle("li-active",b===btn)
      );

      $("#li-section-name").textContent = titulos[filtro];
      cargar(true);
    });
  });

  let debounce;
  $("#li-search").addEventListener("input",e => {
    clearTimeout(debounce);
    debounce = setTimeout(() => {
      busqueda = e.target.value.trim();
      cargar(true);
    },400);
  });

  $("#li-sort").addEventListener("change",e => {
    orden = e.target.value;
    cargar(true);
  });

  botonMas.addEventListener("click",() => cargar(false));

  async function iniciar() {
    iniciarLogo();
    try {
      await buscarEtiquetas();
      await cargar(true);
    } catch(e) {
      console.error(e);
      estadoTexto.textContent =
        "Error al conectar con WordPress. " +
        "Verifica que la API REST esté habilitada.";
    }
  }

  iniciar();
})();
</script>

Facebook
Twitter
LinkedIn
Pocket
WhatsApp

El INE bajo la lupa