/* === Базовые настройки === */
:root {
  --tui-font-text-m: 400 16px/1.6 'Open Sans', sans-serif;
  --color-main: #009478;
  --color-dark: #363636;
  --color-text: #4a4a4a;
}

* {
  box-sizing: border-box;
}

html, body {
  font: var(--tui-font-text-m);
  color: var(--color-dark);
  background: #fff;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  padding-top: 70px; /* под фиксированный navbar */
}

/* === Заголовки и текст === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--color-dark);
  margin: 2rem 0 0.75rem;
}

h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

p, ul, ol {
  margin-bottom: 1.2rem;
  color: var(--color-text);
}

ul li { list-style-type: disc; }
ol li { list-style-type: decimal; }

/* === Ссылки === */
a {
  color: #00285a;
  text-decoration: underline;
  transition: color 0.2s;
}
a:hover { color: #ec6241; }

/* === Контейнеры === */
.container, main, .content-section, .hero, .content-box {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

.content-box { width: 90%; }

/* === Navbar === */
.navbar {
  background: var(--color-main);
  color: #fff;
  width: 100%;
  height: 70px;
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */

  display: flex;
  align-items: center;
  padding: 5px 1rem;
}

.navbar .container,
.navbar-end {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Логотип на переднем плане */
.navbar .navbar-brand {
  position: relative;
  z-index: 1002;
  display: flex;
  align-items: center;
}

.navbar .navbar-brand img {
  max-height: 60px;
  width: auto;
}

/* Кнопки/ссылки в navbar */
.navbar-item {
  background: #6a737d;
  border: 2px solid #6a737d;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
  margin-top: 3rem;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 1rem;
  height: 100%;
}

.mt-2 {
  margin-top: 2rem;
}

.header-nav .nav-link {
  color: #fff !important;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  transition: background-color 0.3s;
}
.header-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}
.header-nav .nav-link.active,
.nav-link.home-link.active {
  background: rgba(255, 255, 255, 0.2);
  font-weight: bold;
}

/* Кнопки со скруглением */
.navbar-item.is-rounded-link {
  border-radius: 9999px;
  color: #fff;
  margin: 0 5px;
  padding: 5px 15px;
  font-weight: bold;
  transition: background 0.3s;
}
.navbar-item.is-rounded-link:hover {
  background: rgba(255, 255, 255, 0.2);
}
.navbar-item.is-active-link {
  background: #008069;
  color: #fff;
}

/* === Под-навигация (sticky) === */
.sub-nav-menu {
  background: transparent;
  height: 50px;
  width: 100%;
  position: sticky;
  top: 70px;
  z-index: 99;
}

.sub-nav-menu .container {
  max-width: 900px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0;
}

.sub-nav-menu .menu-box {
  background: #e6f7f5;
  border-radius: 25px;
  /* box-shadow: 0 2px 5px rgba(0,0,0,0.2); */
  width: 100%;
  height: 100%;
  display: flex;
}

.sub-nav-menu .menu-scroll-container {
  display: flex;
  align-items: center;
  height: 100%;
  flex-grow: 1;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 15px;
}
.sub-nav-menu .menu-scroll-container::-webkit-scrollbar {
  display: none;
}

.sub-nav-menu .menu-item {
  color: var(--color-dark);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  padding: 0 10px;
  flex-shrink: 0;
  transition: 0.2s;
}
.sub-nav-menu .menu-item.is-active-item {
  background: var(--color-main);
  color: #fff;
  border-radius: 25px;
  padding: 0 20px;
  height: 90%;
}
.sub-nav-menu .menu-item:hover:not(.is-active-item) {
  background: rgba(0,0,0,0.05);
  border-radius: 15px;
  color: var(--color-main);
}

/* === Footer === */
.footer {
  background: var(--color-main);
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
}
.footer p, .footer a { color: #fff; }

/* === Мультимедиа === */
.responsive-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.video-container iframe,
.video-container video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* === Бургер-кнопка (чистая, с анимацией) === */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  cursor: pointer;
  margin-left: auto;
  padding: 0;
  z-index: 1001;
}

.menu-toggle {
  display: none; /* Чекбокс больше не виден */
}

.burger span {
  display: block;
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: 0.4s;
}

/* Hover-эффект */
.burger:hover span:nth-child(1) { transform: translateY(-2px); }
.burger:hover span:nth-child(3) { transform: translateY(2px); }

/* Анимация крестика */
.menu-toggle:checked + .burger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle:checked + .burger span:nth-child(2) { opacity: 0; }
.menu-toggle:checked + .burger span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* === Основное меню для ПК === */
.header-nav {
  display: flex;             /* показываем всегда */
  flex-direction: row;       /* горизонтально на ПК */
  gap: 15px;
  align-items: center;
  padding: 0 1rem;
  height: 100%;
  background: transparent;   /* на ПК фон прозрачный */
  position: relative;        /* не фиксируем */
  transform: none;
  opacity: 1;
}

/* Ссылки остаются как есть */
.header-nav .nav-link {
  display: inline-block;
  text-align: center;
  padding: 5px 10px;
  border-radius: 4px;
  background: transparent;
  color: #fff;
}

/* === Мобильное меню (вертикально, с анимацией) === */
@media (max-width: 768px) {
  .header-nav {
    display: none;           /* скрыто по умолчанию */
    flex-direction: column;
    gap: 10px;
    background: var(--color-main);
    padding: 1rem;
    position: fixed;
    top: 70px;
    left: 0; right: 0;
    min-height: calc(100vh - 70px);
    transform: translateY(-100%);
    opacity: 0;
    z-index: 1000;
    transition: transform 0.4s ease, opacity 0.4s ease;
  }

  /* Когда меню активно */
  .menu-toggle:checked ~ .header-nav {
    display: flex;
    transform: translateY(0);
    opacity: 1;
  }

  /* Бургер-кнопка видна только на мобилке */
  .burger {
    display: flex;
  }
}
