.department-links {
  width: 100%;
  max-width: 2560px;
  margin: 0 auto;
  padding: 0px 0;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-item {
  display: flex;
  align-items: center;
  padding: 1% 0;
  border-bottom: 5px solid #C0C0C0;
  margin-bottom: 0%;
  width: 100%;
}

.link-item a {
  display: flex;
  align-items: center;
  font-size: 1em;
  font-weight: bold;
  color: #000000;
  text-decoration: none;
  font-family: Arial, sans-serif;
  overflow-wrap: break-word;
}

.before-element {
  display: inline-block;
  width: 8px;
  height: 29px;
  background-color: #74b4ec;
  margin-right: 10px;
  flex-shrink: 0;
}

.link-image {
  margin-right: 5px; /* Притискає зображення до правого краю */
  flex-shrink: 0; /* Забороняє стискання зображення */
}

.link-item a:hover {
  color: #006bb6;
  text-decoration: underline;
}


/* upravl */

.department-content {
  width: 100%;
  max-width: 2560px; /* Обмежуємо ширину для великих екранів */
  margin: 0 auto; /* Центруємо */
  padding: 20px 0; /* Відступи зверху та знизу */
  font-family: Arial, sans-serif;
}

.section-header {
  display: flex;
  justify-content: center; /* Центрування по горизонталі */
  align-items: center;     /* Центрування по вертикалі */  padding: 0px 0;
  margin-bottom: 0px;
}

.section-header h1 {
  font-weight: bold;
  color: #000000;
  margin: 0;
  margin-bottom: 1%;
  margin-top: 1%;
}

.section-header h2 {
  font-weight: bold;
  color: #000000;
  margin: 0;
  margin-bottom: 1%;
  margin-top: 1%;
}

.section-header h3 {
  font-weight: bold;
  color: #000000;
  margin: 0;
  margin-bottom: 1%;
  margin-top: 1%;
}

.section-header h4 {
  font-weight: bold;
  color: #000000;
  margin: 0;
  margin-bottom: 1%;
  margin-top: 1%;
}

.section-header h5 {
  font-weight: bold;
  color: #000000;
  margin: 0;
  margin-bottom: 1%;
  margin-top: 1%;
}

.section-header h6 {
  font-weight: bold;
  color: #000000;
  margin: 0;
  margin-bottom: 1%;
  margin-top: 1%;
}

.divider {
  width: 100%;
  height: 2px;
  background-color: #E8E8E8; /* Сірий колір для роздільника */
  margin: 1% 0; /* Відступи зверху та знизу */
}

.download-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5%;
  padding: 0px 0;
}

.download-label {
  flex: 1;
  min-width: 0; /* Потрібно для flex-контейнерів, щоб працював перенос */
  color: #000;
  margin: 0;
  word-wrap: break-word;
}

.download-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px; /* Додаємо відступ між елементами для кращої читабельності */
  flex-shrink: 0;
  width: auto; /* Видаляємо фіксовану ширину 205px */
  min-width: 275px; /* Додаємо мінімальну ширину для стабільності */
}

.download-button, .back-button button {
  background-color: #E8E8E8;
  border: 1px solid #C0C0C0;
  padding: 6px 12px;
  font-size: 1em;
  color: #000000;
  cursor: pointer;
  font-family: Arial, sans-serif;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  box-sizing: border-box;
  width: 125px; /* Фіксована ширина для кнопки */
  text-align: center; /* Центруємо текст у кнопці */
  margin-right: 0; /* Видаляємо правий відступ */
}

.download-button:hover, .back-button button:hover {
  background-color: #D3D3D3; /* Такий самий ефект наведення, як у "Назад" */
}

.download-button i {
  margin-right: 0px; /* Відступ для іконки завантаження */
}

.file-size {
  font-size: 1em;
  color: #555;
  white-space: nowrap;
  min-width: 60px; /* Забезпечуємо однаковий простір для розміру файлу */
  text-align: left; /* Вирівнюємо текст розміру файлу */
}

.pdf-icon {
  margin-left: auto;
}

.pdf-icon img {
  height: 40px;
  width: auto;
  display: block;
}

.zip-icon {
  margin-left: auto;
}

.zip-icon img {
  height: 18px; /* або інша фіксована висота */
  width: auto;
  display: block;
}

.back-button {
  text-align: center;
  padding: 3% 0;
}

.back-button button {
  background-color: #E8E8E8; /* Сірий фон, як у таблиці */
  border: 1px solid #C0C0C0;
  padding: 0.7% 0.7%;
  font-size: 1em;
  color: #000000;
  cursor: pointer;
  font-family: Arial, sans-serif;
  box-sizing: border-box; /* Відступи входять у розмір кнопки */
}

.back-button button:hover {
  background-color: #D3D3D3; /* Трохи темніший сірий при наведенні */
}

/* ms */

.download-links1 {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0px;
  flex-shrink: 0;
}


/* keriv */


.staff-table {
  width: 100%;
  border-collapse: collapse;
}

.staff-row {
  display: flex;
  border-bottom: 1px solid #ddd;
  align-items: center;
}

.staff-row.header {
  font-weight: bold;
  background-color: #f0f0f0;
}

.staff-cell {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 1em; /* Розмір шрифту, еквівалент font-size: 2 */
  font-weight: bold;
  color: #000000; /* Чорний колір тексту */
  text-decoration: none;
  font-family: Arial, sans-serif; /* Узгоджуємо шрифт із сайтом */
}

.staff-cell:first-child {
  text-align: left;
}

/* arh */

.backarh-button {
  display: flex; /* Використовуємо Flexbox для розміщення кнопок в ряд */
  justify-content: center; /* Центруємо кнопки в контейнері */
  gap: 70px; /* Відступ між кнопками, можна змінити за потреби */
  padding: 3% 0; /* Відступ зверху і знизу контейнера */
}

.backarh-button button {
  background-color: #E8E8E8; /* Колір фону кнопок */
  border: 1px solid #C0C0C0; /* Рамка кнопок */
  padding: 5px 5px; /* Внутрішні відступи кнопок */
  font-size: 1em; /* Розмір шрифту */
  color: #000000; /* Колір тексту */
  cursor: pointer; /* Курсор при наведенні */
  font-family: Arial, sans-serif; /* Шрифт */
  border-radius: 5px; /* Закруглені кути */
  transition: background-color 0.3s ease; /* Плавна зміна кольору при наведенні */
}

.backarh-button button:hover {
  background-color: #D3D3D3; /* Колір фону при наведенні */
}

/* contact */

.contact-info {
  font-size: 1em;
  color: #000000;
  line-height: 1.5;
}

.contact-info p {
  margin: 10px 0;
}

.contact-info a {
  color: #006bb6;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}



/* Контейнер із зображенням по центру */

.image-containerс {
  text-align: center;
  margin: 20px 0;
}
.centeredс-image {
  width: 70%;
  height: auto;
}

/* Табліці */

.file-inline-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0; /* Відстань між елементами */
}

.file-inline-wrap .pdf-icon img {
  width: 40px;
  height: auto;
}

.file-inline-wrap .file-size {
  margin: 0;
  white-space: nowrap;
}

/* Текстовий блок - перехід за посиланням із зображенням */
.web-link {
  display: flex;
  align-items: flex-start;
  padding: 1% 0;
  border-bottom: 5px solid #C0C0C0;
  margin-bottom: 1%;
}

.tblok-img {
  flex: 1; /* займає весь доступний простір */
  word-wrap: break-word;
}

.tblok a {
  display: flex;
  align-items: center; /* Змінено з flex-start на center для вирівнювання по центру */
  font-size: 1em;
  font-weight: bold;
  color: #000000;
  text-decoration: none;
  font-family: Arial, sans-serif;
  overflow-wrap: break-word;
}

.tblok a:hover {
  color: #006bb6;
  text-decoration: underline;
}

.image-web {
  margin-left: 10px;
}

.image-web img {
  width: 70px;
  height: auto;
}

.wsite-link {
  display: flex;
  gap: 0px; /* Відстань між текстом і картинкою */
  align-items: center;
  margin-bottom: 1%; /* Відстань між блоками */
  border-bottom: 5px solid #C0C0C0;
  padding: 1% 0;
}

.image-wsite {
  flex-shrink: 0; /* не стискати */
}



@media (max-width: 768px) {
  /* Зменшуємо шрифти */
  .link-item a,
  .section-header h1,
  .section-header h2,
  .section-header h3,
  .section-header h4,
  .section-header h5,
  .section-header h6,
  .download-label,
  .download-button,
  .back-button button,
  .file-size,
  .staff-cell,
  .contact-info {
    font-size: 0.95rem;
  }

  .link-item {
    flex-direction: column; /* можна залишити column для всього li */
    align-items: flex-start;
    padding: 3% 2%;
  }

  .link-item a {
    display: inline-flex; /* ключовий момент */
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap; /* не дозволяємо перенос */
    width: 100%;
  }

  .before-element {
    display: inline-block;
    width: 8px;
    height: 20px;
    background-color: #74b4ec;
    margin-right: 10px;
    flex-shrink: 0;
  }

  .link-item a {
    font-size: 0.95rem;
    line-height: 1.3; /* це вирівнює по центру висоти */
  }

  .link-image {
    margin-right: 5px;
    flex-shrink: 0;
  }

  .link-image img {
    width: 35px;
    height: auto;
  }

  /* Завантаження */
  .download-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .download-links,
  .download-links1 {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .download-button,
  .back-button button {
    width: 100%;
    font-size: 1rem;
    padding: 6px;
    text-align: center;
    margin-right: 0;
  }

  .file-size {
    text-align: left;
    width: 100%;
  }

  .pdf-icon img,
  .zip-icon img {
    height: 30px;
  }

  /* Таблиця персоналу */
  .staff-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .staff-cell {
    width: 100%;
    text-align: left;
    padding: 8px 0;
  }

  /* Кнопки назад архіву */
  .backarh-button {
    flex-direction: column;
    gap: 15px;
  }

  .backarh-button button {
    width: 100%;
    font-size: 1rem;
    padding: 10px;
  }

  /* Центрована картинка */
  .centeredс-image {
    width: 100%;
  }

  /* Стилі для веб-посилань */
  .web-link,
  .wsite-link {
    flex-direction: column;
    align-items: flex-start;
    padding: 3% 2%;
  }

  .tblok a {
    font-size: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .image-web img,
  .image-wsite img {
    width: 50px;
  }

  .image-web,
  .image-wsite {
    margin-left: 0;
    margin-top: 10px;
  }

  /* Контакти */
  .contact-info p {
    margin: 8px 0;
  }

  .file-inline-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .file-inline-wrap .pdf-icon img {
    width: 30px;
  }
}
