/* =====================================================================
   Solución · Posicionamiento SEO Técnico
   Extiende soluciones-gestion-digital.css con bloques específicos.
   max-width: 1240px en todos los bloques (coherente con gestion-digital).
   ===================================================================== */

/* ═══ FIELDS GRID — Dos campos de juego (Google + IA) ═════════════
   Cada campo: label + título + párrafo técnico + mockup + nota. */
.gd-page .fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.gd-page .field {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.gd-page .field-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}
.gd-page .field-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
.gd-page .field-desc {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.gd-page .field-note {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.55;
  font-style: italic;
  padding: 12px 16px;
  background: var(--bg-2);
  border-left: 2px solid var(--accent);
  margin-top: 4px;
}

/* ═══ SERP MOCKUP ═════════════════════════════════════════════════ */
.gd-page .serp {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
.gd-page .serp__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  margin-bottom: 18px;
}
.gd-page .serp__query { font-size: 13px; color: var(--ink); }
.gd-page .serp__result {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.gd-page .serp__result:last-child { border-bottom: none; }
.gd-page .serp__result.is-hl {
  background: linear-gradient(90deg, rgba(0,102,255,0.05), transparent);
  padding-left: 10px;
  margin: 0 -10px;
  border-left: 3px solid var(--accent);
  border-bottom: 1px solid var(--line-2);
}
.gd-page .serp__cite {
  font-style: normal;
  font-size: 11.5px;
  color: #006621;
  display: block;
  margin-bottom: 3px;
}
.gd-page .serp__title {
  display: block;
  font-size: 14.5px;
  color: #1a0dab;
  margin-bottom: 4px;
  line-height: 1.3;
}
.gd-page .serp__result.is-hl .serp__title { font-weight: 500; }
.gd-page .serp__desc {
  display: block;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.45;
}

/* ═══ AI MOCKUP ═══════════════════════════════════════════════════ */
.gd-page .ai {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gd-page .ai__msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.gd-page .ai__avatar {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}
.gd-page .ai__avatar.is-user { background: var(--bg-2); color: var(--ink-2); }
.gd-page .ai__avatar.is-ai { background: var(--ink); color: var(--bg); }
.gd-page .ai__prompt {
  font-size: 13.5px;
  color: var(--ink);
  padding-top: 3px;
}
.gd-page .ai__body { flex: 1; padding-top: 3px; }
.gd-page .ai__body p {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.gd-page .ai__body strong { color: var(--ink); font-weight: 500; }
.gd-page .ai__source {
  margin-top: 10px;
  padding: 6px 10px;
  background: var(--bg-2);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  display: inline-block;
}

/* ═══ MÉTODO · 5 capas verticales ═════════════════════════════════ */
.gd-page .method-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}
.gd-page .method-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.gd-page .method-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding-top: 6px;
}
.gd-page .method-content h3 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 12px;
}
.gd-page .method-content p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: 12px;
}
.gd-page .method-content p:last-child { margin-bottom: 0; }
.gd-page .method-content .note {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.55;
  padding: 12px 16px;
  background: var(--bg-2);
  border-left: 2px solid var(--accent);
  font-style: italic;
}

/* ═══ CASO REAL — Chips de posiciones #1 ═════════════════════════ */
.gd-page .positions-block {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.gd-page .positions-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.gd-page .positions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gd-page .pos-chip {
  font-family: var(--mono);
  font-size: 12px;
  padding: 7px 12px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 4px;
}
.gd-page .positions-ia {
  margin-top: 24px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  padding: 14px 18px;
  background: var(--bg-2);
  border-left: 2px solid var(--accent);
}

/* ═══ CODE SNAP — Comparativa de código real (sección 01) ═════════
   Visualiza la diferencia técnica concreta: HTML sin estructura
   semántica vs HTML con schema.org tipado. Específico de SEO. */
.gd-page .code-snap {
  background: #0F1419;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 28px;
  font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  box-shadow: 0 12px 32px -16px rgba(0,0,0,0.4);
}
.gd-page .code-snap__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #1A2026;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.gd-page .code-snap__dots {
  display: flex;
  gap: 6px;
}
.gd-page .code-snap__dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.gd-page .code-snap__file {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}
.gd-page .code-snap__badge {
  margin-left: auto;
  font-size: 9px;
  padding: 3px 7px;
  border-radius: 3px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.gd-page .code-snap__badge.is-warn {
  background: rgba(255, 200, 0, 0.15);
  color: #FFC83D;
}
.gd-page .code-snap__badge.is-ok {
  background: rgba(0, 184, 102, 0.18);
  color: #4ADE80;
}
.gd-page .code-snap__body {
  padding: 18px 18px;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  overflow-x: auto;
}
.gd-page .code-snap__line { white-space: pre; }
.gd-page .code-snap .cs-tag { color: #F87171; }      /* HTML tags */
.gd-page .code-snap .cs-attr { color: #60A5FA; }     /* attributes */
.gd-page .code-snap .cs-str { color: #4ADE80; }      /* string values */
.gd-page .code-snap .cs-key { color: #C084FC; }      /* schema keys */
.gd-page .code-snap .cs-txt { color: rgba(255,255,255,0.7); }
.gd-page .code-snap__status {
  padding: 12px 18px 16px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gd-page .code-snap__status-item {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gd-page .code-snap__status-item.is-miss {
  color: rgba(248, 113, 113, 0.85);
}
.gd-page .code-snap__status-item.is-miss::before {
  content: "─";
  color: rgba(248, 113, 113, 0.6);
}
.gd-page .code-snap__status-item.is-have {
  color: rgba(74, 222, 128, 0.95);
}
.gd-page .code-snap__status-item.is-have::before {
  content: "✓";
  color: #4ADE80;
  font-weight: 600;
}

/* Variante para .compare-col.is-active (fondo oscuro) — sin sombra extra */
.gd-page .compare-col.is-active .code-snap {
  box-shadow: 0 12px 32px -16px rgba(0,0,0,0.6);
}

/* ═══ SERVICE STREAM — Anchor Fase 1 + 4 Quarters (sección 05) ═══
   Layout asimétrico: bloque ancla de construcción + 4 tarjetas con
   progresión estratégica del año, una por trimestre. */
.gd-page .service-stream {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  margin-bottom: 32px;
  overflow: hidden;
}

.gd-page .stream-anchor {
  background:
    linear-gradient(160deg, var(--accent) 0%, #0050cc 100%);
  color: white;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.gd-page .stream-anchor::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(255,255,255,0.14), transparent 55%);
  pointer-events: none;
}
.gd-page .stream-anchor__tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  opacity: 0.85;
  text-transform: uppercase;
}
.gd-page .stream-anchor__title {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: -4px;
}
.gd-page .stream-anchor__sub {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  line-height: 1.45;
}
.gd-page .stream-anchor__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.gd-page .stream-anchor__items span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.95);
  padding: 6px 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
.gd-page .stream-anchor__moment {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.2);
  padding: 5px 10px;
  border-radius: 3px;
  align-self: flex-start;
  margin-top: 4px;
}

.gd-page .stream-flow {
  display: flex;
  flex-direction: column;
}
.gd-page .stream-flow__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.gd-page .stream-flow__head-arrow {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.gd-page .stream-quarters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  flex: 1;
}
.gd-page .quarter {
  padding: 24px 22px;
  border-right: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gd-page .quarter:last-child { border-right: none; }
.gd-page .quarter__tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.15em;
  font-weight: 500;
}
.gd-page .quarter__months {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  margin-top: -8px;
}
.gd-page .quarter__focus {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.25;
  margin-top: 4px;
}
.gd-page .quarter__items {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gd-page .quarter__items span {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
  padding-left: 12px;
  position: relative;
}
.gd-page .quarter__items span::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.gd-page .stream-flow__foot {
  padding: 14px 28px;
  border-top: 1px solid var(--line-2);
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
}

@media (max-width: 980px) {
  .gd-page .service-stream { grid-template-columns: 1fr; }
  .gd-page .stream-anchor { padding: 28px 24px; }
  .gd-page .stream-anchor__title { font-size: 28px; }
  .gd-page .stream-quarters { grid-template-columns: repeat(2, 1fr); }
  .gd-page .quarter:nth-child(2) { border-right: none; }
  .gd-page .quarter:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 560px) {
  .gd-page .stream-quarters { grid-template-columns: 1fr; }
  .gd-page .quarter { border-right: none; border-bottom: 1px solid var(--line-2); }
}

/* ═══ ALCANCE · Fase 1 + Fase 2 ═══════════════════════════════════ */
.gd-page .includes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.gd-page .include-phase {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
}
.gd-page .include-phase__tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.gd-page .include-phase__title {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
}
.gd-page .include-phase ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.gd-page .include-phase ul li {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
  padding: 11px 0 11px 22px;
  border-top: 1px solid var(--line-2);
  position: relative;
}
.gd-page .include-phase ul li:first-child { border-top: none; }
.gd-page .include-phase ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-3);
  font-family: var(--mono);
}
.gd-page .includes-footer {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ═══ MANIFIESTO · Lo que NO es ═══════════════════════════════════ */
.gd-page .manifesto {
  background: var(--ink);
  color: var(--bg);
  padding: 64px 48px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.gd-page .manifesto-lead {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--bg);
}
.gd-page .manifesto-body h2 {
  font-family: var(--sans);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--bg);
  margin-bottom: 18px;
}
.gd-page .manifesto-body p {
  font-size: 14.5px;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
  margin-bottom: 12px;
}
.gd-page .manifesto-body p:last-child { margin-bottom: 0; }

/* ═══ FAQ ═════════════════════════════════════════════════════════ */
.gd-page .faq-list {
  border-top: 1px solid var(--ink);
}
.gd-page .faq-item { border-bottom: 1px solid var(--line); }
.gd-page .faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.gd-page .faq-item summary::-webkit-details-marker { display: none; }
.gd-page .faq-item summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 18px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.gd-page .faq-item[open] summary::after {
  content: "−";
  color: var(--accent);
}
.gd-page .faq-answer {
  padding: 0 0 26px 0;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.7;
  max-width: 820px;
}

/* CTA · contact-wrap → ahora vive en soluciones-gestion-digital.css
   (compartido entre las dos páginas de soluciones). */

/* ═══ ALINEACIÓN INTRA-CARDS · subgrid ════════════════════════════
   Cuando hay cards en grids 2-4 columnas, sus elementos internos
   (label, title, mockup, párrafos, listas) tienen alturas variables
   y NO se alinean a la misma altura vertical entre cards. Eso da
   sensación de desorden. Con CSS subgrid cada card hereda las
   row-tracks del grid padre y los elementos análogos se alinean
   al elemento más alto de la fila. Scoped a .seo-page para no
   afectar a /soluciones/gestion-digital. */

/* Sección 01 — compare-grid: label · title · code-snap · 6 items */
.gd-page.seo-page .compare-grid {
  grid-template-rows: auto auto auto repeat(6, auto);
}
.gd-page.seo-page .compare-grid > .compare-col {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 9;
}

/* Sección 02 — fields-grid: label · title · desc · mockup · note */
.gd-page.seo-page .fields-grid {
  grid-template-rows: auto auto auto 1fr auto;
  column-gap: 32px;
  row-gap: 0;
}
.gd-page.seo-page .fields-grid > .field {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  row-gap: 20px;
}

/* Sección 04 — results-grid: label · value · context (min-height) */
.gd-page.seo-page .results-grid .result-context {
  min-height: 3em;
}

/* Sección 05 — stream-quarters: tag · months · focus · items */
.gd-page.seo-page .stream-quarters {
  grid-template-rows: auto auto auto 1fr;
}
.gd-page.seo-page .stream-quarters > .quarter {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  row-gap: 12px;
}

/* Sección 05 — includes-grid: tag · title · ul */
.gd-page.seo-page .includes-grid {
  grid-template-rows: auto auto 1fr;
  column-gap: 32px;
  row-gap: 0;
}
.gd-page.seo-page .includes-grid > .include-phase {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  row-gap: 0;
}

/* Sección 06 — targets-list 2-col x 3 filas (5 items + 1 vacío) */
.gd-page.seo-page .targets-list {
  grid-template-rows: repeat(3, auto auto);
}
.gd-page.seo-page .targets-list > .target {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  row-gap: 12px;
}

/* Fallback para navegadores sin subgrid: min-height en titles
   evita el peor desalineamiento visual (titles que envuelven a
   distinto número de líneas entre cards adyacentes). */
@supports not (grid-template-rows: subgrid) {
  .gd-page.seo-page .compare-title,
  .gd-page.seo-page .field-title,
  .gd-page.seo-page .quarter__focus,
  .gd-page.seo-page .targets-list .target h3,
  .gd-page.seo-page .include-phase__title {
    min-height: 2.4em;
  }
}

/* ═══ RESPONSIVE ══════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .gd-page .fields-grid,
  .gd-page .includes-grid { grid-template-columns: 1fr; gap: 20px; }
  .gd-page .method-step {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 28px 0;
  }
  .gd-page .manifesto {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 28px;
  }
  .gd-page .cta-final { padding: 40px 28px; }

  /* En móvil 1 columna: desactivar subgrid (cada card autónoma) */
  .gd-page.seo-page .compare-grid,
  .gd-page.seo-page .fields-grid,
  .gd-page.seo-page .includes-grid,
  .gd-page.seo-page .targets-list,
  .gd-page.seo-page .stream-quarters {
    grid-template-rows: none;
  }
  .gd-page.seo-page .compare-grid > .compare-col,
  .gd-page.seo-page .fields-grid > .field,
  .gd-page.seo-page .includes-grid > .include-phase,
  .gd-page.seo-page .targets-list > .target,
  .gd-page.seo-page .stream-quarters > .quarter {
    display: block;
    grid-row: auto;
  }
  .gd-page.seo-page .fields-grid > .field { display: flex; flex-direction: column; gap: 20px; }
  .gd-page.seo-page .stream-quarters > .quarter { display: flex; flex-direction: column; gap: 12px; }
}
