/* preguntas-frecuentes.css — Página «Preguntas frecuentes»
   (/preguntas-frecuentes, Recursos › Preguntas frecuentes). Landing v2,
   diseño aprobado el 20-nov-2026: especificación de diseño «preguntas»
   y preguntas.dc.html.

   Se carga solo en preguntas-frecuentes.html, después de landing-v2.css.
   Prefijo .pf-. Comportamiento en js/preguntas-frecuentes.js.

   Colores: solo tokens de css/tokens.css (paleta 2026), sin hex sueltos ni
   gradientes. Dos contextos redefinen los tokens por rol:
   · .pf-flot: buscador, tarjetas de preguntas, mensaje sin resultados y chips
     del índice en celular. Crema con texto marino en los dos temas
     (--card-float-*).
   · .lv-oscuro (landing-v2.css): el cierre de contacto, marino fijo.

   Diferencias con el diseño, por las decisiones de landing v2:
   tipografía del repo (h1, h2 y preguntas en Google Sans Semibold, <em> en
   DM Serif Text Italic; nunca Poppins) y el CTA del cierre en menta
   (lv-btn--principal). */

/* ── Contexto crema fijo ──────────────────────────────────────────────── */
.pf-flot {
  --bg: var(--card-float-bg);
  --text: var(--card-float-text);
  --text-muted: color-mix(in srgb, var(--card-float-text) 72%, var(--card-float-bg));
  --border: color-mix(in srgb, var(--card-float-text) 12%, transparent);
  --surface-2: color-mix(in srgb, var(--card-float-text) 4%, var(--card-float-bg));
  --focus: var(--hs-marino);
  background-color: var(--bg);
  color: var(--text);
}
.pf p { margin: 0; }
.pf h1, .pf h2, .pf h3 { margin: 0; }
.pf-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ══ 1 · Encabezado y buscador ═══════════════════════════════════════════ */
.pf-hero { padding-bottom: clamp(48px, 6vw, 80px); }
.pf-hero__wrap { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.pf-migas { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--text-muted); }
.pf-migas a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.pf-migas a:hover { color: var(--text); }
.pf-migas a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.pf .pf-hh { font-size: clamp(44px, 6vw, 84px); line-height: 1.02; color: var(--text); }
.pf-hh em { color: var(--hs-naranja); }
.pf-hdesc { max-width: 620px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--text-muted); }

.pf-buscador { width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
/* Sin JS el buscador no sirve: se oculta y todo queda abierto. */
html:not(.pf-js) .pf-buscador { display: none; }
.pf-caja {
  position: relative; display: flex; align-items: center; gap: 8px;
  border: 1.5px solid color-mix(in srgb, var(--text) 25%, transparent); border-radius: 999px;
  padding: 6px 6px 6px 24px;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--hs-marino) 8%, transparent);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pf-caja:focus-within {
  border-color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 12%, transparent), 0 14px 30px color-mix(in srgb, var(--hs-marino) 8%, transparent);
}
.pf-campo {
  flex: 1; min-width: 0; min-height: 52px; border: 0; background: transparent;
  font: inherit; font-size: 18px; color: var(--text); outline: none;
}
.pf-campo::placeholder { color: var(--text-muted); opacity: 1; }
/* La «x» nativa del campo search se cambia por el botón «Borrar». */
.pf-campo::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.pf-borrar {
  flex-shrink: 0; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0;
  background-color: var(--surface-2); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.pf-borrar[hidden] { display: none; }
.pf-borrar:hover { background-color: color-mix(in srgb, var(--text) 10%, var(--bg)); }
.pf-borrar:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pf-conteo { font-size: 15px; color: var(--text-muted); min-height: 22px; padding-left: 4px; }
.pf-conteo b { color: var(--text); font-weight: 600; }

/* ══ 2 · Índice y temas ═══════════════════════════════════════════════════ */
.pf-temas { padding-bottom: clamp(64px, 8vw, 112px); }
.pf-cuerpo { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; max-width: 1200px; margin: 0 auto; }
.pf-indice {
  flex: 0 0 260px; position: sticky; top: calc(var(--hs-capsula-alto) + 40px); z-index: 5;
  display: flex; flex-direction: column; gap: 4px;
}
.pf-indice__t {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); padding: 0 14px 8px;
}
.pf-ix {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 14px; border-radius: 12px;
  font-size: 15px; color: var(--text); text-decoration: none;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
.pf-ix:hover { background-color: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.pf-ix:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pf-ix__n {
  flex-shrink: 0; min-width: 28px; padding: 2px 8px; border-radius: 999px; text-align: center;
  font-size: 13px; font-weight: 600; background-color: color-mix(in srgb, var(--text) 8%, transparent);
}
/* Tema visible: marino fijo con texto crema; en oscuro, un borde lo separa. */
.pf-ix[aria-current="true"] { background-color: var(--hs-marino); color: var(--hs-crema); font-weight: 600; }
.pf-ix[aria-current="true"] .pf-ix__n { background-color: color-mix(in srgb, var(--hs-crema) 18%, transparent); }
html.dark .pf-ix[aria-current="true"] { box-shadow: inset 0 0 0 1px var(--border); }
.pf-ix.is-apagado { opacity: .45; }

.pf-contenido { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 56px; }

@media (max-width: 899px) {
  .pf-cuerpo { gap: 28px; }
  /* Fila de chips sticky bajo la cápsula, con desplazamiento lateral. */
  .pf-indice {
    flex: 1 1 100%; top: calc(var(--hs-capsula-alto) + 8px);
    flex-direction: row; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin: 0 -16px; padding: 10px 16px; background-color: var(--surface-2);
  }
  .pf-indice::-webkit-scrollbar { display: none; }
  .pf-indice__t { display: none; }
  .pf-ix {
    flex-shrink: 0; white-space: nowrap; border-radius: 999px;
    background-color: var(--card-float-bg); color: var(--card-float-text);
    border: 1px solid color-mix(in srgb, var(--card-float-text) 15%, transparent);
  }
  .pf-ix .pf-ix__n { background-color: color-mix(in srgb, var(--card-float-text) 8%, transparent); }
  .pf-ix:hover { background-color: color-mix(in srgb, var(--card-float-text) 6%, var(--card-float-bg)); color: var(--card-float-text); }
  .pf-ix:focus-visible { outline-color: var(--text); outline-offset: -3px; }
  .pf-ix[aria-current="true"],
  .pf-ix[aria-current="true"]:hover { background-color: var(--hs-marino); color: var(--hs-crema); border-color: var(--hs-marino); }
  .pf-ix[aria-current="true"] .pf-ix__n { background-color: color-mix(in srgb, var(--hs-crema) 18%, transparent); }
  .pf-ix[aria-current="true"]:focus-visible { outline-color: var(--hs-crema); }
  html.dark .pf-ix[aria-current="true"] { border-color: var(--border); box-shadow: none; }
}
@media (min-width: 640px) and (max-width: 899px) {
  .pf-indice { margin: 0 -24px; padding: 10px 24px; }
}

.pf-tema { display: flex; flex-direction: column; gap: 18px; }
/* Al saltar desde el índice, el título queda bajo la cápsula (y bajo la fila
   de chips en celular). Selector más fuerte que el scroll-margin general de
   .hs-con-capsula section[id] (styles.css). El margen absorbe también los
   22 px que el tema sube al terminar su entrada (js/revelar.js). */
.hs-con-capsula section.pf-tema[id] { scroll-margin-top: calc(var(--hs-capsula-alto) + 40px); }
@media (max-width: 899px) { .hs-con-capsula section.pf-tema[id] { scroll-margin-top: calc(var(--hs-capsula-alto) + 104px); } }
.pf-tema[hidden] { display: none; }
.pf-tema__cabeza { display: flex; flex-direction: column; gap: 6px; }
.pf .pf-h2 { font-size: clamp(30px, 3vw, 40px); line-height: 1.1; color: var(--text); }
.pf-tema__bajada { font-size: 16px; color: var(--text-muted); }

.pf-lista { display: flex; flex-direction: column; gap: 10px; }
.pf-vacio {
  border: 1px dashed color-mix(in srgb, var(--text) 30%, transparent); border-radius: 18px;
  padding: 28px; font-size: 17px; line-height: 1.55;
}
.pf-vacio[hidden] { display: none; }
.pf-vacio a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Tarjeta de pregunta: al abrirse suma borde y sombra suave de marino. */
.pf-q {
  border: 1px solid var(--border); border-radius: 18px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pf-q[hidden] { display: none; }
.pf-q.is-abierta {
  border-color: color-mix(in srgb, var(--text) 30%, transparent);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--hs-marino) 8%, transparent);
}
/* h3 por estructura, con la tipografía del texto. */
.pf .pf-qh { font-family: var(--lv-texto-fuente); font-size: inherit; letter-spacing: 0; }
.pf-qb {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding: 18px 22px; border: 0; border-radius: 18px; background: transparent;
  font: inherit; font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--text);
  text-align: left; cursor: pointer;
}
html:not(.pf-js) .pf-qb { cursor: default; }
.pf-qb:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pf-mark { background-color: var(--hs-amarillo); color: var(--hs-marino); border-radius: 4px; padding: 0 2px; }
/* «+» dibujado con CSS: dos barras que giran a «×» al abrir. */
.pf-mas {
  position: relative; flex-shrink: 0; width: 32px; height: 32px; border-radius: 999px;
  background-color: var(--surface-2);
  transition: transform .25s ease, background-color .25s ease;
}
.pf-mas::before,
.pf-mas::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px;
  margin: -1px 0 0 -6px; border-radius: 2px; background-color: var(--text);
  transition: background-color .25s ease;
}
.pf-mas::after { transform: rotate(90deg); }
.pf-q.is-abierta .pf-mas { transform: rotate(45deg); background-color: var(--hs-marino); }
.pf-q.is-abierta .pf-mas::before,
.pf-q.is-abierta .pf-mas::after { background-color: var(--hs-crema); }
html:not(.pf-js) .pf-mas { display: none; }

/* Respuesta: texto al 86 % (AA sobre crema). Con JS parte cerrada; la regla
   de html.pf-js evita que se vea abierta antes de que el JS ponga hidden. */
.pf-a {
  max-width: 760px; padding: 0 22px 22px;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 16px; line-height: 1.65; color: color-mix(in srgb, var(--text) 86%, var(--bg));
}
.pf-a[hidden],
html.pf-js .pf-q:not(.is-abierta) .pf-a { display: none; }
.pf-a ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pf-a li { position: relative; padding-left: 20px; }
.pf-a li::before {
  content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px;
  border-radius: 999px; background-color: var(--text);
}
.pf-a b { font-weight: 600; color: var(--text); }
.pf-a a { color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.pf-a a:hover { text-decoration-color: var(--hs-naranja); }
.pf-a a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Tabla de precios. Bajo 640 px cada fila se apila como tarjeta. */
.pf-tabla {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; font-size: 15px;
}
.pf-tabla th {
  text-align: left; font-weight: 600; font-size: 13px; color: var(--text-muted);
  background-color: var(--surface-2); padding: 12px 14px;
}
.pf-tabla td { padding: 14px; border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent); vertical-align: top; }
.pf-tabla td small { display: block; font-size: 13px; color: var(--text-muted); }
.pf-tabla__plan { font-weight: 600; color: var(--text); }
@media (max-width: 639px) {
  .pf-tabla, .pf-tabla tbody, .pf-tabla tr, .pf-tabla td { display: block; width: 100%; }
  .pf-tabla thead { display: none; }
  .pf-tabla tr { border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent); padding: 6px 0; }
  .pf-tabla tr:first-child { border-top: 0; }
  .pf-tabla td { border-top: 0; padding: 6px 14px; display: flex; justify-content: space-between; gap: 12px; }
  .pf-tabla td::before { content: attr(data-label); font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
  .pf-tabla td.pf-tabla__plan::before { content: none; }
  .pf-tabla td > span { text-align: right; }
  .pf-tabla td small { display: block; }
}

/* ══ 3 · Cierre de contacto ═══════════════════════════════════════════════ */
.pf-cierre { padding-top: clamp(64px, 8vw, 104px); padding-bottom: clamp(64px, 8vw, 104px); }
.pf-cierre__wrap {
  max-width: 820px; margin: 0 auto; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 20px;
}
.pf .pf-cierre__h { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; color: var(--text); }
.pf-cierre__p { font-size: 18px; line-height: 1.55; color: var(--text-muted); }
.pf-correo {
  display: flex; align-items: center; justify-content: center; gap: 8px 12px; flex-wrap: wrap;
  max-width: 100%; border-radius: 999px; padding: 6px 6px 6px 22px;
  background-color: color-mix(in srgb, var(--hs-crema) 6%, var(--hs-marino));
}
.pf-correo__dir {
  font-size: 17px; font-weight: 600; color: var(--hs-crema); text-decoration: none;
  overflow-wrap: anywhere;
}
.pf-correo__dir:hover { text-decoration: underline; text-underline-offset: 3px; }
.pf-correo__dir:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.pf-copiar {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0;
  background-color: var(--hs-crema); color: var(--hs-marino);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.pf-copiar:hover { background-color: color-mix(in srgb, var(--hs-marino) 8%, var(--hs-crema)); }
.pf-copiar:focus-visible { outline: 2px solid var(--hs-crema); outline-offset: 3px; }
@media (max-width: 420px) {
  .pf-correo { border-radius: 24px; padding: 14px; flex-direction: column; }
}
.pf-cierre__cta { margin-top: 12px; }

/* ── Reducir movimiento: los estados cambian sin animarse ─────────────── */
@media (prefers-reduced-motion: reduce) {
  .pf *, .pf *::before, .pf *::after { transition: none !important; }
}
