.sub-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 20px;
  font-weight: 600;
  line-height: 2.2;
}
.menu-item {
  position: relative;
}
.menu-item a::after {
  transition: 0.3s;
}
.menu a {
  color: #fff;
  text-decoration: none;
  position: relative;
}

@media screen and (min-width: 1000px) {
  .header .menu {
    display: flex;
    align-items: center;
    font-size: 18px;
  }
  .header .menu-item {
    margin: 0 15px;
  }
  .header .menu-item:hover .sub-menu {
    opacity: 1;
    pointer-events: auto;
    top: 100%;
  }
  .header .menu-item a::after {
    width: 0;
    left: 50%;
  }
  .header .menu-item a:hover::after {
    width: 100%;
    left: 0;
  }

  .sub-menu {
    position: absolute;
    left: 0;
    top: 0%;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    border: 1px solid #ed1c24;
    padding: 10px 0;
    background-color: rgba(15, 15, 15, 0.8);
  }
  .sub-menu .menu-item {
    white-space: nowrap;
  }

  .menu a::after {
    content: "";
    position: absolute;
    background-color: #fff;
    height: 2px;
    width: 0;
    bottom: -2px;
    left: 0;
  }
  .menu a:hover::after {
    width: 100%;
  }
}
@media screen and (max-width: 1000px) {
  .ham.active {
    left: auto;
    right: 0;
  }

  .header__menu {
    max-height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
  }
  .header .menu {
    text-align: left;
    align-items: flex-start;
  }
  .header .menu-item {
    padding: 5px 25px;
    box-sizing: border-box;
  }
  .header .menu-item-active > a::after {
    content: "";
    position: absolute;
    background-color: #ed1c24;
    height: 2px;
    width: 100%;
    bottom: -5px;
    left: 0;
    transition: 0.3s;
  }
  .header .menu-item-active .sub-menu {
    display: block;
  }

  .sub-menu {
    display: none;
  }
  .sub-menu .menu-item {
    font-weight: 400;
    padding: 0 15px;
  }
  .sub-menu .menu-item a {
    color: gray;
  }
}