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

/* Адаптация фона под тему сайта */
.terms-container {
  background-color: transparent;
  color: var(--text-primary);
}

/* Заголовки */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

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

h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

h4 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Параграфы и списки */
p {
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

ul, ol {
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.5rem;
}

/* Специальное выделение для важных пунктов */
.important-notice {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent-coral);
  background-color: rgba(255, 127, 80, 0.1);
  margin-bottom: 1.5rem;
}

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

/* Секции документа */
.terms-section {
  margin-bottom: 3rem;
}

.last-updated {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

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

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

.table thead {
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
  color: white;
  border-bottom: 2px solid var(--primary-cyan);
}

.table th {
  font-weight: 600;
  padding: 0.75rem;
}

.table td {
  padding: 0.75rem;
  border-color: rgba(0, 188, 212, 0.2);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 188, 212, 0.05);
}

/* Нумерованные секции */
.numbered-section {
  counter-reset: section;
}

.numbered-section > .terms-section::before {
  counter-increment: section;
  content: counter(section) ". ";
  font-weight: 700;
  color: var(--primary-cyan);
}