{"id":59,"date":"2026-03-24T13:21:55","date_gmt":"2026-03-24T19:21:55","guid":{"rendered":"https:\/\/sospuravida.com\/SUITLEGAL\/?page_id=59"},"modified":"2026-03-24T21:00:32","modified_gmt":"2026-03-25T03:00:32","slug":"buscardor-s-o-s-legal","status":"publish","type":"page","link":"https:\/\/sospuravida.com\/SUITLEGAL\/buscardor-s-o-s-legal\/","title":{"rendered":"BUSCARDOR S.O.S LEGAL"},"content":{"rendered":"<div  class='flex_column av-t3hz-acc29934bea251028538896e0369bbd9 av_one_full  avia-builder-el-0  el_before_av_one_full  avia-builder-el-first  first flex_column_div  '     ><section  class='av_textblock_section av-mn500qlf-4c9e664eeb580797de96d45b89c46efc '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/CreativeWork\" ><div class='avia_textblock'  itemprop=\"text\" >\r\n<div class=\"sos-lex-frontend-wrap\">\r\n    <div class=\"lex-front-header\">\r\n        <h2 class=\"lex-front-title\"><span style=\"color:#a855f7;\">SOS COLMENA DE LEYES<\/span> SEARCH ENGINE<\/h2>\r\n        <p class=\"lex-front-subtitle\">Buscador Inteligente de Legislaci\u00f3n de Costa Rica<\/p>\r\n    <\/div>\r\n\r\n    <div class=\"lex-front-main\">\r\n        <div class=\"lex-front-search-panel\">\r\n            <div style=\"position: relative; width: 100%; margin-bottom: 20px;\">\r\n                <input type=\"text\" id=\"lex-front-search-input\" class=\"lex-front-search-bar\" placeholder=\"Ej: expropiaci\u00f3n, divorcio, aguinaldo...\">\r\n                <button class=\"lex-front-btn-search\" onclick=\"ejecutarBusquedaFrontend()\">BUSCAR<\/button>\r\n            <\/div>\r\n            \r\n            <div style=\"color:#64748b; font-size:11px; font-weight:bold; letter-spacing:1px; margin-bottom:10px; text-transform:uppercase;\">FILTRAR B\u00daSQUEDA:<\/div>\r\n            \r\n            <div class=\"lex-front-filters-grid\" id=\"lex-front-dynamic-tabs\">\r\n                <button class=\"lex-front-filter-btn active\" onclick=\"seleccionarFiltroFrontend(this, 'TODO')\">Cargando B\u00f3veda...<\/button>\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <div class=\"lex-front-results-panel custom-scroll\" id=\"lex-front-results-container\">\r\n            <div style=\"display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; opacity:0.6; padding: 40px 0;\">\r\n                <h3 style=\"color:#64748b; font-family: sans-serif;\">SISTEMA LISTO<\/h3>\r\n                <p style=\"font-size:14px; color:#94a3b8; text-align:center;\">Ingrese t\u00e9rminos legales para extraer jurisprudencia exacta.<\/p>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<style>\r\n    \/* CSS FRONTEND - Limpio y elegante *\/\r\n    .sos-lex-frontend-wrap { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.05); margin: 20px 0; width: 100%; }\r\n    .lex-front-header { background: #0f172a; padding: 25px; text-align: center; border-bottom: 3px solid #a855f7; }\r\n    .lex-front-title { font-weight: 900; font-size: 22px; color: #f8fafc; margin:0 0 5px 0; letter-spacing: 1px;}\r\n    .lex-front-subtitle { color: #94a3b8; font-weight: 600; font-size: 12px; margin: 0; text-transform: uppercase; letter-spacing: 1px;}\r\n    .lex-front-main { padding: 20px; background: #f8fafc;}\r\n    .lex-front-search-panel { background: #ffffff; padding: 20px; border-radius: 8px; border: 1px solid #e2e8f0; box-shadow: 0 2px 10px rgba(0,0,0,0.02); margin-bottom: 20px;}\r\n    .lex-front-search-bar { width: 100%; background: #f1f5f9; border: 2px solid #cbd5e1; color: #334155; padding: 15px 120px 15px 20px; font-size: 16px; border-radius: 6px; outline: none; transition: 0.3s;}\r\n    .lex-front-search-bar:focus { border-color: #a855f7; background: #fff;}\r\n    .lex-front-btn-search { position: absolute; right: 5px; top: 5px; bottom: 5px; background: #0f172a; color: #fff; border: none; padding: 0 20px; border-radius: 4px; font-weight: bold; cursor: pointer; transition: 0.3s; }\r\n    .lex-front-btn-search:hover { background: #a855f7; }\r\n    .lex-front-filters-grid { display: flex; flex-wrap: wrap; gap: 8px; }\r\n    .lex-front-filter-btn { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: bold; transition: 0.3s; text-transform: uppercase;}\r\n    .lex-front-filter-btn:hover { background: #e2e8f0; }\r\n    .lex-front-filter-btn.active { background: #a855f7 !important; border-color: #a855f7 !important; color: #fff !important; }\r\n    .lex-front-results-panel { background: #ffffff; border-radius: 8px; border: 1px solid #e2e8f0; padding: 20px; max-height: 600px; overflow-y: auto; }\r\n    .lex-front-article-card { background: #f8fafc; border-left: 4px solid #a855f7; padding: 15px; margin-bottom: 15px; border-radius: 4px; border-top:1px solid #e2e8f0; border-right:1px solid #e2e8f0; border-bottom:1px solid #e2e8f0;}\r\n    .lex-front-ley-name { font-size: 11px; color: #a855f7; font-weight: bold; text-transform: uppercase; margin-bottom:4px;}\r\n    .lex-front-article-num { font-size: 16px; color: #0f172a; font-weight: 900; margin-bottom:10px;}\r\n    .lex-front-article-body { font-size: 14px; color: #475569; line-height: 1.6; }\r\n    .lex-front-highlight { background: rgba(168, 85, 247, 0.2); color: #7e22ce; padding: 2px 4px; border-radius: 2px; font-weight:bold;}\r\n<\/style>\r\n\r\n<script>\r\nlet frontFiltroActual = 'TODO';\r\n\/\/ URL de AJAX Blindada (Por si el tema web bloquea la variable global)\r\nconst fetchUrl = (typeof ajaxurl !== 'undefined') ? ajaxurl : window.location.origin + '\/wp-admin\/admin-ajax.php';\r\n\r\n\/\/ CARGAR PESTA\u00d1AS DIN\u00c1MICAMENTE AL ENTRAR A LA P\u00c1GINA (ANTI-CACH\u00c9)\r\ndocument.addEventListener(\"DOMContentLoaded\", function() {\r\n    let formData = new FormData();\r\n    formData.append('action', 'sos_lex_get_cats');\r\n    \r\n    fetch(fetchUrl, { method: 'POST', body: formData })\r\n    .then(res => res.json())\r\n    .then(response => {\r\n        let html = `<button class=\"lex-front-filter-btn active\" onclick=\"seleccionarFiltroFrontend(this, 'TODO')\">TODO<\/button>`;\r\n        if(response.success && response.data.length > 0) {\r\n            response.data.forEach(cat => {\r\n                let catName = cat.replace(\/_\/g, ' ');\r\n                html += `<button class=\"lex-front-filter-btn\" onclick=\"seleccionarFiltroFrontend(this, '${cat}')\">${catName}<\/button>`;\r\n            });\r\n        }\r\n        document.getElementById('lex-front-dynamic-tabs').innerHTML = html;\r\n    }).catch(e => {\r\n        document.getElementById('lex-front-dynamic-tabs').innerHTML = `<button class=\"lex-front-filter-btn active\">TODO<\/button>`;\r\n    });\r\n});\r\n\r\nfunction seleccionarFiltroFrontend(btn, filtro) {\r\n    document.querySelectorAll('.lex-front-filter-btn').forEach(el => el.classList.remove('active'));\r\n    btn.classList.add('active');\r\n    frontFiltroActual = filtro;\r\n    if(document.getElementById('lex-front-search-input').value.trim() !== \"\") { ejecutarBusquedaFrontend(); }\r\n}\r\n\r\ndocument.getElementById('lex-front-search-input').addEventListener('keypress', function (e) {\r\n    if (e.key === 'Enter') ejecutarBusquedaFrontend();\r\n});\r\n\r\nfunction ejecutarBusquedaFrontend() {\r\n    const query = document.getElementById('lex-front-search-input').value.trim();\r\n    const container = document.getElementById('lex-front-results-container');\r\n    \r\n    if(query === \"\") { alert(\"Ingrese un t\u00e9rmino de b\u00fasqueda.\"); return; }\r\n\r\n    container.innerHTML = `<div style=\"padding:40px 0; text-align:center;\"><p style=\"color:#64748b; font-weight:bold;\">Consultando Base de Datos...<\/p><\/div>`;\r\n\r\n    let formData = new FormData();\r\n    formData.append('action', 'sos_lex_buscar');\r\n    formData.append('query', query);\r\n    formData.append('filtro', frontFiltroActual);\r\n\r\n    fetch(fetchUrl, { method: 'POST', body: formData })\r\n    .then(res => res.json())\r\n    .then(response => {\r\n        if(response.success) {\r\n            let html = `<div style=\"margin-bottom:15px; font-size:12px; color:#475569;\">Se encontraron <b>${response.data.length}<\/b> resultados para \"${query}\"<\/div>`;\r\n            const regex = new RegExp(`(${query})`, 'gi');\r\n\r\n            response.data.forEach(art => {\r\n                let contenidoResaltado = art.contenido.replace(regex, '<span class=\"lex-front-highlight\">$1<\/span>');\r\n                html += `\r\n                <div class=\"lex-front-article-card\">\r\n                    <div class=\"lex-front-ley-name\">${art.ley_nombre}<\/div>\r\n                    <div class=\"lex-front-article-num\">${art.numero}<\/div>\r\n                    <div class=\"lex-front-article-body\">${contenidoResaltado}<\/div>\r\n                <\/div>`;\r\n            });\r\n            container.innerHTML = html;\r\n        } else {\r\n            container.innerHTML = `<div style=\"padding:40px 0; text-align:center;\"><h3 style=\"color:#ef4444;\">SIN RESULTADOS<\/h3><p style=\"font-size:13px; color:#64748b;\">${response.data.mensaje}<\/p><\/div>`;\r\n        }\r\n    }).catch(error => {\r\n        container.innerHTML = `<p style=\"color:#ef4444; text-align:center;\">Error de conexi\u00f3n.<\/p>`;\r\n    });\r\n}\r\n<\/script>\n<\/div><\/section><\/div>\n<div  class='flex_column av-q4bn-236ba61f48c3fd4f15929b7a4fb7a936 av_one_full  avia-builder-el-2  el_after_av_one_full  avia-builder-el-last  first flex_column_div  column-top-margin'     ><section  class='av_textblock_section av-mn515fwl-56ec8e251f6fe72670952cf3769cc527 '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/CreativeWork\" ><div class='avia_textblock'  itemprop=\"text\" ><p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-928 aligncenter\" src=\"https:\/\/sospuravida.com\/SUITLEGAL\/wp-content\/uploads\/2026\/03\/cintillo-de-verde.png\" alt=\"\" width=\"621\" height=\"72\" srcset=\"https:\/\/sospuravida.com\/SUITLEGAL\/wp-content\/uploads\/2026\/03\/cintillo-de-verde.png 1425w, https:\/\/sospuravida.com\/SUITLEGAL\/wp-content\/uploads\/2026\/03\/cintillo-de-verde-300x35.png 300w, https:\/\/sospuravida.com\/SUITLEGAL\/wp-content\/uploads\/2026\/03\/cintillo-de-verde-1030x119.png 1030w, https:\/\/sospuravida.com\/SUITLEGAL\/wp-content\/uploads\/2026\/03\/cintillo-de-verde-768x89.png 768w, https:\/\/sospuravida.com\/SUITLEGAL\/wp-content\/uploads\/2026\/03\/cintillo-de-verde-705x82.png 705w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/p>\n<\/div><\/section><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-59","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sospuravida.com\/SUITLEGAL\/wp-json\/wp\/v2\/pages\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sospuravida.com\/SUITLEGAL\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sospuravida.com\/SUITLEGAL\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sospuravida.com\/SUITLEGAL\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sospuravida.com\/SUITLEGAL\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":5,"href":"https:\/\/sospuravida.com\/SUITLEGAL\/wp-json\/wp\/v2\/pages\/59\/revisions"}],"predecessor-version":[{"id":931,"href":"https:\/\/sospuravida.com\/SUITLEGAL\/wp-json\/wp\/v2\/pages\/59\/revisions\/931"}],"wp:attachment":[{"href":"https:\/\/sospuravida.com\/SUITLEGAL\/wp-json\/wp\/v2\/media?parent=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}