/* Reset и общие стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

body {
  display: flex;
  flex-direction: column;
}

/* === Кнопка-ярлык меню (всегда видна, ширина 92px) === */
.menu-toggle {
  position: fixed;
  top: 15px;
  left: 0; /* Прикреплен к левому краю меню */
  z-index: 1001;
  background: #2c3e50;
  color: white;
  border: none;
  width: 90px;
  height: 48px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 10px;
  box-shadow: -4px 4px 10px rgba(0, 0, 0, 0.2);
  transition: left 0.4s ease, background 0.3s ease;
  border-radius: 0 5px 5px 0;
  white-space: nowrap;
}

.menu-toggle i {
  margin-right: 10px;
}

.menu-toggle:hover {
  background: #1abc9c;
}

/* === Боковое меню с анимацией === */
.sidebar {
  width: 250px;
  background-color: #2c3e50;
  height: 100vh;
  position: fixed;
  top: 0;
  left: -245px; /* Выступает на 5px */
  padding-top: 20px;
  font-size: 120%;
  z-index: 1000;
  transform: translateX(0);
  opacity: 0.8;
  transition: left 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
}

.sidebar.active {
  left: 0;
  transform: translateX(0);
  opacity: 1;
}

/* === Ярлык двигается вместе с меню === */
.sidebar.active ~ .menu-toggle {
  left: 247px; /* Двигается вместе с меню */
}

/* === Пункты меню === */
.sidebar ul {
 
  padding: 0;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;

  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
}

.sidebar ul li a:hover,
.sidebar ul li a:focus {
  color: #1abc9c;
  background-color: #34495e;
}


@media (max-width: 768px) {
  .sidebar ul li a {
    font-size: 18px;
    padding: 20px 25px;
    min-height: 56px;
    align-items: center;
  }

  .sidebar ul li a i {
    font-size: 20px;
  }

  .submenu li a {
    padding-left: 40px;
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 300px; /* увеличиваем ширину */
    left: -295px;  /* смещаем за экран на 5px */
  }

  .sidebar.active ~ .menu-toggle {
    left: 297px; /* двигается вместе с расширенным меню */
  }

  .page-content {
    margin-left: 0 !important;
    padding: 55px 10px 10px 10px;
  }
}

/* === Вложенные пункты меню === */
.has-submenu .submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background-color: #34495e;
}

.has-submenu.open .submenu {
  max-height: 200px;
}

.submenu-icon {
  margin-left: auto;
  transition: transform 0.3s ease;
}

.has-submenu.open .submenu-icon {
  transform: rotate(180deg);
}

/* === Основной контент === */
.page-content {
  flex: 1 0 auto;

  padding: 20px;
  transition: margin-left 0.4s ease;
}

@media (min-width: 769px) {
  .page-content {
    margin-left: 250px;
  }
}

@media (max-width: 768px) {

  .page-content {
    margin-left: 0 !important; /* Убираем отступ полностью */
    padding: 55px 10px 10px 10px ; /* Делаем небольшой внутренний отступ, чтобы не "прилипало" к краям */
  }

.menu-toggle {
  position: fixed;
  top: 5px; }

  .policy-section-toggle::after {
    color: #999;
  }
}


/* === Overlay затемнения фона === */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease, display 0.3s ease;
}

.overlay.show {
  display: block;
  opacity: 1;
}

ol>li {margin-left: 20px;}

ol>li>ul {margin-left: 40px;}


/* === Подвал сайта === */
.site-footer {
  flex-shrink: 0;
  background-color: #2c3e50;
  color: white;
  padding: 20px 0;
  font-size: 14px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-content p {
  margin: 5px 0;
}

.footer-content a {
  color: #1abc9c;
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}