@import url("https://fonts.googleapis.com/css?family=Barlow:200,300,400,500,600,700,800,900&display=swap");

body {
  margin: 0;
  font-family: "Barlow", sans-serif;
}
ul {
  margin: 0;
  padding: 0;
}
ul li {
  list-style: none;
}

a {
  text-decoration: none;
  color: white;
}

/* Navigation */
nav {
  /* Nav Bar */
  /* Main Nav */
}
img {
  border:0;
  max-width:100%;
  height:auto
}
nav .menubar {
  width: 100%;
  height: 40px;
  position:fixed;
  top: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3%;
  box-sizing: border-box;
  background-color: #F55656;
  border-radius:5px;
  box-shadow: 0px 0px 20px -10px rgba(0, 0, 0, 0.3);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  -webkit-transition: -webkit-transform .5s;
  transition: -webkit-transform .5s;
  transition: transform .5s;
  transition: transform .5s, -webkit-transform .5s;
}
  /* Logo */
  /* Icons */
@media screen and (max-width: 767px) {
  nav .menubar {
    padding: 0 10px;
  }
}
.nav{
  box-shadow:0 1px 2px #F55656;
  padding-top:50px;
  overflow:auto;
  hight:calc(100vh - 55px);
  margin: 0 auto;
}

.nav li > a{
  float:left;
  width:16%;
  height:38px;
  text-align:center;
  line-height:38px;
  color: #F55656;
  font-size:1.1rem;
}
.nav li:hover  > a{
  color: #333333;
  font-size: 1.2rem;
}
nav .menubar .home {
  color: #ffffff;
  transition: all 0.4s ease;
  width: 25px;
  height: 25px;
}
nav .menubar .home:hover {
  opacity: 0.5;
}
nav .menubar .header {
  font-size: 1.2rem;
  color: #ffffff;
  border-radius:5px;
  transition: all 0.4s ease;
}
nav .menubar .icons {
  display: flex;
  /* Icon Menu Hamburguer */
  /* Secondary Icons */
}
nav .menubar .icons .icon-menu {
  display: flex;
  width: 30px;
  height: 30px;
  z-index: 99;
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  /* Icon Close */
}
nav .menubar .icons .icon-menu span {
  background-color: #ffffff;
  width: 30px;
  height: 3px;
  position: absolute;
  display: flex;
  justify-content: flex-end;
  transition: all 0.2s ease;
  right: 0;
  border-radius: 5px;
}
nav .menubar .icons .icon-menu span:before, nav .menubar .icons .icon-menu span:after {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  background-color:#ffffff;
  border-radius: 5px;
}
nav .menubar .icons .icon-menu span:before {
  transform: translateY(-10px);
  transition: all 0.3s 0.1s ease;
}
nav .menubar .icons .icon-menu span:after {
  transform: translateY(10px);
  transition: all 0.3s 0.2s ease;
}
nav .menubar .icons .icon-menu:hover span {
  width: 30px;
}
nav .menubar .icons .icon-menu:hover span:before {
  width: 25px;
}
nav .menubar .icons .icon-menu:hover span:after {
  width: 20px;
}
nav .menubar .icons .icon-menu.icon-closed {
  justify-content: center;
}
nav .menubar .icons .icon-menu.icon-closed span {
  background-color: white;
  justify-content: center;
  width: 0px;
  right: initial;
  opacity: 0.5;
  transition: all 0.6s ease;
}
nav .menubar .icons .icon-menu.icon-closed span:before, nav .menubar .icons .icon-menu.icon-closed span:after {
  width: 30px;
  background-color: white;
}
nav .menubar .icons .icon-menu.icon-closed span:before {
  transform: rotate(45deg);
}
nav .menubar .icons .icon-menu.icon-closed span:after {
  transform: rotate(-45deg);
}
nav .menubar .icons .icon-menu.icon-closed:hover span {
  width: 0;
  opacity: 1;
}
@media screen and (max-width: 767px) {
  nav .menubar .icons .icon-menu.icon-closed:hover span:before {
    transform: rotate(45deg);
  }
  nav .menubar .icons .icon-menu.icon-closed:hover span:after {
    transform: rotate(-45deg);
  }
}
nav .menubar .icons .secondary-icons {
  display: flex;
  flex-wrap: wrap;
}
nav .menubar .icons .secondary-icons .icon-second {
  width: 30px;
  height: 30px;
  margin: 0 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 5px;
}
@media screen and (max-width: 767px) {
  nav .menubar .icons .secondary-icons .icon-second {
    margin: 0 5px;
  }
}
nav .menubar .icons .secondary-icons .icon-second:last-child {
  margin-right: 30px;
}
@media screen and (max-width: 767px) {
  nav .menubar .icons .secondary-icons .icon-second:last-child {
    margin-right: 15px;
  }
}
nav .menubar .icons .secondary-icons .icon-second:hover {
  transform: translateY(-5px);
  opacity: 0.5;
}
@media screen and (max-width: 767px) {
  nav .menubar .icons .secondary-icons .icon-second:hover {
    transform: translateY(0px);
    opacity: 1;
  }
}
nav .menu {
  display: none;
  /* Open Menu */
  /* Animation - Close */
}
nav .menu.open {
  display: flex;
  z-index: 40;
  overflow: hidden;
  /* Menu Open - Main Link */
}
nav .menu.open .menu-link {
  width: 33%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: all 0.4s ease-in-out;
  animation: menu 0.6s ease forwards;
  height: 50vh;
  position: relative;
  /* Main Link - text */
  /* Sub Menu */
  /* Menu Links - Hover */
}
@keyframes menu {
  0% {
    height: 0;
    transform: translatey(-50%);
  }
  100% {
    height: 100vh;
    transform: translatey(0%);
  }
}
nav .menu.open .menu-link:nth-child(1) {
  background-color: #ffb961;
  animation-duration: 0.6s;
}
nav .menu.open .menu-link:nth-child(2) {
  background-color: #875C91;
  animation-duration: 0.8s;
}
nav .menu.open .menu-link:nth-child(3) {
  background-color: #f3826f;
  animation-duration: 1s;
}
nav .menu.open .menu-link:nth-child(4) {
  background-color: #5d84bf;
  animation-duration: 1.2s;
}
nav .menu.open .menu-link .text-item {
  color: white;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 40px;
  width: 100%;
  height: 20%;
  letter-spacing: 4px;
  transition: all 0.4s 0.3s ease-in-out, letter-spacing 0.2s ease-in, opacity 0.2s ease-in;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transform-origin: center;
  animation: text-in 0.5s ease;
  position: absolute;
}
@media screen and (max-width: 767px) {
  nav .menu.open .menu-link .text-item {
    transform: rotate(0deg);
    font-size: 30px;
  }
}
@keyframes text-in {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0;
  }
  100% {
    opacity: 0.3;
  }
}
nav .menu.open .menu-link .text-item .icon {
  position: absolute;
  display: flex;
  width: 30px;
  height: 30px;
  opacity: 0;
  transform: translateY(0px);
  transition: all 0.4s ease-in-out;
  background-image: url("https://rafaelalucas91.github.io/assets/icons/white/icon-54.svg");
}
@media screen and (max-width: 767px) {
  nav .menu.open .menu-link .text-item .icon {
    opacity: 0.5;
    transform: translateY(40px);
  }
}
nav .menu.open .menu-link .submenu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 40px;
  box-sizing: border-box;
  opacity: 0;
  z-index: -10;
  transition: all 0.6s ease-in-out;
  height: 0%;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  bottom: 0;
  transform: translateY(50%);
  position: absolute;
}
@media screen and (max-width: 767px) {
  nav .menu.open .menu-link .submenu {
    padding: 0 5%;
  }
}
nav .menu.open .menu-link .submenu .sub-item {
  display: none;
  margin: 10px 0;
  color: white;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 20px;
  font-weight: 600;
  position: relative;
  width: fit-content;
  cursor: pointer;
  padding: 5px 15px;
}
@media screen and (max-width: 767px) {
  nav .menu.open .menu-link .submenu .sub-item {
    font-size: 1.2rem;
  }
}
nav .menu.open .menu-link .submenu .sub-item:after {
  content: "";
  height: 0%;
  width: 3px;
  background-color: white;
  opacity: 0.3;
  position: absolute;
  top: 0;
  left: 0;
  transition: height 0.4s 0.3s ease, width 0.4s ease;
}
nav .menu.open .menu-link .submenu .sub-item:hover:after {
  width: 100%;
  height: 100%;
  transition: height 0.4s ease, width 0.4s 0.3s ease;
}
nav .menu.open .menu-link:hover {
  width: 50%;
  transition: all 0.4s ease-in-out;
  /* When Click to Open Sub Menu */
}
nav .menu.open .menu-link:hover .text-item {
  height: 50%;
  transform: rotate(0deg) translateX(0px);
  font-size: 30px;
  opacity: 1;
  letter-spacing: 10px;
}
nav .menu.open .menu-link:hover .text-item .icon {
  opacity: 1;
  transform: translateY(40px);
  transition: all 0.3s 0.4s ease-in-out;
}
@media screen and (max-width: 767px) {
  nav .menu.open .menu-link:hover .text-item {
    width: 100%;
    font-size: 30px;
    opacity: 0.3;
    letter-spacing: 5px;
  }
}
@media screen and (max-width: 767px) {
  nav .menu.open .menu-link:hover.active {
    height: 80vh;
  }
}
nav .menu.open .menu-link:hover.active .text-item {
  transform: rotate(0deg) translateX(0px) translateY(-50%);
  transform-origin: center center;
  transition: all 0.6s ease-in-out;
}
@media screen and (max-width: 767px) {
  nav .menu.open .menu-link:hover.active .text-item {
    height: 20%;
    transform: translateY(-180%);
  }
}
nav .menu.open .menu-link:hover.active .text-item .icon {
  transition: all 0.3s ease-in-out;
  transform: translateY(40px) rotate(-180deg);
}
nav .menu.open .menu-link:hover.active .submenu {
  transform: translateY(0);
  height: 50%;
  z-index: 20;
  opacity: 1;
  bottom: 0;
}
@media screen and (max-width: 767px) {
  nav .menu.open .menu-link:hover.active .submenu {
    height: 70%;
  }
}
nav .menu.open .menu-link:hover.active .submenu .sub-item {
  display: flex;
  animation: submenu 1s ease forwards;
  z-index: 30;
}
@keyframes submenu {
  0% {
    transform: translatex(50px) rotate(5deg);
    opacity: 0;
  }
  50% {
    transform: translatex(50px) rotate(-5deg);
    opacity: 0;
  }
  100% {
    opacity: 1;
    transform: translatex(0px) rotate(0deg);
  }
}
nav .menu.open .menu-link:hover.active .submenu .sub-item:nth-child(1) {
  animation-duration: 1s;
}
nav .menu.open .menu-link:hover.active .submenu .sub-item:nth-child(2) {
  animation-duration: 1.2s;
}
nav .menu.open .menu-link:hover.active .submenu .sub-item:nth-child(3) {
  animation-duration: 1.4s;
}
@media screen and (max-width: 767px) {
  nav .menu.open .menu-link {
    width: 100%;
    height: 33%;
    animation: menu-mobile 0.6s ease forwards;
    transform: translatey(0%);
    right: 0;
  }
  @keyframes menu-mobile {
    0% {
      transform: translateX(200%);
    }
    100% {
      transform: translateX(0%);
    }
  }
  nav .menu.open .menu-link:hover {
    width: 100%;
  }
}
@media screen and (max-width: 767px) {
  nav .menu.open {
    height: 100vh;
    flex-direction: column;
  }
}
nav .menu.close .menu-link {
  animation: menu-close 1s ease forwards;
}
@keyframes menu-close {
  0% {
    height: 100vh;
  }
  100% {
    height: 0;
  }
}
nav .menu.close .menu-link .text-item {
  animation: text-out 0.6s ease forwards;
}
@keyframes text-out {
  0% {
    opacity: 0.3;
  }
  80% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
