/* ============================================================
   XUPERPARLEY · Estilos de páginas de contenido (/en/*, /es/*)
   Complementa styles.css — reutiliza los tokens y los botones.
   ============================================================ */

/* ---------- Base de documento ---------- */
.page-doc { background: var(--bg); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green); color: var(--on-accent); font-weight: 700;
  padding: 12px 20px; border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; }

.page-doc :is(a, button, summary, input):focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* El toggle de idioma en páginas internas son enlaces, no botones */
.lang-toggle span,
.lang-toggle a {
  display: inline-flex; align-items: center;
  padding: 5px 11px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--muted); transition: all .15s;
}
.lang-toggle span.is-active { background: var(--green-soft); color: var(--green); }
.lang-toggle a:hover { color: var(--txt); background: var(--hover-bg); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-top: 22px; padding-bottom: 2px;
  font-size: 13px; color: var(--muted-2);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb [aria-current] { color: var(--muted); }

/* ---------- Hero de página ---------- */
.page-hero { position: relative; padding: 40px 0 56px; overflow: hidden; }
.page-hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.page-hero-glow {
  position: absolute; width: 720px; height: 520px; top: -260px; left: 50%;
  transform: translateX(-50%); border-radius: 50%; filter: blur(100px); opacity: .45;
  background: radial-gradient(circle, rgba(62,242,160,.34), rgba(47,216,255,.16) 45%, transparent 70%);
}
.page-hero-inner { position: relative; z-index: 1; max-width: 860px; }

.page-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(32px, 5.6vw, 58px); line-height: 1.06; letter-spacing: -.02em;
  margin-bottom: 20px;
}
.page-title strong {
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.page-lede {
  font-size: clamp(16px, 2.1vw, 19px); line-height: 1.65; color: var(--muted);
  max-width: 720px;
}
.page-hero .hero-cta { margin: 32px 0 0; }

.trust-strip {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  list-style: none; margin-top: 30px; padding: 0;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--muted);
}
.trust-strip li { display: flex; align-items: center; gap: 8px; }
.trust-strip li::before { content: '◇'; color: var(--green); font-size: 10px; }

/* ---------- Secciones ---------- */
.page-doc .section { padding: 52px 0; }
.page-doc .section + .section { padding-top: 0; }

.sec-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(23px, 3.2vw, 32px); line-height: 1.18; letter-spacing: -.01em;
  margin-bottom: 16px; scroll-margin-top: calc(var(--header-h) + 20px);
}
.sec-intro { font-size: 17px; color: var(--muted); line-height: 1.7; max-width: 780px; margin-bottom: 26px; }
.sec-p { font-size: 16px; color: var(--muted); line-height: 1.75; max-width: 780px; }
.sec-p + .sec-p { margin-top: 16px; }
.sec-p strong { color: var(--txt); font-weight: 600; }
.sec-outro { margin-top: 24px; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid; gap: 16px; margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}
.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.info-card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 24px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.info-card:hover {
  border-color: var(--green-line); transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.info-ico { font-size: 22px; display: block; margin-bottom: 14px; }
.info-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.info-desc { font-size: 15px; color: var(--muted); line-height: 1.65; }

/* ---------- Listas ---------- */
.feat-list { list-style: none; display: grid; gap: 14px; max-width: 860px; margin-top: 6px; }
.feat-list li {
  position: relative; padding-left: 26px;
  font-size: 16px; color: var(--muted); line-height: 1.7;
}
.feat-list li::before {
  content: ''; position: absolute; left: 4px; top: 11px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--grad);
}
.feat-list strong { color: var(--txt); font-weight: 600; }

.check-list {
  list-style: none; display: grid; gap: 12px; margin-top: 6px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.check-list li {
  position: relative; padding-left: 30px;
  font-size: 15px; color: var(--muted); line-height: 1.6;
}
.check-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--green); font-weight: 700;
}

/* ---------- Pills ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.pill {
  padding: 9px 18px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; color: var(--txt);
  transition: border-color .2s, color .2s;
}
.pill:hover { border-color: var(--green-line); color: var(--green); }

/* ---------- Pasos ---------- */
.step-list { list-style: none; counter-reset: step; display: grid; gap: 14px; max-width: 860px; margin-top: 6px; }
.step-list li {
  counter-increment: step;
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 18px 20px;
}
.step-list li::before {
  content: counter(step);
  flex: 0 0 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--green-soft); border: 1px solid var(--green-line);
  color: var(--green); font-family: var(--font-mono); font-size: 13px; font-weight: 700;
}
.step-body { font-size: 15px; color: var(--muted); line-height: 1.65; }
.step-body strong { color: var(--txt); font-weight: 600; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; margin-top: 6px; border-radius: var(--r-lg); border: 1px solid var(--line-soft); }
.data-table { width: 100%; border-collapse: collapse; min-width: 460px; font-size: 15px; }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; }
.data-table thead th {
  background: var(--surface-2); color: var(--txt);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
.data-table tbody tr { border-top: 1px solid var(--line-soft); }
.data-table tbody th { color: var(--txt); font-weight: 600; }
.data-table td { color: var(--muted); }
.data-table .tick { color: var(--green); font-weight: 700; }

/* ---------- FAQ ----------
   Dos columnas: encabezado a la izquierda, lista de preguntas a la derecha.
   Cada pregunta es una tarjeta con chevron, que se despliega al abrirla. */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 28px 56px;
  align-items: start;
}
.faq-head { position: sticky; top: calc(var(--header-h) + 28px); }
.faq-head .sec-title { margin-bottom: 12px; }
.faq-head .sec-intro { font-size: 15px; margin-bottom: 0; }

.faq { display: grid; gap: 8px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); overflow: hidden;
  transition: border-color .2s, background .2s;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.faq-item:hover { border-color: var(--line); background: var(--surface-2); }
.faq-item[open] { border-color: var(--green-line); background: var(--surface); }

.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 17px 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-q {
  font-size: 15.5px; font-weight: 600; color: var(--txt); line-height: 1.45;
}
.faq-item[open] .faq-q { color: var(--green); }

.faq-chev {
  flex: 0 0 auto; width: 22px; height: 22px;
  display: grid; place-items: center;
  font-size: 19px; line-height: 1; color: var(--muted-2);
  transition: transform .22s cubic-bezier(.2,.7,.2,1), color .2s;
}
.faq-item:hover .faq-chev { color: var(--muted); }
.faq-item[open] .faq-chev { transform: rotate(90deg); color: var(--green); }

.faq-a { padding: 0 20px 20px; }
.faq-a p { font-size: 15px; color: var(--muted); line-height: 1.75; }

@media (max-width: 860px) {
  .faq-layout { grid-template-columns: 1fr; gap: 20px; }
  .faq-head { position: static; }
}

/* ---------- Glosario ---------- */
.glossary { display: grid; gap: 2px; margin-top: 6px; border-radius: var(--r-lg); overflow: hidden; }
.gloss-item {
  display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 20px;
  padding: 16px 20px; background: var(--surface);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.gloss-item dt { font-weight: 600; color: var(--txt); font-size: 15px; }
.gloss-item dd { font-size: 15px; color: var(--muted); line-height: 1.65; }

/* ---------- Callout ---------- */
.callout {
  border-left: 3px solid var(--green);
  background: var(--green-soft);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 20px 24px; max-width: 860px;
}
.callout-warn { border-left-color: var(--warn); background: rgba(255,207,92,.09); }
.callout-title { display: block; margin-bottom: 10px; color: var(--txt); font-size: 16px; }
.callout p { font-size: 15px; color: var(--muted); line-height: 1.7; }
.callout p + p { margin-top: 10px; }
.callout strong { color: var(--txt); }
.callout code {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--code-bg); padding: 2px 6px; border-radius: 4px;
}

/* ---------- CTA ---------- */
.section-cta { padding-bottom: 60px; }
.cta-box {
  position: relative; overflow: hidden;
  border: 1px solid var(--green-line); border-radius: var(--r-xl);
  background: var(--grad-soft);
  padding: 48px 40px; text-align: center;
}
.cta-title { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; margin-bottom: 14px; }
.cta-text { font-size: 16px; color: var(--muted); line-height: 1.7; max-width: 560px; margin: 0 auto 28px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Relacionados ---------- */
.section-related { padding-bottom: 70px; }
.related-grid {
  display: grid; gap: 14px; margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.related-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 22px;
  transition: border-color .2s, transform .2s;
}
.related-card:hover { border-color: var(--green-line); transform: translateY(-2px); }
.related-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--txt); }
.related-desc { font-size: 14px; color: var(--muted); line-height: 1.55; }
.related-go { margin-top: 6px; color: var(--green); font-size: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .page-doc .nav { display: none; }
  .page-doc .menu-toggle { display: flex; }
  .page-doc .header-actions .btn { display: none; }
}

@media (max-width: 620px) {
  .page-hero { padding: 28px 0 40px; }
  .page-doc .section { padding: 40px 0; }
  .gloss-item { grid-template-columns: 1fr; gap: 6px; }
  .cta-box { padding: 36px 24px; }
  .check-list { grid-template-columns: 1fr; }
}
