/* =============================================================================
   TrampoPro — Legal Pages (Termos de Uso / Política de Privacidade)
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-y: auto; scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: #f4f5f7;
  color: #111827;
  font-size: 15px;
  line-height: 1.75;
}

/* ── TOP BAR ── */
.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8eaef;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.topbar-logo .mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563EB, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-logo .brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}
.topbar-logo .brand span { color: #2563EB; }

.topbar-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #374151;
  background: none; border: 1.5px solid #e8eaef;
  border-radius: 8px; padding: 7px 14px;
  cursor: pointer; text-decoration: none;
  transition: all .2s;
}
.btn-ghost:hover { border-color: #2563EB; color: #2563EB; }

/* ── LAYOUT PRINCIPAL ── */
.legal-wrapper {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 32px 80px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

/* ── SIDEBAR / TOC ── */
.legal-toc {
  position: sticky;
  top: 72px;
  background: #fff;
  border: 1.5px solid #e8eaef;
  border-radius: 16px;
  padding: 20px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.toc-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f3f4f6;
}
.toc-list { list-style: none; }
.toc-list li + li { margin-top: 2px; }
.toc-list a {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all .15s;
  line-height: 1.4;
}
.toc-list a:hover,
.toc-list a.active {
  background: #eff6ff;
  color: #2563EB;
  font-weight: 600;
}

/* ── DOCUMENT ── */
.legal-doc {
  background: #fff;
  border: 1.5px solid #e8eaef;
  border-radius: 20px;
  padding: 48px 52px 52px;
  box-shadow: 0 2px 12px #0000000a;
}

.doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #2563EB;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 50px;
  padding: 4px 12px;
  margin-bottom: 20px;
}
.doc-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: #111827;
  line-height: 1.25;
  margin-bottom: 12px;
}
.doc-meta {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 2px solid #f3f4f6;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.doc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.doc-intro {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 36px;
  font-size: 14px;
  color: #1e40af;
  line-height: 1.7;
}

/* ── SECTIONS ── */
.legal-section {
  margin-bottom: 44px;
  scroll-margin-top: 88px;
}
.legal-section h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #2563EB, #7c3aed);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  flex-shrink: 0;
}
.legal-section h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin: 22px 0 10px;
}
.legal-section p { margin-bottom: 14px; color: #374151; }
.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul,
.legal-section ol {
  margin: 10px 0 16px 20px;
  color: #374151;
}
.legal-section li { margin-bottom: 6px; line-height: 1.65; }

.legal-section strong { color: #111827; font-weight: 600; }

.info-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 13.5px;
  color: #065f46;
  line-height: 1.6;
}
.warn-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 13.5px;
  color: #92400e;
  line-height: 1.6;
}
.highlight-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 13.5px;
  color: #1e40af;
  line-height: 1.6;
}

/* Tabela */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  font-size: 13.5px;
}
.legal-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid #e8eaef;
}
.legal-table td {
  padding: 10px 14px;
  border: 1px solid #e8eaef;
  color: #374151;
  vertical-align: top;
}
.legal-table tr:nth-child(even) td { background: #f9fafb; }

/* Direitos */
.rights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}
.right-card {
  background: #f9fafb;
  border: 1.5px solid #e8eaef;
  border-radius: 10px;
  padding: 14px 16px;
}
.right-card .right-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #eff6ff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
  color: #2563EB;
  flex-shrink: 0;
}
.right-card .right-title { font-size: 13px; font-weight: 700; color: #111827; margin-bottom: 4px; }
.right-card .right-desc  { font-size: 12px; color: #6b7280; line-height: 1.5; }

/* Doc footer */
.doc-footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 2px solid #f3f4f6;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.doc-footer .doc-nav-links { display: flex; gap: 20px; flex-wrap: wrap; }
.doc-footer a { font-size: 13px; font-weight: 600; color: #2563EB; text-decoration: none; }
.doc-footer a:hover { text-decoration: underline; }
.doc-version { font-size: 12px; color: #9ca3af; }

/* Scroll to top */
.btn-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563EB, #7c3aed);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px #2563EB44;
  transition: all .2s;
  z-index: 99;
}
.btn-top.visible { display: flex; }
.btn-top:hover { transform: translateY(-2px); box-shadow: 0 8px 24px #2563EB44; }

/* ── RESPONSIVO ── */
@media (max-width: 860px) {
  .legal-wrapper {
    grid-template-columns: 1fr;
    padding: 24px 20px 60px;
    gap: 0;
  }
  .legal-toc {
    position: static;
    max-height: none;
    margin-bottom: 24px;
    border-radius: 12px;
  }
  .legal-doc {
    padding: 28px 24px 36px;
    border-radius: 14px;
  }
  .doc-title { font-size: 22px; }
  .rights-grid { grid-template-columns: 1fr; }
  .legal-topbar { padding: 12px 20px; }
  .topbar-title { display: none; }
  .btn-top { bottom: 20px; right: 20px; }
}
@media (max-width: 500px) {
  .legal-doc { padding: 22px 18px 28px; }
  .legal-table { font-size: 12px; }
  .legal-table th, .legal-table td { padding: 8px 10px; }
}
