/* ==========================================================================
   TERMOS E PRIVACIDADE - GATHR REBRANDED
   ========================================================================== */

:root {
  --nx-purple: #481389;
  --nx-purple-dark: #2E0854;
  --nx-purple-light: #F4EFFF;
  --nx-purple-soft: rgba(72, 19, 137, 0.05);
  --nx-gold: #FFD700;
  --nx-white: #FFFFFF;
  --nx-gray-50: #F9FAFB;
  --nx-gray-100: #F3F4F6;
  --nx-gray-200: #E5E7EB;
  --nx-gray-600: #4B5563;
  --nx-gray-800: #1F2937;
  --nx-gray-900: #111827;
}

html {
  scroll-behavior: smooth;
}

.termos-page-wrapper {
  background: var(--nx-gray-50);
  padding: 2rem 0 5rem 0;
  min-height: calc(100vh - 80px);
}

/* ==========================================================================
   1. CABEÇALHO DA PÁGINA (SOLTO NO MAIN CONTENT, SEM CARD)
   ========================================================================== */
.termos-header-row {
  margin-bottom: 2rem;
}

.termos-header-row .breadcrumb {
  font-size: 0.85rem;
}

.termos-header-row .breadcrumb a {
  color: var(--nx-gray-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

.termos-header-row .breadcrumb a:hover {
  color: var(--nx-purple);
}

.termos-title {
  font-size: 2.1rem;
  font-weight: 850;
  color: var(--nx-purple-dark);
  margin-bottom: 0.5rem;
}

.termos-subtitle {
  font-size: 1.02rem;
  color: var(--nx-gray-600);
  line-height: 1.55;
  margin-bottom: 1rem;
  max-width: 800px;
}

.termos-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.termos-update-badge {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--nx-purple-dark);
  background: var(--nx-purple-soft);
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
}

.termos-trust-badge {
  font-size: 0.84rem;
  font-weight: 600;
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: inline-flex;
  align-items: center;
}

/* Atalhos Rápidos Soltos no Fundo */
.termos-quick-nav {
  display: flex;
  gap: 1rem;
  max-width: 800px;
}

.termos-quick-btn {
  flex: 1;
  background: var(--nx-white);
  border: 1px solid rgba(72, 19, 137, 0.12);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  color: var(--nx-gray-800);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(72, 19, 137, 0.02);
  transition: all 0.25s ease;
}

.termos-quick-btn:hover {
  border-color: var(--nx-purple);
  color: var(--nx-purple);
  background: var(--nx-purple-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(72, 19, 137, 0.06);
}

.termos-quick-btn i.fa-arrow-down {
  font-size: 0.8rem;
  color: var(--nx-purple);
  transition: transform 0.2s ease;
}

.termos-quick-btn:hover i.fa-arrow-down {
  transform: translateY(3px);
}

/* ==========================================================================
   2. LAYOUT GRID (2 COLUNAS)
   ========================================================================== */
.termos-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 2.5rem;
  align-items: start;
}

/* ==========================================================================
   3. CONTEÚDO PRINCIPAL (EXCLUSIVO PARA AS SEÇÕES)
   ========================================================================== */
.termos-content-card {
  background: var(--nx-white);
  border-radius: 24px;
  border: 1px solid rgba(72, 19, 137, 0.08);
  box-shadow: 0 6px 24px rgba(72, 19, 137, 0.03);
  padding: 3rem;
}

/* ==========================================================================
   4. SEÇÕES DO CONTEÚDO
   ========================================================================== */
.termos-section {
  scroll-margin-top: 100px;
  padding-bottom: 2.25rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--nx-gray-100);
}

.termos-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.termos-section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--nx-purple-dark);
  margin-top: 0;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.termos-section p {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--nx-gray-800);
  margin-bottom: 1rem;
}

.termos-section p:last-child {
  margin-bottom: 0;
}

.termos-section ul {
  padding-left: 1.5rem;
  margin-bottom: 1.15rem;
}

.termos-section ul li {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--nx-gray-800);
  margin-bottom: 0.5rem;
}

.termos-section a {
  color: var(--nx-purple);
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.termos-section a:hover {
  color: var(--nx-purple-dark);
}

/* Destaques discretos para seções importantes */
.termos-section--highlight {
  background: var(--nx-purple-soft);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(72, 19, 137, 0.1);
}

/* ==========================================================================
   5. SIDEBAR STICKY ("NESTE DOCUMENTO")
   ========================================================================== */
.termos-sidebar {
  position: sticky;
  top: 90px;
}

.toc-card {
  background: var(--nx-white);
  border-radius: 20px;
  border: 1px solid rgba(72, 19, 137, 0.08);
  box-shadow: 0 6px 20px rgba(72, 19, 137, 0.03);
  padding: 1.5rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.toc-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--nx-gray-600);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.toc-group-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--nx-purple);
  margin-top: 1.15rem;
  margin-bottom: 0.5rem;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--nx-purple-soft);
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc-link {
  font-size: 0.86rem;
  color: var(--nx-gray-600);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  line-height: 1.35;
  transition: all 0.2s ease;
  display: block;
}

.toc-link:hover {
  color: var(--nx-purple);
  background: var(--nx-purple-soft);
}

.toc-link.active {
  color: var(--nx-purple);
  background: var(--nx-purple-light);
  font-weight: 750;
  border-left: 3px solid var(--nx-purple);
}

/* ==========================================================================
   6. NAVEGAÇÃO MOBILE COMPACTA
   ========================================================================== */
.mobile-toc-wrapper {
  display: none;
  margin-bottom: 1.5rem;
}

.mobile-toc-toggle {
  width: 100%;
  background: var(--nx-white);
  border: 1px solid rgba(72, 19, 137, 0.12);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--nx-purple-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  cursor: pointer;
}

.mobile-toc-dropdown {
  display: none;
  background: var(--nx-white);
  border: 1px solid rgba(72, 19, 137, 0.12);
  border-radius: 14px;
  margin-top: 0.5rem;
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.mobile-toc-dropdown.show {
  display: block;
}

.mobile-toc-dropdown .toc-link {
  padding: 8px 12px;
  font-size: 0.9rem;
}

/* ==========================================================================
   7. BOTÃO VOLTAR AO TOPO
   ========================================================================== */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--nx-purple);
  color: var(--nx-white);
  border: none;
  box-shadow: 0 6px 20px rgba(72, 19, 137, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  background: var(--nx-purple-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(72, 19, 137, 0.4);
}

/* ==========================================================================
   8. RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 1200px) {
  .termos-header-row .breadcrumb {
    padding-left: 3.25rem;
  }
}

@media (max-width: 992px) {
  .termos-grid {
    grid-template-columns: 1fr;
  }

  .termos-sidebar {
    display: none;
  }

  .mobile-toc-wrapper {
    display: block;
  }

  .termos-quick-nav {
    flex-direction: column;
  }

  .termos-content-card {
    padding: 1.75rem 1.5rem;
  }

  .termos-title {
    font-size: 1.65rem;
  }
}
