/* ==========================================================
   Páginas legais (Política de Privacidade, Cookies, Termos)
   ========================================================== */

.legal-hero {
  padding: 160px 0 60px;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99, 102, 241, 0.25), transparent 70%);
}

.legal-hero .legal-tag {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 30px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.1);
  color: #c7d2fe;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.legal-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.legal-hero p {
  color: var(--text-gray);
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.legal-updated {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.85rem;
  color: #a5b4fc;
}

.legal-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
  padding: 20px 0 100px;
}

/* Índice lateral */
.legal-toc {
  position: sticky;
  top: 110px;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.legal-toc h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-gray);
  margin-bottom: 14px;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
}

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

.legal-toc a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  display: block;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.legal-toc a::before {
  content: counter(toc) ". ";
  color: #6366f1;
  font-weight: 600;
}

.legal-toc a:hover {
  color: #ffffff;
}

/* Conteúdo */
.legal-content {
  max-width: 820px;
  /* impede que a largura mínima das tabelas estique a coluna do grid */
  min-width: 0;
}

.legal-toc {
  min-width: 0;
}

.legal-content section {
  scroll-margin-top: 110px;
  margin-bottom: 44px;
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: #ffffff;
}

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 22px 0 10px;
  color: #e2e8f0;
}

.legal-content p,
.legal-content li {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.8;
}

.legal-content p {
  margin-bottom: 14px;
}

.legal-content ul {
  margin: 0 0 16px 0;
  padding-left: 22px;
}

.legal-content ul li {
  margin-bottom: 8px;
}

.legal-content strong {
  color: #ffffff;
  font-weight: 600;
}

.legal-content a {
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: #ffffff;
}

/* Destaque */
.legal-callout {
  padding: 20px 24px;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.08);
  margin: 20px 0;
}

.legal-callout p:last-child {
  margin-bottom: 0;
}

/* Tabelas */
.legal-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 18px 0 22px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.93rem;
}

.legal-table th,
.legal-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  line-height: 1.6;
}

.legal-table th {
  background: rgba(99, 102, 241, 0.12);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

/* Botão inline para reabrir preferências de cookies */
.legal-btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.legal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.4);
}

.legal-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

@media (max-width: 1024px) {
  .legal-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .legal-toc {
    position: static;
  }

  .legal-hero h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 600px) {
  .legal-hero {
    padding: 130px 0 40px;
  }

  .legal-hero h1 {
    font-size: 1.8rem;
  }

  .legal-content h2 {
    font-size: 1.25rem;
  }
}
