@import url("https://fonts.googleapis.com/css?family=Nunito&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap");

:root {
  --primaryColor: #fff;
  --navColor1: #21292c;
  --navColor2: #aa3e39;
  --navColor3: #aa6e39;
  --navColor4: #236267;
  --navColor5: #2c8437;
}

html {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #efedd6;
  font-family: Nunito, sans-serif;
}

/* --- Navigation Menu ------------------------------ */

/* Overlay */
.overlay {
  position: fixed;
  z-index: 9;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  transform: translateX(-100vw);
}

.overlay-slide-right {
  transition: all 0.4s ease-in-out;
  transform: translateX(0);
}

.overlay-slide-left {
  transition: all 0.8s ease-in-out;
  transform: translateX(-100vw);
}

/* Nav Menu Items */
nav,
nav ul {
  height: 100vh;
  margin: 0;
  padding: 0;
}

nav ul {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  list-style: none;
}

nav ul li {
  height: 20%;
  overflow: hidden;
}

nav li a {
  position: relative;
  top: 45%;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 4px;
  text-decoration: none;
  display: block;
  text-align: center;
}

nav li a:hover {
  transform: scale(1.2);
}

nav li a::before {
  content: "";
  width: 25vw;
  height: 3px;
  background-color: #fff;
  position: absolute;
  top: 47.5%;
  left: 0;
  opacity: 0;
}

nav li a:hover::before {
  opacity: 1;
}

nav li:nth-of-type(1) {
  background-color: var(--navColor1);
}

nav li:nth-of-type(2) {
  background-color: var(--navColor2);
}

nav li:nth-of-type(3) {
  background-color: var(--navColor3);
}

nav li:nth-of-type(4) {
  background-color: var(--navColor4);
}

nav li:nth-of-type(5) {
  background-color: var(--navColor5);
}

/* Slide in animation with delay for each */
.slide-in-1 {
  animation: slide-in 0.4s linear 0.2s both;
}

.slide-in-2 {
  animation: slide-in 0.4s linear 0.4s both;
}

.slide-in-3 {
  animation: slide-in 0.4s linear 0.6s both;
}

.slide-in-4 {
  animation: slide-in 0.4s linear 0.8s both;
}

.slide-in-5 {
  animation: slide-in 0.4s linear 1s both;
}

@keyframes slide-in {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

/* Slide out animation with delay for each */
.slide-out-1 {
  animation: slide-out 0.3s linear 0.5s both;
}

.slide-out-2 {
  animation: slide-out 0.3s linear 0.4s both;
}

.slide-out-3 {
  animation: slide-out 0.3s linear 0.3s both;
}

.slide-out-4 {
  animation: slide-out 0.3s linear 0.2s both;
}

.slide-out-5 {
  animation: slide-out 0.3s linear 0.1s both;
}

@keyframes slide-out {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

/* --- Menu Bars ------------------------------------ */

.menu-bars {
  position: fixed;
  top: 1rem;
  right: 2rem;
  z-index: 10;
  display: inline;
  cursor: pointer;
}

.bar1,
.bar2,
.bar3 {
  width: 35px;
  height: 4px;
  background-color: #000;
  margin: 8px 0;
  transition: 0.4s;
}

/* Rotate first bar */
.change .bar1 {
  transform: rotate(-45deg) translate(-7px, 8px);
  background-color: #fff;
}

/* Fade out the second bar */
.change .bar2 {
  opacity: 0;
}

/* Rotate last bar */
.change .bar3 {
  transform: rotate(45deg) translate(-6px, -8px);
  background-color: #fff;
}

/* --- Sections ------------------------------------ */

section#home {
  /* background-color: #22254b; */
  background-color: #efedd6;
}

section#home a {
  position: absolute;
  z-index: 2;
  top: 1.5rem;
  left: 1.5rem;
  text-decoration: none;
  font-size: 1.4rem;
  padding-bottom: 5px;
  color: black;
  border-bottom: 1px solid #000;
}

/* resources section */
#resources {
  font-family: "Roboto", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 5rem;
  overflow-x: hidden;
  /* background-color: chartreuse; */
}

#resources h1 {
  margin: 10px;
}

#resources a {
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}

#resources .box {
  background-color: steelblue;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 400px;
  height: 200px;
  margin: 10px;
  border-radius: 10px;
  box-shadow: 2px 4px 5px rgba(0, 0, 0, 0.3);
  transform: translateX(400%);
  transition: transform 0.4s ease;
}

#resources .box:nth-of-type(even) {
  transform: translateX(-400%);
}

#resources .box.show {
  transform: translateX(0);
}

#resources .box h2 {
  font-size: 45px;
  padding: 5px;
}

/* Media Query: Large Smartphone (Vertical) */
@media (max-width: 600px) {
  section#home a {
    top: 1rem;
    left: 1rem;
  }

  .menu-bars {
    top: 0.5rem;
    right: 1rem;
  }
}

@media (max-width: 600px) {
  #resources .box {
    width: 330px;
    height: 200px;
    margin: 10px;
  }
}
