/* =========================================================================
   Blog — índice y artículos. Complementa site.css.

   Componentes disponibles dentro de .post-body:
   .summary           "En resumen": caja con lista de puntos clave
   .callout           nota; variantes .callout--warn, .callout--ok
   .facts             rejilla de cifras: .fact > strong + span (+ small)
   .timeline          cronología: ol > li(.is-key) > time + h3 + p
   .compare           dos columnas: .compare-col.is-before / .is-after (h4 + contenido; p.sample)
   .ba                pareja de fotos: figure.is-before[data-label] / figure.is-after[data-label]
   .checklist         ul con marcas; .checklist--x para “no”
   .steps-list        ol numerado, li > h3 + p
   .table-wrap        envoltorio con scroll para <table>
   .pull              cita destacada (blockquote.pull > p + cite)
   .faq               details/summary
   .cta-audit         llamada a la auditoría (oscura)
   .tc-card           bloque de Travel Capital (renta fija gestionada)
   .sources           lista de fuentes (h2 + ol > li > a)
   Fuera del cuerpo: .post-header, .post-hero, .post-aside (.toc, .aside-cta), .related
   ========================================================================= */

/* ---------- Índice del blog ---------- */
.blog-head { max-width: 720px; margin-bottom: 48px; }
.blog-head h1 { margin: 16px 0 18px; }
.featured-post { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; margin-bottom: 22px; transition: box-shadow .2s, transform .2s; }
.featured-post:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.featured-post img { width: 100%; height: 100%; object-fit: cover; min-height: 300px; }
.featured-post .body { padding: 40px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.featured-post .cat, .post-card .cat { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.featured-post h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.featured-post p { color: var(--ink-2); }
.featured-post .more { font-weight: 600; color: var(--accent); }
.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post-card .date { font-size: .82rem; color: var(--muted); }
.badge-new { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; letter-spacing: .06em; vertical-align: middle; }

/* ---------- Estructura del artículo ---------- */
.post-wrap { padding: 40px 0 110px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 26px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.post-header { max-width: 820px; }
.post-header h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); margin: 16px 0 20px; }
.dek { font-size: 1.22rem; line-height: 1.6; color: var(--ink-2); max-width: 760px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.post-meta .author { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.post-meta .author svg { width: 30px; height: 30px; }

.post-hero { margin: 40px 0 0; }
.post-hero img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 16 / 8; object-fit: cover; }
.post-hero figcaption { margin-top: 10px; font-size: .88rem; color: var(--muted); }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 72px; margin-top: 52px; align-items: start; }
.post-aside { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 18px; }
.post-body { max-width: 720px; min-width: 0; }

/* ---------- Tipografía del cuerpo ---------- */
.post-body > * + * { margin-top: 22px; }
.post-body h2 { font-size: clamp(1.65rem, 2.8vw, 2.15rem); margin-top: 64px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.post-body h3 { font-size: 1.3rem; margin-top: 40px; }
.post-body h2 + *, .post-body h3 + * { margin-top: 14px; }
.post-body p, .post-body li { font-size: 1.1rem; line-height: 1.78; color: var(--ink-2); }
.post-body ul:not([class]), .post-body ol:not([class]) { padding-left: 1.25em; }
.post-body ul:not([class]) li, .post-body ol:not([class]) li { margin-top: 8px; }
.post-body li::marker { color: var(--accent); }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body a:not([class]) { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a:not([class]):hover { color: var(--accent-hover); }
.post-body sup a { text-decoration: none !important; font-size: .75em; font-weight: 600; padding: 0 1px; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

/* ---------- Resumen e índice ---------- */
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 30px; }
.post-body .summary h2 { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.summary ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.post-body .summary li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 1.02rem; line-height: 1.6; color: var(--ink); margin: 0; }
.summary li::before { content: ""; width: 8px; height: 8px; margin-top: .62em; border-radius: 50%; background: var(--accent); }

.toc { font-size: .92rem; }
.toc .toc-title { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; display: block; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--accent); }
.toc a.active { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.aside-cta { background: var(--deep); color: var(--on-deep); border-radius: var(--radius); padding: 22px; font-size: .92rem; }
.aside-cta strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; line-height: 1.25; margin-bottom: 8px; }
.aside-cta p { color: var(--on-deep-muted); margin-bottom: 14px; }
.aside-cta .btn { width: 100%; }

/* ---------- Notas ---------- */
.callout { position: relative; padding: 20px 22px 20px 62px; border-radius: var(--radius); background: var(--sand); border: 1px solid var(--line); }
.callout::before { content: "i"; position: absolute; left: 22px; top: 21px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--ink); color: var(--bg); font-family: var(--font-display); font-style: italic; }
.post-body .callout p + p { margin-top: 8px; }
.post-body .callout p { font-size: 1.02rem; margin: 0; }
.callout--warn { background: #FBEDE7; border-color: #F1CDBE; }
.callout--warn::before { content: "!"; font-style: normal; background: var(--accent); color: #fff; }
.callout--ok { background: #F1F4EA; border-color: #D8DFC7; }
.callout--ok::before { content: "✓"; font-style: normal; background: var(--olive); color: #fff; }

/* ---------- Cifras ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.facts--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .facts--2 { grid-template-columns: 1fr; } }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; display: flex; flex-direction: column; gap: 6px; }
.fact strong { font-family: var(--font-display); font-weight: 500; font-size: 2.1rem; line-height: 1.05; letter-spacing: -0.02em; color: var(--accent); }
.fact span { font-size: .93rem; line-height: 1.45; color: var(--ink-2); }
.fact small { font-size: .78rem; color: var(--muted); }

/* ---------- Cronología ---------- */
.timeline { list-style: none; margin: 0; padding: 4px 0 0 30px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-bottom: 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -30px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--sand-2); box-sizing: border-box; }
.timeline li.is-key::before { border-color: var(--accent); background: var(--accent); }
.timeline time { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.post-body .timeline h3 { font-size: 1.15rem; margin: 4px 0; }
.post-body .timeline p { font-size: 1rem; margin: 0; }

/* ---------- Comparativas ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare-col { border-radius: var(--radius); padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); }
.compare-col.is-before { background: var(--bg); border-style: dashed; }
.compare-col.is-after { background: #F4F6EE; border-color: #CBD4B8; }
.compare-col h4 { font-family: var(--font-body); font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
.compare-col.is-before h4 { color: var(--accent); }
.compare-col.is-after h4 { color: var(--olive); }
.post-body .compare-col p, .post-body .compare-col li { font-size: 1rem; line-height: 1.6; }
.post-body .compare-col p + p { margin-top: 10px; }
.post-body .compare-col .sample { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.45; color: var(--ink); }
.compare-col ul { padding-left: 1.1em; margin: 0; }

.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ba figure { margin: 0; position: relative; }
.ba img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.ba figure::after { content: attr(data-label); position: absolute; top: 10px; left: 10px; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); }
.ba figure.is-after::after { background: var(--accent); color: #fff; }
.ba figcaption { margin-top: 8px; font-size: .86rem; color: var(--muted); }

/* ---------- Listas ---------- */
.checklist { list-style: none; padding: 0; display: grid; gap: 12px; }
.post-body .checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; margin: 0; }
.checklist li::before { content: ""; width: 22px; height: 22px; margin-top: 5px; border-radius: 50%; background: var(--olive-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234E5B3E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.checklist--x li::before { background: #F6E4DA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23B4502C' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M5 5l6 6M11 5l-6 6'/%3E%3C/svg%3E") center / 12px no-repeat; }

.steps-list { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 14px; }
.steps-list > li { counter-increment: s; position: relative; padding: 22px 24px 22px 76px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps-list > li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 24px; top: 20px; font-family: var(--font-display); font-size: 1.5rem; color: var(--accent); }
.post-body .steps-list h3 { font-size: 1.15rem; margin: 0 0 6px; }
.post-body .steps-list p { font-size: 1rem; margin: 0; }
.post-body .steps-list p + p { margin-top: 8px; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 540px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; color: var(--ink-2); }
.table-wrap th { background: var(--sand); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child { font-weight: 600; color: var(--ink); }
.post-body .table-note { font-size: .86rem; color: var(--muted); margin-top: 10px; }

/* ---------- Cita ---------- */
.pull { margin: 40px 0 0; padding: 0 0 0 26px; border-left: 3px solid var(--accent); }
.post-body .pull p { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.4; color: var(--ink); }
.pull cite { display: block; margin-top: 10px; font-style: normal; font-size: .88rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-family: var(--font-display); font-size: 1.16rem; line-height: 1.35; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 40px 22px 0; }
.post-body .faq details > div p { font-size: 1.04rem; }
.post-body .faq details > div p + p { margin-top: 10px; }

/* ---------- Llamadas a la acción ---------- */
.cta-audit { background: var(--deep); color: var(--on-deep); border-radius: var(--radius-lg); padding: 38px 36px; }
.post-body .cta-audit { margin-top: 56px; }
.post-body .cta-audit h2, .post-body .cta-audit h3 { color: var(--on-deep); margin: 0 0 10px; font-size: 1.7rem; }
.post-body .cta-audit p { color: var(--on-deep-muted); }
.cta-audit .btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.cta-audit .btn-ghost { border-color: rgba(255,255,255,.35); color: var(--on-deep); }
.cta-audit .btn-ghost:hover { background: var(--on-deep); color: var(--deep); }

.tc-card { display: grid; gap: 18px; padding: 30px 32px 28px 38px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.tc-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--olive); }
.tc-card .tc-eyebrow { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); margin-bottom: 8px; }
.post-body .tc-card h3, .tc-card h3 { font-size: 1.45rem; margin: 0 0 10px; }
.post-body .tc-card p { font-size: 1.02rem; line-height: 1.65; margin: 0; }
.tc-card .tc-points { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-body .tc-card .tc-points li, .tc-card .tc-points li { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 12px; border-radius: 999px; background: var(--olive-soft); font-size: .88rem; font-weight: 500; line-height: 1.2; color: var(--olive); }
.tc-card .btn { justify-self: start; background: var(--olive); color: #fff; }
.tc-card .btn:hover { background: #3E4A31; }
.tc-card small { font-size: .8rem; line-height: 1.5; color: var(--muted); }

/* ---------- Fuentes y relacionados ---------- */
.post-body .sources { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.post-body .sources h2 { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.sources ol { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; }
.post-body .sources li { font-size: .9rem; line-height: 1.5; color: var(--muted); margin: 0; }
.sources a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--sand-2); text-underline-offset: 3px; word-break: break-word; }
.sources a:hover { color: var(--accent); }
.post-body .post-updated { font-size: .88rem; color: var(--muted); margin-top: 20px; }

.related { margin-top: 80px; padding-top: 56px; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.8rem; margin-bottom: 24px; }
.related .posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .post-layout { grid-template-columns: 1fr; gap: 0; }
  .post-aside { position: static; order: -1; margin-bottom: 36px; }
  .post-aside .aside-cta { display: none; }
  .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
  .post-body { max-width: none; }
}
@media (max-width: 760px) {
  .post-wrap { padding: 24px 0 80px; }
  .dek { font-size: 1.1rem; }
  .post-hero img { aspect-ratio: 4 / 3; }
  .post-body p, .post-body li { font-size: 1.04rem; }
  .compare, .ba { grid-template-columns: 1fr; }
  .tc-card { padding: 26px 22px 24px 28px; }
  .tc-card .btn { width: 100%; }
  .cta-audit { padding: 30px 22px; }
  .steps-list > li { padding: 20px 20px 20px 64px; }
  .steps-list > li::before { left: 18px; }
  .related .posts { grid-template-columns: 1fr; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post img { min-height: 0; aspect-ratio: 16 / 9; }
  .featured-post .body { padding: 26px 22px; }
  .posts-grid { grid-template-columns: 1fr; }
}

/* Índice: destacado oscuro y rejilla de 3 */
.featured-post--dark { display: block; background: var(--deep); border-color: var(--deep); }
.featured-post--dark .body { padding: 52px 56px; max-width: 860px; }
.featured-post--dark h2 { color: var(--on-deep); font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.featured-post--dark p, .featured-post--dark .date { color: var(--on-deep-muted); }
.featured-post--dark .cat, .featured-post--dark .more { color: #E8A383; }
.posts-grid--3 { grid-template-columns: repeat(3, 1fr); }
.posts-grid--3 .post-card > div { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-card.is-wide { grid-column: span 2; flex-direction: row; gap: 26px; align-items: stretch; }
.post-card.is-wide img { width: 46%; object-fit: cover; border-radius: 12px; }
@media (max-width: 1040px) { .posts-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .posts-grid--3 { grid-template-columns: 1fr; }
  .post-card.is-wide { grid-column: auto; flex-direction: column; }
  .post-card.is-wide img { width: 100%; aspect-ratio: 16 / 9; }
  .featured-post--dark .body { padding: 30px 24px; }
}

/* Páginas legales */
.legal { max-width: 780px; }
.legal h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); margin: 14px 0 10px; }
.post-body.legal h2 { font-size: 1.5rem; margin-top: 48px; }
.post-body.legal p, .post-body.legal li { font-size: 1.02rem; }
.post-body .legal-updated { font-size: .92rem; color: var(--muted); }
.legal-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.post-body .legal-box p { margin: 0; }
.post-body .legal-box p + p { margin-top: 6px; }
.legal table { width: 100%; border-collapse: collapse; font-size: .94rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--sand); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.legal code { background: var(--sand); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
