/* =============================================
   1. Базові змінні, Reset, Типографіка
   ============================================= */
:root {
  /* Кольори — професійна синьо-графітова палітра */
  --color-main: #243c84;
  /* основний (header, кнопки) */
  --color-accent: #2f5bd3;
  /* hover / активні елементи */
  --color-accent-light: #dce6ff;
  /* світлий акцент */
  --color-bg: #f4f6fb;
  /* фон сторінки */
  --color-text: #2c2c2c;
  /* основний текст */
  --color-link: #1f4fd6;
  /* посилання */
  --color-dark: #1e2f66;
  /* темні блоки / footer */
  --color-subtitle: #40548a;
  /* підзаголовки */

  /* Тіні */
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-main: 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.12);

  /* Шрифти */
  --font-base: "Noto Serif", Georgia, "Times New Roman", serif;
  --font-title: "Playfair Display", serif;

  /* Додаткові */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease;
  --radius-soft: 10px;
  --radius-strong: 20px;
  --shadow-dark: 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow-light: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-size: 18px;
  font-family: var(--font-base);
  font-weight: 500;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga", "kern";
  font-variant-ligatures: common-ligatures;
}

/* Базові елементи */
a {
  text-decoration: none;
  color: inherit;
}

ul,
ol,
li {
  list-style: none;
}

img {
  vertical-align: top;
  max-width: 100%;
  height: auto;
}

/* Контейнер */
.container {
  width: 90%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 10px;
  box-sizing: border-box;
}

@media (min-width: 1600px) {
  .container {
    max-width: 1440px;
  }
}

@media (max-width: 768px) {
  .container {
    width: 96%;
    padding: 0;
  }
}

/* Заголовки */
h1,
h2 {
  font-size: 30px;
  font-weight: 700;
  margin: 30px 0 18px;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--color-dark);
  text-shadow: none;
  /* прибрали декоративну тінь */
}

h3 {
  margin: 18px 0 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--color-subtitle);
  letter-spacing: 0.01em;
}

/* Абзаци */
p {
  margin: 12px;
  text-align: justify;
  font-size: 17px;
  font-weight: 400;
  color: #3a3a4a;
  line-height: 1.6;
  hyphens: auto;
  max-width: 100%;
}

section p:first-of-type {
  margin-top: 0;
}

section p+p {
  margin-top: 1em;
}

/* Акценти */
strong,
b {
  font-weight: 700;
  color: var(--color-main);
}

em,
i {
  font-style: italic;
  color: var(--color-accent);
}

/* ============================================
   2. Інтерактив: Кнопки, toggle
   ============================================ */

/* Універсальні кнопки */
button,
input[type="button"],
input[type="submit"],
.page-link,
.toggle-btn {

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 22px;
  min-height: 38px;

  font-family: var(--font-base);
  font-weight: 600;
  font-size: 14px;

  background: var(--color-main);
  color: #ffffff;

  border: none;
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);

  cursor: pointer;
  text-decoration: none;

  transition: var(--transition-normal);
}

/* Hover */
button:hover,
.page-link:hover,
.toggle-btn:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

/* Active */
button:active,
.page-link:active,
.toggle-btn:active {
  transform: scale(0.97);
}

/* Disabled */
button:disabled,
.page-link.disabled,
.disabled {
  background: #cfcfcf;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}


/* ============================================
   Toggle
   ============================================ */

.toggle-btn::before {
  content: "▶";
  font-size: 13px;
  margin-right: 6px;
  transition: transform var(--transition-normal);
}

.toggle-btn.active::before {
  transform: rotate(90deg);
}

/* Контент */
.toggle-content {
  display: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.toggle-content.active {
  display: block;
  opacity: 1;
}

/* Хлібні крихти */
.breadcrumbs {
  font-size: 14px;
  font-family: var(--font-base);
  color: #666;
  margin: 16px 0 24px;
}

.breadcrumbs::before {
  content: '';
  display: block;
  height: 1px;
  background: #ddd;
  margin-bottom: 8px;
}

.breadcrumbs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  padding: 0;
  margin: 0;
}

.breadcrumbs ul li::after {
  content: "›";
  margin: 0 0.5em;
  color: #aaa;
}

.breadcrumbs ul li:last-child::after {
  content: "";
}

.breadcrumbs a {
  color: var(--color-link);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  font-weight: bold;
  color: #000;
}

/* TOC — зміст */
.toc {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 30px;
}

.toc ul {
  padding-left: 20px;
}

.toc li {
  margin-bottom: 5px;
}

/* Кнопки поширення */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0;
  font-family: var(--font-base);
  font-weight: 600;
}

.share-buttons a img {
  width: 28px;
  height: 28px;
  transition: transform 0.2s ease;
}

.share-buttons a:hover img {
  transform: scale(1.1);
}

/* плагінація */
.pagination {
  display: flex;
  gap: 12px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

/* ============================================
   3. Верхнє меню (головне + адаптивність)
   ============================================ */

/* Контейнери верхніх ліній */
.header__top-line-1,
.header__top-line-2 {
  width: 90%;
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 30px;
}

@media (min-width: 1600px) {
  .header__top-line-1,
  .header__top-line-2 {
    max-width: 1440px;
  }
}

@media (max-width: 767px) {
  .header__top-line-1,
  .header__top-line-2 {
    width: 100%;
  }
}

/* Нижній рядок — соцмережі, мови */
.header__top-line-1 {
  height: 35px;
  border-radius: 0 0 12px 12px;
  background: #2f3e46;
  color: #ffffff;
  justify-content: flex-end;
  gap: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.header__top-line-1 img {
  height: 22px;
  vertical-align: middle;
  opacity: 0.75;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.header__top-line-1 img:hover {
  transform: scale(1.12);
  opacity: 1;
}

/* Головний рядок з логотипом і меню */
.header__top-line-2 {
  height: 55px;
  justify-content: space-between;
  background: #1f2933;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: visible;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.header__top-line-2:hover {
  background: #263544;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.header__top-line-2::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: 1;
}

.header__top-line-2 > * {
  position: relative;
  z-index: 2;
}

/* Логотип */
.header__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e4e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.header__logo:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* Бургер-меню */
.menu__icon {
  display: none;
}

@media (max-width: 767px) {
  .menu__icon {
    display: block;
    width: 30px;
    height: 18px;
    position: relative;
    cursor: pointer;
    z-index: 5;
  }

  .menu__icon::before,
  .menu__icon::after,
  .menu__icon span {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 10%;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  .menu__icon::before { top: 0; }
  .menu__icon::after { bottom: 0; }

  .menu__icon span {
    top: 50%;
    transform: translateY(-50%);
  }

  .menu__icon._active span { opacity: 0; }

  .menu__icon._active::before {
    top: 50%;
    transform: rotate(-45deg);
  }

  .menu__icon._active::after {
    bottom: 50%;
    transform: rotate(45deg);
  }
}

/* Меню: список */
.menu__list {
  display: flex;
  align-items: center;
  gap: 24px;
}

.menu__list > li {
  position: relative;
}

.menu__link {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 19px;
  color: #e4e7eb;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
}

.menu__link:hover,
.menu__link:focus {
  color: var(--color-main);
  text-shadow: none;
}

/* Підменю */
.menu__sub-list {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  padding: 16px 20px;
  min-width: 220px;
  max-width: 320px;
  max-height: 400px;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(15px);
  transition: all 0.3s ease;
  z-index: 5;
}

.menu__list > li:hover > .menu__sub-list,
.menu__list > li:focus-within > .menu__sub-list {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.menu__sub-list li {
  margin-bottom: 10px;
  border-bottom: 1px solid #e4e7eb;
  padding-bottom: 6px;
}

.menu__sub-list li:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.menu__sub-link {
  display: block;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  color: #1f2933;
  padding: 10px 0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.menu__sub-link:hover,
.menu__sub-link:focus {
  color: var(--color-main);
  background-color: #f1f5f9;
  text-shadow: none;
  outline: none;
}

/* Scrollbar */
.menu__sub-list::-webkit-scrollbar { width: 8px; }
.menu__sub-list::-webkit-scrollbar-track { background: #f1f5f9; }
.menu__sub-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
.menu__sub-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Touch режим */
body._touch .menu__list > li { display: flex; align-items: center; }
body._touch .menu__link { flex: 1 1 auto; }

body._touch .menu__arrow {
  display: block;
  width: 0;
  height: 0;
  margin-left: 5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 10px solid #ffffff;
  transition: transform 0.3s ease;
  cursor: pointer;
}

body._touch .menu__list > li._active .menu__arrow {
  transform: rotate(-180deg);
}

body._touch .menu__list > li._active .menu__sub-list {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0);
  pointer-events: all;
}

/* Mobile fullscreen */
@media (max-width: 767px) {

  body._lock { overflow: hidden; }

  .menu__body {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1f2933;
    padding: 100px 30px 30px;
    transition: top 0.3s ease;
    overflow-y: auto;
    z-index: 9999;
  }

  .menu__body._active { top: 0; }

  .menu__list { flex-direction: column; gap: 20px; }

  .menu__sub-list {
    position: relative;
    width: 100%;
    margin-top: 16px;
    background: #ffffff;
    color: #1f2933;
    border-radius: 8px;
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height .3s ease, opacity .2s ease, visibility .2s ease;
  }

  .menu__list > li._active .menu__sub-list {
    max-height: 480px;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    padding: 10px 16px;
  }

  .menu__sub-link {
    font-size: 18px;
    color: #1f2933;
    border-bottom: 1px solid #e4e7eb;
  }

  .menu__sub-link:hover,
  .menu__sub-link:focus {
    background-color: #f1f5f9;
  }

  .menu__arrow {
    border-top: 10px solid #ffffff;
  }
}

/* ============================================
   4. Header + Hero Section (Handyman Style)
   ============================================ */

/* Фіксована шапка */
.header__body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Відступ контенту */
.page {
  flex: 1 1 auto;
  padding-top: 85px;
}

.page__index {
  padding-top: 0;
}

/* ============================================
   Hero / Банер
   ============================================ */

.header__baner {
  position: relative;
  width: 100%;
  padding: 120px 20px 80px 20px;

  background: linear-gradient(135deg, #f3f6f9, #ffffff);
  text-align: center;

  overflow: hidden;
}

/* Заголовок у банері */
.header__baner h1 {
  font-size: 38px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 16px;
}

/* Підзаголовок */
.header__baner p {
  font-size: 18px;
  color: #4a5568;
  max-width: 720px;
  margin: 0 auto 24px auto;
  text-align: center;
}

/* Кнопки у банері */
.header__baner .hero-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   Mobile
   ============================================ */

@media (max-width: 768px) {

  .header__baner {
    padding: 100px 15px 60px 15px;
  }

  .header__baner h1 {
    font-size: 28px;
  }

  .header__baner p {
    font-size: 16px;
  }

}

/* ============================================
   5. Картки послуг
   ============================================ */

/* Контейнер карток */
.card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  padding: 30px 0;
  background-color: var(--color-bg);
}

/* Одна картка */
.card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 300px;
  max-width: 360px;
  width: 100%;

  background: #ffffff;
  border-radius: 12px;
  padding: 20px;

  border: 1px solid #e4e7eb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover */
.card__body:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

/* Заголовок у картці */
.card__body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-dark);
}

/* Текст */
.card__body p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: #4a5568;
  margin: 0 0 12px 0;
  text-align: left;
}

/* Кнопка в картці */
.card__link {
  margin-top: auto;
  align-self: flex-start;
}

/* Ціна */
.card__price {
  font-size: 20px;
  font-weight: 700;
  margin-top: 8px;
  color: var(--color-main);
}

/* Mobile */
@media (max-width: 768px) {
  .card {
    gap: 20px;
    padding: 20px 0;
  }

  .card__body {
    max-width: 100%;
  }
}

/* ============================================
   6. Footer — Service Style (Handyman)
   ============================================ */

/* Основний контейнер футера */
.footer__body {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 48px 24px;

  background: #1f2933;
  /* темний технічний */
  color: #e4e7eb;

  font-family: var(--font-base);
  font-size: 14px;
  line-height: 1.6;

  border-top: 4px solid var(--color-main);
}

/* Колонки */
.footer__item {
  flex: 1 1 220px;
  max-width: 260px;
  padding: 0 10px;
  text-align: left;
}

/* Заголовки колонок */
.footer__item p {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-bottom: 14px;
}

/* Меню */
.footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__menu a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 400;
  color: #cbd2d9;
  text-decoration: none;
  transition: color var(--transition-normal);
}

.footer__menu a:hover {
  color: var(--color-main);
}

/* Соцмережі / мови */
.footer__flag img,
.footer__icons img {
  width: 22px;
  height: 22px;
  margin: 4px 6px 0 0;
  opacity: 0.75;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.footer__flag img:hover,
.footer__icons img:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* Нижній рядок */
.footer__bottom {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: #9aa5b1;
  padding-top: 24px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   Mobile
   ============================================ */

@media (max-width: 768px) {

  .footer__body {
    flex-direction: column;
    text-align: center;
    gap: 24px;
    padding: 36px 16px;
  }

  .footer__item {
    max-width: 100%;
  }

  .footer__menu a {
    padding: 6px 0;
  }

  .footer__bottom {
    font-size: 12px;
  }

}

/* ============================================
   Утиліти, Теми, Анімації
   ============================================ */

/* Приховування */
.hidden {
  display: none !important;
  visibility: hidden !important;
}

/* Вирівнювання */
.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

/* Відступи */
.mt-0 {
  margin-top: 0 !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.pt-0 {
  padding-top: 0 !important;
}

.pb-0 {
  padding-bottom: 0 !important;
}

/* Світлі / темні секції */
.section--light {
  background-color: #ffffff;
  color: var(--color-text);
}

.section--dark {
  background-color: var(--color-dark);
  color: #ffffff;
}

/* Анімація з’явлення */
@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
}


/* ============================================
   Cookie Banner
   ============================================ */

#cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;

  width: 260px;
  padding: 18px;

  background: #ffffff;
  color: var(--color-text);

  border-radius: 12px;
  box-shadow: var(--shadow-main);

  display: flex;
  flex-direction: column;
  gap: 10px;

  z-index: 9999;
  font-size: 13px;
}

#cookie-banner p {
  margin: 0;
  line-height: 1.4;
}

#cookie-banner button {
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
}

/* Прийняти */
#accept-cookies {
  background: var(--color-main);
  color: #ffffff;
  font-weight: 600;
  transition: var(--transition-normal);
}

#accept-cookies:hover {
  background: var(--color-accent);
}

/* Відмовити */
#decline-cookies {
  background: #f0f0f0;
  color: #777;
  opacity: 0.6;
  pointer-events: none;
}