/* ==========================================================================
   LEGADIGMA — páginas legales (aviso de privacidad, de confidencialidad,
   términos y condiciones, política de cookies).
   Usa los tokens y componentes de styles.css y el .page-hero de boletin.css.
   ========================================================================== */

.legal-meta {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.legal-wrap { padding-block: clamp(40px, 6vw, 76px); }

.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.legal-index {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 20px 22px;
  background: var(--off-white);
  border: 1px solid var(--gray-12);
  border-radius: var(--radius);
}
.legal-index__title {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-50);
  margin-bottom: 12px;
}
.legal-index ol {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 56vh;
  overflow-y: auto;
}
.legal-index a {
  display: block;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--gray-75);
  transition: color 0.2s ease;
}
.legal-index a:hover { color: var(--navy); }
.legal-index a strong { color: var(--gray-25); font-weight: 600; margin-right: 6px; }

.legal-content { max-width: 74ch; color: var(--gray-75); }

.legal-section { padding-top: 8px; margin-bottom: 40px; scroll-margin-top: calc(var(--header-h) + 16px); }
.legal-section:last-child { margin-bottom: 0; }
.legal-section h2 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--navy-900);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-12);
}
.legal-section h2 .legal-num { color: var(--gold); margin-right: 10px; font-variation-settings: "opsz" 40, "wght" 500, "SOFT" 0, "WONK" 0; }
.legal-content h3 {
  font-size: 1.02rem;
  color: var(--navy-900);
  margin: 22px 0 10px;
  font-variation-settings: "opsz" 30, "wght" 520, "SOFT" 0, "WONK" 0;
}
.legal-content p { margin: 0 0 15px; line-height: 1.75; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-content strong { color: var(--navy-900); font-weight: 700; }

.legal-list { margin: 0 0 16px 1.35em; padding: 0; }
.legal-list li { margin-bottom: 7px; line-height: 1.65; }
.legal-list--bullet { list-style-type: disc; }
.legal-list--decimal { list-style-type: decimal; }
.legal-list--roman { list-style-type: upper-roman; }
.legal-list--roman-lower { list-style-type: lower-roman; }
.legal-list--letter { list-style-type: upper-alpha; }
.legal-list--letter-lower { list-style-type: lower-alpha; }

.legal-table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--gray-12); border-radius: 10px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.legal-table th, .legal-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--gray-12); }
.legal-table thead th { background: var(--off-white); color: var(--navy-900); font-weight: 600; }
.legal-table tbody tr:last-child td { border-bottom: none; }

.legal-firma { margin-top: 28px; font-weight: 700; color: var(--navy-900); }

.legal-related {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-12);
}
.legal-related p { font-size: 0.82rem; color: var(--gray-50); margin-bottom: 10px; }
.legal-related nav { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.legal-related a { font-size: 0.88rem; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.legal-related a:hover { color: var(--gold); }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-index { position: static; }
  .legal-index ol { max-height: none; }
}
