/* ============================================================
   Wheeler — Página Legal (Términos y Condiciones)
   ============================================================ */

/* --- Hero -------------------------------------------------- */
.legal-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1d3557 60%, #3589a1 100%);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  pointer-events: none;
}

.legal-hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 10%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(53, 137, 161, 0.15);
  pointer-events: none;
}

.legal-hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.legal-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.legal-hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}

.legal-hero__sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 20px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.legal-hero__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}

/* --- Layout ------------------------------------------------ */
.legal-main {
  padding: 56px 20px 80px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .legal-toc {
    display: none;
  }
}

/* --- TOC sidebar ------------------------------------------- */
.legal-toc__inner {
  position: sticky;
  top: 88px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
}

.legal-toc__title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.legal-toc__list li {
  counter-increment: toc-counter;
  margin-bottom: 2px;
}

.legal-toc__list a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.82rem;
  color: #64748b;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  line-height: 1.4;
}

.legal-toc__list a::before {
  content: counter(toc-counter);
  display: inline-block;
  min-width: 18px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6366f1;
  flex-shrink: 0;
}

.legal-toc__list a:hover {
  background: #eff6ff;
  color: #1e293b;
  text-decoration: none;
}

/* --- Cuerpo del documento ---------------------------------- */
.legal-body {
  min-width: 0;
}

.legal-content {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 48px 52px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

/* Secciones h2 (T&C) y h3 (Política) */
.legal-content .terminos-condiciones h2,
.legal-content h2.legal-section,
.legal-content h3.legal-section {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 40px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  counter-increment: section-counter;
}

.legal-content .terminos-condiciones h2::before,
.legal-content h2.legal-section::before,
.legal-content h3.legal-section::before {
  content: counter(section-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #1d3557, #3589a1);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 7px;
  flex-shrink: 0;
  letter-spacing: 0;
}

.legal-content .terminos-condiciones,
.legal-content {
  counter-reset: section-counter;
}

.legal-content .terminos-condiciones h2:first-child {
  margin-top: 0;
}

/* Título principal de página legal (h2 sin badge) */
.legal-content h2.legal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1d3557;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #e2e8f0;
  counter-increment: none;
}

.legal-content h2.legal-title::before {
  display: none;
}

/* Párrafos */
.legal-content p {
  font-size: 0.97rem;
  line-height: 1.8;
  color: #374151;
  margin: 0 0 16px;
}

/* Listas */
.legal-content ul,
.legal-content ol {
  padding-left: 0;
  margin: 0 0 20px;
  list-style: none;
}

.legal-content ul li,
.legal-content ol li {
  position: relative;
  padding: 8px 12px 8px 36px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #374151;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background 0.1s;
}

.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6366f1;
}

.legal-content ul li:hover {
  background: #f8fafc;
}

/* Texto en cursiva al final */
.legal-content em {
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Strong */
.legal-content strong {
  color: #1d3557;
  font-weight: 700;
}

@media (max-width: 640px) {
  .legal-content {
    padding: 28px 20px;
    border-radius: 14px;
  }
  .legal-content .terminos-condiciones h2,
  .legal-content h2 {
    font-size: 1rem;
  }
}

/* --- Footer note ------------------------------------------ */
.legal-footer-note {
  margin-top: 32px;
  padding: 16px 22px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-footer-note a {
  color: #6366f1;
  font-weight: 600;
  text-decoration: underline;
}
