/* ════════════════════════════════════════════════════════════
   Política de Privacidad — estilos específicos
   (la base de nav, glass, gradient-text y fade-up se hereda de
   css/nosotros.css, cargado antes que este archivo)
   ════════════════════════════════════════════════════════════ */

:root {
  --primary-dark: #021c3f;
  --teal: #0097b1;
  --teal-dark: #016279;
  --purple: #726bf4;
  --pink: #c86dd8;
  --gold: #dd9c43;
}

/* ── Badges del encabezado ── */
.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.legal-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  box-shadow: 0 0 10px rgba(0, 151, 177, 0.6);
}

/* ── Layout índice + contenido ── */
.legal-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .legal-layout {
    grid-template-columns: 280px 1fr;
    gap: 3.5rem;
    align-items: start;
  }
}

/* ── Tabla de contenidos (TOC) ── */
.toc {
  position: relative;
}
@media (min-width: 1024px) {
  .toc {
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding-right: 6px;
  }
  .toc::-webkit-scrollbar {
    width: 5px;
  }
  .toc::-webkit-scrollbar-thumb {
    background: rgba(114, 107, 244, 0.4);
    border-radius: 99px;
  }
}
.toc-title {
  font-family: "Poppins", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
  padding-left: 0.5rem;
}
.toc ol {
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc a {
  counter-increment: toc;
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.toc a::before {
  content: counter(toc);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  min-width: 18px;
  transition: color 0.2s ease;
}
.toc a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.toc a.active {
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(0, 151, 177, 0.16),
    rgba(114, 107, 244, 0.16)
  );
  border-left-color: var(--teal);
}
.toc a.active::before {
  color: var(--teal);
}

/* ── Secciones del documento ── */
.legal-section {
  scroll-margin-top: 110px;
  margin-bottom: 1.75rem;
  padding: 2rem 2rem 1.6rem;
  border-radius: 20px;
}
@media (max-width: 640px) {
  .legal-section {
    padding: 1.5rem 1.25rem;
  }
}
.legal-section h2 {
  font-family: "Poppins", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  line-height: 1.25;
}
.legal-section h2 .num {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.legal-section h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin: 1.4rem 0 0.6rem;
}
.legal-section p,
.legal-section li {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.75;
}
.legal-section p {
  margin-bottom: 0.9rem;
}
.legal-section strong {
  color: #fff;
  font-weight: 600;
}
.legal-section a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 151, 177, 0.35);
  transition: color 0.2s ease;
}
.legal-section a:hover {
  color: #4fd1e0;
}
.legal-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.4rem 0 1.1rem;
}
.legal-section ul li {
  position: relative;
  padding-left: 1.5rem;
}
.legal-section ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--purple));
}
.legal-section ol.numbered {
  list-style: decimal;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.4rem 0 1.1rem;
}
.legal-section ol.numbered li {
  padding-left: 0.3rem;
}

/* ── Tablas legales ── */
.legal-table-wrap {
  overflow-x: auto;
  margin: 0.6rem 0 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 480px;
}
.legal-table thead th {
  background: linear-gradient(
    135deg,
    rgba(0, 151, 177, 0.18),
    rgba(114, 107, 244, 0.18)
  );
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  text-align: left;
  padding: 0.8rem 1rem;
  white-space: nowrap;
}
.legal-table tbody td {
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
  line-height: 1.5;
}
.legal-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}
.legal-table tbody tr:hover {
  background: rgba(114, 107, 244, 0.06);
}

/* ── Tarjeta destacada (NO tratamos / contacto) ── */
.callout {
  border-radius: 16px;
  padding: 1.3rem 1.4rem;
  margin: 1rem 0 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.callout-danger {
  background: rgba(200, 109, 216, 0.07);
  border-color: rgba(200, 109, 216, 0.28);
}
.callout-info {
  background: rgba(0, 151, 177, 0.07);
  border-color: rgba(0, 151, 177, 0.28);
}
.callout h3 {
  margin-top: 0 !important;
}
.callout ul li::before {
  background: linear-gradient(135deg, var(--pink), var(--gold));
}

/* ── Tarjeta de contacto / derechos ── */
.contact-card {
  border-radius: 18px;
  padding: 1.6rem;
  background: linear-gradient(
    135deg,
    rgba(0, 151, 177, 0.1),
    rgba(114, 107, 244, 0.1)
  );
  border: 1px solid rgba(0, 151, 177, 0.25);
}
.contact-card a.mail {
  font-weight: 600;
}

/* ── Botón volver arriba ── */
#to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 151, 177, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
#to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#to-top:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 30px rgba(114, 107, 244, 0.55);
}

/* ── Barra de progreso de lectura ── */
#read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--teal), var(--purple), var(--pink));
  transition: width 0.1s linear;
}
