header { 
  background-color: #3c3d41; 
  display: flex; 
  flex-flow: row nowrap; 
  align-items: center; 
  margin: 0px; 
  width: 100%; 
  padding: 20px; 
  font-family: "Roboto Slab", serif; 
  font-style: normal; 
  position: sticky;
}

.logo { 
  margin-left: 13%;
}

.menu { 
  flex-grow: initial;
  margin-left: 5%;
}

.menu ul { 
  display: flex; 
  flex-flow: row nowrap; 
  margin: 2px 0 0; 
  padding: 0; 
  font-size: 16px; 
  line-height: 18px;
  list-style: none; 
  justify-content: center; 
}

.menu li { 
  margin-right: 20px; 
}

.menu li:last-child { 
  margin-right: 0; 
}

.menu a, 
.menu .active { 
  display: block; 
  padding: 8px 10px; 
  text-transform: uppercase; 
  letter-spacing: .27em; 
}

.menu a { 
  color: #ffffff; 
  text-decoration: none; 
}

.menu .active { 
  color: #fff; 
  background-color: #000000; 
  border-radius: 8px; 
}

a:hover { color:rgba(255, 255, 255, 0.411); text-decoration:none; }

/* Скрываем бургер-меню на больших экранах */
.burger-menu {
  display: none;
}

/* Базовый стиль для бургер-меню */
.burger-menu {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 25px;
  margin-right: 15px;
}

.burger-menu span {
  display: block;
  width: 100%;
  height: 4px;
  background-color: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Анимация для активного состояния */
.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Скрываем меню на мобильных по умолчанию */
.menu {
  display: none;
  flex-direction: column;
  align-items: center;
  background-color: #3c3d41;
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  padding: 10px 0;
}

/* Активное состояние меню */
.menu.active {
  display: flex;
  width: 40%;
}

/* Показываем бургер-меню только на мобильных */
@media (max-width: 768px) {
  .burger-menu {
      display: flex;
  }

  .menu ul {
      flex-direction: column;
      gap: 15px;
      list-style: none;
      padding: 0;
      margin: 0;
  }

  .menu ul li {
      margin: 0;
  }

  .menu ul li a {
      color: #fff;
      text-decoration: none;
      text-transform: uppercase;
      padding: 10px 20px;
  }

  .menu ul li a:hover {
      color: rgba(255, 255, 255, 0.7);
  }
  .logo { 
    margin-left: 5%;
  }
}

/* Показываем меню в одну строку на больших экранах */
@media (min-width: 769px) {
  .menu ul {
    flex-direction: row;
    justify-content: center;
  }

  .menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: static;
  }

  .burger-menu {
    display: none; /* Скрываем бургер-меню на больших экранах */
  }
}
