/* Contenido Patrocinado — Blog */
:root {
  --red: #e63946;
  --red-dark: #c92a37;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --muted: #767676;
  --line: #e6e6e6;
  --line-soft: #f1f1f1;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --max: 1180px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ───────── Header ───────── */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0;
}
.brand__name {
  font-size: 15px;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand__name small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-back {
  font-size: 13.5px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .15s ease;
}
.nav-back:hover { color: var(--red); }
.nav-back svg { width: 14px; height: 14px; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.lang-switch a {
  padding: 6px 8px;
  color: var(--muted);
  transition: color .15s ease;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.is-active { color: var(--ink); position: relative; }
.lang-switch a.is-active::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: 0;
  height: 2px; background: var(--red);
}
.lang-divider {
  width: 1px; height: 14px; background: var(--line);
}

/* ───────── Listado ───────── */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 28px 96px;
}

.page-head {
  max-width: 760px;
  margin-bottom: 48px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 14px;
}
.page-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.page-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 640px;
}

/* Category bar */
.cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 36px 0 0;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}
.cat-bar a {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: background .15s ease, color .15s ease;
  font-weight: 500;
}
.cat-bar a:hover { background: var(--line-soft); color: var(--ink); }
.cat-bar a.is-active {
  background: var(--ink);
  color: #fff;
}

/* Article list */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.article-row:last-child { border-bottom: none; }

.article-row__thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.article-row__thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.article-row__body { min-width: 0; }
.article-row__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.article-row__cat {
  color: var(--red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
}
.article-row__dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--muted);
}
.article-row__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--ink);
}
.article-row__title a {
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .25s ease;
}
.article-row__title a:hover { background-size: 100% 1px; }
.article-row__excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 14px;
  max-width: 60ch;
}
.article-row__author {
  font-size: 13px;
  color: var(--muted);
}
.article-row__author strong {
  color: var(--ink);
  font-weight: 600;
}

/* Pagination */
.pager {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 56px;
}
.pager a, .pager span {
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 0 10px;
}
.pager a:hover { background: var(--line-soft); }
.pager .is-current {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.pager .is-disabled { color: var(--line); }

/* ───────── Article ───────── */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 28px 96px;
}
.article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.article__cat {
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}
.article__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.article__lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 36px;
  max-width: 65ch;
}
.article__byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.byline-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
}
.byline-info { line-height: 1.3; }
.byline-info strong { font-size: 14.5px; }
.byline-info span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.hero {
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 -50px 14px;
}
.hero svg { width: 100%; height: 100%; display: block; }
.hero-caption {
  font-size: 13px;
  color: var(--muted);
  margin: 0 -50px 44px;
  padding-top: 8px;
}

.prose {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.65;
  color: #222;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-top: 2em;
  margin-bottom: 0.5em;
  font-weight: 600;
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.3;
  margin-top: 1.6em;
  margin-bottom: 0.4em;
  font-weight: 600;
}
.prose p { margin: 0 0 1.1em; }
.prose a {
  color: var(--red);
  border-bottom: 1px solid rgba(230, 57, 70, 0.3);
  transition: border-color .15s ease;
}
.prose a:hover { border-bottom-color: var(--red); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: 0.35em 0; }
.prose blockquote {
  border-left: 3px solid var(--red);
  padding: 4px 0 4px 22px;
  margin: 1.6em 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 21px;
  line-height: 1.5;
}
.prose figure {
  margin: 2em -50px;
}
.prose figure .ph {
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
}
.prose figcaption {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

.article-foot {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tag-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-right: 8px;
}
.tag {
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--ink-soft);
}
.tag:hover { background: var(--line); }

/* Related (compact, optional - one block) */
.related {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px 96px;
}
.related h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.related-card { display: block; }
.related-card .ph {
  aspect-ratio: 16/10;
  background: var(--bg-soft);
  border-radius: 4px;
  margin-bottom: 14px;
  overflow: hidden;
}
.related-card .ph svg { width: 100%; height: 100%; display: block; }
.related-card__cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 6px;
}
.related-card__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

/* ───────── Footer ───────── */
.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding: 36px 28px;
  background: var(--bg-soft);
}
.site-foot__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.site-foot a:hover { color: var(--red); }

/* Responsive */
@media (max-width: 820px) {
  .article-row {
    grid-template-columns: 140px 1fr;
    gap: 20px;
    padding: 24px 0;
  }
  .article-row__title { font-size: 19px; }
  .article-row__excerpt { display: none; }
  .article-row__author { font-size: 12px; }
  .hero, .hero-caption, .prose figure { margin-left: 0; margin-right: 0; }
  .related-grid { grid-template-columns: 1fr; }
  .nav-back span { display: none; }
}

/* ── Bloques agregados por assemble_blog.py ─────────────────────────── */
.featured-grid {
  margin: 40px 0 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.featured-grid__title {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  font-weight: 600;
}
.cat-block { margin-top: 56px; }
.cat-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cat-block__title {
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 600;
}
.cat-block__more {
  font-size: 13px;
  color: var(--red);
  font-weight: 600;
}
.cat-block__more:hover { text-decoration: underline; }
.cat-bar a {
  cursor: pointer;
}

/* ── Ancho del artículo igualado a la home (1180px de contenedor) ──────
   El cuerpo del texto (.prose) mantiene una columna interna estrecha
   para legibilidad (líneas ~75 caracteres). Los elementos visuales
   (título, hero, lede, byline, breadcrumb) aprovechan el ancho completo. */
.article {
  max-width: var(--max) !important;
  padding-left: 28px;
  padding-right: 28px;
}
.article .prose {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.article .prose blockquote {
  /* el blockquote queda dentro del prose, hereda max-width */
  max-width: 100%;
}
.article .article__title,
.article .article__lede,
.article .article__meta,
.article .article__byline,
.article .case-study-note {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.article .article__title { margin-bottom: 22px; }
/* Hero a ancho completo del contenedor, sin sangría negativa */
.article .hero {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
}
.article .hero-caption {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Breadcrumb visible arriba del artículo ───────────────────────────── */
.bc-trail {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 28px 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.bc-trail a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.bc-trail a:hover { color: var(--red); }
.bc-trail__sep {
  color: var(--line);
  margin: 0 6px;
}
.bc-trail__current {
  color: var(--ink);
  font-weight: 500;
  /* truncar título largo en mobile */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}
@media (max-width: 600px) {
  .bc-trail__current { max-width: 100%; }
}

/* ── Disclaimer "datos ilustrativos" para casos de estudio ─────────────── */
.case-study-note {
  background: #fff8e6;
  border-left: 3px solid #e6b800;
  padding: 14px 18px;
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.55;
  color: #6b5400;
  border-radius: 0 4px 4px 0;
}
.case-study-note strong { color: #4a3a00; }
