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

/* Адаптация к теме сайта */
.bg-dark {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%) !important;
  color: #FFFFFF !important;
}

.bg-dark .card-text,
.bg-dark p,
.bg-dark ul,
.bg-dark li {
  color: #FFFFFF !important;
}

.terms-section {
  background-color: var(--light);
  color: var(--text);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.terms-section h2 {
  color: var(--primary);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.terms-section h3 {
  color: var(--secondary);
  font-size: 1.35rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

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

.terms-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.terms-section ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.terms-section ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.terms-section p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.terms-header {
  text-align: center;
  margin-bottom: 3rem;
}

.terms-header h1 {
  color: var(--primary);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.terms-header .last-updated {
  color: var(--text-light);
  font-size: 0.95rem;
  font-style: italic;
}

.important-notice {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #FFFFFF;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.important-notice p {
  margin-bottom: 0;
  font-weight: 500;
  color: #FFFFFF !important;
}

.important-notice strong {
  color: #FFFFFF !important;
}

.subsection {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
}

@media (max-width: 768px) {
  .terms-header h1 {
    font-size: 2rem;
  }
  
  .terms-section {
    padding: 1.5rem;
  }
  
  .terms-section h2 {
    font-size: 1.5rem;
  }
}