/* ============================================================
   Datagrowth Blog — pulido del cuerpo del artículo.
   Complementa theme.json (presets de color/tipografía) y
   /assets/components/components.css (chrome: header + footer).
   Solo afecta al contenido del post (.wp-block-post-content).
   ============================================================ */

.wp-block-post-content {
  font-size: 1.05rem;
  line-height: 1.75;
  /* El tema padre (Twenty Twenty-Five) pone body{font-weight:300}; el resto
     del sitio usa 400. Forzamos 400 para igualar la tipografía de las landings. */
  font-weight: 400;
}
.wp-block-post-content > * + * { margin-top: 1.25em; }

.wp-block-post-content h2 { margin-top: 1.9em; }
.wp-block-post-content h3 { margin-top: 1.5em; }

.wp-block-post-content img,
.wp-block-post-content figure img {
  border-radius: 12px;
  height: auto;
}
.wp-block-post-content figure { margin-block: 1.8em; }
.wp-block-post-content figcaption {
  font-size: 0.85rem;
  color: #1d2e3a;
  opacity: 0.75;
  text-align: center;
  margin-top: 0.6em;
}

/* Enlaces dentro del artículo: subrayado verde de marca. */
.wp-block-post-content a {
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  text-decoration-color: #b5ff82;
}

/* Listas con respiración. */
.wp-block-post-content ul,
.wp-block-post-content ol { padding-left: 1.3em; }
.wp-block-post-content li + li { margin-top: 0.4em; }

/* Bloques de código legibles sobre superficie clara. */
.wp-block-post-content pre,
.wp-block-post-content code {
  background: #f3f5f8;
  border-radius: 8px;
}
.wp-block-post-content pre { padding: 16px 18px; overflow-x: auto; }
.wp-block-post-content :not(pre) > code { padding: 2px 6px; }

/* ============================================================
   Botones del chrome compartido (.dg-btn / .dg-btn--primary).
   El header/footer (header.html) usa estas clases, pero su base vive
   en el styles.css de cada landing — que el blog NO carga. Sin esto,
   el CTA "Hablar con nosotros" del header sale como texto pelado sin
   pill. Portamos las utilidades aquí (tokens vienen de components.css).
   ============================================================ */
.dg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--r-pill);
  padding: 6px 8px 6px 24px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  height: 56px;
  text-decoration: none;
  transition: background 300ms var(--ease-out), border-color 300ms var(--ease-out), transform 300ms var(--ease-out);
  cursor: pointer;
  border: none;
}
.dg-btn:active { transform: scale(0.98); }
.dg-btn:focus-visible { outline: 2px solid var(--lima); outline-offset: 2px; }
.dg-btn__label { padding-left: 4px; }
.dg-btn__circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.dg-btn__circle svg { width: 14px; height: 14px; transition: transform 300ms var(--ease-out); }
.dg-btn:hover .dg-btn__circle svg { transform: translate(2px, -2px); }
.dg-btn--primary { background: var(--ink); color: #fff; }
.dg-btn--primary:hover { background: var(--ink-soft); }
.dg-btn--primary .dg-btn__circle { background: var(--lima); color: var(--ink); }
.dg-btn--full { width: 100%; }

/* blog.css carga DESPUÉS de components.css, así que .dg-btn (height:56)
   pisaría las medidas compactas del chrome. Las re-afirmamos. En las
   landings styles.css carga ANTES de components.css y el problema no existe. */
.dg-chrome-cta { height: 48px; padding: 4px 6px 4px 18px; font-size: 14px; }
.dg-chrome-cta .dg-btn__circle { width: 36px; height: 36px; }
.dg-chrome-mobile__cta { background: var(--bg); color: var(--ink); }
.dg-chrome-mobile__cta .dg-btn__circle { background: var(--lima); color: var(--ink); }

/* ============================================================
   ARTÍCULO — hero: imagen destacada arriba; categoría, título y
   fecha debajo, en el mismo registro tipográfico que el sitio
   (DM Sans 500, tracking ceñido), ink sobre blanco.
   ============================================================ */
.dg-post-backbar {
  max-width: 1100px;
  margin-inline: auto;
  padding: 22px 24px 4px;
}
.dg-post-backbar a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.dg-post-backbar a:hover {
  text-decoration: underline;
  text-decoration-color: var(--lima);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.dg-post-cover img { border-radius: 16px; }

/* Imagen destacada por defecto para entradas sin una (ver functions.php).
   El <img> hereda los estilos de .dg-pcover/.dg-fcover/.dg-post-cover img. */
.dg-cover-empty > a { display: block; line-height: 0; }
.dg-post-head {
  max-width: 1100px;
  margin-inline: auto;
  padding: 30px 24px 0;
}
.dg-post-head > * { max-width: none; }
.dg-post-head .wp-block-post-terms {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.dg-post-head .wp-block-post-terms a { color: inherit; text-decoration: none; }
.dg-post-head .wp-block-post-title {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0.5rem 0 0.7rem;
  text-wrap: balance;
}
.dg-post-head .wp-block-post-date {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.8;
  margin: 0;
}

/* ============================================================
   ARTÍCULO — CTA final: tarjeta navy contenida con acento lima.
   ============================================================ */
.dg-post-cta { padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 56px); }
.dg-post-cta__card {
  max-width: 1100px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 28px;
  padding: clamp(36px, 5vw, 64px);
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
}
.dg-post-cta__card::before {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -55%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 255, 130, 0.20), transparent 70%);
  pointer-events: none;
}
.dg-post-cta__eyebrow,
.dg-post-cta__h2,
.dg-post-cta__lead,
.dg-post-cta__actions { position: relative; margin: 0; }
.dg-post-cta__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lima);
}
.dg-post-cta__h2 {
  color: #fff;
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.dg-post-cta__lead {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.55;
  max-width: 52ch;
}
.dg-post-cta__actions { margin-top: 6px; }
/* Botón lima sobre navy (primary navy sería invisible aquí). */
.dg-post-cta .dg-btn {
  background: var(--lima);
  color: var(--ink);
}
.dg-post-cta .dg-btn:hover { background: #a4f06b; }
.dg-post-cta .dg-btn .dg-btn__circle { background: var(--ink); color: #fff; }

/* ============================================================
   ARTÍCULO — pulido tipográfico del cuerpo (mejora de lectura).
   ============================================================ */
.wp-block-post-content h2,
.wp-block-post-content h3 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink, #263b4a);
}
.wp-block-post-content h2 { font-size: clamp(24px, 3vw, 32px); }
.wp-block-post-content h3 { font-size: clamp(20px, 2.4vw, 24px); }
/* Entradilla: primer párrafo con más presencia. */
.wp-block-post-content > p:first-of-type {
  font-size: 1.18rem;
  line-height: 1.7;
  color: #1d2e3a;
}
.wp-block-post-content blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--lima, #b5ff82);
  font-size: 1.15rem;
  line-height: 1.5;
  font-style: italic;
  color: #1d2e3a;
}
.wp-block-post-content blockquote p { margin: 0; }
.wp-block-post-content hr {
  border: 0;
  height: 1px;
  background: rgba(38, 59, 74, 0.12);
  margin: 2.4em 0;
}
.wp-block-post-content a:hover { text-decoration-color: var(--ink, #263b4a); }

@media (prefers-reduced-motion: reduce) {
  .dg-btn,
  .dg-btn .dg-btn__circle svg { transition: none; }
  .dg-btn:active { transform: none; }
}
