﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
  scroll-behavior: smooth;
}

body{
  background: #a004e1;
}

header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 30px 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
}
header .logo {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 2em; 
  letter-spacing: 2px;
}
header ul {
  display: flex;
  justify-content: center;
  align-items: center;
}
header ul li {
  list-style: none;
  margin-left: 20px;
}
header ul li a {
  text-decoration: none;
  padding: 6px 15px;
  color: #fff; 
}
header ul li a:hover,
header ul li a.active {
  background: #fff;
  color: #3a52d3;
}

header .nav-btn{
  display: flex;
}

.hmenu-container{
  flex: 1;
  display: none;
  align-items: center;
  justify-content: flex-end;
}

.hmenu{
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hmenu div{
  width: 1.6rem;
  height: 3px;
  border-radius: 3px;
  background-color: #fff;
  position: relative;
  z-index: 1001;
  transition: .5s;
}

.hmenu div::before,
.hmenu div::after{
  content: "";
  position: absolute;
  width: inherit;
  height: inherit;
  background-color: #fff;
  border-radius: 3px;
  transition: .5s;
}

.hmenu div::before{
  transform: translateY(-7px);
}

.hmenu div::after{
  transform: translateY(7px);
}

#check{
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  z-index: 90000;
  cursor: pointer;
  opacity: 0;
  display: none;
}

#check:checked ~ .hmenu-container .hmenu div{
  background-color: transparent;
}

#check:checked ~ .hmenu-container .hmenu div::before{
  transform: translateY(0) rotate(-45deg);
}

#check:checked ~ .hmenu-container .hmenu div::after{
  transform: translateY(0) rotate(45deg);
}

@media (max-width: 920px) 
{
  header { 
    padding: 30px 30px; 
  }
  .hmenu-container{
    display: flex;
  }

  #check{
    display: block;
  }

  .nav-btn{
    position: fixed;
    height: calc(100vh - 3rem);
    top: 6rem;
    left: 0;
    width: 100%;
    background-color: #1d2344;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transform: translateX(100%);
    transition: .65s;

  }

  #check:checked ~ .nav-btn{
    transform: translateX(0);
  }

  .nav-btn > ul{
    flex-direction: column;
    line-height: 5;
    padding: 1.6rem 2rem;
  }

}