/* Artículo «Qué es SEO, GEO y AEO»: estilos de los bloques propios del cuerpo vigente (clases ga-*).
   Cada sigla tiene su color dentro de la paleta: SEO navy (la base), AEO azul niebla (la capa del medio), GEO lima (la capa de IA),
   igual que la ilustración de las tres capas. Los anchos responden al cuerpo del artículo (consulta de contenedor), no a la pantalla. */

.bl-body { container: ga-body / inline-size; }

/* Colores de las tres siglas */
.ga-c-seo { --ga: var(--navy); --ga-on: var(--lime); }
.ga-c-aeo { --ga: #aeb9c7; --ga-on: var(--on-lime); }
.ga-c-geo { --ga: var(--lime); --ga-on: var(--on-lime); }
html.dark .ga-c-seo { --ga: #3a4f70; }

/* Cada sección toma el color de su sigla (01 SEO, 02 AEO, 03 GEO); el resto, lima */
.ga-sec { --sec-c: var(--lime); --sec-on: var(--on-lime); }
.bl-body:has(.ga-layers) > .ga-sec:nth-of-type(1) { --sec-c: var(--navy); --sec-on: var(--lime); }
.bl-body:has(.ga-layers) > .ga-sec:nth-of-type(2) { --sec-c: #aeb9c7; --sec-on: var(--on-lime); }
html.dark .bl-body:has(.ga-layers) > .ga-sec:nth-of-type(1) { --sec-c: #3a4f70; }

/* Etiquetas pequeñas («En corto», «Definición», «Caso real»…) */
.bl-body .ga-label { display: block; margin-bottom: .45em; font-size: var(--t-small); font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; color: var(--brand); }

/* El índice propio del artículo vigente duplica el índice lateral de la plantilla (que se arma con los mismos h2,
   marca la sección actual y muestra el avance), así que se oculta. */
.bl-body .ga-toc { display: none; }

/* Arranque: «En corto» y «Lo que vas a aprender», uno sobre otro */
.ga-intro { display: grid; gap: 12px; }
.ga-intro > * { margin: 0; }
.bl-body .ga-intro .answer-first { padding: clamp(20px, 2.6vw, 30px); border-radius: 20px; background: var(--c-lime, #eff3cf); }
.bl-body .answer-first p { margin: 0; }

/* Secciones numeradas */
.bl-body > .ga-sec { margin-top: clamp(52px, 6vw, 88px); }
.ga-sec > * + *, .ga-split-txt > * + * { margin-top: 1.1em; }
.ga-kicker { display: flex; align-items: center; gap: 12px; font-size: var(--t-small); font-weight: 600; color: var(--soft); line-height: 1.2; }
.ga-kn { flex: none; display: inline-grid; place-items: center; min-width: 44px; height: 34px; padding: 0 10px; border-radius: 11px; background: var(--sec-c); color: var(--sec-on); font-size: .9375rem; font-variant-numeric: tabular-nums; transform-origin: 50% 60%; }
.bl-body .ga-sec h2 { margin-top: .45em; }
.bl-body .ga-sec .ga-kicker + h2 { margin-top: .45em; }

/* Definición: tarjeta con la barra del color de la sigla */
.bl-body p.ga-def { position: relative; padding: clamp(18px, 2.2vw, 26px) clamp(18px, 2.2vw, 26px) clamp(18px, 2.2vw, 26px) clamp(24px, 2.6vw, 34px); border-radius: 18px; background: var(--surface); overflow: hidden; }
.bl-body p.ga-def::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--sec-c); transform-origin: 50% 0; transform: scaleY(var(--ga-bar, 1)); }

/* Texto e ilustración lado a lado */
.ga-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: center; }
.ga-split-rev .ga-fig { order: -1; }
.ga-split .ga-fig { align-self: start; position: sticky; top: 92px; }
.bl-body .ga-split p.ga-def { font-size: 1.0625rem; line-height: 1.6; }
.ga-fig { margin: 0; }
.ga-fig img { width: 100%; height: auto; border-radius: 20px; background: var(--surface); box-shadow: 0 18px 44px rgba(29, 42, 61, .10); }
.ga-fig figcaption { margin-top: 10px; font-size: var(--t-small); line-height: 1.45; color: var(--soft); }
html.dark .ga-fig img { filter: brightness(.9); box-shadow: none; }

/* Los tres frentes del SEO */
.ga-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ga-pillar { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 18px; background: var(--surface); font-size: 1rem; line-height: 1.5; color: var(--ink); transition: translate .25s var(--ease-out), background-color .25s ease; }
.ga-pillar:hover { translate: 0 -4px; }
.ga-pillar strong { font-size: 1.125rem; color: var(--ink); letter-spacing: -0.012em; }
.ga-pillar-n { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 4px; border-radius: 12px; background: var(--navy); color: var(--lime); font-weight: 600; transform-origin: 50% 60%; }

/* Frase destacada */
.bl-body blockquote.ga-quote { position: relative; margin-inline: 0; padding: 4px 0 4px 26px; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); }
.bl-body blockquote.ga-quote::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 6px; background: var(--lime); transform-origin: 50% 100%; transform: scaleY(var(--ga-bar, 1)); }

/* Pastillas de cada sigla */
.ga-pill { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; background: var(--ga, var(--lime)); color: var(--ga-on, var(--on-lime)); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; line-height: 1.5; white-space: nowrap; }

/* Tabla comparativa: encabezado claro para que se lean las tres pastillas */
.bl-body .cmp-table thead th { background: var(--surface); padding-block: 14px; }
.bl-body .cmp-table tbody th { background: transparent; color: var(--ink); border-top: 1px solid var(--border); font-weight: 600; width: 22%; }
.bl-body .cmp-table td strong { color: var(--ink); }
.bl-body .cmp-table tbody tr:nth-child(even) th { background: color-mix(in srgb, var(--surface) 45%, transparent); }

/* La base común: tres capas apiladas (la de abajo, la más ancha) */
.ga-fig-layers { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(18px, 2.6vw, 30px); align-items: center; }
.ga-fig-layers figcaption { margin: 0; font-size: inherit; color: var(--ink); }
.bl-body ol.ga-layers { display: grid; gap: 8px; }
.bl-body ol.ga-layers > li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--ga) 16%, var(--tile)); border-left: 5px solid var(--ga); font-size: var(--t-small); line-height: 1.45; }
.bl-body ol.ga-layers > li::before { content: none; }
.bl-body ol.ga-layers > li:nth-child(1) { margin-inline: 28px; }
.bl-body ol.ga-layers > li:nth-child(2) { margin-inline: 14px; }

/* Caso real: tarjeta navy con la cifra grande */
.bl-body .ga-case { position: relative; display: grid; grid-template-columns: minmax(150px, 200px) minmax(0, 1fr); gap: clamp(18px, 2.6vw, 32px); padding: clamp(22px, 3vw, 36px); border-radius: 22px; background: var(--navy); color: #f2f5f8; overflow: hidden; isolation: isolate; }
.ga-case::after { content: ''; position: absolute; z-index: -1; right: -14px; bottom: -18px; width: clamp(96px, 11vw, 140px); aspect-ratio: 1; background: url('img/t-grafico.webp') center / contain no-repeat; opacity: .9; translate: 0 var(--ga-y, 0px); pointer-events: none; }
.ga-case-num { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.ga-case-big { font-size: clamp(3.25rem, 2.4rem + 3vw, 4.75rem); font-weight: 600; letter-spacing: -0.04em; line-height: .95; color: var(--lime); font-variant-numeric: tabular-nums; }
.ga-case-unit { font-size: var(--t-small); line-height: 1.35; color: #dbe2ea; }
.ga-case-chip { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-size: .875rem; font-weight: 600; transform-origin: 0 50%; }
.ga-case-txt { padding-right: clamp(40px, 7vw, 96px); }
.bl-body .ga-case .ga-label { color: var(--lime); }
.bl-body .ga-case p { margin: 0 0 14px; color: #dbe2ea; font-size: var(--t-small); line-height: 1.6; }
.bl-body .ga-case a:not(.btn-primary) { color: var(--lime); }
.bl-body .ga-case a.ga-case-link { display: inline-flex; font-weight: 600; text-decoration: none; }
.bl-body .ga-case a.ga-case-link:hover { text-decoration: underline; }

/* 10 acciones: tarjetas numeradas en dos columnas */
.bl-body ol.ga-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bl-body ol.ga-actions > li { padding: 18px 18px 18px 66px; border-radius: 18px; background: var(--surface); font-size: 1rem; line-height: 1.5; color: var(--ink); transition: translate .25s var(--ease-out); }
.bl-body ol.ga-actions > li:hover { translate: 0 -3px; }
.bl-body ol.ga-actions > li::before { content: counter(bl, decimal-leading-zero); left: 16px; top: 16px; width: 36px; height: 36px; border-radius: 11px; font-size: .875rem; font-variant-numeric: tabular-nums; }
.bl-body ol.ga-actions > li strong { display: block; margin-bottom: 4px; font-size: 1.0625rem; line-height: 1.3; color: var(--ink); }
.bl-body ol.ga-actions code, .bl-body .ga-m code { background: var(--tile); }

/* Cómo medir: tres tarjetas con ícono */
.ga-measure { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ga-m { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 20px; border-radius: 18px; background: var(--surface); font-size: 1rem; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.ga-m strong { font-size: 1.0625rem; line-height: 1.3; color: var(--ink); }
.ga-m svg { width: 46px; height: 46px; margin-bottom: 4px; padding: 11px; border-radius: 14px; background: var(--navy); fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Preguntas frecuentes */
.ga-faq { display: grid; gap: 10px; }
.ga-faq details { border-radius: 18px; background: var(--surface); transition: background-color .25s ease; }
.ga-faq details[open] { background: var(--c-lime, #eff3cf); }
.ga-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; list-style: none; cursor: pointer; border-radius: 18px; }
.ga-faq summary::-webkit-details-marker { display: none; }
.ga-faq summary::after { content: ''; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8d400' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 18px no-repeat; transition: rotate .3s var(--ease-out); }
.ga-faq details[open] summary::after { rotate: 45deg; }
.bl-body .ga-faq summary h3 { display: block; margin: 0; font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.3; }
.bl-body .ga-faq details p { margin: 0; padding: 0 20px 20px; font-size: var(--t-small); line-height: 1.6; }
@media (prefers-reduced-motion: no-preference) {
  .ga-faq details[open] p { animation: ga-abre .35s var(--ease-out); }
}
@keyframes ga-abre { from { opacity: 0; translate: 0 -6px; } }

/* Cierre del artículo: bloque navy con brillo lima y objeto 3D */
.bl-body > .ga-cta { position: relative; margin-top: clamp(52px, 6vw, 88px); padding: clamp(30px, 4vw, 52px) clamp(22px, 4vw, 52px); border-radius: 24px; text-align: center; background: radial-gradient(circle at 88% 0%, rgba(200, 212, 0, .26), transparent 55%), var(--navy); color: #f2f5f8; overflow: hidden; isolation: isolate; }
.ga-cta::after { content: ''; position: absolute; z-index: -1; left: clamp(-22px, -1.6vw, -10px); bottom: -22px; width: clamp(92px, 10vw, 128px); aspect-ratio: 1; background: url('img/t-cohete.webp') center / contain no-repeat; translate: 0 var(--ga-y, 0px); pointer-events: none; }
.bl-body .ga-cta .ga-label { color: var(--lime); }
.bl-body h2.ga-cta-h { margin: 0 auto .35em; max-width: 18ch; color: #fff; }
.bl-body .ga-cta p { max-width: 46ch; margin: 0 auto 22px; color: #dbe2ea; }
.ga-cta-btns { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; }
.bl-body .ga-cta a.ga-cta-sec { color: var(--lime); font-weight: 600; }

/* Medios: cuerpo del artículo angosto (escritorio chico) */
@container ga-body (max-width: 640px) {
  .ga-split, .ga-fig-layers { grid-template-columns: minmax(0, 1fr); }
  .ga-split-rev .ga-fig { order: 0; }
  .ga-split .ga-fig { position: static; }
  .ga-pillars, .ga-measure, .bl-body ol.ga-actions { grid-template-columns: minmax(0, 1fr); }
  .bl-body .ga-case { grid-template-columns: minmax(0, 1fr); }
  .ga-case-txt { padding-right: 0; }
  .ga-case::after { width: 84px; right: -8px; bottom: auto; top: 10px; }
}

/* Celular: la tabla pasa a tarjetas, una por fila, con la pastilla de cada sigla */
@container ga-body (max-width: 560px) {
  .bl-body .ga-sec .table-wrap { overflow: visible; }
  .bl-body .cmp-table, .bl-body .cmp-table tbody, .bl-body .cmp-table tr, .bl-body .cmp-table th, .bl-body .cmp-table td { display: block; width: auto; }
  .bl-body .cmp-table { border-radius: 0; overflow: visible; }
  .bl-body .cmp-table thead { display: none; }
  .bl-body .cmp-table tbody { display: grid; gap: 10px; }
  .bl-body .cmp-table tbody tr { padding: 6px 0; border-radius: 18px; background: var(--surface); overflow: hidden; }
  .bl-body .cmp-table tbody th, .bl-body .cmp-table tbody tr:nth-child(even) th { width: auto; border: 0; padding: 12px 16px 6px; background: transparent; font-size: 1.0625rem; }
  .bl-body .cmp-table td, .bl-body .cmp-table tr:nth-child(even) td { display: flex; align-items: baseline; gap: 10px; padding: 8px 16px; border: 0; background: transparent; }
  .bl-body .cmp-table td::before { flex: none; min-width: 52px; text-align: center; padding: 1px 0; border-radius: 999px; background: var(--ga); color: var(--ga-on); font-size: .75rem; font-weight: 600; letter-spacing: .04em; }
  .bl-body .cmp-table td:nth-of-type(1)::before { content: 'SEO'; --ga: var(--navy); --ga-on: var(--lime); }
  .bl-body .cmp-table td:nth-of-type(2)::before { content: 'AEO'; --ga: #aeb9c7; --ga-on: var(--on-lime); }
  .bl-body .cmp-table td:nth-of-type(3)::before { content: 'GEO'; --ga: var(--lime); --ga-on: var(--on-lime); }
  html.dark .bl-body .cmp-table td:nth-of-type(1)::before { --ga: #3a4f70; }
  .bl-body ol.ga-layers > li:nth-child(1) { margin-inline: 16px; }
  .bl-body ol.ga-layers > li:nth-child(2) { margin-inline: 8px; }
  .bl-body ol.ga-actions > li { padding: 16px 16px 16px 60px; }
  .bl-body ol.ga-actions > li::before { left: 14px; top: 14px; width: 32px; height: 32px; }
  .ga-faq summary { padding: 16px; }
  .bl-body .ga-faq details p { padding: 0 16px 18px; }
  .ga-cta::after { width: 76px; bottom: -16px; }
}
