/* ================================================================
   Cúpora · Legal Documents — Document-style CSS
   Uso: @push('head') en todas las vistas legal/*
   ================================================================ */

/* ── Wrapper de página ─────────────────────────────────────── */
.ld-page {
  background: var(--bg-page, #fbf6ee);
  min-height: 60vh;
  padding: clamp(5rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
}

.ld-wrap {
  width: min(calc(100% - 2rem), 820px);
  margin-inline: auto;
}

/* ── Cabecera del documento ────────────────────────────────── */
.ld-header {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line, rgba(47, 47, 47, .12));
}

.ld-badge {
  display: inline-block;
  margin-bottom: .75rem;
  padding: .28rem .7rem;
  border: 1px solid var(--cup-gold, #8b6f37);
  border-radius: 4px;
  color: var(--cup-gold, #8b6f37);
  font-family: var(--font-body, Inter, sans-serif);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ld-title {
  margin: 0 0 .75rem;
  color: var(--ink, #2f2f2f);
  font-family: var(--font-display, 'DM Serif Display', Georgia, serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.ld-meta {
  margin: 0;
  color: var(--ink-soft, rgba(47, 47, 47, .6));
  font-family: var(--font-body, Inter, sans-serif);
  font-size: .82rem;
  line-height: 1.6;
}

/* ── Tabla de contenido ────────────────────────────────────── */
.ld-toc {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line, rgba(47, 47, 47, .1));
  border-left: 3px solid var(--cup-gold, #8b6f37);
  border-radius: 0 8px 8px 0;
}

.ld-toc__label {
  margin: 0 0 .75rem;
  color: var(--ink-soft, rgba(47, 47, 47, .55));
  font-family: var(--font-body, Inter, sans-serif);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ld-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  counter-reset: toc-item;
}

.ld-toc__list li {
  counter-increment: toc-item;
}

.ld-toc__list a {
  color: var(--ink, #2f2f2f);
  font-family: var(--font-body, Inter, sans-serif);
  font-size: .875rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s ease;
}

.ld-toc__list a:hover {
  color: var(--cup-gold, #8b6f37);
}

/* ── Cuerpo del documento ──────────────────────────────────── */
.ld-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Secciones ─────────────────────────────────────────────── */
.ld-section {
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-bottom: 1px solid var(--line, rgba(47, 47, 47, .09));
}

.ld-section:last-child {
  border-bottom: none;
}

.ld-h2 {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin: 0 0 1rem;
  color: var(--ink, #2f2f2f);
  font-family: var(--font-body, Inter, sans-serif);
  font-size: clamp(.95rem, 2vw, 1.1rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.ld-h2__num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--cup-gold, #8b6f37);
  border-radius: 50%;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  flex-basis: 1.75rem;
}

.ld-h3 {
  margin: 1.25rem 0 .5rem;
  color: var(--ink, #2f2f2f);
  font-family: var(--font-body, Inter, sans-serif);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.4;
}

.ld-section p {
  margin: 0 0 .85rem;
  color: var(--ink, #2f2f2f);
  font-family: var(--font-body, Inter, sans-serif);
  font-size: .9375rem;
  line-height: 1.72;
}

.ld-section p:last-child {
  margin-bottom: 0;
}

.ld-section ul,
.ld-section ol {
  margin: .5rem 0 .85rem 0;
  padding-left: 1.4rem;
}

.ld-section li {
  color: var(--ink, #2f2f2f);
  font-family: var(--font-body, Inter, sans-serif);
  font-size: .9375rem;
  line-height: 1.72;
  margin-bottom: .3rem;
}

.ld-section a {
  color: var(--cup-coffee, #5b3b28);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ld-section a:hover {
  color: var(--cup-gold, #8b6f37);
}

/* ── Callout (bloque destacado) ────────────────────────────── */
.ld-callout {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: rgba(139, 111, 55, .07);
  border-left: 3px solid var(--cup-gold, #8b6f37);
  border-radius: 0 6px 6px 0;
}

.ld-callout p {
  margin: 0 !important;
  font-size: .875rem !important;
  line-height: 1.6 !important;
}

/* ── Tabla de plazos / condiciones ─────────────────────────── */
.ld-table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  font-family: var(--font-body, Inter, sans-serif);
  font-size: .875rem;
}

.ld-table th {
  padding: .6rem .85rem;
  background: var(--cup-gold, #8b6f37);
  color: #fff;
  font-weight: 700;
  text-align: left;
  letter-spacing: .02em;
}

.ld-table th:first-child { border-radius: 6px 0 0 0; }
.ld-table th:last-child  { border-radius: 0 6px 0 0; }

.ld-table td {
  padding: .6rem .85rem;
  color: var(--ink, #2f2f2f);
  border-bottom: 1px solid var(--line, rgba(47, 47, 47, .09));
  line-height: 1.5;
}

.ld-table tr:last-child td {
  border-bottom: none;
}

.ld-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, .6);
}

/* ── Lista de otros documentos ─────────────────────────────── */
.ld-related {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line, rgba(47, 47, 47, .12));
}

.ld-related__label {
  margin: 0 0 1rem;
  color: var(--ink-soft, rgba(47, 47, 47, .55));
  font-family: var(--font-body, Inter, sans-serif);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ld-related__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
}

.ld-related__list a {
  color: var(--ink-soft, rgba(47, 47, 47, .7));
  font-family: var(--font-body, Inter, sans-serif);
  font-size: .82rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 47, 47, .2);
  padding-bottom: 1px;
  transition: color .15s ease, border-color .15s ease;
}

.ld-related__list a:hover {
  color: var(--cup-gold, #8b6f37);
  border-color: var(--cup-gold, #8b6f37);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .ld-wrap { width: calc(100% - 1.5rem); }
  .ld-toc  { padding: 1rem 1.15rem; }
  .ld-table { font-size: .8rem; }
  .ld-table th, .ld-table td { padding: .5rem .65rem; }
}
