/* NAV component Grid and flex Author Richard W. of richardspage.co.uk 22/09/2022
* 
*  ToDos:
*       px and rem,
*       clean up
*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@import url("https://fonts.googleapis.com/css2?family=Rubik+Dirt&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Reem+Kufi+Ink&display=swap");

:root {
  /* Variables */
  --font-light: rgb(255, 255, 255);
  --page-outer-gutter: 5vw;
  --bg-colour: linear-gradient(
    135deg,
    rgb(136, 0, 0) 20%,
    rgb(172, 35, 14) 100%
  );
}
html {
  font-family: "Reem Kufi Ink", sans-serif;
}
.nav_bar {
  display: grid;
  grid-template-columns: repeat(2, min-content) repeat(2, 1fr);
  grid-template-rows: 1fr;
  gap: 0px 0px;
  grid-auto-flow: row;
  justify-items: stretch;

  min-height: 70px;
  background: var(--bg-colour);
  box-shadow: 0 0 0.35rem black;
}

.logo {
  justify-self: start;
  align-self: center;
  grid-area: 1 / 1 / 2 / 2;
  font-weight: 400;
}

.logo img {
  padding-left: var(--page-outer-gutter);
}

.logo_title {
  justify-self: start;
  align-self: center;
  grid-area: 1 / 2 / 2 / 3;

  color: var(--font-light);
}

#mobile_nav {
  justify-self: end;
  align-self: center;
  grid-area: 1 / 4 / 2 / 5;

  margin-right: var(--page-outer-gutter);
}

#desktop_nav {
  grid-area: 1 / 3 / 2 / 4;
  display: none;
}

#mobile_items {
  display: none;
}

#burger_btn {
  width: 35px;
  height: 35px;
  cursor: pointer;
  border-radius: 10px;
  padding: 5px;
}

#burger_btn:hover > .bar {
  background-color: rgb(119, 51, 51);
}

.bar {
  height: 3px;
  width: 100%;
  background-color: var(--font-light);
  display: block;
  border-radius: 5px;
  margin-top: 2px;
  transition: 0.3s ease;
}

.bar_top {
  transform: translateY(-4px);
}

.bar_bot {
  transform: translateY(4px);
}

.switch .bar {
  background-color: rgb(255, 0, 0);
}

.switch .bar_top {
  transform: translateY(4px) rotateZ(-45deg);
}

.switch .bar_bot {
  transform: translateY(-6px) rotate(45deg);
}

.switch .bar_mid {
  opacity: 0;
}

#mobile_items.bg_mobile_nav {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.mobile_item {
  display: flex;
  align-items: center;
}

.mobile_item li:nth-child(odd) {
  justify-content: flex-start;
  /* needs better solution */
  margin-left: 32%;
}

.mobile_item li:nth-child(even) {
  padding-left: 2rem;
  margin-right: auto;
}

ul.mobile_item:hover:not(.active) {
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem;
  transform: scale(1.2);
  transition: 0.3s ease-in-out;
}

.bg_mobile_nav {
  background: var(--bg-colour);
  min-height: calc(100vh - 70px);
  /* z-index: 999; */
  opacity: 0.9;
  animation: 0.5s slide-in ease-in-out 1;
}

@keyframes slide-in {
  0% {
    transform: translateX(-100vw);
    opacity: 0;
  }

  100% {
    transform: translateX(0vw);
    opacity: 0.9;
  }
}

.mobile_item li,
.nav_item li {
  list-style: none;
  font-weight: 400;
}

.mobile_item li a,
.nav_item li a {
  color: var(--font-light);
  text-decoration: none;
}

.bi {
  color: var(--font-light);
  font-size: 2rem;
}

@media (min-width: 628px) {
  .nav_bar {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 0px 0px;
  }

  .logo {
    grid-area: 1 / 1 / 2 / 2;
    justify-self: center;
  }

  .logo_title {
    grid-area: 2 / 1 / 3 / 2;
    justify-self: center;
    align-self: flex-start;
  }

  .logo img {
    padding-left: 0;
  }

  #mobile_nav {
    display: none;
  }

  #desktop_nav {
    grid-area: 3 / 1 / 4 / 2;
    display: flex;
    justify-content: center;
    padding: 1em 0;
  }

  .nav_item {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .mobile_items.bg_mobile_nav {
    display: none;
  }
}

@media (min-width: 935px) {
  .nav_bar {
    display: grid;
    grid-template-columns: repeat(2, min-content) 1fr;
    grid-template-rows: 1fr;
    gap: 0px 0px;
  }

  .logo {
    justify-self: start;
    align-self: center;
    grid-area: 1 / 1 / 1 / 2;
  }

  .logo img {
    padding-left: var(--page-outer-gutter);
  }

  .logo_title {
    justify-self: start;
    align-self: center;
    grid-area: 1 / 2 / 1 / 3;
  }

  #mobile_nav {
    display: none;
  }

  #desktop_nav {
    justify-self: end;
    align-self: center;
    grid-area: 1 / 3 / 1 / 5;
    margin-right: var(--page-outer-gutter);
  }

  .nav_item {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.nav_item:not(:first-child) {
  padding-left: 1em;
}

ul.mobile_item:hover:not(.active) {
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem;
  transform: scale(1.5);
  transition: 0.3s ease-in-out;
}

.active {
  opacity: 0.5;
}

ul.nav_item {
  transition: 0.2s ease-in-out;
}
ul.nav_item:hover:not(.active) {
  transform: scale(1.05);
  transition: 0.2s ease-in-out all;
}
.nav_item li a:hover,
.nav_item li .bi:hover {
  color: rgb(255, 255, 255);
}

/*
*   Social media
*/

.social {
  margin: 0 3px;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  position: fixed;
  top: calc(((100vh) - 65px) /2);
  z-index: 3;
}
.show {
  opacity: 1;
  transition: opacity 1s ease-in-out;
}
.social a {
  color: #fff;
  text-decoration: none;
}
.social ul {
  
  transform: translate(-270px, 0);
}
.social ul li {
  display: block;

  min-width: 300px;
  text-align: right;
  border-radius: 0 45px 45px 0;
  transition: all 1s;
}
.social ul li:hover {
  transform: translate(120px, 0);
  background: rgba(0, 0, 0, 0.4);
}
.social ul li:hover a {
  color: #ffffff;
}
.social ul li:hover i {
  color: #fff;
  padding: 5px;
  margin-right: 10px;
  background: transparent;
  transform: rotate(360deg);
  transition: all 1s;
}
.social ul li i {
  color: rgb(255, 143, 162);
  background: transparent;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 30px;
  transform: rotate(0deg);
}
/*

*/
