/* terminos.css — estilos de la página Términos (Concepto A, portado del mockup
   design/terminos/concept-a.html). Acento slate + índigo. */

/* ── Índice lateral: estado activo (scroll-spy) ── */
.toc-link {
  display: block;
  padding: 0.375rem 0.75rem;
  border-left: 2px solid transparent;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;            /* slate-500 */
  text-decoration: none;
  transition: color 150ms, border-color 150ms, background-color 150ms;
  border-radius: 0 4px 4px 0;
}
.toc-link:hover { color: #3c52bb; background-color: rgba(60, 82, 187, 0.06); }
.toc-link.active {
  border-left-color: #3c52bb;
  color: #3c52bb;
  font-weight: 600;
  background-color: rgba(60, 82, 187, 0.07);
}
.dark .toc-link        { color: #94a3b8; }
.dark .toc-link:hover  { color: #7b93f7; background-color: rgba(99, 128, 251, 0.1); }
.dark .toc-link.active { border-left-color: #6380fb; color: #7b93f7; background-color: rgba(99, 128, 251, 0.12); font-weight: 600; }

/* ── Sección legal: compensación del navbar fixed (~136px) ── */
.legal-section { scroll-margin-top: 160px; }

/* ── Prosa legal ── */
.prose-legal h2 {
  font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em;
  color: #0f172a; margin-top: 2.5rem; margin-bottom: 0.875rem;
}
.dark .prose-legal h2 { color: #f1f5f9; }
.prose-legal p {
  font-size: 0.9375rem; line-height: 1.75; color: #475569; margin-bottom: 0.875rem;
}
.dark .prose-legal p { color: #cbd5e1; }
.prose-legal ul { list-style: none; padding: 0; margin: 0.5rem 0 1rem 0; }
.prose-legal ul li {
  font-size: 0.9375rem; line-height: 1.7; color: #475569;
  padding-left: 1.25rem; position: relative; margin-bottom: 0.3rem;
}
.dark .prose-legal ul li { color: #cbd5e1; }
.prose-legal ul li::before {
  content: ''; position: absolute; left: 0; top: 0.65em;
  width: 5px; height: 5px; border-radius: 50%; background-color: #3c52bb; opacity: 0.6;
}
.dark .prose-legal ul li::before { background-color: #6380fb; }
.prose-legal strong { font-weight: 600; color: #1e293b; }
.dark .prose-legal strong { color: #e2e8f0; }
.prose-legal a {
  color: #3c52bb; text-underline-offset: 3px; text-decoration: underline;
  text-decoration-color: rgba(60, 82, 187, 0.35); transition: text-decoration-color 150ms;
}
.prose-legal a:hover { text-decoration-color: #3c52bb; }
.dark .prose-legal a { color: #7b93f7; text-decoration-color: rgba(123,147,247,0.35); }
.dark .prose-legal a:hover { text-decoration-color: #7b93f7; }

/* Sub-etiqueta (MÉTODOS DE PAGO, etc.) */
.prose-legal .sublabel {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  color: #64748b; margin-top: 1.1rem; margin-bottom: 0.375rem;
}
.dark .prose-legal .sublabel { color: #94a3b8; }

/* Divisor entre secciones */
.section-divider { border: none; border-top: 1px solid #e2e8f0; margin: 2rem 0 0 0; }
.dark .section-divider { border-top-color: rgba(255,255,255,0.08); }

/* Número de sección — círculo con gradiente de marca */
.section-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.625rem; height: 1.625rem; border-radius: 50%;
  background: linear-gradient(135deg, #3c52bb, #26a2d0);
  color: #fff; font-size: 0.6875rem; font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  flex-shrink: 0; margin-right: 0.5rem; vertical-align: middle; position: relative; top: -1px;
}

/* TOC colapsable mobile.
   El max-height abierto es solo el tope de la transición: tiene que superar el alto
   real del índice (16 secciones, varias con título de 2 líneas) o las últimas quedan
   cortadas. Si se agregan secciones, revisar este valor. */
#toc-mobile-body { max-height: 0; overflow: hidden; transition: max-height 320ms cubic-bezier(0.4,0,0.2,1); }
#toc-mobile-body.open { max-height: 1200px; }

/* TOC sticky desktop: terminos-nav.js le fija `top` y `max-height` contra el borde
   inferior real de #main-header (el subnav de categorías colapsa al scrollear).
   overscroll-contain evita que al llegar al final del índice el scroll se contagie
   a la página; la variante lg: no está en tw-compiled.css y el <aside> ya está
   oculto en <lg, así que va como CSS crudo. */
#toc-sticky-desktop { overscroll-behavior: contain; }
#toc-sticky-desktop::-webkit-scrollbar { width: 4px; }
#toc-sticky-desktop::-webkit-scrollbar-thumb { background: rgba(100,116,139,0.25); border-radius: 999px; }
#toc-chevron { transition: transform 260ms ease; }
#toc-chevron.rotated { transform: rotate(180deg); }

/* Scroll suave a las anclas del índice (scoped a /terminos). */
html { scroll-behavior: smooth; }
