/* ----- NAVBAR OUTSIDE CONTAINER ----- */
#navbar {
  position: absolute;
  width: 100%;
}
/* ----- GLOBAL PADDING ----- */
.jpadding-nav {
  /* padding: 50px; */
  /* padding: 10px 50px; */
  padding: 15px 50px;
}

/* ----- NAVBAR ------------------------------------------------------------------------------- */

.jnavbar {
  margin: auto;
  background-color: transparent;
  /* background-color: #0f0e0e; */
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2em;
  /* padding-bottom: 15px; */

  position: relative;
  transition-duration: 0.5s;
  z-index: 5;
}

.jnavbar-bg {
  background: #0f0e0e;
  background: linear-gradient(
    180deg,
    rgba(15, 14, 14, 1) 0%,
    rgba(15, 14, 14, 1) 90%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* navbar area left - toggle */
.nav-left {
  display: flex;
  align-items: center;
}
.navbar-title {
  display: flex;
  /* padding-top: 10px; */
  padding-left: 55px;
  /*color: #9d9d9d;
     font-size: 18px;
    font-family: Raleway; */
  font-family: Metropolis;
  font-weight: 500;
  color: #adadad;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 4px;
  margin-right: -4px;
}

/* navbar area middle - brand logo */
.nav-brand {
  display: flex;
  justify-content: center;
}
.nav-brand img {
  height: 18px;
}
.nav-brand:hover {
  transition-duration: 0.3s;
  color: #f3d3b5;
}

/* navbar area right - links */
.nav-right {
  display: flex;
  justify-content: right;
}

/* navbar links */
.jnav-link {
  font-family: Metropolis;
  font-weight: 500;
  font-size: 10px;
  color: #ffffff;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 4px;
  margin-right: -4px;
  /* line-height: 24px; */
  /* width: fit-content; */
  transition-duration: 0.3s;
}

.jnav-link:hover {
  color: #adadad;
  text-decoration: none;
  transition-duration: 0.3s;
}

/* links spacing */
.nav-right .jnav-link,
.nav-right .jbtn-nav {
  margin-left: 1rem;
}

/*  ----- DROPDOWN ----- */

/* fix dropdown height in navbar */
.dropdown {
  display: inherit;
}
/* hide caret */
.dropdown-toggle::after {
  display: none;
}

/* lang dropdown sizing */
#dropdownLang .dropdown-menu {
  min-width: 4.5rem;
  width: 4.5rem;
}

.dropdown-menu {
  background-color: #0f0e0e;
  border: 1px solid #0f0e0e;
  color: #fff;
}

/* same style as jnav-link */
.dropdown-item {
  font-family: Metropolis;
  font-weight: 500;
  font-size: 10px;
  color: #ffffff;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 4px;
  margin-right: -4px;
  transition-duration: 0.3s;
}

.dropdown-item.active {
  color: #fff;
  text-decoration: none;
  background-color: #424242;
}

.dropdown-item.active:hover,
.dropdown-item:hover {
  color: #0f0e0e;
  text-decoration: none;
  background-color: #adadad;
  transition-duration: 0.3s;
}

/* hide mobile dropdown */
.nav-right .show-s {
  display: none;
}

/*  ----- NAVBAR TOGGLE BUTTON ------------------------------------------------------------------------------- */

.toggle-container {
  display: flex;
  align-items: center;
}

.toggle-button {
  position: relative;
  top: 0.5rem;
  height: 30px;
  width: 35px;
  cursor: pointer;
  z-index: 100;
  transition: opacity 0.25s ease;
}

.toggle-button .top {
}
.toggle-button .middle {
  width: 35px;
}
.toggle-button .bottom {
  width: 18px;
}

.toggle-button:hover span {
  background: #fff;
}
.toggle-button:hover .bottom {
  width: 35px;
}

.toggle-button.active:hover .top {
  background: #fff;
}
.toggle-button.active:hover .middle {
  background: #fff;
}
.toggle-button.active:hover .bottom {
  background: #fff;
  width: 35px;
}

.toggle-button.active {
  z-index: 100;
  position: fixed;
  top: 70px;
  /* top: 20px; */
}

.toggle-button.active .top {
  transform: translateY(11px) translateX(0) rotate(45deg);
  background: #fff;
  border-radius: 5px;
}
.toggle-button.active .middle {
  transform: translateY(5px) translateX(0) rotate(45deg);
  background: #fff;
  border-radius: 5px;
}
.toggle-button.active .bottom {
  transform: translateY(-5px) translateX(0) rotate(-45deg);
  background: #fff;
  border-radius: 5px;
  width: 35px;
}

.toggle-button span {
  background: #fff;
  border: none;
  /* height: 3px; */
  height: 1px;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transition: all 0.35s ease;
  cursor: pointer;
  border-radius: 5px;
}

.toggle-button span:nth-of-type(2) {
  top: 11px;
}

.toggle-button span:nth-of-type(3) {
  top: 22px;
}

/* ----- NAVBAR OVERLAY ------------------------------------------------------------------------------- */

/* navbar style */

.duke-nav-style .overlay-main a {
  font-family: Metropolis;
  font-weight: 400;
  font-size: 30px;
  /* letter-spacing: 13px; */
  letter-spacing: 0.25em;
  line-height: normal;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;

  /* opacity: 0.6; */
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s, width 0.35s;
  overflow: hidden;
  z-index: 99;
  /* display: none; */
}

.overlay.open {
  opacity: 1;
  visibility: visible;
  width: 100%;

  /* main grid to split in screen */
  display: grid;
  grid-template-columns: 40% 1fr;
}

/* darken rest of screen */
.overlay-background {
  background-color: #000;
  opacity: 0.5;
}

/* content container */
.overlay-container {
  /* grid splits brand title and content 
       todo: replace with one grid */
  height: 100vh;
  height: 100dvh; /* This is for future browsers that support svh, dvh and lvh */
  display: grid;
  grid-template-rows: auto 1fr;

  /* background: rgb(153, 133, 118);
    background: linear-gradient(
      166deg,
      rgb(155, 155, 155) 0%,
      rgba(37, 37, 37, 1) 100%
    ); */
  background: rgb(122, 122, 122);
  background: linear-gradient(
    132deg,
    rgb(195, 195, 195) 0%,
    rgb(65, 65, 65) 100%
  );
  /* background-image: linear-gradient(45deg, rgba(194, 233, 221, 0.5) 1%, rgba(104, 119, 132, 0.5) 100%), linear-gradient(-45deg, #494d71 0%, rgba(217, 230, 185, 0.5) 80%);  opacity: 1 !important; */

  opacity: 1 !important;
}

/* titles transition animations delay */
.overlay.open .overlay-main a {
  animation: fadeInRight 0.5s ease forwards;
  animation-delay: 0.3s;
}
.overlay.open .overlay-main a:nth-of-type(2) {
  animation-delay: 0.35s;
}
.overlay.open .overlay-main a:nth-of-type(3) {
  animation-delay: 0.4s;
}
.overlay.open .overlay-main a:nth-of-type(4) {
  animation-delay: 0.45s;
}
.overlay.open .overlay-main a:nth-of-type(5) {
  animation-delay: 0.5s;
}
/* .overlay.open h3:nth-of-type(6) {
      animation-delay: 0.55s;
    } */

/* .overlay nav {
    position: relative;
    top: 250px;
    transform: translateY(-50%);
    text-align: left;
    padding-left: 30%;
  } */

/* overlay-content */
.overlay nav {
  display: grid;
  justify-content: center;
  /* align-content: flex-start; */
  grid-template-rows: auto 20% 20%;
  /* grid-template-rows: auto auto auto; */
  gap: 20px;
}

/* top container with navbar title */
.overlay-top {
  display: flex;
  justify-content: center;
  padding: 70px 0;
  /* padding-top: 70px; */
  /* padding-left: 30%; */
  color: #9d9d9d;
  /* font-size: 18px;
    font-family: Raleway; */
}

/* main links container */
.overlay-main {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  /* display: grid;
    grid-template-rows: repeat(5, 1fr); */
}
.overlay-main a {
  opacity: 0;
}

/* bottom links containers */
.navbar-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: center;
  align-content: center;
  gap: 10px;
}

.jnav-socials,
.jnav-lang {
  /* margin-top: 50px; */
}
/* bottom socials */
.jnav-socials a.jnav-link {
  margin-right: 0.5rem;
  font-size: 16px;
}
.jnav-socials a.jnav-link:last-child {
  margin-right: 0;
}
/* bottom langs */
.jnav-lang a {
  margin-left: 0.5rem;
}
.jnav-lang {
  text-align: end;
}

/* regular link style */
.jnav-link,
.overlay-top {
  font-family: Metropolis;
  font-weight: 500;
  color: #ffffff;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 4px;
  margin-right: -4px;
  /* line-height: 24px; */
  transition-duration: 0.3s;
  text-decoration: none;
  /* width: fit-content; */
}

.jnav-link:hover {
  color: #adadad;
  text-decoration: none;
  transition-duration: 0.3s;
}

.overlay nav .jnav-link {
  color: #fff;
  opacity: 0.7;
}
.overlay nav .jnav-link:hover {
  color: #fff;
  opacity: 1;
}

/* link hover 1: underline left to right but back - https://tobiasahlin.com/blog/css-trick-animating-link-underlines/ */

.overlay .overlay-main a {
  /* position: relative; */
}
/* .overlay .overlay-main a:hover:after, .overlay .overlay-main a:focus:after, .overlay .overlay-main a:active:after {
    width: 100%;
  }
  .overlay .overlay-main a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
  
    transform: translateX(-50%);
    height: 3px;
    background: #adadad;
    transition: .35s;
  } */

/* link hover 2: underline left to right - https://github.com/codrops/LineHoverStyles/ */

.overlay .overlay-main a {
  /* cursor: pointer; */
  position: relative;
  white-space: nowrap;
  /* color: var(--color-text); */
}
.overlay .overlay-main a::before,
.overlay .overlay-main a::after {
  position: absolute;
  width: 100%;
  height: 2px;
  /* background: currentColor; */
  background: #adadad;
  top: 100%;
  left: 0;
  pointer-events: none;
}
.overlay .overlay-main a::before {
  content: "";
  /* show by default */
}
.overlay .overlay-main a::before {
  transform-origin: 100% 50%;
  transform: scale3d(0, 1, 1);
  transition: transform 0.5s;
}
.overlay .overlay-main a:hover::before {
  transform-origin: 0% 50%;
  transform: scale3d(1, 1, 1);
}

/* ----- ANIMATIONS ------------------------------------------------------------------------------- */
/* The @keyframes rule specifies the animation code , more info: https://www.w3schools.com/cssref/css3_pr_animation-keyframes.asp */

@keyframes fadeInRight {
  0% {
    opacity: 0;
    left: 20%;
  }
  100% {
    opacity: 1;
    left: 0;
  }
}

/* ----- LIGHT MODE ------------------------------------------------------------------------------- */
.light-mode .toggle-button span {
  background: #000;
}
#logo-black {
  display: none;
}
.light-mode #logo-black {
  display: block;
}
.light-mode #logo-white {
  display: none;
}

/* ----- MEDIA QUERIES ------------------------------------------------------------------------------- */

@media (max-width: 1300px) {
  /* .overlay-top {
      margin-left: auto;
      margin-right: auto;
      padding-left: 0;
    }
    .overlay nav {
      padding-left: 150px;
    }
    .overlay nav {
      margin-left: auto;
      margin-right: auto;
      margin-bottom: auto;
      top: 180px;
      padding: 0;
    } */
}

@media (max-width: 1150px) {
  /* .overlay.open {
      grid-template-columns: 1fr 1fr;
    }
    .overlay nav {
      margin-left: auto;
      margin-right: auto;
      margin-bottom: auto;
      top: 180px;
      padding: 0;
    }
    .overlay ul li a {
      font-size: 38px !important;
      line-height: 40px;
    } */
  .jpadding-nav {
    padding: 10px 20px;
  }
  /* 50% screen nav */
  .overlay.open {
    grid-template-columns: 50% 1fr;
  }
}

@media (max-width: 900px) {
  /* full screen nav */
  .overlay.open {
    grid-template-columns: 1fr;
    overflow-y: hidden !important;
  }
  /* remove dark bg */
  .overlay-background {
    display: none;
  }
  /* navbar bottom center */
  .navbar-bottom {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

@media (max-device-width: 768px) {
  .toggle-button.active {
    z-index: 100;
    position: fixed;
    /* top: 70px; */
    /* position: relative;
      top: 0.5rem; */
  }
}
@media (max-width: 620px) {
  /* hide overflowing links */
  .nav-right .hide-m {
    display: none;
  }
}
@media (max-width: 576px) {
  /* TODO: same class twice */
  .jpadding-nav {
    padding-left: 15px;
    padding-right: 15px;
  }
  .jpadding-nav {
    padding: 15px 25px;
  }
  /* move up toggle and title (nav top) */
  .toggle-button.active {
    top: 35px;
    /* position: relative;
      top: 0.5rem; */
  }
  .overlay-top {
    padding-top: 35px;
  }
  .overlay .overlay-main a {
    font-size: 25px;
    letter-spacing: 11px;
    font-weight: 400;
  }
}

@media (max-width: 420px) {
  .jpadding-nav {
    padding: 5px 25px;
  }
  /* change lang dropdown text */
  .nav-right .hide-s {
    display: none;
  }
  .nav-right .show-s {
    display: inline-block;
  }
}

@media (max-width: 350px) {
  .overlay .overlay-main a {
    font-size: 20px;
    letter-spacing: 10px;
  }
}

/* ----- HEIGHT QUERIES ------------------------------------------------------------------------------- */

@media (max-height: 820px) {
  /* .overlay nav {
      margin-left: auto;
      margin-right: auto;
      margin-bottom: auto;
      top: 180px;
      padding: 0;
    } */
}
@media (max-height: 580px) {
  /* .overlay nav {
      top: 130px;
      font-size: 25px;
    }
    .overlay ul li {
      min-height: 25px;
      padding: 10px 0;
    } */

  /* .overlay-top {
      padding-top: 30px;
    } */
}

@media only screen and (max-height: 500px) {
  .toggle-button.active {
    top: 30px;
  }
  .overlay-top {
    padding: 30px 0;
  }
}

@media only screen and (max-height: 420px) {
  /* .jpadding-nav {
      padding: 5px 25px;
    } */
  .overlay .overlay-main a {
    font-size: 25px;
    letter-spacing: 11px;
    font-weight: 300;
  }
}

@media only screen and (max-height: 376px) {
  .overlay nav {
    grid-template-rows: auto auto auto;
    gap: 15px;
  }
}
@media only screen and (max-height: 324px) {
  .overlay nav {
    grid-template-rows: auto auto auto;
    gap: 5px;
  }
}

/* navbar titles
  TODO: regroup in one class to hide */
.brand {
  display: none;
}
.brand-catalog {
  display: none;
}
.catalog {
  display: none;
}
