/* Estilos propios del artículo google-ads-vs-seo-chile (prefijo ba-).
   Google Ads va en navy y el SEO en lima en todo el artículo: columnas, pastillas, barras y tablas.
   Los anchos responden al cuerpo del artículo (consulta de contenedor ga-body de blog-geo.css). */

/* Color de cada canal */
.ba-c-ads { --bc: var(--navy); --bc-on: #f2f5f8; --bc-acc: var(--lime); }
.ba-c-seo { --bc: var(--lime); --bc-on: var(--on-lime); --bc-acc: var(--navy); }
html.dark .ba-c-ads { --bc: #3a4f70; }

/* Número de sección: alterna lima y navy (02 Google Ads en navy, 03 SEO en lima) */
.bl-body > .ga-sec:nth-of-type(odd) { --sec-c: var(--lime); --sec-on: var(--on-lime); }
.bl-body > .ga-sec:nth-of-type(even) { --sec-c: var(--navy); --sec-on: var(--lime); }
html.dark .bl-body > .ga-sec:nth-of-type(odd) { --sec-c: var(--lime); }
html.dark .bl-body > .ga-sec:nth-of-type(even) { --sec-c: #3a4f70; }

/* Arranque con dos párrafos */
.bl-body .ba-first p + p { margin-top: .8em; }

/* Pastillas «Google Ads» / «SEO» */
.ba-pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--bc); color: var(--bc-on); font-size: .75rem; font-weight: 600; letter-spacing: .02em; line-height: 1.5; white-space: nowrap; }

/* 01 · Dos columnas: Google Ads (navy) y SEO (lima) */
.ba-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ba-duo-c { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: clamp(20px, 2.4vw, 28px); border-radius: 20px; background: var(--bc); color: var(--bc-on); overflow: hidden; transition: translate .25s var(--ease-out); }
.ba-duo-c:hover { translate: 0 -4px; }
.bl-body .ba-duo-c p { margin: 0; color: var(--bc-on); font-size: 1rem; line-height: 1.55; }
.bl-body .ba-duo-c strong.ba-duo-h { display: block; margin-bottom: 8px; font-size: clamp(1.375rem, 1.1rem + .9vw, 1.75rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; color: inherit; }
.ba-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--bc-on) 12%, transparent); }
.ba-ic svg { width: 24px; height: 24px; fill: none; stroke: var(--bc-acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ba-c-seo .ba-ic { background: rgba(29, 42, 61, .12); }
.ba-spark { display: block; width: 100%; height: auto; margin-top: auto; overflow: visible; }
.ba-spark-l { fill: none; stroke: var(--bc-acc); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.ba-spark-stop { stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 3 5; opacity: .45; }
.ba-spark-d { fill: var(--bc-acc); transform-box: fill-box; transform-origin: 50% 50%; }
/* Conclusión: las mismas dos columnas, en frase */
.bl-body .ba-duo-sm p.ba-duo-c { font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }

/* 02 · Escala de costo por clic: cada rubro con su rango sobre la misma escala */
.bl-body .ga-split-txt h3:first-child { margin-top: 0; }
.bl-body ul.ba-cpc { gap: 8px; }
.bl-body ul.ba-cpc > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n v" "e e" "b b"; gap: 2px 16px; padding: 14px 18px 16px; border-radius: 16px; background: var(--surface); font-size: 1rem; line-height: 1.45; transition: translate .25s var(--ease-out); }
.bl-body ul.ba-cpc > li:hover { translate: 4px 0; }
.bl-body ul.ba-cpc > li::before { content: none; }
.ba-cpc strong { grid-area: n; font-size: 1.0625rem; }
.ba-cpc-ej { grid-area: e; font-size: var(--t-small); color: var(--soft); }
.ba-cpc-v { grid-area: v; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ba-cpc-bar, .ba-range { grid-area: b; position: relative; display: block; height: 8px; margin-top: 10px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.ba-cpc-bar i, .ba-range i { position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 100%); width: max(10px, calc((var(--b) - var(--a)) * 100%)); border-radius: inherit; background: var(--navy); transform-origin: 0 50%; }
.ba-cpc li:last-child .ba-cpc-bar i { background: var(--lime); }
html.dark .ba-cpc-bar i, html.dark .ba-range i { background: var(--lime); }

/* 02 · La cuenta: cuándo cierra y cuándo no */
.ba-calc { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; }
.bl-body .ba-calc p { position: relative; margin: 0; padding: 20px 20px 20px 66px; border-radius: 18px; font-size: 1rem; line-height: 1.6; }
.ba-calc-ok { background: var(--c-lime, #eff3cf); }
.ba-calc-no { background: var(--surface); }
html.dark .ba-calc-ok { background: #1d2410; }
.ba-calc-ic { position: absolute; left: 18px; top: 18px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); }
.ba-calc-ic svg { width: 18px; height: 18px; fill: none; stroke: var(--lime); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ba-calc-no .ba-calc-ic { background: var(--ink); }
.ba-calc-no .ba-calc-ic svg { stroke: var(--tile); }
.ba-calc b { font-weight: 600; font-variant-numeric: tabular-nums; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--lime) 55%, transparent) 0); }
.ba-calc-no b { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--ink) 16%, transparent) 0); }
.ba-calc b.ba-calc-big { font-size: 1.3em; letter-spacing: -0.02em; }

/* Razones en tarjetas (el número lo pone blog.js) */
.ba-why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ba-why-c { min-width: 0; padding: 20px 22px; border-radius: 18px; background: var(--surface); transition: translate .25s var(--ease-out); }
.ba-why-c:hover { translate: 0 -4px; }
.bl-body .ba-why-c h3 { margin: 0 0 .55em; font-size: 1.125rem; line-height: 1.3; }
.bl-body .ba-why-c p { margin: 0; font-size: 1rem; line-height: 1.55; }

/* 02 · Presupuesto mínimo: tarjeta navy con la cifra grande y el megáfono */
.bl-body .ba-min { position: relative; padding: clamp(22px, 3vw, 34px); padding-right: clamp(22px, 15vw, 170px); border-radius: 22px; background: var(--navy); overflow: hidden; isolation: isolate; }
.ba-min::after { content: ''; position: absolute; z-index: -1; right: -10px; bottom: -14px; width: clamp(96px, 12vw, 150px); aspect-ratio: 1; background: url('img/t-megafono.webp') center / contain no-repeat; translate: 0 var(--ba-y, 0px); pointer-events: none; }
.bl-body .ba-min p { margin: 0; color: #dbe2ea; font-size: var(--t-small); line-height: 1.55; }
.bl-body .ba-min p + p { margin-top: 12px; }
.bl-body .ba-min strong { display: block; color: var(--lime); font-weight: 600; }
.ba-min-big { display: block; margin: 10px 0 6px; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; color: #fff; font-variant-numeric: tabular-nums; }
.ba-min-unit { display: block; color: #f2f5f8; font-size: 1rem; }
html.dark .bl-body .ba-min { background: #22324a; }

/* 03 · SEO local destacado */
.ba-local { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 20px; padding: clamp(20px, 2.6vw, 30px); border-radius: 20px; background: var(--c-lime, #eff3cf); }
html.dark .ba-local { background: #1d2410; }
.ba-local-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--navy); }
.ba-local-ic svg { width: 28px; height: 28px; fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform-origin: 50% 100%; }
.bl-body .ba-local h3 { margin: 0 0 .45em; }
.bl-body .ba-local p { margin: 0; }

/* 04 · Ficha del caso */
.ba-brief { padding: 18px 22px; border-radius: 18px; background: var(--navy); }
html.dark .ba-brief { background: #22324a; }
.bl-body .ba-brief p { margin: 0; color: #f2f5f8; }
.bl-body .ba-brief-h strong { color: var(--lime); font-size: var(--t-small); }
.bl-body p.ba-brief-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.ba-brief-i { padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .09); font-size: .9375rem; line-height: 1.4; color: #dbe2ea; }
.ba-brief-i b { color: #fff; font-weight: 600; }
.ba-dot { color: var(--lime); font-weight: 600; }

/* Tablas estilizadas */
.bl-body .ba-table thead th { background: var(--surface); color: var(--ink); vertical-align: bottom; font-size: .875rem; padding-block: 14px; }
.bl-body .ba-table thead .ba-pill { display: flex; width: fit-content; margin-bottom: 5px; }
.bl-body .ba-table tbody th { background: transparent; color: var(--ink); border-top: 1px solid var(--border); font-weight: 600; }
.bl-body .ba-table tbody tr:nth-child(even) th { background: color-mix(in srgb, var(--surface) 45%, transparent); }
.bl-body .ba-table td { font-variant-numeric: tabular-nums; }
.bl-body .ba-table td.ba-win { background: color-mix(in srgb, var(--lime) 24%, var(--tile)); font-weight: 600; }
html.dark .bl-body .ba-table td.ba-win { background: color-mix(in srgb, var(--lime) 16%, var(--tile)); }
.ba-row-leads .ba-v, .ba-row-cpl td { font-weight: 600; }
.ba-meter { display: block; height: 6px; margin-top: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.ba-meter i { display: block; width: max(6px, calc(var(--v) * 100%)); height: 100%; border-radius: inherit; background: var(--navy); transform-origin: 0 50%; }
.ba-roi td:nth-of-type(n+3) .ba-meter i { background: var(--lime); }
html.dark .ba-meter i { background: #8fa3c2; }
html.dark .ba-roi td:nth-of-type(n+3) .ba-meter i { background: var(--lime); }
.bl-body .ba-row-tot td { font-size: 1.0625rem; font-weight: 600; text-align: center; }
.bl-body .ba-bud thead th.ba-tot-h { background: var(--lime); color: var(--on-lime); }
.bl-body .ba-bud td.ba-tot { background: color-mix(in srgb, var(--lime) 18%, var(--tile)); }
html.dark .bl-body .ba-bud td.ba-tot { background: color-mix(in srgb, var(--lime) 12%, var(--tile)); }
.ba-tot b { display: block; font-weight: 600; white-space: nowrap; }
.ba-size { display: inline-block; vertical-align: middle; width: calc(6px + var(--s) * 4px); aspect-ratio: 1; margin-right: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 30%, transparent); }

/* 05 · Errores frecuentes: tarjetas numeradas */
.ba-errs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ba-err { min-width: 0; padding: 22px; border-radius: 18px; background: var(--surface); transition: translate .25s var(--ease-out); }
.ba-err:hover { translate: 0 -4px; }
.bl-body .ba-err h3 { display: block; margin: 0 0 .5em; font-size: 1.125rem; line-height: 1.3; }
.ba-err-n { display: flex; align-items: center; gap: 6px; width: fit-content; margin-bottom: 12px; padding: 3px 12px 3px 6px; border-radius: 999px; background: var(--navy); color: var(--lime); font-size: .8125rem; font-weight: 600; letter-spacing: .01em; line-height: 1.6; transform-origin: 0 50%; }
html.dark .ba-err-n { background: #3a4f70; }
.ba-err-n::before { content: ''; flex: none; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.bl-body .ba-err p { margin: 0; font-size: 1rem; line-height: 1.55; }
.ba-hl { font-weight: 600; background: linear-gradient(transparent 60%, color-mix(in srgb, var(--lime) 60%, transparent) 0); }

/* 06 · Carriles Ads y SEO a lo largo de las cuatro etapas */
.ba-lanes { display: grid; gap: 10px; padding: 18px 18px 14px; border-radius: 18px; background: var(--surface); }
.ba-lane { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 10px; }
.ba-lane .ba-pill { justify-self: start; }
.ba-lane-t { position: relative; height: 14px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.ba-lane-t i { position: absolute; top: 0; bottom: 0; border-radius: inherit; transform-origin: 0 50%; }
.ba-lane-ads i { left: 0; right: 0; background: linear-gradient(90deg, var(--navy) 0 50%, color-mix(in srgb, var(--navy) 35%, transparent) 100%); }
.ba-lane-seo i { left: 25%; right: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--lime) 35%, transparent), var(--lime) 70%); }
html.dark .ba-lane-ads i { background: linear-gradient(90deg, #8fa3c2 0 50%, rgba(143, 163, 194, .3) 100%); }
.ba-lane-ticks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-left: 60px; }
.ba-lane-ticks span { height: 8px; border-left: 2px solid color-mix(in srgb, var(--ink) 18%, transparent); }

/* 06 · Plan por etapas: línea de tiempo */
.bl-body ul.ba-plan { position: relative; gap: 10px; }
.bl-body ul.ba-plan::before { content: ''; position: absolute; left: 15px; top: 22px; bottom: 22px; width: 4px; border-radius: 4px; background: linear-gradient(var(--navy), var(--lime)); transform-origin: 50% 0; transform: scaleY(var(--ba-line, 1)); }
html.dark .bl-body ul.ba-plan::before { background: linear-gradient(#8fa3c2, var(--lime)); }
.bl-body ul.ba-plan > li { margin-left: 46px; padding: 16px 18px; border-radius: 16px; background: var(--surface); font-size: 1rem; line-height: 1.55; transition: translate .25s var(--ease-out); }
.bl-body ul.ba-plan > li:hover { translate: 4px 0; }
.bl-body ul.ba-plan > li::before { left: -40px; top: 18px; width: 20px; height: 20px; background: var(--navy); box-shadow: 0 0 0 4px var(--tile); }
.bl-body ul.ba-plan > li:nth-child(n+3)::before { background: var(--lime); }
html.dark .bl-body ul.ba-plan > li:nth-child(-n+2)::before { background: #8fa3c2; }
.ba-plan strong { display: inline-flex; margin-right: 6px; padding: 1px 10px; border-radius: 999px; background: var(--navy); color: var(--lime); font-size: .875rem; line-height: 1.6; white-space: nowrap; }
html.dark .ba-plan strong { background: #3a4f70; }

/* 06 · Regla práctica: la decisión en dos caminos */
.ba-rule { padding: clamp(20px, 2.6vw, 30px); border-radius: 20px; background: var(--c-lime, #eff3cf); }
html.dark .ba-rule { background: #1d2410; }
.bl-body .ba-rule p { margin: 0; }
.bl-body .ba-rule-h strong { color: var(--brand); }
.ba-fork { display: grid; gap: 8px; margin: 14px 0; }
.bl-body .ba-fork-r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px 12px 18px; border-radius: 14px; background: var(--tile); }
.ba-fork-q { flex: 1 1 240px; font-weight: 500; }
.ba-fork-a { color: var(--soft); font-weight: 600; }
.ba-fork-r b { padding: 4px 14px; border-radius: 999px; background: var(--bc); color: var(--bc-on); font-size: .9375rem; font-weight: 600; white-space: nowrap; }

/* Cuerpo angosto */
@container ga-body (max-width: 640px) {
  .ba-duo, .ba-why, .ba-errs, .ba-calc { grid-template-columns: minmax(0, 1fr); }
  .bl-body .ba-min { padding-right: clamp(22px, 3vw, 34px); padding-bottom: 96px; }
  .ba-min::after { width: 92px; }
}

/* Celular: las tablas pasan a tarjetas, una por fila */
@container ga-body (max-width: 560px) {
  .bl-body .ba-tw { overflow: visible; }
  .bl-body .ba-table, .bl-body .ba-table tbody, .bl-body .ba-table tr, .bl-body .ba-table th, .bl-body .ba-table td { display: block; width: auto; }
  .bl-body .ba-table { border-radius: 0; overflow: visible; }
  .bl-body .ba-table thead { display: none; }
  .bl-body .ba-table tbody { display: grid; gap: 10px; }
  .bl-body .ba-table tbody tr { padding: 6px 0 10px; border-radius: 18px; background: var(--surface); overflow: hidden; }
  .bl-body .ba-table tbody th, .bl-body .ba-table tbody tr:nth-child(even) th { border: 0; padding: 12px 16px 6px; background: transparent; font-size: 1.0625rem; }
  .bl-body .ba-table td, .bl-body .ba-table tr:nth-child(even) td { border: 0; padding: 8px 16px; background: transparent; }
  .bl-body .ba-table td::before { display: block; width: fit-content; margin-bottom: 4px; padding: 1px 10px; border-radius: 999px; background: var(--navy); color: #f2f5f8; font-size: .75rem; font-weight: 600; letter-spacing: .02em; }
  :where(html.dark) .bl-body .ba-table td::before { background: #3a4f70; }
  /* ROI: cuatro columnas en una grilla de 2 × 2 */
  .bl-body .ba-roi tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bl-body .ba-roi tbody th { grid-column: 1 / -1; }
  .bl-body .ba-roi td:nth-of-type(1)::before { content: 'Ads · mes 1'; }
  .bl-body .ba-roi td:nth-of-type(2)::before { content: 'Ads · mes 12'; }
  .bl-body .ba-roi td:nth-of-type(3)::before { content: 'SEO · mes 1'; }
  .bl-body .ba-roi td:nth-of-type(4)::before { content: 'SEO · mes 12'; }
  .bl-body .ba-roi td:nth-of-type(n+3)::before { background: var(--lime); color: var(--on-lime); }
  .bl-body .ba-roi .ba-row-tot td { text-align: left; }
  .bl-body .ba-roi .ba-row-tot td:nth-of-type(1)::before { content: 'Google Ads'; background: var(--navy); color: #f2f5f8; }
  .bl-body .ba-roi .ba-row-tot td:nth-of-type(2)::before { content: 'SEO'; background: var(--lime); color: var(--on-lime); }
  .bl-body .ba-table td.ba-win { border-radius: 12px; background: color-mix(in srgb, var(--lime) 24%, var(--tile)); }
  .ba-dot { display: none; }
  /* Presupuestos: cada monto con su etiqueta */
  .bl-body .ba-bud td:nth-of-type(1)::before { content: 'Google Ads (pauta)'; }
  .bl-body .ba-bud td:nth-of-type(2)::before { content: 'Gestión Ads'; }
  .bl-body .ba-bud td:nth-of-type(3)::before { content: 'SEO mensual'; background: var(--lime); color: var(--on-lime); }
  .bl-body .ba-bud td.ba-tot { margin: 6px 8px 0; padding: 10px; border-radius: 12px; }
  .bl-body .ba-bud td.ba-tot::before { content: 'Total marketing digital'; background: var(--lime); color: var(--on-lime); }
  .ba-tot b { white-space: normal; }
  .bl-body ul.ba-cpc > li { grid-template-columns: minmax(0, 1fr); grid-template-areas: "n" "e" "v" "b"; }
  .bl-body ul.ba-cpc > li { padding: 14px 16px; }
  .bl-body .ba-calc p { padding: 64px 16px 18px; }
  .ba-calc-ic { left: 16px; top: 16px; }
  .ba-local { grid-template-columns: minmax(0, 1fr); }
  .ba-lane-ticks { margin-left: 60px; }
}
