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

/* Адаптация к теме сайта */
.terms-container {
  background-color: var(--surface);
  color: var(--text-primary);
  padding: 2rem 0;
}

.terms-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.terms-section:last-child {
  border-bottom: none;
}

.terms-section h2 {
  color: var(--primary);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
}

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

.terms-section h4 {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  margin-top: 1rem;
}

.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;
  color: var(--text-secondary);
}

.terms-section li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

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

.last-updated {
  background: var(--surface-light);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
}

.last-updated p {
  margin: 0;
  color: var(--text-secondary);
}

.important-notice {
  background: var(--surface-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
  border: 1px solid var(--border);
}

.important-notice p {
  margin: 0;
  font-weight: 500;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .terms-section h2 {
    font-size: 1.5rem;
  }
  
  .terms-section h3 {
    font-size: 1.15rem;
  }
}