/* ============================================================
   EMBII AI — DISEÑO LEGAL CORPORATIVO Y MINIMALISTA
   Limpio, sobrio, sin elementos decorativos innecesarios.
   Alineado exactamente con la cuadrícula institucional ui-grid.
   ============================================================ */

.legal-main-section {
  background: var(--color-white, #FFFFFF);
  color: var(--color-topaz-900, #121019);
  min-height: calc(100vh - 200px);
  padding-top: 3.5rem;
  padding-bottom: 5.5rem;
  width: 100%;
}

.legal-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Ocultar cualquier elemento decorativo no corporativo */
.legal-kicker,
.back-home {
  display: none !important;
}

/* Título principal H1: Sobrio y corporativo */
.legal-main-section h1 {
  font-family: var(--font-display, 'Archivo', sans-serif);
  font-size: clamp(1.85rem, 2.6vw, 2.35rem);
  font-weight: 700;
  line-height: 1.18;
  color: #121019;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  max-width: 1040px;
}

/* Metadatos (fecha, versión) */
.legal-meta {
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.8125rem; /* 13px */
  color: #676378;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #EAE8F2;
  line-height: 1.5;
  max-width: 1040px;
}

.legal-meta strong {
  color: #302B43;
  font-weight: 600;
}

/* Párrafo destacado / Lead */
.legal-lead {
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 1rem; /* 16px */
  font-style: normal;
  line-height: 1.65;
  color: #2B2838;
  margin: 0 0 2rem;
  padding: 0;
  background: transparent;
  border-left: none;
  max-width: 980px;
}

/* Secciones y espaciado */
.legal-main-section section {
  margin-bottom: 2.25rem;
  max-width: 980px;
}

/* Encabezados de sección H2 */
.legal-main-section h2 {
  font-family: var(--font-display, 'Archivo', sans-serif);
  font-size: 1.25rem; /* 20px */
  font-weight: 700;
  line-height: 1.3;
  color: #121019;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #F0EFF4;
}

/* Subencabezados H3 */
.legal-main-section h3 {
  font-family: var(--font-display, 'Archivo', sans-serif);
  font-size: 1rem; /* 16px */
  font-weight: 700;
  line-height: 1.35;
  color: #121019;
  margin: 1.5rem 0 0.5rem;
}

/* Párrafos y listas: tamaño corporativo estandarizado (15px) */
.legal-main-section p,
.legal-main-section li {
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.9375rem; /* 15px */
  line-height: 1.65;
  color: #3A3748;
}

.legal-main-section p {
  margin: 0 0 1rem;
  max-width: 980px;
}

.legal-main-section ul,
.legal-main-section ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
  max-width: 980px;
}

.legal-main-section li {
  margin-bottom: 0.35rem;
}

.legal-main-section strong {
  color: #121019;
  font-weight: 700;
}

/* Enlaces sobrios y profesionales */
.legal-main-section a {
  color: #2B152E;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #D6D4DD;
  text-underline-offset: 3px;
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}

.legal-main-section a:hover {
  color: var(--color-purple, #834F87);
  text-decoration-color: var(--color-purple, #834F87);
}

/* Cajas de aclaración / Disclaimer */
.disclaimer-box,
.legal-callout {
  background: #F8F8FA;
  border: 1px solid #E2E0EB;
  border-left: 3px solid #676378;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0 2rem;
  font-size: 0.875rem; /* 14px */
  line-height: 1.6;
  color: #484357;
  max-width: 980px;
}

.disclaimer-box a,
.legal-callout a {
  color: #121019;
}

/* Tabla de Contenidos (TOC): minimalista y ordenada */
.toc,
.legal-toc {
  background: #F8F8FA;
  border: 1px solid #EAE8F2;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 0 0 2.25rem;
  max-width: 980px;
}

.toc h3,
.legal-toc h3 {
  font-size: 0.75rem; /* 12px */
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #676378;
  margin: 0 0 0.75rem;
  font-weight: 700;
  font-family: var(--font-display, 'Archivo', sans-serif);
}

.toc ol,
.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-counter;
}

.toc li,
.legal-toc li {
  counter-increment: toc-counter;
  margin: 0.3rem 0;
  font-size: 0.875rem; /* 14px */
}

.toc li::before,
.legal-toc li::before {
  content: counter(toc-counter, decimal-leading-zero) ". ";
  color: #8E8A9D;
  font-weight: 600;
  margin-right: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.toc a,
.legal-toc a {
  color: #302B43;
  text-decoration: none;
  font-weight: 500;
}

.toc a:hover,
.legal-toc a:hover {
  color: var(--color-purple, #834F87);
  text-decoration: underline;
}

/* Tablas legales y de cookies: limpias y neutras */
.cookies-table-wrap,
.legal-table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 2rem;
  border: 1px solid #EAE8F2;
  border-radius: 6px;
  background: #FFFFFF;
  max-width: 980px;
}

.cookies-table,
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem; /* 14px */
  text-align: left;
  margin: 0;
  background: #FFFFFF;
}

.cookies-table th,
.legal-table th,
.cookies-table td,
.legal-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #EAE8F2;
}

.cookies-table th,
.legal-table th {
  background: #F8F8FA;
  font-weight: 700;
  color: #302B43;
  font-family: var(--font-display, 'Archivo', sans-serif);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cookies-table tr:last-child td,
.legal-table tr:last-child td {
  border-bottom: none;
}

.cookies-table code,
.legal-main-section code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.825em;
  background: #F4F4F6;
  color: #302B43;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

.cookie-action-box {
  background: #F8F8FA;
  border: 1px solid #E2E0EB;
  border-radius: 6px;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: 980px;
}

/* Responsividad en móviles */
@media (max-width: 768px) {
  .legal-main-section {
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
  }

  .toc,
  .legal-toc {
    padding: 1rem;
  }

  .cookies-table th,
  .legal-table th,
  .cookies-table td,
  .legal-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.8125rem;
  }
}
