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

/* Адаптация к теме сайта */
.terms-wrapper {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

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

.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.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

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

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

.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-muted, var(--text-primary));
}

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

.last-updated {
  background: var(--dark-card, var(--bg-secondary));
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
}

.last-updated p {
  margin: 0;
  font-size: 0.95rem;
}

.table-responsive {
  margin: 2rem 0;
}

.table {
  color: var(--text-primary);
  border-color: var(--border-color, rgba(255,255,255,0.1));
}

.table thead {
  background: var(--dark-card, var(--bg-secondary));
  border-bottom: 2px solid var(--border-color, rgba(255,255,255,0.2));
}

.table th {
  color: var(--primary);
  font-weight: 600;
  padding: 1rem;
  border-color: var(--border-color, rgba(255,255,255,0.1));
}

.table td {
  padding: 0.875rem 1rem;
  border-color: var(--border-color, rgba(255,255,255,0.1));
}

.contact-info {
  background: var(--dark-card, var(--bg-secondary));
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.contact-info h3 {
  margin-top: 0;
}

@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;
  }
}