/* ═══════════════════════════════════════════════════════════════════════════
   widgets.css — Estilos de los widgets de contenido.
   Antes cada widget llevaba su propio <style> en el cuerpo, así que una página
   con cuatro widgets repetía su CSS en cada visita y nada se cacheaba. Aquí se
   sirven una vez, y los colores pasan a los tokens de v2.css: si cambia el
   verde de marca, los widgets lo siguen solos.
   Los widgets que comparten estilos entre español e inglés comparten bloque.
   ═══════════════════════════════════════════════════════════════════════════ */


/* ── widget-ciudades-tramite-en.php, widget-ciudades-tramite.php ─────────────────────────────────────── */
.widget-ciudades-tramite { margin: 2rem 0; }
.ciudades-tramite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    margin-top: 1rem;
    padding: 0;
    list-style: none;
}
.ciudades-tramite-grid a {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 14px;
    background: #f9f9f9;
    color: var(--ec-brand);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    line-height: 1.35;
}
.ciudades-tramite-grid a:hover { background: var(--ec-brand); color: #fff; }
.ciudades-tramite-grid a span { display: block; font-weight: 400; font-size: 12px; color: #888; }
.ciudades-tramite-grid a:hover span { color: #e8f1ec; }

/* ── widget-como-llegar-en.php, widget-como-llegar.php ─────────────────────────────────────── */
.widget-transporte { margin: 2rem 0; }
.transporte-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}
.transporte-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    line-height: 1.5;
}
.transporte-list li:last-child { border-bottom: none; }
.transporte-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* ── widget-comunidad-mexicana-en.php, widget-comunidad-mexicana.php ─────────────────────────────────────── */
.widget-comunidad { margin: 2rem 0; }
.comunidad-stats {
    display: flex;
    gap: 16px;
    margin: 1.2rem 0;
    flex-wrap: wrap;
}
.stat-item {
    background: #f4f9f5;
    border-left: 4px solid var(--ec-brand);
    border-radius: 0 8px 8px 0;
    padding: 14px 20px;
    min-width: 140px;
    flex: 1;
}
.stat-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--ec-brand);
    line-height: 1.1;
}
.stat-label {
    font-size: 12px;
    color: #555;
    margin-top: 3px;
}

/* ── widget-consulados-cercanos-en.php, widget-consulados-cercanos.php ─────────────────────────────────────── */
.widget-cercanos { margin: 2rem 0; }
.cercanos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 1rem;
}
.cercano-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #f9f9f9;
}
.cercano-ciudad   { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.cercano-distancia{ font-size: 12px; color: #888; margin-bottom: 4px; }
.cercano-desc     { font-size: 13px; color: #555; margin-bottom: 10px; }
.btn-outline-sm {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--ec-brand);
    color: var(--ec-brand);
    border-radius: 5px;
    font-size: 12px;
    text-decoration: none;
    margin-top: 6px;
}
.btn-outline-sm:hover { background: var(--ec-brand); color: #fff; }

/* ── widget-contexto-frontera-en.php, widget-contexto-frontera.php ─────────────────────────────────────── */
.widget-frontera {
    margin: 2rem 0;
    padding: 20px;
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
}
.widget-frontera h2 { color: #92400e; }

/* ── widget-costos-tramites-en.php, widget-costos-tramites.php ─────────────────────────────────────── */
.widget-costos { margin: 2rem 0; }
.costos-tabla { overflow-x: auto; margin: 0.8rem 0; }
.costos-tabla table { width: 100%; border-collapse: collapse; font-size: 14px; }
.costos-tabla th { background: var(--ec-brand); color: #fff; padding: 10px 14px; text-align: left; }
.costos-tabla td { padding: 9px 14px; border-bottom: 1px solid #eee; }
.costos-tabla tr:nth-child(even) td { background: var(--ec-brand-soft); }
.costos-tabla td:last-child { font-weight: bold; white-space: nowrap; }
.costos-nota { font-size: 13px; background: #fff7e6; border-left: 4px solid #e0a800; padding: 10px 14px; margin: 0.8rem 0; border-radius: 4px; }

/* ── widget-curp-acceso-en.php, widget-curp-acceso.php ─────────────────────────────────────── */
.widget-curp-acceso {
    margin: 1.6rem 0 2rem;
    background: var(--ec-brand-soft);
    border: 1px solid #cfe3d8;
    border-top: 4px solid var(--ec-brand);
    border-radius: 10px;
    padding: 20px 24px;
}
.widget-curp-acceso h2 { margin-top: 0 !important; }
.acceso-intro { margin: 0 0 12px; }
.acceso-pasos { margin: 0 0 18px; padding-left: 20px; }
.acceso-pasos li { margin-bottom: 5px; line-height: 1.5; }
.acceso-btn {
    display: inline-block;
    background: var(--ec-brand);
    color: #fff !important;
    font-weight: 700;
    font-size: 17px;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(0,104,71,.28);
    transition: background .18s ease, transform .18s ease;
}
.acceso-btn:hover, .acceso-btn:focus-visible { background: #00543a; transform: translateY(-1px); }
.acceso-pie { margin: 14px 0 0; font-size: 13px; color: var(--ec-body); line-height: 1.55; }
@media screen and (max-width: 700px) {
    .widget-curp-acceso { padding: 16px 17px; }
    .acceso-btn { display: block; text-align: center; padding: 15px 18px; font-size: 16px; }
}

/* ── widget-curp-comparativa-en.php ─────────────────────────────────────── */
.widget-curp-comparativa { margin: 2rem 0; }
.comparativa-tabla { overflow-x: auto; margin: 1rem 0; }
.comparativa-tabla table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.comparativa-tabla th { background: var(--ec-brand); color: #fff; padding: 10px 12px; text-align: left; vertical-align: top; }
.comparativa-tabla td { padding: 10px 12px; border-bottom: 1px solid #eef1f6; vertical-align: top; }
.comparativa-tabla tr:nth-child(even) td { background: var(--ec-brand-soft); }
.comparativa-tabla .si { color: #14663c; font-weight: 700; }
.comparativa-tabla .no { color: #a3221a; font-weight: 700; }
.comparativa-nota { font-size: 13.5px; background: #eef4fb; border-left: 4px solid #3b6ea5; padding: 10px 14px; border-radius: 4px; }

/* On mobile the table becomes stacked cards: no horizontal scrolling. */
@media screen and (max-width: 700px) {
    .comparativa-tabla { overflow-x: visible; }
    .comparativa-tabla table { min-width: 0; }
    .comparativa-tabla thead { position: absolute; left: -9999px; }
    .comparativa-tabla tr { display: block; border: 1px solid #dfe5ec; border-left: 4px solid var(--ec-brand); border-radius: 8px; margin-bottom: 12px; padding: 4px 0; }
    .comparativa-tabla td { display: flex; gap: 10px; border-bottom: 1px solid #f2f4f8; background: #fff !important; padding: 8px 14px; }
    .comparativa-tabla tr td:last-child { border-bottom: none; }
    .comparativa-tabla td::before { content: attr(data-l); font-weight: 700; color: #8a97ad; font-size: 12px; text-transform: uppercase; flex: 0 0 40%; }
}

/* ── widget-curp-comparativa.php ─────────────────────────────────────── */
.widget-curp-comparativa { margin: 2rem 0; }
.comparativa-tabla { overflow-x: auto; margin: 1rem 0; }
.comparativa-tabla table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.comparativa-tabla th { background: var(--ec-brand); color: #fff; padding: 10px 12px; text-align: left; vertical-align: top; }
.comparativa-tabla td { padding: 10px 12px; border-bottom: 1px solid #eef1f6; vertical-align: top; }
.comparativa-tabla tr:nth-child(even) td { background: var(--ec-brand-soft); }
.comparativa-tabla .si { color: #14663c; font-weight: 700; }
.comparativa-tabla .no { color: #a3221a; font-weight: 700; }
.comparativa-nota { font-size: 13.5px; background: #eef4fb; border-left: 4px solid #3b6ea5; padding: 10px 14px; border-radius: 4px; }

/* En móvil la tabla se convierte en tarjetas apiladas: nada de scroll lateral. */
@media screen and (max-width: 700px) {
    .comparativa-tabla { overflow-x: visible; }
    .comparativa-tabla table { min-width: 0; }
    .comparativa-tabla thead { position: absolute; left: -9999px; }
    .comparativa-tabla tr { display: block; border: 1px solid #dfe5ec; border-left: 4px solid var(--ec-brand); border-radius: 8px; margin-bottom: 12px; padding: 4px 0; }
    .comparativa-tabla td { display: flex; gap: 10px; border-bottom: 1px solid #f2f4f8; background: #fff !important; padding: 8px 14px; }
    .comparativa-tabla tr td:last-child { border-bottom: none; }
    .comparativa-tabla td::before { content: attr(data-l); font-weight: 700; color: #8a97ad; font-size: 12px; text-transform: uppercase; flex: 0 0 40%; }
}

/* ── widget-curp-decodificador-en.php, widget-curp-decodificador.php ─────────────────────────────────────── */
.widget-curp-decoder { margin: 2rem 0; }
.curp-tool { background: var(--ec-brand-soft); border: 1px solid #d6e6dd; border-radius: 10px; padding: 18px 20px; margin: 1rem 0; }
.curp-label { display: block; font-weight: 700; font-size: 14px; color: var(--ec-ink); margin-bottom: 6px; }
.curp-row { display: flex; gap: 10px; }
.curp-input {
    flex: 1; min-width: 0; padding: 12px 14px; font-size: 16px; letter-spacing: 1px;
    text-transform: uppercase; border: 2px solid var(--ec-brand); border-radius: 6px;
    box-sizing: border-box; font-family: monospace;
}
.curp-input:focus { outline: 2px solid #ce0000; outline-offset: 1px; }
.curp-btn {
    padding: 12px 22px; background: var(--ec-brand); color: #fff; border: none; border-radius: 6px;
    font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.curp-btn:hover { background: #00543a; }
.curp-privacidad { font-size: 12.5px; color: var(--ec-body); margin: 10px 0 0; line-height: 1.5; }
.curp-salida { margin-top: 16px; }
.curp-veredicto { font-weight: 700; padding: 10px 14px; border-radius: 6px; margin: 0 0 10px; font-size: 14.5px; }
.curp-ok { background: #e8f6ee; color: #14663c; }
.curp-ko { background: #fdecea; color: #a3221a; }
.curp-errores { margin: 0 0 12px; padding-left: 20px; font-size: 14px; color: #a3221a; }
.curp-errores li { margin-bottom: 4px; }
.curp-tabla-wrap { overflow-x: auto; }
.curp-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
.curp-tabla th { background: var(--ec-brand); color: #fff; padding: 8px 12px; text-align: left; }
.curp-tabla td { padding: 8px 12px; border-bottom: 1px solid #eef1f6; }
.curp-pos { white-space: nowrap; color: #8a97ad; font-size: 12.5px; }
.curp-val { font-family: monospace; font-weight: 700; font-size: 15px; color: var(--ec-brand); letter-spacing: 1px; white-space: nowrap; }
.curp-fila-ko .curp-val { color: #a3221a; }
.curp-detalle { color: var(--ec-body); font-style: italic; }
.curp-aviso { font-size: 13px; background: #eef4fb; border-left: 4px solid #3b6ea5; padding: 10px 14px; border-radius: 4px; }
.curp-nota-x { font-size: 13px; background: #fff7e6; border-left: 4px solid #e0a800; padding: 10px 14px; border-radius: 4px; }
@media screen and (max-width: 700px) {
    .curp-tool { padding: 14px 15px; }
    .curp-row { flex-direction: column; }
    .curp-btn { width: 100%; padding: 14px; }
    .curp-input { font-size: 15px; }
}

/* ── widget-curp-entidades-en.php, widget-curp-entidades.php ─────────────────────────────────────── */
.widget-curp-entidades { margin: 2rem 0; }
.entidades-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 1rem 0; }
.entidad-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--ec-brand-soft); border-radius: 6px; font-size: 14px; }
.entidad-clave { font-family: monospace; font-weight: 700; font-size: 15px; color: #fff; background: var(--ec-brand); padding: 3px 8px; border-radius: 4px; letter-spacing: 1px; flex: 0 0 auto; }
.entidad-nombre { color: var(--ec-ink); line-height: 1.3; }
.entidad-ne { display: flex; align-items: flex-start; gap: 12px; background: #fff7e6; border-left: 4px solid #e0a800; padding: 14px 16px; border-radius: 6px; margin: 1rem 0; font-size: 14px; line-height: 1.55; }
.entidad-clave-ne { background: #ce0000; }
.entidades-nota { font-size: 13.5px; background: #eef4fb; border-left: 4px solid #3b6ea5; padding: 10px 14px; border-radius: 4px; }
@media screen and (max-width: 700px) {
    .entidades-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .entidad-item { font-size: 13px; padding: 7px 9px; gap: 7px; }
    .entidad-clave { font-size: 13px; padding: 2px 6px; }
}
@media screen and (max-width: 380px) {
    .entidades-grid { grid-template-columns: 1fr; }
}

/* ── widget-curp-router-en.php, widget-curp-router.php ─────────────────────────────────────── */
.widget-curp-router { margin: 2rem 0; }
.widget-curp-router > p { margin-bottom: 1rem; }
.router-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.router-card {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 18px; border: 1px solid #dfe5ec; border-left: 4px solid var(--ec-brand);
    border-radius: 8px; background: #fff; text-decoration: none; color: inherit;
    transition: box-shadow .18s ease, transform .18s ease, border-left-color .18s ease;
}
.router-card:hover, .router-card:focus-visible {
    box-shadow: 0 4px 16px rgba(0,0,0,.10); transform: translateY(-2px);
    border-left-color: #ce0000; text-decoration: none;
}
.router-ico { font-size: 22px; line-height: 1; }
.router-tit { font-weight: 700; color: var(--ec-ink); font-size: 15.5px; line-height: 1.3; }
.router-sub { font-size: 13.5px; color: var(--ec-body); line-height: 1.4; }
@media screen and (max-width: 700px) {
    .router-grid { grid-template-columns: 1fr; }
    .router-card { padding: 14px 16px; }
}

/* ── widget-curp-siguientes-en.php, widget-curp-siguientes.php ─────────────────────────────────────── */
.widget-curp-siguientes { margin: 2.5rem 0 1rem; }
.siguientes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.siguiente-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; background: #fff;
    border: 1px solid #dfe5ec; border-radius: 8px;
    text-decoration: none; color: inherit;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.siguiente-card:hover, .siguiente-card:focus-visible {
    border-color: var(--ec-brand); box-shadow: 0 4px 14px rgba(0,0,0,.09);
    transform: translateY(-2px); text-decoration: none;
}
.siguiente-cuerpo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.siguiente-tit { font-weight: 700; color: var(--ec-ink); font-size: 15.5px; line-height: 1.3; }
.siguiente-txt { font-size: 13.5px; color: var(--ec-body); line-height: 1.45; }
.siguiente-flecha {
    margin-left: auto; flex: 0 0 auto; color: var(--ec-brand);
    font-size: 20px; line-height: 1; transition: transform .18s ease;
}
.siguiente-card:hover .siguiente-flecha { transform: translateX(4px); }
@media screen and (max-width: 700px) {
    .siguientes-grid { grid-template-columns: 1fr; }
    .siguiente-card { padding: 14px 16px; gap: 10px; }
}

/* ── widget-movil-cercano-en.php, widget-movil-cercano.php ─────────────────────────────────────── */
.widget-movil {
    margin: 2rem 0;
    padding: 18px 20px;
    background: var(--ec-brand-soft);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}
.widget-movil h2 { color: #065f46; font-size: 18px; }
.btn-movil {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: var(--ec-brand);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}
.btn-movil:hover { background: var(--ec-brand-dark); }

/* ── widget-requisitos-pasaporte-en.php, widget-requisitos-pasaporte.php ─────────────────────────────────────── */
.widget-pasaporte { margin: 2rem 0; }
.requisitos-list { padding-left: 1.4rem; margin: 0.8rem 0 1.4rem; }
.requisitos-list li { margin-bottom: 6px; font-size: 14px; line-height: 1.5; }
.pasaporte-tabla { overflow-x: auto; margin: 0.8rem 0; }
.pasaporte-tabla table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.pasaporte-tabla th {
    background: var(--ec-brand);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
}
.pasaporte-tabla td {
    padding: 9px 14px;
    border-bottom: 1px solid #eee;
}
.pasaporte-tabla tr:nth-child(even) td { background: var(--ec-brand-soft); }

/* ── widget-routing-en.php ─────────────────────────────────────── */
.widget-routing { margin: 2rem 0; }
.widget-routing h2 { margin-bottom: .4rem; }
.routing-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.btn-routing {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: var(--ec-brand);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
}
.btn-routing:hover  { background: var(--ec-brand-dark); }
.btn-routing:disabled { background: #888; cursor: not-allowed; }
.btn-gmaps {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border: 1px solid var(--ec-brand);
    color: var(--ec-brand);
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s;
}
.btn-gmaps:hover { background: var(--ec-brand); color: #fff; }
.routing-map {
    height: 380px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: .5rem;
    border: 1px solid #ddd;
}
.routing-status {
    font-size: 13px;
    color: #555;
    margin: .4rem 0;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
}
/* Routing machine panel in English */
.leaflet-routing-container {
    font-size: 13px;
    max-height: 300px;
    overflow-y: auto;
}

/* ── widget-routing.php ─────────────────────────────────────── */
.widget-routing { margin: 2rem 0; }
.widget-routing h2 { margin-bottom: .4rem; }
.routing-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.btn-routing {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: var(--ec-brand);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
}
.btn-routing:hover  { background: var(--ec-brand-dark); }
.btn-routing:disabled { background: #888; cursor: not-allowed; }
.btn-gmaps {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border: 1px solid var(--ec-brand);
    color: var(--ec-brand);
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s;
}
.btn-gmaps:hover { background: var(--ec-brand); color: #fff; }
.routing-map {
    height: 380px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: .5rem;
    border: 1px solid #ddd;
}
.routing-status {
    font-size: 13px;
    color: #555;
    margin: .4rem 0;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
}
/* Routing machine panel in Spanish */
.leaflet-routing-container {
    font-size: 13px;
    max-height: 300px;
    overflow-y: auto;
}

/* ── widget-trabajadores-agricolas-en.php, widget-trabajadores-agricolas.php ─────────────────────────────────────── */
.widget-agricola { margin: 2rem 0; background: #f3f8f4; border: 1px solid #d8e8de; border-radius: 8px; padding: 1.2rem 1.4rem; }
.widget-agricola h2 { margin-top: 0; }
.agricola-list { padding-left: 1.4rem; margin: 0.8rem 0 1rem; }
.agricola-list li { margin-bottom: 7px; font-size: 14px; line-height: 1.55; }
.agricola-aviso { font-size: 14px; background: #fff; border-left: 4px solid var(--ec-brand); padding: 10px 14px; border-radius: 4px; margin: 0; }

/* ── widget-tramites-ciudad-en.php, widget-tramites-ciudad.php ─────────────────────────────────────── */
.widget-tramites-ciudad { margin: 2rem 0; }
.tramites-ciudad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 1rem;
    padding: 0;
    list-style: none;
}
.tramite-ciudad-item {
    border: 1px solid #e0e0e0;
    border-left: 3px solid var(--ec-brand);
    border-radius: 8px;
    padding: 14px 16px;
    background: #f9f9f9;
}
.tramite-ciudad-item a {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: var(--ec-brand);
    text-decoration: none;
    margin-bottom: 4px;
}
.tramite-ciudad-item a:hover { text-decoration: underline; }
.tramite-ciudad-item span { font-size: 13px; color: #555; line-height: 1.45; }
