/* Общие настройки */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f2fafb;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

form {
    position: relative;
    left: 6%;
}

td, th {
    font-size: 0.8em; /* Адаптивное уменьшение */
    word-wrap: break-word; /* Перенос длинных слов */
    overflow-wrap: break-word; /* Современный аналог */
    white-space: normal; /* Разрешаем перенос строк */
    padding: 8px;
}

/* Заголовок страницы */
h1, h3, h4, h5, h6 {
    color: #4c5c68; /* Немного темнее для заголовков */
    margin: 10px 0;
}

/* Отступ у имени отделений*/
h2 {
    position: relative;
    left: 3%; /* Отступ слева */
}

/* Оглавление */
.toc {
    background-color: #e9f3f1; /* Чуть темнее основного фона */
    padding: 15px;
    border-left: 4px solid #8bc3b7; /* Акцентный цвет для границы */
    margin: 20px 0;
}

.toc a {
    color: #4c5c68;
    text-decoration: none;
}

.toc a:hover {
    color: #6dbf9e; /* Подсветка при наведении */
}

/* Текстовый контент */
p {
    color: #555;
    font-size: 16px;
    margin: 10px 0;
}

/* Стили для таблиц */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #f5f5f5; /* Легкий фон для таблиц */
}

th, td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

th {
    background-color: #e9f3f1; /* Головка таблицы */
    color: #4c5c68;
}

tr:nth-child(even) {
    background-color: #f9fbfa; /* Четные строки */
}

tr:hover {
    background-color: #8fcbff; /* Подсветка при наведении */
}

/* Контейнеры */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Футер */
footer {
    background-color: #e9f3f1;
    color: #555;
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
}

footer a {
    color: #4c5c68;
    text-decoration: none;
}

footer a:hover {
    color: #6dbf9e;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    table, th, td {
        font-size: 14px;
    }

    .container {
        padding: 10px;
    }
}

/* Стили для таблиц */
table {
    width: 85%; /* Таблица занимает 80% ширины контейнера */
    position: relative;
    left: 6%;
    background-color: #f5f5f5; /* Легкий фон для таблиц */
}

th, td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

th {
    background-color: #e9f3f1; /* Головка таблицы */
    color: #4c5c68;
}

tr:nth-child(even) {
    background-color: #f9fbfa; /* Четные строки */
}

tr:hover {
    background-color: #8ad1ae; /* Подсветка при наведении в табличке */
    color: #ffffff;
}

/* Настройка ширины столбцов */
table th:nth-child(1), table td:nth-child(1) {
    width: 18%; /* Для ФИО */
    white-space: nowrap; /* Чтобы текст не переносился */
    overflow: hidden; /* Обрезать длинные ФИО */
    text-overflow: ellipsis; /* Добавить "..." при обрезании */
}

table th:nth-child(2), table td:nth-child(2) {
    width: 20%; /* Для отделения */
}

table th:nth-child(3), table td:nth-child(3),
table th:nth-child(4), table td:nth-child(4) {
    width: 7%; /* Для телефонов */
    max-width: 50px; /* Ограничение ширины для телефонов */
    text-align: center; /* Центрирование телефонных номеров */
}

/* Стили для фиксированных кнопок */
.fixed-buttons {
    position: fixed;
    right: 20px; /* Расстояние от правого края окна */
    top: 50%; /* Расположение по центру вертикально */
    transform: translateY(-50%); /* Центрирование по вертикали */
    display: flex;
    flex-direction: column; /* Вертикальное расположение кнопок */
    gap: 10px; /* Отступ между кнопками */
    z-index: 1000; /* Повышение приоритета отображения */
}

.fixed-buttons .button {
    display: block;
    width: 50px; /* Ширина кнопки */
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.fixed-buttons .button:hover {
    transform: scale(1.1); /* Эффект увеличения при наведении */
}

.fixed-buttons img {
    max-width: 100%;
    height: auto; /* Сохранение пропорций */
    display: block;
}