/* =============================================================================
   article.css — hoja propia de las páginas de contenido de NEXIA Switch
   (/es/<tema>/ y /en/<topic>/).

   Por qué es un archivo aparte y no más reglas dentro de site.css:
   site.css es la hoja de la landing — está hecha para un hero, tarjetas,
   planes y un comparador. Estas páginas son texto largo, y meter tipografía
   de artículo ahí terminaría cambiando la landing sin querer. La regla del
   proyecto para lo compartido de verdad es extraerlo a su propio archivo y
   enlazarlo a propósito: esto es eso.

   Depende de las variables de color de site.css, que estas páginas también
   cargan (para heredar header, nav, botones y footer idénticos a la landing).
   ========================================================================== */

/* ── El artículo ─────────────────────────────────────────────────────────── */
.article {
  max-width: 760px;          /* ~85 caracteres por línea: el ancho que se lee */
  margin: 0 auto;
  padding: 0 24px 20px;
}

.article-head {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 74px) 24px clamp(18px, 3vw, 30px);
  text-align: center;
}

.article-head .kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(11, 17, 32, .6);
}
.article-head .kicker i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 12px var(--green);
}

.article-head h1 {
  font-family: var(--display);
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.02em;
  margin-bottom: 18px;
}
.article-head h1 .grad {
  background: linear-gradient(120deg, var(--cyan2), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.article-head .lead {
  font-size: clamp(16.5px, 2vw, 19px);
  line-height: 1.66;
  color: var(--muted);
  max-width: 660px;
  margin: 0 auto;
}

/* Migas: además de orientar, son las que Google muestra en vez de la URL. */
.crumbs {
  max-width: 820px; margin: 0 auto; padding: 20px 24px 0;
  font-size: 12.5px; color: var(--faint);
}
.crumbs a { color: var(--faint); }
.crumbs a:hover { color: var(--cyan2); }
.crumbs span { margin: 0 7px; opacity: .55; }

/* ── Tipografía del cuerpo ───────────────────────────────────────────────── */
.article h2 {
  font-family: var(--display);
  font-size: clamp(21px, 2.7vw, 27px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.012em;
  margin: 46px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 84px;      /* el header es sticky: sin esto tapa el ancla */
}
.article h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.article h3 {
  font-family: var(--display);
  font-size: clamp(16.5px, 2vw, 19px);
  font-weight: 600;
  margin: 30px 0 10px;
  color: var(--text);
  scroll-margin-top: 84px;
}

.article p { margin: 14px 0; font-size: 16.5px; line-height: 1.78; color: #C7D2E1; }
.article p > b, .article p > strong, .article li > b { color: var(--text); font-weight: 600; }
.article a { border-bottom: 1px solid rgba(14, 165, 233, .35); }
.article a:hover { border-bottom-color: var(--cyan2); }

.article ul, .article ol { margin: 14px 0 14px 22px; }
.article li { margin: 8px 0; font-size: 16.5px; line-height: 1.72; color: #C7D2E1; }
.article ul li::marker { color: var(--cyan); }
.article ol li::marker { color: var(--cyan); font-weight: 600; }

.article code {
  font-family: var(--mono); font-size: .88em;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 6px; color: var(--cyan2);
}

/* ── Bloques destacados ──────────────────────────────────────────────────── */
.callout {
  border-left: 3px solid var(--cyan);
  background: var(--cyan-dim);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 26px 0;
}
.callout p { margin: 6px 0; color: var(--text); }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--amber); background: var(--amber-dim); }

/* Tabla comparativa, reutilizando el lenguaje visual del comparador. */
.article .tablewrap { overflow-x: auto; margin: 26px 0; }
.article table {
  width: 100%; min-width: 520px; border-collapse: collapse;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  font-size: 14.8px;
}
.article th, .article td {
  padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.article th { background: var(--panel); color: var(--text); font-weight: 600; font-size: 13.5px; }
.article th.us { color: var(--cyan2); }
.article td { color: #C7D2E1; }
.article td.y { color: var(--green); font-weight: 600; }
.article td.n { color: var(--faint); }
.article td.m { color: var(--amber); }
.article tr:last-child td { border-bottom: none; }

/* ── Índice de la página ─────────────────────────────────────────────────── */
.onthispage {
  border: 1px solid var(--line);
  background: var(--bg2);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 0 0 34px;
}
.onthispage b {
  display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 10px; font-weight: 700;
}
.onthispage ol { margin: 0 0 0 20px; }
.onthispage li { margin: 5px 0; font-size: 15px; }

/* ── Preguntas ───────────────────────────────────────────────────────────── */
.article .faq { margin-top: 12px; }
.article details {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; margin-bottom: 10px; background: var(--bg2);
}
.article details[open] { border-color: var(--line2); }
.article summary {
  cursor: pointer; font-weight: 600; color: var(--text); font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; gap: 14px;
}
.article summary::-webkit-details-marker { display: none; }
.article summary::after { content: "+"; color: var(--cyan); font-size: 20px; line-height: 1; }
.article details[open] summary::after { content: "−"; }
.article details .a { margin-top: 10px; color: #C7D2E1; line-height: 1.75; font-size: 15.6px; }

/* ── Cierre ──────────────────────────────────────────────────────────────── */
.article-cta {
  max-width: 820px; margin: 54px auto 0; padding: 34px 24px 64px;
  text-align: center; border-top: 1px solid var(--line);
}
.article-cta h2 {
  font-family: var(--display); font-size: clamp(21px, 3vw, 29px);
  font-weight: 700; margin-bottom: 12px;
}
.article-cta p { color: var(--muted); margin-bottom: 22px; font-size: 16.5px; }
.article-cta .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Páginas hermanas: enlazado interno, que es como se reparte la autoridad. */
.related { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.related h2 {
  font-family: var(--display); font-size: 19px; font-weight: 700;
  margin: 46px 0 16px; padding-top: 26px; border-top: 1px solid var(--line);
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.related-grid a {
  display: block; border: 1px solid var(--line); border-radius: 11px;
  padding: 15px 17px; background: var(--bg2); transition: .18s;
}
.related-grid a:hover { border-color: var(--cyan); background: var(--panel); }
.related-grid b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.related-grid span { display: block; color: var(--faint); font-size: 13px; line-height: 1.5; }

@media (max-width: 720px) {
  .article, .article-head, .crumbs, .related, .article-cta { padding-left: 18px; padding-right: 18px; }
  .article p, .article li { font-size: 16px; }
}
