/* Страницы с документами: просмотр PDF, кнопки скачивания и документ, набранный текстом */

.doc-title {
  text-align: center;
}

.doc-viewer {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.doc-viewer iframe {
  display: block;
  width: 100%;
  height: clamp(460px, 80vh, 1080px);
  border: 0;
}

.doc-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.doc-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 8px;
  background: #003d7a;
  color: #ffffff;
  font-family: "Exo 2", Arial, sans-serif;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-align: center;
  transition: background-color 0.2s ease;
}

.doc-download:hover {
  background: #012d5a;
}

.doc-download:focus-visible {
  outline: 2px solid #003d7a;
  outline-offset: 2px;
}

/* Текст документа, набранный прямо на странице */

.doc-text {
  margin-top: 20px;
  padding: 24px 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  line-height: 24px;
}

.doc-text p {
  margin: 0 0 16px;
  text-wrap: pretty;
}

.doc-text p:last-child {
  margin-bottom: 0;
}

.doc-text h3 {
  margin: 32px 0 16px;
  font-family: "Exo 2", Arial, sans-serif;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  text-wrap: pretty;
}

.doc-text .doc-meta {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-muted);
}

.doc-purpose {
  margin: 20px 0;
  padding: 16px;
  background: var(--bg-main);
  border-radius: 8px;
}

.doc-purpose h4 {
  margin: 0 0 12px;
  font-family: "Exo 2", Arial, sans-serif;
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
  text-wrap: pretty;
}

.doc-purpose > p {
  margin: 12px 0 0;
}

.doc-props {
  margin: 0;
  display: grid;
  gap: 12px;
}

.doc-prop {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.doc-prop dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 20px;
}

.doc-prop dd {
  margin: 0;
  text-wrap: pretty;
}

.doc-list {
  margin: 0 0 16px;
  padding-left: 22px;
}

.doc-list li {
  margin-bottom: 12px;
  text-wrap: pretty;
}

.doc-list li:last-child {
  margin-bottom: 0;
}

.doc-link {
  color: #003d7a;
  font-weight: 600;
  text-decoration: underline;
}

.doc-link:hover {
  color: #012d5a;
}

.doc-link:focus-visible {
  outline: 2px solid #003d7a;
  outline-offset: 2px;
  border-radius: 2px;
}

@media (min-width: 640px) {
  .doc-text .doc-meta {
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
  }
}

@media (min-width: 960px) {
  .doc-viewer,
  .doc-text {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .doc-text {
    padding: 32px;
  }

  .doc-purpose {
    padding: 20px 24px;
  }

  .doc-prop {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0 20px;
  }
}

@media (min-width: 1200px) {
  .doc-viewer {
    margin-top: 40px;
  }

  .doc-actions {
    margin-top: 24px;
  }

  .doc-download {
    min-height: 48px;
    padding: 0 28px;
    font-size: 18px;
    line-height: 24px;
  }

  .doc-text {
    margin-top: 40px;
    padding: 40px;
    font-size: 18px;
    line-height: 28px;
  }

  .doc-text h3 {
    margin: 40px 0 20px;
    font-size: 22px;
    line-height: 30px;
  }

  .doc-purpose h4 {
    font-size: 18px;
    line-height: 26px;
  }

  .doc-prop dt {
    font-size: 16px;
    line-height: 22px;
  }
}
