/* Защита от горизонтального скролла */
html, body { 
  overflow-x: hidden; 
  max-width: 100vw; 
}

/* Адаптация фонов к теме */
.bg-light {
  background-color: var(--dark-lighter) !important;
  color: var(--text-primary) !important;
}

/* Типографика для юридических документов */
.terms-section {
  margin-bottom: 3rem;
}

.terms-section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.terms-section h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.terms-section h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.terms-section p {
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.terms-section ul,
.terms-section ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  line-height: 1.8;
}

.terms-section li {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.terms-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.last-updated {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  padding: 1rem;
  border-left: 4px solid var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
}

.important-notice {
  padding: 1.5rem;
  margin: 2rem 0;
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: rgba(var(--primary-rgb), 0.05);
}

.important-notice p {
  margin-bottom: 0;
  font-weight: 500;
}

/* Таблицы */
.table-responsive {
  margin: 2rem 0;
}

.table {
  color: var(--text-primary);
  border-color: var(--border-color);
}

.table thead {
  background: var(--dark-card);
  border-bottom: 2px solid var(--border-color);
}

.table thead th {
  font-weight: 600;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.table tbody td {
  color: var(--text-secondary);
  border-color: var(--border-color);
}

/* Адаптивность */
@media (max-width: 768px) {
  .terms-section h2 {
    font-size: 1.5rem;
  }
  
  .terms-section h3 {
    font-size: 1.25rem;
  }
  
  .terms-section ul,
  .terms-section ol {
    padding-left: 1.5rem;
  }
}