/* ---------------------------------------------------- */
/* 🎨 КОЛЬОРОВА СХЕМА ТА ЗМІННІ */
/* ---------------------------------------------------- */
:root {
  --main-bg: #993333;
  /* Основний бордовий колір (фоновий) */
  --light-text: #fff8f0;
  /* Світлий текст на темному фоні */
  --accent-light: #c05030;
  /* Світлий акцент */
  --block-bg: #f5e3d3;
  /* Фон контейнера */
  --accent: #b04a2c;
  /* Коричнево-червоний (для h1 та h3) */
  --dark-text: #4a3f35;
  /* Темний текст (для решти заголовків) */
}

/* ---------------------------------------------------- */
/* ⚙️ ОСНОВНІ НАЛАШТУВАННЯ */
/* ---------------------------------------------------- */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--dark-text);
  line-height: 1.5;
  background-color: #faf6f2;
  background-image: url('txf.jpg');
  background-repeat: repeat;
  background-attachment: fixed;
}

/* ---------------------------------------------------- */
/* 🧭 ШАПКА САЙТУ */
/* ---------------------------------------------------- */
header {
  text-align: center;
  padding: 30px 0;
  background: var(--main-bg);
  color: var(--light-text);
  border-radius: 5px;
}

.site-title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--light-text);
  margin: 0;
}

header p {
  margin: 5px 0 0 0;
  font-size: 1rem;
  color: var(--light-text);
}

/* ---------------------------------------------------- */
/* 🧱 НАВІГАЦІЯ */
/* ---------------------------------------------------- */
nav {
  margin: 5px 0;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
}

nav ul li {
  flex: 1;
}

nav ul li a {
  display: block;
  padding: 12px 0;
  text-align: center;
  background: var(--main-bg);
  color: var(--light-text);
  text-decoration: none;
  transition: background 0.3s;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 0;
}

nav ul li:first-child a {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

nav ul li:last-child a {
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

nav ul li a:hover,
nav ul li a.active {
  background: #e28b5a;
}

/* ---------------------------------------------------- */
/* 📦 ОСНОВНИЙ КОНТЕЙНЕР */
/* ---------------------------------------------------- */
.container {
  max-width: 720px;
  margin: 0 auto;
  background: var(--block-bg);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

/* ---------------------------------------------------- */
/* 📜 ОСНОВНИЙ ВМІСТ */
/* ---------------------------------------------------- */
main {
  padding: 10px 0;
}

/* Заголовки */
h1 {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--accent);
  margin-top: 0;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

h2,
h3,
h4,
h5,
h6 {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--dark-text);
  margin-top: 0;
}

h2 {
  font-size: 1.2rem;
}

h3 {
  font-size: 1.1rem;
}

/* Абзаци в секціях */
.section {
  margin-bottom: 0;
}

.section p {
  text-align: justify;
  text-indent: 1.5em;
  margin-bottom: 1em;
}

/* ---------------------------------------------------- */
/* 🖼️ КАРТИНКИ */
/* ---------------------------------------------------- */
.section img {
  display: block;
  margin: 0 auto 1em;
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

/* ---------------------------------------------------- */
/* 📺 АДАПТИВНЕ ВІДЕО */
/* ---------------------------------------------------- */
.video-responsive {
  max-width: 720px;
  /* Обмеження ширини відео */
  margin: 10px auto;
  position: relative;
  padding-top: 56.25%;
  /* Формат 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 5px;
}

.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ---------------------------------------------------- */
/* 🔢 СПИСКИ */
/* ---------------------------------------------------- */
.list-block {
  text-align: justify;
}

.list-block ol {
  font-size: 0.9em;
  margin: 0;
  padding-left: 40px;
  list-style-type: decimal;
}

.list-block li {
  margin-bottom: 0.8em;
  line-height: 1.5;
}

/* ---------------------------------------------------- */
/* ✒️ ПІДПИСИ */
/* ---------------------------------------------------- */
.signature {
  text-align: right;
  text-indent: 0;
  margin-top: 1.5em;
  /* виправлено */
  margin-bottom: 30px;
}

/* ---------------------------------------------------- */
/* 🧾 ВИНОСКИ (FOOTNOTES) — ОСТАТОЧНА ВЕРСІЯ */
/* ---------------------------------------------------- */

/* Посилання на виноски у тексті */
a[href^="#fn"],
a[href^="#fn"] sup,
.footnote-marker,
.footnote-marker sup {
  text-decoration: none !important;
  border-bottom: none !important;
  color: inherit !important;
}

/* Для запобігання появі синього кольору або фокуса */
a[href^="#fn"]:visited,
a[href^="#fn"]:active,
a[href^="#fn"]:focus {
  color: inherit !important;
  outline: none !important;
  text-decoration: none !important;
}

/* Посилання у списку виносок (внизу сторінки) */
.list-block ol a {
  text-decoration: none !important;
  color: inherit !important;
  border-bottom: none !important;
}

.list-block ol a:hover {
  color: var(--accent);
}


/* ---------------------------------------------------- */
/* 🔗 ТЕКСТОВІ ПОСИЛАННЯ */
/* (виключає навігацію та кнопки) */
/* ---------------------------------------------------- */
a:not(nav ul li a):not(.button) {
  text-decoration: underline;
  color: #0000EE;
}

a:not(nav ul li a):not(.button):visited {
  color: #551A8B;
}

a:not(nav ul li a):not(.button):hover {
  color: var(--main-bg);
}

a:not(nav ul li a):not(.button):active {
  color: var(--accent-light);
}

/* ---------------------------------------------------- */
/* 💡 ПІДСВІТКА ЯКОРІВ */
/* ---------------------------------------------------- */
:target {
  background-color: #fff4c2;
  transition: background-color 0.8s ease;
  animation: highlight-fade 3s forwards;
}

@keyframes highlight-fade {
  0% {
    background-color: #fff4c2;
  }

  100% {
    background-color: transparent;
  }
}

/* ---------------------------------------------------- */
/* 📝 СПЕЦІАЛЬНІ БЛОКИ */
/* ---------------------------------------------------- */
.intro-note {
  font-style: italic;
  /* для вступних приміток */
}

.document-text {
  font-family: 'Times New Roman', serif;
  background-color: #f7f7f7;
  padding: 10px;
  border: 1px solid #ddd;
}

.document-text p {
  text-indent: 0;
  /* Без абзацного відступу в документах */
}

/* ---------------------------------------------------- */
/* 🦶 ФУТЕР */
/* ---------------------------------------------------- */
footer {
  text-align: center;
  padding: 15px;
  margin-top: 20px;
  background: var(--main-bg);
  color: var(--light-text);
  border-radius: 5px;
  font-size: 0.9rem;
}