body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #0078d7;
    color: white;
    padding: 10px 20px;
    text-align: left; /* Выравнивание заголовка по левому краю */
    position: fixed; /* Закрепляем заголовок в верхней части страницы */
    width: 100%; /* Полная ширина */
    top: 0;
    left: 0;
    z-index: 1000; /* Убедитесь, что заголовок поверх других элементов */
}

h1 {
    margin: 0;
}

h2 {
    margin: 5px 0 0; /* Убираем отступы вокруг подзаголовка */
    font-size: 18px;
    font-weight: normal; /* Меняем начертание шрифта подзаголовка */
}

main {
    padding: 100px 20px 20px; /* Добавляем отступ сверху для размещения заголовка и подзаголовка */
}

.document-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Создаем колонки, которые автоматически заполняются */
    gap: 10px; /* Отступы между кнопками */
    max-width: 1000px; /* Максимальная ширина контейнера */
    margin-left: 20px; /* Отступ слева для списка документов */
}

button {
    padding: 10px;
    background-color: #0078d7;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
    width: 100%; /* Кнопка занимает всю ширину контейнера */
    box-sizing: border-box; /* Учитываем паддинг и бордер в ширину кнопки */
    overflow-wrap: break-word; /* Перенос слов, если текст слишком длинный */
}

button:hover {
    background-color: #005bb5;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay-content {
    position: relative;
    width: 80%;
    height: 80%;
    background-color: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: black;
    cursor: pointer;
    z-index: 1100; /* Убедитесь, что кнопка закрытия выше всех других элементов */
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto; /* Включить взаимодействие внутри iframe */
}
