*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
.navbar{
position: fixed;
top: 0px;
left: 0;
width: 100%;
z-index: 10;
background: white;
height: 5rem;
}
.menu{
max-width: 72rem;
width: 100%;
margin: 0 auto;
padding: 0 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo{
font-size: 1.1rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 2px;
line-height: 4rem;
padding-top: 10px;
}
.logo span{
font-weight: 300;
}
.hamburger-menu{
height: 40px;
width: 40px;
cursor: pointer;
display: flex;
position: fixed;
right: 110px;
z-index: 333;
flex-direction: column;
top: 30px;
}
.hamburger-menu span{
width: 40px;
border-top: 2px solid rgb(0, 0, 0);
position: absolute;
}
.one, .two{
transform: rotate(0deg);
transition: .6s ease;
}
.two{
top: 12px;
}
.three{
top: 24px;
}
.hamburger-menu:hover .three{
display: none;
}
.hamburger-menu:hover .one{
transform: rotate(585deg);
top: 14px;
}
.hamburger-menu:hover .two{
transform: rotate(-585deg);
top: 14px;
}
.navContent{
width: 0px;
height: 30px;
right: 0;
position: absolute;
top: 3px;
display: flex;
transition: .6s ease;
align-items: center;
}
.hamburger-menu:hover .navContent{
width: 650px;
height: 130px;
margin-top: -50px;
}
body{
background: black;
}
.navItem{
width: 0px;
transition: .5s;
height: 0%;
overflow: hidden;
}
.hamburger-menu:hover .navItem{
position: relative;
margin-left: 10px;
transition: .4s;
height: 40px !important;
display: flex;
align-items: center;
justify-content: center;
padding-left: 10px;
padding-right: 10px;
text-transform: capitalize;
border-top-right-radius: 10px;
border-bottom-left-radius: 10px;
width: auto;
transition: .5s;
height: 100%;
overflow: visible;
}
.navItem h6{
font-weight: 300;
}
.navItem:hover{
color: white;
background: linear-gradient(45deg, rgba(0, 0, 0, 0.8), black);
height: 100%;
text-transform: uppercase;
height: 40px !important;
}
.hover{
width: 00px;
height: 1px;
background: black;
position: absolute;
top: -5px;
left: -5px;
transition: .1s ease;
}
.hover2{
width: 1px;
height: 0px;
background: black;
position: absolute;
bottom: -5px;
right: -5px;
transition: .2s linear;
}
.navItem:hover .hover2{
height: 10px;
}
.navItem:hover .hover{
width: 30px;
}
@media (max-width: 900px){
.hamburger-menu{
height: 40px;
width: 40px;
cursor: pointer;
display: flex;
position: fixed;
right: 40px;
z-index: 333;
flex-direction: column;
top: 30px;
}
.navContent{
width: 0vw;
background: rgb(0, 0, 0);
height: 100vh;
position: absolute;
display: flex;
right: calc(100vw - 40px);
transition: .3s ease;
top: -30px;
align-items: center;
flex-direction: column;
color: white;
justify-content: center;
overflow: hidden;
}
.navContent.active{
width: 60vw;
background: rgba(0, 0, 0, 0.89);
height: 100vh;
position: absolute;
display: flex;
right: calc(40vw - 40px);
transition: .6s ease;
top: -30px;
align-items: center;
flex-direction: column;
color: white;
justify-content: center;
transition: .4s ease;
}
.navItem{
position: relative;
margin-left: 10px;
transition: .4s;
height: 10%;
display: flex;
align-items: center;
justify-content: center;
padding-left: 10px;
padding-right: 10px;
text-transform: capitalize;
border-top-right-radius: 10px;
border-bottom-left-radius: 10px;
width: 100%;
transition: .5s;
height: 80px;
overflow: hidden;
}
.hamburger-menu.active .three{
display: none;
}
.hamburger-menu.active .one{
transform: rotate(585deg);
top: 14px;
}
.hamburger-menu.active .two{
transform: rotate(-585deg);
top: 14px;
}
}
function toggle_items(item_name){
element = document.querySelector(item_name);
element.classList.toggle("active");
}