/* ============================================================
   ConvertAI — BLOG
   CSS standalone. El blog NO carga Tailwind CDN a propósito:
   son páginas de contenido y el CDN de Tailwind es un script
   render-blocking de ~300KB que destroza LCP/INP. Los tokens
   de color son los mismos de la landing (index.html + landing.css).
   ============================================================ */

:root {
  --bg: #1a1d21;
  --bg-soft: #22272b;
  --bg-soft-2: #2c333a;
  --border: #30363d;
  --border-soft: rgba(48, 54, 61, 0.5);
  --text: #c9d1d9;
  --text-dim: #8b949e;
  --text-dimmer: #6b7280;
  --white: #fff;
  --brand: #ec4899;
  --brand-400: #f472b6;
  --brand-600: #db2777;
  --wa: #25d366;
  --radius: 16px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* El header sticky tapa los anclas del TOC si no reservamos el offset */
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--brand-400); text-decoration: none; }
a:hover { color: var(--brand); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Salto directo al contenido — accesibilidad y señal de calidad */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
  font-weight: 700; font-size: 14px;
}
.skip-link:focus { left: 0; color: #fff; }

/* ===================== HEADER ===================== */
.bnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(26, 29, 33, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.bnav-in {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-width: 0;
}
.bnav-logo { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bnav-logo span { white-space: nowrap; }
/* El logo va a la landing (comportamiento esperado en cualquier sitio) y el
   tag "Blog" al índice. Antes el logo apuntaba a /blog y no quedaba forma
   de regresar al sitio principal desde un artículo. */
.bnav-home { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bnav-home:hover span { color: var(--brand-400); }
a.blog-tag:hover { background: rgba(236, 72, 153, 0.12); color: var(--brand); }
.bnav-logo img {
  height: 26px; width: auto;
  filter: brightness(0) saturate(100%) invert(32%) sepia(83%) saturate(2046%) hue-rotate(312deg) brightness(95%) contrast(92%);
}
.bnav-logo span { font-weight: 800; color: var(--white); font-size: 17px; letter-spacing: -0.01em; }
.bnav-logo .blog-tag {
  font-size: 11px; font-weight: 700; color: var(--brand);
  border: 1px solid rgba(236, 72, 153, 0.35); border-radius: 5px;
  padding: 1px 6px; letter-spacing: 0.04em; text-transform: uppercase;
}
.bnav-links { display: none; gap: 22px; font-size: 14px; color: var(--text-dim); }
.bnav-links a { color: var(--text-dim); }
.bnav-links a:hover { color: var(--white); }
.bnav-cta {
  background: var(--brand); color: #fff !important; font-weight: 700; font-size: 14px;
  padding: 8px 16px; border-radius: 9px; white-space: nowrap;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.2);
}
.bnav-cta:hover { background: var(--brand-600); box-shadow: 0 0 30px rgba(236, 72, 153, 0.35); }
@media (min-width: 900px) { .bnav-links { display: flex; } }

/* Barra de progreso de lectura */
.read-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-400));
  z-index: 60; transition: width 0.1s linear;
}

/* ===================== BREADCRUMBS ===================== */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dimmer); padding: 22px 0 0;
}
.crumbs a { color: var(--text-dim); }
.crumbs a:hover { color: var(--white); }
.crumbs .sep { opacity: 0.5; }
.crumbs [aria-current] { color: var(--text-dim); }

/* ===================== HERO DEL BLOG ===================== */
.blog-hero { padding: 48px 0 32px; text-align: center; }
.blog-hero h1 {
  font-size: clamp(32px, 6vw, 52px); font-weight: 900; color: var(--white);
  letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 16px;
}
.blog-hero p { font-size: 18px; color: var(--text-dim); max-width: 640px; margin: 0 auto; line-height: 1.65; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font-size: 13px; font-weight: 600; color: var(--brand);
  background: rgba(236, 72, 153, 0.08); border: 1px solid rgba(236, 72, 153, 0.22);
  padding: 6px 14px; border-radius: 999px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.6); animation: pdot 2s infinite;
}
@keyframes pdot {
  0% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(236, 72, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

/* ===================== BUSCADOR DEL ÍNDICE ===================== */
/* Filtra las tarjetas que YA están en el DOM del índice. Cero peticiones y
   cero índice JSON: el único peso extra es el atributo `data-search` de cada
   tarjeta. Solo existe en /blog; los artículos no cargan nada de esto. */
.blog-search { max-width: 560px; margin: 8px auto 0; }
.blog-search input {
  width: 100%;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 18px;
  color: var(--text); font-size: 15px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.blog-search input::placeholder { color: var(--text-dimmer); }
.blog-search input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}
.blog-search input::-webkit-search-cancel-button { filter: invert(0.6); cursor: pointer; }
.search-count {
  margin: 10px 0 0; text-align: center;
  font-size: 13px; color: var(--text-dim); min-height: 18px;
}

/* ===================== CHIPS DE CATEGORÍA ===================== */
.cat-bar {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 28px 0 8px;
}
.chip {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px; transition: all 0.2s;
}
.chip:hover { border-color: var(--brand); color: var(--white); }
.chip.on { background: rgba(236, 72, 153, 0.12); border-color: var(--brand); color: var(--brand-400); }

/* ===================== GRID DE POSTS ===================== */
.post-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px;
  padding: 32px 0 16px;
}
.post-grid > * { min-width: 0; }
@media (min-width: 700px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* La tarjeta entera es clickeable vía "stretched link": el <a> real envuelve
   solo el título (así el anchor text que ve Google es el título del artículo)
   y su ::after se estira sobre toda la tarjeta. Se evita anidar bloques dentro
   de un <a>, que rompe el foco de teclado en varios navegadores. */
.pcard {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.pcard h2 a, .pcard h3 a, .featured-body h2 a {
  color: inherit; text-decoration: none;
}
.pcard h2 a::after, .pcard h3 a::after, .featured-body h2 a::after {
  content: ''; position: absolute; inset: 0;
}
.pcard h2 a:focus-visible::after, .pcard h3 a:focus-visible::after,
.featured-body h2 a:focus-visible::after {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius);
}
.pcard:hover {
  transform: translateY(-4px); border-color: var(--brand);
  box-shadow: 0 12px 40px rgba(236, 72, 153, 0.1);
}
.pcard-img { aspect-ratio: 16 / 9; background: var(--bg-soft-2); overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.pcard-cat { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.pcard h2, .pcard h3 {
  margin: 0; font-size: 18px; line-height: 1.35; font-weight: 700;
  color: var(--white); letter-spacing: -0.01em;
}
.pcard p { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.pcard-meta {
  margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--text-dimmer);
  display: flex; align-items: center; gap: 8px;
}
/* Post destacado */
.featured {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-top: 8px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.featured:hover { border-color: var(--brand); box-shadow: 0 12px 40px rgba(236, 72, 153, 0.1); }
.featured-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft-2); }
.featured-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-body { padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.featured-body h2 {
  margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.25;
  font-weight: 800; color: var(--white); letter-spacing: -0.02em;
}
.featured-body p { margin: 0; color: var(--text-dim); font-size: 16px; line-height: 1.65; }
@media (min-width: 860px) {
  .featured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .featured-img { aspect-ratio: auto; height: 100%; }
}

/* ===================== LAYOUT DEL ARTÍCULO ===================== */
/* `minmax(0, 1fr)` y no `1fr`: un grid item trae `min-width: auto`, así que
   NO se encoge por debajo del ancho de su contenido. Con una tabla de
   `min-width: 520px` adentro, la columna crecía a 520px y empujaba la página
   entera fuera del viewport en móvil. El `min-width: 0` de los hijos hace lo
   mismo un nivel abajo, para que el scroll lo cargue `.table-scroll` y no el body. */
.post-layout {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px 40px;
}
.post-layout > * { min-width: 0; }
@media (min-width: 1040px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
}

.post-head { padding: 26px 0 0; }
.post-head h1 {
  font-size: clamp(30px, 5vw, 46px); font-weight: 900; color: var(--white);
  line-height: 1.15; letter-spacing: -0.03em; margin: 14px 0 18px;
}
.post-sub { font-size: 19px; color: var(--text-dim); line-height: 1.65; margin: 0 0 24px; }
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text-dimmer);
  padding-bottom: 24px; border-bottom: 1px solid var(--border-soft);
}
.post-meta .avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border);
}
.post-meta strong { color: var(--text); font-weight: 600; }
.post-meta .dotsep { opacity: 0.4; }

/* ===================== TL;DR ===================== */
/* Bloque de respuesta corta arriba del artículo. Es lo que Google levanta
   como featured snippet y lo que los motores de respuesta (ChatGPT,
   Perplexity, AI Overviews) citan. Va SIEMPRE antes del primer H2. */
.tldr {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.07), rgba(236, 72, 153, 0.02));
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-left: 3px solid var(--brand);
  border-radius: 12px; padding: 20px 24px; margin: 30px 0;
}
.tldr-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 8px;
}
.tldr p { margin: 0; font-size: 16.5px; line-height: 1.7; color: var(--text); }
.tldr ul { margin: 8px 0 0; padding-left: 20px; }
.tldr li { margin: 5px 0; font-size: 15.5px; }

/* ===================== TABLA DE CONTENIDO ===================== */
.toc-mobile {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 20px; margin: 26px 0;
}
.toc-mobile summary {
  cursor: pointer; font-weight: 700; color: var(--white); font-size: 15px;
  padding: 14px 0; list-style: none;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: ' ▾'; color: var(--brand); }
.toc-mobile[open] summary::after { content: ' ▴'; }
.toc-mobile ol { margin: 0 0 16px; padding-left: 20px; }
.toc-mobile li { margin: 7px 0; font-size: 14.5px; }
.toc-mobile a { color: var(--text-dim); }
.toc-mobile a:hover { color: var(--brand-400); }
@media (min-width: 1040px) { .toc-mobile { display: none; } }

.side { display: none; }
@media (min-width: 1040px) {
  .side { display: block; }
  .side-sticky { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; }
}
.toc-box {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px;
  max-height: 60vh; overflow-y: auto;
}
.toc-box h2 {
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dimmer); margin: 0 0 12px;
}
.toc-box ul { list-style: none; margin: 0; padding: 0; }
.toc-box li { margin: 0; }
.toc-box li.lvl-3 { padding-left: 14px; }
.toc-box a {
  display: block; padding: 6px 0 6px 12px; font-size: 13.5px; line-height: 1.45;
  color: var(--text-dim); border-left: 2px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.toc-box a:hover { color: var(--white); border-left-color: var(--text-dim); }
.toc-box a.active { color: var(--brand-400); border-left-color: var(--brand); font-weight: 600; }

/* ===================== TIPOGRAFÍA DEL ARTÍCULO ===================== */
.prose { font-size: 17.5px; line-height: 1.78; color: var(--text); }
/* Una URL o una palabra larga sin espacios también desborda: que corte. */
.prose, .tldr, .faq-a, .callout, .tpl { overflow-wrap: break-word; }
.prose > * { max-width: 74ch; }
.prose > .full { max-width: none; }

.prose h2 {
  font-size: clamp(24px, 3.4vw, 31px); font-weight: 800; color: var(--white);
  letter-spacing: -0.02em; line-height: 1.25; margin: 52px 0 16px;
  scroll-margin-top: 90px;
}
.prose h3 {
  font-size: clamp(19px, 2.4vw, 22px); font-weight: 700; color: var(--white);
  line-height: 1.35; margin: 36px 0 12px; scroll-margin-top: 90px;
}
.prose h4 { font-size: 17px; font-weight: 700; color: var(--white); margin: 26px 0 10px; }
.prose p { margin: 0 0 20px; }
.prose strong { color: var(--white); font-weight: 650; }
.prose em { color: var(--text); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 24px; }
.prose li { margin: 9px 0; }
.prose li::marker { color: var(--brand); }
.prose img { border-radius: 12px; border: 1px solid var(--border); display: block; margin: 28px 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

/* Enlace de ancla al lado de cada heading (aparece en hover) */
.h-anchor {
  opacity: 0; margin-left: 10px; font-size: 0.7em; color: var(--brand);
  text-decoration: none; transition: opacity 0.15s; vertical-align: middle;
}
.prose h2:hover .h-anchor, .prose h3:hover .h-anchor { opacity: 1; }

.prose blockquote {
  margin: 28px 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--brand);
  color: var(--text-dim); font-style: italic; font-size: 18px;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  background: var(--bg-soft-2); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 6px; font-size: 0.87em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--brand-400);
}
.prose pre {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px; overflow-x: auto; margin: 26px 0;
}
.prose pre code { background: none; border: 0; padding: 0; color: var(--text); font-size: 14px; }

/* Tablas: siempre con scroll propio, el body nunca se desborda */
.table-scroll { overflow-x: auto; margin: 28px 0; -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.prose thead th {
  background: var(--bg-soft); color: var(--white); font-weight: 700;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em;
}
.prose tbody tr:hover { background: rgba(255, 255, 255, 0.015); }

/* Plantillas copiables — bloque especial para posts de scripts */
.tpl {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-left: 3px solid var(--wa); border-radius: 10px;
  padding: 16px 20px; margin: 18px 0; font-size: 16px; line-height: 1.65;
}
.tpl-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--wa); margin-bottom: 6px;
}

/* Callouts */
.callout {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 22px; margin: 28px 0;
}
.callout-title { font-weight: 700; color: var(--white); margin: 0 0 6px; font-size: 15px; }
.callout p:last-child { margin-bottom: 0; }

/* ===================== CTAs ===================== */
.cta-inline {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(236, 72, 153, 0.03));
  border: 1px solid rgba(236, 72, 153, 0.28);
  border-radius: var(--radius); padding: 26px 28px; margin: 44px 0;
  max-width: none !important;
}
.cta-inline h3 {
  margin: 0 0 8px !important; font-size: 20px !important; font-weight: 800; color: var(--white);
  line-height: 1.3;
}
.cta-inline p { margin: 0 0 18px; color: var(--text-dim); font-size: 15.5px; line-height: 1.6; }
.btn {
  display: inline-block; background: var(--brand); color: #fff !important;
  font-weight: 700; font-size: 15px; padding: 13px 26px; border-radius: 11px;
  text-decoration: none !important; transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 6px 24px rgba(236, 72, 153, 0.22);
}
.btn:hover { background: var(--brand-600); box-shadow: 0 8px 32px rgba(236, 72, 153, 0.35); transform: translateY(-1px); }
.cta-note { font-size: 12.5px; color: var(--text-dimmer); margin: 12px 0 0 !important; }

/* CTA del sidebar */
.side-cta {
  background: linear-gradient(160deg, rgba(236, 72, 153, 0.12), rgba(236, 72, 153, 0.02));
  border: 1px solid rgba(236, 72, 153, 0.28);
  border-radius: 14px; padding: 22px 20px;
}
.side-cta h2 { font-size: 16px; font-weight: 800; color: var(--white); margin: 0 0 8px; line-height: 1.35; }
.side-cta p { font-size: 13.5px; color: var(--text-dim); margin: 0 0 16px; line-height: 1.55; }
.side-cta .btn { display: block; text-align: center; padding: 11px 18px; font-size: 14px; }

/* CTA final gigante */
.cta-end {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 20px; padding: 44px 32px; margin: 56px 0 0; text-align: center;
  position: relative; overflow: hidden;
}
.cta-end::before {
  content: ''; position: absolute; width: 420px; height: 420px; top: -240px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(236, 72, 153, 0.14) 0%, transparent 70%);
  pointer-events: none;
}
.cta-end h2 {
  position: relative; margin: 0 0 12px; font-size: clamp(24px, 4vw, 34px);
  font-weight: 900; color: var(--white); letter-spacing: -0.02em; line-height: 1.2;
}
.cta-end p { position: relative; margin: 0 auto 24px; max-width: 520px; color: var(--text-dim); font-size: 16.5px; }
.cta-end .btn { position: relative; font-size: 16.5px; padding: 15px 34px; }

/* ===================== FAQ ===================== */
.faq { margin: 56px 0 0; }
.faq h2 { font-size: clamp(24px, 3.4vw, 31px); font-weight: 800; color: var(--white); margin: 0 0 20px; letter-spacing: -0.02em; }
.faq details {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 10px; overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 17px 22px;
  font-weight: 650; color: var(--white); font-size: 16px; line-height: 1.45;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-size: 22px; font-weight: 400; flex-shrink: 0; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq-a { padding: 16px 22px 20px; color: var(--text-dim); font-size: 16px; line-height: 1.7; }
.faq-a p { margin: 0 0 12px; }
.faq-a p:last-child { margin-bottom: 0; }

/* ===================== AUTOR ===================== */
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin: 48px 0 0;
}
.author-box img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.author-box h2 { font-size: 16px; font-weight: 700; color: var(--white); margin: 0 0 2px; }
.author-box .role { font-size: 12.5px; color: var(--brand); margin: 0 0 10px; font-weight: 600; }
.author-box p { font-size: 14.5px; color: var(--text-dim); margin: 0; line-height: 1.65; }

/* ===================== COMPARTIR ===================== */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 44px 0 0; }
.share span { font-size: 13px; color: var(--text-dimmer); margin-right: 4px; }
.share a, .share button {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 9px; padding: 8px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.share a:hover, .share button:hover { border-color: var(--brand); color: var(--white); }

/* ===================== RELACIONADOS / PREV-NEXT ===================== */
.related { margin: 60px 0 0; }
.related > h2 {
  font-size: 22px; font-weight: 800; color: var(--white); margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.prevnext {
  display: grid; grid-template-columns: 1fr; gap: 12px; margin: 40px 0 0;
}
@media (min-width: 720px) { .prevnext { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pn {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 20px; transition: border-color 0.2s;
}
.pn:hover { border-color: var(--brand); }
.pn .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dimmer); font-weight: 700; }
.pn .ttl { display: block; margin-top: 6px; color: var(--white); font-weight: 650; font-size: 15px; line-height: 1.4; }
.pn.next { text-align: right; }

/* ===================== FOOTER ===================== */
.bfoot { border-top: 1px solid var(--border-soft); margin-top: 72px; padding: 32px 0 40px; }
.bfoot-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: flex; flex-direction: column; gap: 18px;
  align-items: center; text-align: center;
}
.bfoot-logo { display: flex; align-items: center; gap: 8px; }
.bfoot-logo img {
  height: 22px;
  filter: brightness(0) saturate(100%) invert(32%) sepia(83%) saturate(2046%) hue-rotate(312deg) brightness(95%) contrast(92%);
}
.bfoot-logo span { font-weight: 800; color: var(--white); font-size: 15px; }
.bfoot-links { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; font-size: 13.5px; }
.bfoot-links a { color: var(--text-dim); }
.bfoot-links a:hover { color: var(--white); }
.bfoot-legal { font-size: 12px; color: var(--text-dimmer); max-width: 620px; line-height: 1.6; }
@media (min-width: 780px) {
  .bfoot-in { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* CTA flotante en móvil */
.float-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 55;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(26, 29, 33, 0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-soft);
  transform: translateY(120%); transition: transform 0.3s ease;
}
.float-cta.show { transform: translateY(0); }
.float-cta .btn { display: block; text-align: center; }
@media (min-width: 1040px) { .float-cta { display: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
