/* ============================================================
   Indemniza360 — Centro de conocimiento (blog)
   Reutiliza tokens de styles.css (:root). Cargar DESPUÉS.
   ============================================================ */

/* Acentos por tema */
:root {
  --t-trafico: #11B5A6;
  --t-laboral: #E8A23D;
  --t-sanitaria: #E5604D;
  --t-civil: #6C6BD8;
  --t-practicas: #3DA0E8;
}

/* ---------- Hero del centro de conocimiento ---------- */
.kb-hero {
  position: relative;
  background:
    radial-gradient(900px 500px at 88% -20%, rgba(17, 181, 166, 0.2), transparent 60%),
    radial-gradient(700px 400px at 5% 120%, rgba(108, 107, 216, 0.16), transparent 60%),
    var(--navy);
  color: #fff;
  overflow: hidden;
}
.kb-hero::after {
  content: "";
  position: absolute;
  right: -180px; top: -220px;
  width: 560px; height: 560px;
  border: 1.5px solid rgba(17, 181, 166, 0.16);
  border-radius: 50%;
  pointer-events: none;
}
.kb-hero .container { position: relative; padding-top: 56px; padding-bottom: 56px; }
.kb-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 18px;
}
.kb-eyebrow svg { width: 17px; height: 17px; }
.kb-hero h1 {
  color: #fff;
  font-size: clamp(34px, 4.8vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 860px;
  margin-bottom: 18px;
}
.kb-hero h1 em { font-style: normal; color: var(--teal); }
.kb-hero .kb-lead {
  font-size: clamp(17px, 1.7vw, 20px);
  color: rgba(255, 255, 255, 0.78);
  max-width: 600px;
  margin-bottom: 30px;
}
.kb-search {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 14px 18px;
  max-width: 520px;
}
.kb-search svg { width: 20px; height: 20px; color: rgba(255, 255, 255, 0.6); flex-shrink: 0; }
.kb-search input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; font-size: 16px; font-family: var(--font); font-weight: 500;
}
.kb-search input::placeholder { color: rgba(255, 255, 255, 0.5); }
.kb-search .kb-search-hint { font-size: 12.5px; color: rgba(255,255,255,0.4); font-weight: 600; white-space: nowrap; }

.kb-stats { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.kb-stats div strong { display: block; font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.kb-stats div span { font-size: 13px; color: rgba(255, 255, 255, 0.6); font-weight: 600; }

/* ---------- Barra de temas ---------- */
.topic-bar { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 76px; z-index: 40; }
.topic-bar .container { display: flex; align-items: center; gap: 10px; padding-top: 16px; padding-bottom: 16px; overflow-x: auto; }
.topic-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 700; white-space: nowrap;
  color: var(--carbon); background: var(--bone);
  border: 1px solid var(--line); cursor: pointer;
  transition: all 0.15s;
}
.topic-pill:hover { border-color: var(--teal); color: var(--teal-ink); }
.topic-pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.topic-pill .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.topic-pill .cnt { font-size: 12px; opacity: 0.6; font-weight: 800; }

/* ---------- Artículo destacado ---------- */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  background: var(--paper);
  margin-bottom: 56px;
}
.featured-cover { position: relative; min-height: 380px; background-size: cover; background-position: center; }
.featured-cover .cover-grad { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(11,29,58,0.1), rgba(11,29,58,0.45)); }
.featured-badge {
  position: absolute; top: 22px; left: 22px;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.95); color: var(--navy);
  font-size: 12.5px; font-weight: 800; padding: 7px 13px; border-radius: 999px;
}
.featured-badge svg { width: 14px; height: 14px; color: var(--teal-ink); }
.featured-body { padding: 44px 44px; display: flex; flex-direction: column; justify-content: center; }
.featured-cat { font-size: 12.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.featured-body h2 { font-size: clamp(26px, 2.8vw, 34px); line-height: 1.18; letter-spacing: -0.01em; margin-bottom: 14px; }
.featured-body p { color: var(--slate); font-size: 16.5px; margin-bottom: 22px; }
.featured-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; font-size: 13.5px; color: var(--slate); font-weight: 600; }
.featured-meta .dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.featured-meta .author { display: flex; align-items: center; gap: 9px; }
.read-link { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; color: var(--teal-ink); font-size: 16px; }
.read-link svg { width: 18px; height: 18px; transition: transform 0.15s; }
.featured:hover .read-link svg, .article-card:hover .read-link svg { transform: translateX(4px); }

/* ---------- Avatar autor ---------- */
.author-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  font-weight: 800; font-size: 11px; flex-shrink: 0;
}

/* ---------- Cabecera de sección ---------- */
.kb-section-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.kb-section-head h2 { font-size: 26px; letter-spacing: -0.01em; }
.kb-section-head p { color: var(--slate); font-size: 15.5px; margin-top: 4px; }
.kb-section-head .right { margin-left: auto; }

/* ---------- Grid de artículos ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 20px 48px -20px rgba(11,29,58,0.28); }
.article-card .ac-cover { height: 172px; position: relative; background-size: cover; background-position: center; }
.article-card .ac-cat {
  position: absolute; top: 14px; left: 14px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: 999px; color: #fff;
  background: rgba(11,29,58,0.55); backdrop-filter: blur(4px);
  display: inline-flex; align-items: center; gap: 6px;
}
.article-card .ac-cat .dot { width: 7px; height: 7px; border-radius: 50%; }
.article-card .ac-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.article-card h3 { font-size: 19px; line-height: 1.28; margin-bottom: 9px; letter-spacing: -0.01em; }
.article-card .ac-ex { color: var(--slate); font-size: 14.5px; line-height: 1.55; flex: 1; }
.article-card .ac-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--slate); font-weight: 600;
}
.article-card .ac-foot .read-time { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--slate); }
.article-card .ac-foot .read-time svg { width: 13px; height: 13px; }

/* ---------- Guías esenciales (pillar content) ---------- */
.guides { background: var(--navy); border-radius: 20px; padding: 48px; color: #fff; position: relative; overflow: hidden; }
.guides::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 320px; height: 320px; border: 1.5px solid rgba(17,181,166,0.2); border-radius: 50%; }
.guides-head { position: relative; max-width: 600px; margin-bottom: 34px; }
.guides-head .kb-eyebrow { color: var(--teal); }
.guides-head h2 { color: #fff; font-size: clamp(26px, 2.8vw, 34px); letter-spacing: -0.01em; }
.guides-head p { color: rgba(255,255,255,0.72); font-size: 16.5px; margin-top: 10px; }
.guides-list { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.guide-item {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.guide-item:hover { background: rgba(17,181,166,0.12); border-color: rgba(17,181,166,0.4); transform: translateX(3px); }
.guide-item .g-num { font-size: 30px; font-weight: 800; color: var(--teal); letter-spacing: -0.02em; min-width: 42px; line-height: 1; }
.guide-item .g-text b { display: block; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 3px; }
.guide-item .g-text span { font-size: 13px; color: rgba(255,255,255,0.6); }
.guide-item .g-arrow { margin-left: auto; color: rgba(255,255,255,0.4); flex-shrink: 0; }
.guide-item:hover .g-arrow { color: var(--teal); }
.guide-item .g-arrow svg { width: 18px; height: 18px; }

/* ---------- CTA newsletter ---------- */
.kb-news {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  background: linear-gradient(120deg, var(--teal) 0%, var(--teal-dark) 100%);
  border-radius: 20px; padding: 44px 48px; color: #fff;
}
.kb-news h2 { color: #fff; font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 10px; }
.kb-news p { color: rgba(255,255,255,0.9); font-size: 16px; }
.kb-news-form { display: flex; gap: 10px; flex-wrap: wrap; }
.kb-news-form input {
  flex: 1; min-width: 200px; padding: 14px 16px; border-radius: 11px; border: none;
  font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--ink); outline: none;
}
.kb-news-form .btn { background: var(--navy); color: #fff; }
.kb-news-form .btn:hover { background: var(--navy-soft); }
.kb-news-note { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 10px; }

/* ============================================================
   PÁGINA DE ARTÍCULO
   ============================================================ */
/* barra de progreso de lectura */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--teal); z-index: 100; transition: width 0.1s linear; }

.article-hero { background: var(--bone); border-bottom: 1px solid var(--line); }
.article-hero .container { padding-top: 36px; padding-bottom: 38px; max-width: 820px; }
.article-cat-line { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.article-cat-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; color: #fff;
}
.article-cat-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.85); }
.article-hero h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.14; letter-spacing: -0.02em; margin-bottom: 18px; }
.article-hero .standfirst { font-size: clamp(18px, 1.8vw, 21px); color: var(--slate); line-height: 1.5; margin-bottom: 26px; text-wrap: pretty; }
.article-byline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--slate); font-weight: 600; }
.article-byline .author { display: flex; align-items: center; gap: 10px; }
.article-byline .author b { color: var(--navy); font-weight: 800; }
.article-byline .dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

.article-cover-full { width: 100%; height: clamp(240px, 36vw, 440px); background-size: cover; background-position: center; position: relative; }

.article-wrap { display: grid; grid-template-columns: 240px minmax(0, 720px) 1fr; gap: 40px; max-width: 1180px; margin: 0 auto; padding: 56px 24px 0; }
.article-toc { position: sticky; top: 100px; align-self: start; }
.article-toc .toc-label { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); margin-bottom: 14px; }
.article-toc ul { display: grid; gap: 3px; border-left: 2px solid var(--line); }
.article-toc a {
  display: block; padding: 7px 0 7px 16px; margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 14px; font-weight: 600; color: var(--slate); line-height: 1.35;
  transition: color 0.15s, border-color 0.15s;
}
.article-toc a:hover { color: var(--teal-ink); }
.article-toc a.active { color: var(--navy); font-weight: 800; border-left-color: var(--teal); }
.article-aside-r { /* columna derecha vacía / sticky cta en desktop */ }
.share-rail { position: sticky; top: 100px; display: grid; gap: 10px; justify-items: start; }
.share-rail .sr-label { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); margin-bottom: 4px; }
.share-btn { width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; color: var(--slate); transition: all 0.15s; }
.share-btn:hover { color: var(--teal-ink); border-color: var(--teal); transform: translateY(-2px); }
.share-btn svg { width: 18px; height: 18px; }

/* ---------- Cuerpo del artículo ---------- */
.article-body { font-size: 18.5px; line-height: 1.78; color: var(--ink); }
.article-body > p { margin-bottom: 22px; color: #2b3645; }
.article-body > p:first-of-type::first-letter {
  float: left; font-size: 64px; line-height: 0.82; font-weight: 800;
  color: var(--navy); margin: 6px 12px 0 0; font-family: var(--font);
}
.article-body h2 {
  font-size: 27px; letter-spacing: -0.01em; margin: 44px 0 16px; scroll-margin-top: 100px;
  padding-top: 6px;
}
.article-body h3 { font-size: 21px; margin: 30px 0 12px; }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 26px; display: grid; gap: 10px; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { color: #2b3645; line-height: 1.65; }
.article-body li::marker { color: var(--teal); font-weight: 800; }
.article-body a { font-weight: 700; border-bottom: 1.5px solid rgba(17,181,166,0.35); }
.article-body a:hover { border-bottom-color: var(--teal); }
.article-body strong { color: var(--navy); font-weight: 800; }
.article-body blockquote {
  margin: 28px 0; padding: 6px 0 6px 26px; border-left: 4px solid var(--teal);
  font-size: 22px; line-height: 1.45; font-weight: 700; color: var(--navy); font-style: italic;
}

/* recuadros */
.callout {
  display: flex; gap: 16px; margin: 28px 0;
  background: var(--cloud); border-radius: 14px; padding: 22px 24px;
  border: 1px solid rgba(17,181,166,0.25);
}
.callout svg { width: 24px; height: 24px; color: var(--teal-ink); flex-shrink: 0; margin-top: 2px; }
.callout .co-body { font-size: 16px; line-height: 1.6; color: var(--ink); }
.callout .co-body b { color: var(--navy); }
.callout.warning { background: #FCF3E8; border-color: rgba(232,162,61,0.4); }
.callout.warning svg { color: #b9772a; }

/* puntos clave */
.takeaways {
  background: var(--navy); color: #fff; border-radius: 16px; padding: 28px 30px; margin: 0 0 36px;
  position: relative; overflow: hidden;
}
.takeaways::after { content: ""; position: absolute; right: -70px; top: -70px; width: 200px; height: 200px; border: 1.5px solid rgba(17,181,166,0.25); border-radius: 50%; }
.takeaways .tk-head { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 16px; }
.takeaways .tk-head svg { width: 18px; height: 18px; }
.takeaways ul { display: grid; gap: 14px; position: relative; list-style: none; }
.takeaways li { position: relative; padding-left: 31px; font-size: 16px; line-height: 1.5; color: rgba(255,255,255,0.9); list-style: none; }
.takeaways li svg { position: absolute; left: 0; top: 3px; width: 19px; height: 19px; color: var(--teal); }

/* CTA dentro del artículo */
.inline-cta {
  margin: 38px 0; padding: 30px 32px; border-radius: 16px;
  background: linear-gradient(120deg, var(--teal), var(--teal-dark)); color: #fff;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.inline-cta .ic-text { flex: 1; min-width: 240px; }
.inline-cta h3 { color: #fff; font-size: 22px; margin-bottom: 6px; }
.inline-cta p { color: rgba(255,255,255,0.9); font-size: 15.5px; }
.inline-cta .btn { background: var(--navy); color: #fff; white-space: nowrap; }
.inline-cta .btn:hover { background: var(--navy-soft); }

/* caja de autor */
.author-box {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--bone); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 28px; margin: 44px 0 0;
}
.author-box .ab-avatar { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; flex-shrink: 0; }
.author-box .ab-name { font-size: 17px; font-weight: 800; color: var(--navy); }
.author-box .ab-role { font-size: 13.5px; color: var(--teal-ink); font-weight: 700; margin-bottom: 8px; }
.author-box .ab-bio { font-size: 14.5px; color: var(--slate); line-height: 1.55; }

/* fin de artículo: divider */
.article-end { max-width: 820px; margin: 0 auto; padding: 0 24px; }

/* relacionados */
.related { background: var(--bone); border-top: 1px solid var(--line); margin-top: 64px; }
.related .container { padding-top: 56px; padding-bottom: 72px; }

/* ---------- Responsive blog ---------- */
@media (max-width: 1080px) {
  .article-wrap { grid-template-columns: minmax(0, 760px); justify-content: center; }
  .article-toc, .article-aside-r { display: none; }
  .featured { grid-template-columns: 1fr; }
  .featured-cover { min-height: 240px; }
  .guides-list { grid-template-columns: 1fr; }
}
@media (max-width: 1020px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .topic-bar { top: 0; }
  .kb-news { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .featured-body { padding: 28px 24px; }
  .guides { padding: 32px 24px; }
  .article-body { font-size: 17.5px; }
  .article-body > p:first-of-type::first-letter { font-size: 52px; }
  .kb-section-head { flex-wrap: wrap; }
}
