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

/* Адаптация к теме сайта */
.bg-light {
  background-color: var(--dark-lighter, #f8f9fa) !important;
  color: var(--text-primary, #212529) !important;
}

/* Типографика юридических документов */
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, #007bff);
  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: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

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

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

strong {
  color: var(--primary, #007bff);
  font-weight: 600;
}

.table-responsive {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.table thead {
  background: var(--primary, #007bff);
  color: white;
  border-bottom: 2px solid var(--border-color, rgba(0,0,0,0.1));
}

.table thead th {
  font-weight: 600;
  padding: 1rem;
  border: none;
}

.table tbody td {
  padding: 0.875rem 1rem;
  vertical-align: top;
}

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

.alert-box {
  background: linear-gradient(135deg, var(--primary, #007bff), var(--secondary, #6c757d));
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.alert-box h3 {
  color: white;
  margin-top: 0;
  font-size: 1.5rem;
}

.alert-box p {
  color: white;
  margin-bottom: 0;
}

.info-block {
  background: var(--dark-lighter, #f8f9fa);
  padding: 1.5rem;
  border-left: 4px solid var(--primary, #007bff);
  border-radius: 4px;
  margin: 1.5rem 0;
}

.numbered-section {
  counter-reset: section-counter;
}

.numbered-section > h3::before {
  counter-increment: section-counter;
  content: counter(section-counter) ". ";
  color: var(--primary, #007bff);
  font-weight: 700;
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}