.header {
  position: fixed;
  color: white;
  width: 100%;
  z-index: 21;
}

.header .upper_header {
  position: relative;
  margin-top: 5vh;
  margin-bottom: 3vh;
  padding-top: 5vh;
}

.header .upper_header .title {
  font-family: "SackersGothicStd";
  text-transform: lowercase;
  font-weight: 500;
  font-size: 2em;
  text-align: center;
  letter-spacing: 0px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header .upper_header .title .raute {
  margin-left: 0.2em;
  transform: translateY(-0.25em);
}

.header .upper_header .icons {
  position: absolute;
  right: 5rem;
  display: flex;
  gap: 1vw;
  bottom: 0rem;
  height: 2em;
}

.header .upper_header .icons a {
  font-size: 1.7em;
}

.header .upper_header .icons .social-icon {
  height: 2em;
  width: 2em;
}

.header .upper_header .icons .social-icon img {
  height: 100%;
  width: 100%;
}

.header .main-nav {
  background-color: rgba(0, 0, 0, 0.3);
  display: none;
}

.header .main-nav.opened-nav {
  display: block;
}

.header .main-nav ul {
  display: flex;
  justify-content: center;
  gap: 2vw;
  margin: 0;
}

.header .main-nav ul li {
  list-style: none;
  position: relative;
  padding-block: 1em 1em;
}

.header .main-nav ul li a {
  font-size: 0.85em;
  text-transform: uppercase;
  position: relative;
  font-weight: bold;
  cursor: pointer;
  transition: color 100ms ease-in-out;
}

.header .main-nav ul li a:after {
  content: "";
  bottom: 0;
  height: 2px;
  width: 0%;
  left: 50%;
  transform: translateX(-50%);
  position: absolute;
  display: block;
  background: currentColor;
  transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header ul li:hover>a,
.header ul li a.active {
  color: var(--clr-primary);
}

.header .main-nav ul li:hover>a:after {
  width: 100% !important;
}

.header .main-nav ul li.subnav:hover .subnav-content,
.header .main-nav ul li.subnav.opened .subnav-content {
  height: auto;
  padding-block: 0.5em 1em;
}

.header .main-nav ul li.subnav:hover>a:after {
  width: 0 !important;
}

.header .main-nav ul li.subnav .subnav-content {
  display: flex;
  overflow-y: hidden;
  height: 0;
  padding-block: 0em;
  transform-origin: top;
  transition: height 200ms ease-in-out, padding-block 200ms ease-in-out;
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translateY(100%);
  z-index: 1;
  justify-content: left;
  gap: 2vw;
  width: 100vw;
  white-space: nowrap;
}

.header .main-nav ul li.subnav:last-of-type .subnav-content {
  right: 0;
  left: auto;
  justify-content: right;
  overflow: hidden;
}

.header .main-nav ul li.subnav~.subnav-bg {
  position: absolute;
  width: 100vw;
  height: 0;
  transition: height 200ms ease-in-out;
  background-color: rgba(0, 0, 0, 0.3);
  top: 100%;
  left: 0;
}

.header .main-nav ul li.subnav:hover~.subnav-bg,
.header .main-nav ul li.subnav.opened~.subnav-bg {
  height: 3em;
  translate: 0 -0.5em;
}

ul li.subnav .subnav-content a:hover {
  color: var(--clr-primary);
}

.header .main-nav ul li.subnav .subnav-content a:hover:after {
  width: 100% !important;
}


@media screen and (orientation: portrait) {
  .header .upper_header .icons {
    display: none;
  }

  .header .upper_header {
    padding-top: 0;
  }

  .mobile-nav {
    z-index: -1;
  }

  .header .upper_header .title {
    z-index: -10;
  }
}

.desktop-menu-icon {
  position: fixed;
  top: calc(10vh - 1em);
  left: 5em;
  height: 4em;
  width: 4em;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 21;
}

.menu-icon {
  position: absolute;
  left: 3vh;
  top: 0;
  scale: 1.5;
  height: 2em;
  width: 2em;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 35;
}

.mobile-nav {
  position: absolute;
  top: 0;
  padding-top: 0;
  left: 0;
  color: white;
  /* transform: translateY(100%) translateY(-1px); */
  max-height: 0;
  overflow-y: auto;
  transition: all 0.3s ease-in-out;
  background-color: rgba(0, 0, 0, .8);
  width: 100%;
}

.mobile-nav ul {
  padding-bottom: 2vh;
}

.mobile-nav.opened-nav {
  max-height: 100vh;
  padding-top: calc(10vw + 2em);
}

.mobile-nav li {
  padding: 1em 0;
  margin: 0 10vw;
  font-size: 1.8vh;
  border-bottom: 1px solid white;
  text-transform: uppercase;
  list-style: none;
}

.mobile-nav li .subnav-content {
  padding: 0.5em 2em 0 2em;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2em;
}

.mobile-nav li.current .subnav-content {
  display: flex;
}

.mobile-nav li:first-of-type {
  border-top: 1px solid white;
}

.mobile-nav li>div:first-child,
.mobile-nav li>a:first-child {
  padding-left: 1em;
}