/* ========= Página de Términos y Condiciones (exclusiva) ========= */

.legal-page {
  min-height: 100vh;
  padding: 96px 16px 72px;
  display: flex;
  justify-content: center;
  background: #f9fafb; /* blanco muy pálido */
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.legal-shell {
  width: 100%;
  max-width: 960px;
}

/* ----- ENCABEZADO ----- */

.legal-header {
  margin-bottom: 28px;
  text-align: left;
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  margin-bottom: 8px;
}

.legal-title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.3rem);
  color: #0f172a;
}

.legal-meta {
  margin: 6px 0 10px;
  font-size: 0.9rem;
  color: #6b7280;
}

.legal-intro {
  margin: 0;
  max-width: 640px;
  font-size: 0.96rem;
  color: #4b5563;
  line-height: 1.7;
}

/* ----- CARD PRINCIPAL ----- */

.legal-card {
  margin-top: 20px;
  background: #ffffff;
  border-radius: 18px;
  padding: 22px 24px 26px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

/* efecto suave de brillo diagonal */

.legal-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.14), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

/* asegurar que el contenido quede encima del brillo */
.legal-card > * {
  position: relative;
  z-index: 1;
}

/* ----- ÍNDICE ----- */

.legal-toc {
  border-radius: 12px;
  padding: 14px 16px;
  background: #f3f4f6;
  border: 1px solid rgba(209, 213, 219, 0.8);
  margin-bottom: 18px;
}

.legal-toc__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4b5563;
}

.legal-toc ol {
  margin: 0;
  padding-left: 18px;
  column-gap: 32px;
  column-count: 2;
  font-size: 0.9rem;
  color: #4b5563;
}

.legal-toc li {
  margin-bottom: 4px;
  break-inside: avoid;
}

.legal-toc a {
  color: #1d4ed8;
  text-decoration: none;
}

.legal-toc a:hover {
  text-decoration: underline;
}

/* ----- SECCIONES ----- */

.legal-section {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid rgba(229, 231, 235, 0.9);
}

.legal-section:first-of-type {
  border-top: none;
  padding-top: 6px;
  margin-top: 8px;
}

.legal-section__title {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #0f172a;
}

.legal-section__body {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.7;
}

.legal-section__body p {
  margin: 4px 0 8px;
}

.legal-section__body ul {
  margin: 2px 0 8px 18px;
  padding: 0;
}

.legal-section__body li {
  margin-bottom: 4px;
}

/* resaltado dirección / info clave */

.legal-highlight {
  margin: 6px 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(226, 232, 240, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.9rem;
  color: #111827;
}

/* nota final */

.legal-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 6px;
}

/* enlaces en texto legal */

.legal-section__body a {
  color: #1d4ed8;
  text-decoration: none;
}

.legal-section__body a:hover {
  text-decoration: underline;
}

/* ----- RESPONSIVE ----- */

@media (max-width: 900px) {
  .legal-page {
    padding-top: 84px;
  }

  .legal-card {
    padding: 20px 16px 22px;
  }

  .legal-toc ol {
    column-count: 1;
  }
}

@media (max-width: 600px) {
  .legal-page {
    padding: 80px 12px 64px;
  }

  .legal-shell {
    max-width: 100%;
  }

  .legal-intro {
    max-width: none;
  }
}

/* ====== Flecha flotante (igual estilo que otras páginas) ====== */

.back-arrow{
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  z-index: 10060;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  text-decoration: none;
  color: #0a0a0a;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  transition: transform .15s ease, box-shadow .2s ease, color .15s ease, background .2s ease;
}

.back-arrow svg{
  display:block;
}

.back-arrow:hover{
  color: #0c6;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
}

.back-arrow:active{
  color: #0c6;
  transform: translateY(0);
}

.back-arrow:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(12,198,115,.28), 0 6px 18px rgba(0,0,0,.10);
}

.back-arrow--right{
  right: calc(16px + env(safe-area-inset-right, 0px));
  left: auto;
}

.back-arrow--left{
  left: calc(16px + env(safe-area-inset-left, 0px));
  right: auto;
}

@media (min-width: 1024px){
  .back-arrow{
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }
}
