/* Скопиран, ненатрапчив стил само за страницата с Общите условия.
   Използва .terms-* селектори и уважава бутоните от layout.css */

.terms-section {
  padding: 28px 0 40px;
  background: #f4f6f8;
}

.terms-header {
  margin: 6px 0 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
.terms-header h1 {
  margin: 0;
  font-family: Montserrat, Inter, system-ui, -apple-system, Segoe UI, Roboto,
    Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  line-height: 1.25;
  color: #101316;
}

.terms-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.terms-actions.bottom {
  justify-content: flex-end;
  margin-top: 18px;
}

/* „Лист“ в центъра – усещане за официален документ */
.terms-paper {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(16, 23, 43, 0.14);
  padding: clamp(18px, 3vw, 40px);
  border: 1px solid rgba(16, 23, 43, 0.06);
}

/* Съдържание – четим „документен“ стил */
.terms-content {
  color: #101316;
  font: 400 17px/1.85 Georgia, "Times New Roman", Times, serif;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Заглавия в документа (ако в terms_html има <h2>/<h3>) */
.terms-content h2,
.terms-content h3,
.terms-content h4 {
  margin: 20px 0 12px;
  font-family: Montserrat, Inter, system-ui, -apple-system, Segoe UI, Roboto,
    Arial, sans-serif;
  font-weight: 800;
  line-height: 1.35;
  color: #101316;
}
.terms-content h2 {
  font-size: 1.35rem;
}
.terms-content h3 {
  font-size: 1.18rem;
}
.terms-content h4 {
  font-size: 1.05rem;
}

.terms-content p {
  margin: 10px 0 14px;
}
.terms-content ul,
.terms-content ol {
  margin: 10px 0 14px 0;
  padding-left: 26px;
}
.terms-content li {
  margin: 6px 0;
}
.terms-content a {
  color: #1a2238;
  text-decoration: underline;
}

/* По-тесен ред на големи екрани за по-добра четимост */
@media (min-width: 1200px) {
  .terms-paper {
    max-width: 860px;
  }
}

/* Мобилен: подравняване и бутони на два реда при нужда */
@media (max-width: 720px) {
  .terms-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .terms-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
