/* Paginas legais */
.legal-page {
  position: relative;
  min-height: 80vh;
  padding: 132px 0 84px;
  overflow: hidden;
}

.legal-page::before,
.legal-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.legal-page::before {
  top: -120px;
  right: -100px;
  width: 280px;
  height: 280px;
  background: rgba(0, 71, 187, 0.32);
}

.legal-page::after {
  left: -60px;
  bottom: 20px;
  width: 220px;
  height: 220px;
  background: rgba(255, 152, 0, 0.16);
}

.legal-header {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 34px;
}

.legal-header h1 {
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.legal-updated {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.legal-tabs {
  display: inline-flex;
  gap: 6px;
  margin-top: 24px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-tab {
  padding: 10px 18px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.legal-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 16px 32px rgba(0, 71, 187, 0.26);
}

.legal-content {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 42px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(15, 22, 38, 0.92) 0%, rgba(8, 13, 24, 0.97) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.85;
}

.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4 {
  margin: 28px 0 12px;
  color: #ffffff;
  line-height: 1.2;
}

.legal-content h1 {
  font-size: 1.75rem;
}

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

.legal-content h3 {
  font-size: 1.15rem;
}

.legal-content h4 {
  font-size: 1rem;
}

.legal-content p,
.legal-content li,
.legal-content span,
.legal-content font {
  color: var(--text-soft);
}

.legal-content p,
.legal-content ul,
.legal-content ol,
.legal-content blockquote {
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  padding-left: 22px;
}

.legal-content li + li {
  margin-top: 8px;
}

.legal-content a {
  color: #8ec0ff;
  text-decoration: underline;
}

.legal-content strong,
.legal-content b {
  color: #ffffff;
}

.legal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 10px 0;
}

.legal-content blockquote {
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: rgba(255, 152, 0, 0.08);
}

.legal-loading,
.legal-empty {
  text-align: center;
  color: var(--text-soft);
  padding: 42px 10px;
}

.legal-loading::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
  animation: legal-spin 0.9s linear infinite;
}

@keyframes legal-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .legal-page {
    padding: 114px 0 60px;
  }

  .legal-content {
    padding: 26px 20px;
    border-radius: 22px;
  }

  .legal-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }
}
