{"id":7544,"date":"2026-08-19T10:39:57","date_gmt":"2026-08-19T08:39:57","guid":{"rendered":"https:\/\/icomuni.cat\/?page_id=7544"},"modified":"2026-08-19T15:49:10","modified_gmt":"2026-08-19T13:49:10","slug":"resultado-test-negocio","status":"publish","type":"page","link":"https:\/\/icomuni.cat\/es\/resultado-test-negocio\/","title":{"rendered":"Resultado Test Negocio"},"content":{"rendered":"<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div><div id=\"icom-result\">\n\n  <div class=\"icom-result-card\" id=\"icom-loading\">\n    <div class=\"icom-loader\"><\/div>\n    <p>Preparando tu diagn\u00f3stico&#8230;<\/p>\n  <\/div>\n\n  <div class=\"icom-result-card\" id=\"icom-content\" hidden>\n\n    <div class=\"icom-top\">\n\n      <div class=\"icom-heading\">\n        <div class=\"icom-eyebrow\">TU DIAGN\u00d3STICO<\/div>\n\n        <h1 id=\"icom-status\"><\/h1>\n\n        <p id=\"icom-status-text\"><\/p>\n      <\/div>\n\n      <div class=\"icom-score\">\n        <strong id=\"icom-score\"><\/strong>\n        <span>\/100<\/span>\n      <\/div>\n\n    <\/div>\n\n\n    <div class=\"icom-summary\">\n\n      <div class=\"icom-summary-box\">\n        <small>TU PUNTO M\u00c1S FUERTE<\/small>\n        <strong id=\"icom-strong\"><\/strong>\n      <\/div>\n\n      <div class=\"icom-summary-box icom-focus\">\n        <small>DONDE PONDR\u00cdA EL FOCO<\/small>\n        <strong id=\"icom-weak\"><\/strong>\n      <\/div>\n\n    <\/div>\n\n\n    <section>\n      <h2>Tu negocio por \u00e1reas<\/h2>\n      <div id=\"icom-areas\"><\/div>\n    <\/section>\n\n\n    <section id=\"icom-alert-section\" hidden>\n\n      <h2>Hay algo que merece atenci\u00f3n<\/h2>\n\n      <div id=\"icom-alerts\"><\/div>\n\n    <\/section>\n\n\n    <section>\n\n      <h2>\u00bfPor d\u00f3nde empezar\u00eda?<\/h2>\n\n      <p class=\"icom-section-intro\">\n        Si este fuera mi negocio, no intentar\u00eda arreglarlo todo ma\u00f1ana.\n        Empezar\u00eda por estas tres cosas:\n      <\/p>\n\n      <ul id=\"icom-recommendations\"><\/ul>\n\n    <\/section>\n\n\n    <div class=\"icom-cta\">\n\n      <div class=\"icom-eyebrow icom-eyebrow-light\">\n        \u00bfQUIERES DARLE LA VUELTA?\n      <\/div>\n\n      <h2>\u00bfQuieres mejorar este resultado?<\/h2>\n\n      <p>\n        Podemos revisar contigo qu\u00e9 atacar primero.\n        Sin venderte humo ni montar un PowerPoint de 84 diapositivas.\n      <\/p>\n\n      <a href=\"\/es\/contacto\/\" class=\"icom-button\">\n        QUIERO REVISAR MI DIAGN\u00d3STICO\n      <\/a>\n\n    <\/div>\n\n  <\/div>\n\n\n  <div class=\"icom-result-card icom-error\" id=\"icom-error\" hidden>\n\n    <div class=\"icom-error-icon\">\ud83d\ude35\u200d\ud83d\udcab<\/div>\n\n    <h1>No hemos podido abrir tu diagn\u00f3stico<\/h1>\n\n    <p id=\"icom-error-message\">\n      Parece que el enlace no es v\u00e1lido o el diagn\u00f3stico ya no est\u00e1 disponible.\n    <\/p>\n\n    <p>\n      Si acabas de recibir el email, prueba a abrir de nuevo el enlace.\n    <\/p>\n\n  <\/div>\n\n<\/div>\n\n\n<style>\n\n#icom-result {\n\n  --blue: #4666AD;\n  --dark: #1F3564;\n  --purple: #3B276A;\n  --coral: #EA5955;\n  --teal: #009CA3;\n\n  --text: #20242C;\n  --muted: #68707D;\n  --border: #E5E8EE;\n  --soft: #F6F7FA;\n\n  max-width: 900px;\n  margin: 35px auto 60px;\n  font-family: inherit;\n  color: var(--text);\n\n}\n\n#icom-result * {\n  box-sizing: border-box;\n}\n\n#icom-result [hidden] {\n  display: none !important;\n}\n\n\n.icom-result-card {\n\n  background: #fff;\n  border: 1px solid var(--border);\n  border-radius: 24px;\n\n  padding: clamp(28px, 5vw, 55px);\n\n  box-shadow:\n    0 20px 60px rgba(31,53,100,.08);\n\n}\n\n\n#icom-loading {\n\n  text-align: center;\n  padding: 60px 30px;\n\n}\n\n\n.icom-loader {\n\n  width: 42px;\n  height: 42px;\n\n  margin: 0 auto 20px;\n\n  border: 4px solid #e8ebf0;\n  border-top-color: var(--teal);\n\n  border-radius: 50%;\n\n  animation: icom-spin .8s linear infinite;\n\n}\n\n@keyframes icom-spin {\n\n  to {\n    transform: rotate(360deg);\n  }\n\n}\n\n\n.icom-top {\n\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n\n  gap: 40px;\n\n  margin-bottom: 40px;\n\n}\n\n\n.icom-heading {\n  flex: 1;\n}\n\n\n.icom-eyebrow {\n\n  margin-bottom: 12px;\n\n  color: var(--blue);\n\n  font-size: 12px;\n  font-weight: 800;\n\n  letter-spacing: .09em;\n\n}\n\n\n#icom-result h1 {\n\n  margin: 0 0 15px;\n\n  color: var(--dark);\n\n  font-size: clamp(35px, 6vw, 54px);\n  line-height: 1.05;\n\n  letter-spacing: -.04em;\n\n}\n\n\n#icom-result h2 {\n\n  margin: 42px 0 18px;\n\n  color: var(--dark);\n\n  font-size: 27px;\n  line-height: 1.2;\n\n}\n\n\n#icom-status-text {\n\n  max-width: 570px;\n\n  margin: 0;\n\n  color: var(--muted);\n\n  font-size: 18px;\n  line-height: 1.6;\n\n}\n\n\n.icom-score {\n\n  width: 150px;\n  height: 150px;\n\n  flex: 0 0 150px;\n\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n\n  border: 8px solid var(--teal);\n\n  border-radius: 50%;\n\n}\n\n\n.icom-score strong {\n\n  color: var(--dark);\n\n  font-size: 46px;\n  line-height: 1;\n\n}\n\n\n.icom-score span {\n\n  margin-top: 3px;\n\n  color: var(--muted);\n\n  font-size: 14px;\n\n}\n\n\n.icom-summary {\n\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n\n  gap: 15px;\n\n  margin-bottom: 15px;\n\n}\n\n\n.icom-summary-box {\n\n  padding: 23px;\n\n  background: var(--soft);\n\n  border-radius: 14px;\n\n}\n\n\n.icom-summary-box small {\n\n  display: block;\n\n  margin-bottom: 8px;\n\n  color: var(--muted);\n\n  font-size: 11px;\n  font-weight: 800;\n\n  letter-spacing: .07em;\n\n}\n\n\n.icom-summary-box strong {\n\n  color: var(--dark);\n\n  font-size: 22px;\n\n}\n\n\n.icom-focus {\n\n  background: rgba(234,89,85,.08);\n\n}\n\n\n.icom-area {\n\n  margin-bottom: 19px;\n\n}\n\n\n.icom-area-header {\n\n  display: flex;\n  justify-content: space-between;\n\n  gap: 20px;\n\n  margin-bottom: 7px;\n\n  font-size: 14px;\n  font-weight: 700;\n\n}\n\n\n.icom-area-track {\n\n  height: 10px;\n\n  overflow: hidden;\n\n  background: #EBEEF3;\n\n  border-radius: 999px;\n\n}\n\n\n.icom-area-bar {\n\n  width: 0;\n  height: 100%;\n\n  background: var(--blue);\n\n  border-radius: inherit;\n\n  transition: width .8s ease;\n\n}\n\n\n.icom-alert-item {\n\n  margin-bottom: 10px;\n\n  padding: 15px 18px;\n\n  background: rgba(234,89,85,.08);\n\n  border-left: 4px solid var(--coral);\n  border-radius: 5px 10px 10px 5px;\n\n  line-height: 1.55;\n\n}\n\n\n.icom-section-intro {\n\n  color: var(--muted);\n\n  line-height: 1.6;\n\n}\n\n\n#icom-recommendations {\n\n  padding-left: 22px;\n\n}\n\n\n#icom-recommendations li {\n\n  margin-bottom: 13px;\n\n  line-height: 1.55;\n\n}\n\n\n.icom-cta {\n\n  margin-top: 50px;\n\n  padding: 34px;\n\n  background: var(--dark);\n\n  border-radius: 18px;\n\n  color: white;\n\n}\n\n\n.icom-cta h2 {\n\n  margin: 0 0 12px !important;\n\n  color: white !important;\n\n}\n\n\n.icom-cta p {\n\n  max-width: 650px;\n\n  margin: 0 0 22px;\n\n  line-height: 1.6;\n\n  opacity: .9;\n\n}\n\n\n.icom-eyebrow-light {\n\n  color: rgba(255,255,255,.7);\n\n}\n\n\n.icom-button {\n\n  display: inline-block;\n\n  padding: 15px 22px;\n\n  background: var(--coral);\n\n  border-radius: 10px;\n\n  color: white !important;\n\n  font-size: 14px;\n  font-weight: 800;\n\n  text-decoration: none !important;\n\n}\n\n\n.icom-error {\n\n  text-align: center;\n\n}\n\n\n.icom-error-icon {\n\n  margin-bottom: 15px;\n\n  font-size: 45px;\n\n}\n\n\n.icom-error p {\n\n  color: var(--muted);\n\n  font-size: 17px;\n  line-height: 1.6;\n\n}\n\n\n@media(max-width:650px) {\n\n  #icom-result {\n    margin: 20px auto 40px;\n  }\n\n  .icom-result-card {\n\n    padding: 28px 20px;\n\n    border-radius: 18px;\n\n  }\n\n  .icom-top {\n\n    flex-direction: column-reverse;\n\n    align-items: flex-start;\n\n  }\n\n  .icom-score {\n\n    width: 120px;\n    height: 120px;\n\n    flex-basis: 120px;\n\n  }\n\n  .icom-score strong {\n    font-size: 37px;\n  }\n\n  .icom-summary {\n    grid-template-columns: 1fr;\n  }\n\n}\n\n<\/style>\n\n\n<script>\n\n(function () {\n\n  'use strict';\n\n\n  \/* =============================================\n     CONFIGURACI\u00d3N\n  ============================================== *\/\n\n  const API_BASE =\n    '\/wp-json\/icomuni\/v1\/test-diagnosis\/';\n\n\n  const labels = {\n\n    estrategia: 'Estrategia',\n    captacion: 'Captaci\u00f3n',\n    ventas: 'Ventas',\n    procesos: 'Procesos',\n    adaptacion: 'Adaptaci\u00f3n',\n    ia: 'Inteligencia Artificial'\n\n  };\n\n\n  const order = [\n\n    'estrategia',\n    'captacion',\n    'ventas',\n    'procesos',\n    'adaptacion',\n    'ia'\n\n  ];\n\n\n  \/* =============================================\n     ELEMENTOS\n  ============================================== *\/\n\n  const loading =\n    document.getElementById('icom-loading');\n\n  const content =\n    document.getElementById('icom-content');\n\n  const error =\n    document.getElementById('icom-error');\n\n  const errorMessage =\n    document.getElementById('icom-error-message');\n\n\n  \/* =============================================\n     ERROR\n  ============================================== *\/\n\n  function showError(message) {\n\n    loading.hidden = true;\n    content.hidden = true;\n\n    errorMessage.textContent = message;\n    error.hidden = false;\n\n  }\n\n\n  \/* =============================================\n     TOKEN DE LA URL\n  ============================================== *\/\n\n  const params =\n    new URLSearchParams(\n      window.location.search\n    );\n\n\n  const token =\n    params.get('t');\n\n\n  if (\n    !token ||\n    !\/^[a-f0-9]{48}$\/i.test(token)\n  ) {\n\n    showError(\n      'El enlace del diagn\u00f3stico no parece v\u00e1lido.'\n    );\n\n    return;\n\n  }\n\n\n  \/* =============================================\n     RECUPERAR RESULTADO DE WORDPRESS\n  ============================================== *\/\n\n  fetch(\n    API_BASE +\n    encodeURIComponent(token),\n    {\n      method: 'GET',\n      cache: 'no-store',\n      headers: {\n        'Accept': 'application\/json'\n      }\n    }\n  )\n\n  .then(function (response) {\n\n    return response\n      .json()\n      .then(function (data) {\n\n        return {\n          ok: response.ok,\n          status: response.status,\n          data: data\n        };\n\n      });\n\n  })\n\n  .then(function (response) {\n\n    if (\n      !response.ok ||\n      !response.data ||\n      response.data.success !== true ||\n      !response.data.result\n    ) {\n\n      let message =\n        'No hemos podido recuperar este diagn\u00f3stico.';\n\n\n      if (\n        response.data &&\n        response.data.message\n      ) {\n\n        message =\n          response.data.message;\n\n      }\n\n\n      throw new Error(message);\n\n    }\n\n\n    renderResult(\n      response.data.result\n    );\n\n  })\n\n  .catch(function (err) {\n\n    console.error(\n      'IcomuniCaT diagn\u00f3stico:',\n      err\n    );\n\n\n    showError(\n      err.message ||\n      'Ha ocurrido un problema recuperando el diagn\u00f3stico.'\n    );\n\n  });\n\n\n  \/* =============================================\n     MOSTRAR RESULTADO\n  ============================================== *\/\n\n  function renderResult(result) {\n\n\n    document\n      .getElementById('icom-score')\n      .textContent =\n        result.total;\n\n\n    document\n      .getElementById('icom-status')\n      .textContent =\n        result.statusLabel;\n\n\n    document\n      .getElementById('icom-status-text')\n      .textContent =\n        result.statusText;\n\n\n    document\n      .getElementById('icom-strong')\n      .textContent =\n        result.strongLabel;\n\n\n    document\n      .getElementById('icom-weak')\n      .textContent =\n        result.weakLabel;\n\n\n    \/* ===========================================\n       \u00c1REAS\n    ============================================ *\/\n\n    const areas =\n      document.getElementById('icom-areas');\n\n\n    areas.innerHTML = '';\n\n\n    order.forEach(function (area) {\n\n\n      const value =\n        Number(result.areas[area]) || 0;\n\n\n      const wrapper =\n        document.createElement('div');\n\n\n      wrapper.className =\n        'icom-area';\n\n\n      const header =\n        document.createElement('div');\n\n\n      header.className =\n        'icom-area-header';\n\n\n      const name =\n        document.createElement('span');\n\n\n      name.textContent =\n        labels[area];\n\n\n      const score =\n        document.createElement('span');\n\n\n      score.textContent =\n        value + '\/100';\n\n\n      header.appendChild(name);\n      header.appendChild(score);\n\n\n      const track =\n        document.createElement('div');\n\n\n      track.className =\n        'icom-area-track';\n\n\n      const bar =\n        document.createElement('div');\n\n\n      bar.className =\n        'icom-area-bar';\n\n\n      track.appendChild(bar);\n\n\n      wrapper.appendChild(header);\n      wrapper.appendChild(track);\n\n\n      areas.appendChild(wrapper);\n\n\n      setTimeout(function () {\n\n        bar.style.width =\n          Math.max(\n            0,\n            Math.min(100, value)\n          ) + '%';\n\n      }, 100);\n\n    });\n\n\n    \/* ===========================================\n       ALERTAS\n    ============================================ *\/\n\n    const alertsSection =\n      document.getElementById(\n        'icom-alert-section'\n      );\n\n\n    const alertsContainer =\n      document.getElementById(\n        'icom-alerts'\n      );\n\n\n    alertsContainer.innerHTML = '';\n\n\n    if (\n      Array.isArray(result.alerts) &&\n      result.alerts.length\n    ) {\n\n\n      result.alerts.forEach(\n        function (alertText) {\n\n\n          const item =\n            document.createElement('div');\n\n\n          item.className =\n            'icom-alert-item';\n\n\n          item.textContent =\n            alertText;\n\n\n          alertsContainer\n            .appendChild(item);\n\n        }\n      );\n\n\n      alertsSection.hidden = false;\n\n    } else {\n\n      alertsSection.hidden = true;\n\n    }\n\n\n    \/* ===========================================\n       RECOMENDACIONES\n    ============================================ *\/\n\n    const recommendations =\n      document.getElementById(\n        'icom-recommendations'\n      );\n\n\n    recommendations.innerHTML = '';\n\n\n    if (\n      Array.isArray(\n        result.recommendations\n      )\n    ) {\n\n\n      result.recommendations.forEach(\n        function (recommendation) {\n\n\n          const item =\n            document.createElement('li');\n\n\n          item.textContent =\n            recommendation;\n\n\n          recommendations\n            .appendChild(item);\n\n        }\n      );\n\n    }\n\n\n    \/* ===========================================\n       MOSTRAR\n    ============================================ *\/\n\n    loading.hidden = true;\n    error.hidden = true;\n    content.hidden = false;\n\n  }\n\n})();\n\n<\/script>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-7544","page","type-page","status-publish","no-featured-image-padding"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/icomuni.cat\/es\/wp-json\/wp\/v2\/pages\/7544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icomuni.cat\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/icomuni.cat\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/icomuni.cat\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/icomuni.cat\/es\/wp-json\/wp\/v2\/comments?post=7544"}],"version-history":[{"count":3,"href":"https:\/\/icomuni.cat\/es\/wp-json\/wp\/v2\/pages\/7544\/revisions"}],"predecessor-version":[{"id":7562,"href":"https:\/\/icomuni.cat\/es\/wp-json\/wp\/v2\/pages\/7544\/revisions\/7562"}],"wp:attachment":[{"href":"https:\/\/icomuni.cat\/es\/wp-json\/wp\/v2\/media?parent=7544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}