/* Header styles */

#header-side-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 1rem;
  position: fixed;
  width: 100vw;
  height: 100vh;
  inset: 0;
  transform: translateX(-100%);
  overflow-y: auto;
  background-color: var(--primary-background);
  z-index: 50;
  transition:
    transform 0.4s ease-in-out,
    background-color 0.3s ease-in-out;
}

body.dark-mode #header-side-nav {
  background-color: var(--primary-background-dark);
}

body.nav-drawer-open #header-side-nav {
  transform: translateX(0);
}

body.nav-drawer-open, body.nav-drawer-open main {
  overflow-y: hidden;
}

.header-side-nav-list {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.2rem;
  list-style-type: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-grow: 1;
  padding: 2rem 1rem;
}

.header-side-nav-list > li {
  text-align: center;
}

.header-side-nav-list > li > a {
  color: var(--black);
  text-decoration: none;
  padding: 0 0.5rem;
}

.header-side-nav-list > a {
  margin-top: 0.25rem;
}

body.dark-mode .header-side-nav-list > li > a {
  color: var(--primary-brand-1);
}

.header-btn-short-text {
  display: flex;
}

.header-btn-long-text {
  display: none;
}

header {
  width: 100vw;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  left: 0;
  right: 0;
  height: 4rem;
  margin: 0rem;
  padding: 0.5rem 1rem;
  overflow: hidden;
  border-radius: 0rem;
  background-color: transparent;
  z-index: 100;
  transition: all 0.3s ease-in-out;
}

header.header-scroll {
  background-color: var(--primary-background-header);
  backdrop-filter: blur(0.5rem);
}

body.dark-mode header.header-scroll {
  background-color: var(--primary-background-header-dark);
}

.header-left,
.header-right {
  width: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  z-index: 10;
}

.header-left {
  justify-content: start;
}

.header-right {
  display: flex;
  flex-direction: row;
  justify-content: end;
}

.header-home-link {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--black);
  text-decoration: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  gap: 0.9rem;
  position: relative;
  transition: all 0.3s ease-in-out;
}

body.dark-mode .header-home-link {
  color: var(--white);
}

.header-home-link > span {
  display: none;
}

.header-logo {
  width: auto;
  height: 2.25rem;
  position: relative;
  z-index: 0;
  border-radius: 0.25rem;
}

.header-logo-top {
  position: absolute;
  z-index: 10;
  opacity: 1;
  transition: all 0.3s ease-in-out;
}

.header-scroll .header-logo-top {
  opacity: 0;
}

#header-nav {
  display: none;
  flex-direction: row;
  z-index: 20;
}

.header-nav-list {
  font-family: var(--font-heading);
  list-style-type: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  /* padding: 2rem 1rem; */
  padding: 2rem 0rem;
}

.header-nav-list > li {
  padding: 0 0.25rem;
}

.header-nav-list > li > a {
  color: var(--black);
  /* opacity: 0.8; */
  text-decoration: none;
  text-wrap: nowrap;
  padding: 0 0.5rem;
  transition: all 0.3s ease-in-out;
}

body.dark-mode .header-nav-list > li > a {
  color: var(--off-white);
}

.toggle-dark-btn {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  margin: 0rem 0.35rem;
  cursor: pointer;
  overflow: hidden;
}

.toggle-dark-btn > .sun {
  position: absolute;
  width: 1.75rem;
  height: 1.75rem;
  stroke: var(--primary-brand-1);
  fill: var(--primary-brand-1);
  cursor: pointer;
  transform: translateY(2.5rem);
}

.toggle-dark-btn > .moon {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--primary-brand-2);
  cursor: pointer;
  transform: translateY(0rem);
}

body.dark-mode .toggle-dark-btn > .sun {
  transform: translateY(0rem);
}

body.dark-mode .toggle-dark-btn > .moon {
  transform: translateY(-2.5rem);
}

#header-menu-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  margin: 0 -1rem;
}

.hamburger {
  transform: scale(0.8);
  -webkit-tap-highlight-color: transparent;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.hamburger > .line {
  fill:none;
  transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
  stroke: var(--black);
  stroke-width: 5.5;
  stroke-linecap:round;
}

body.dark-mode .hamburger > .line {
  stroke: var(--white);
}

.hamburger > .top {
  stroke-dasharray: 40 121;
}

.hamburger > .bottom {
  stroke-dasharray: 40 121;
}

body.nav-drawer-open .hamburger {
  transform: rotate(45deg);
}

body.nav-drawer-open .hamburger > .top {
  stroke-dashoffset: -68px;
}

body.nav-drawer-open .hamburger > .bottom {
  stroke-dashoffset: -68px;
}

/* 400px */
@media (min-width: 25rem) {
  .header-side-nav-list {
    font-size: 1.4rem;
  }
}

/* 640px */
@media (min-width: 40rem) {
  .header-side-nav-list {
    font-size: 1.5rem;
  }

  .header-home-link > span {
    display: flex;
  }

  .header-btn-short-text {
    display: none;
  }

  .header-btn-long-text {
    display: flex;
  }
}

/* 768px */
@media (min-width: 48rem) {
  #header-side-nav {
    transform: translate(-100%);
  }

  body.nav-drawer-open #header-side-nav {
    transform: translateX(-100%);
  }

  header {
    padding: 1rem 2rem;
  }

  /* .header-scroll {
    margin: 0 1rem;
    padding: 0.5rem 1rem;
  } */

  #header-nav {
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: end;
  }

  #header-menu-btn {
    display: none;
  }
}

/* 1024px */
@media (min-width: 64rem) {
  .header-left,
  .header-right {
    flex: 1 1 0;
  }

  .header-logo {
    height: 2.5rem;
  }

  #header-nav {
    flex-grow: 0;
    justify-content: center;
  }

  .header-nav-list {
    font-size: 1.1rem;
  }

  .header-cta-btn {
    display: flex;
  }
}

/* 1280px */
@media (min-width: 80rem) {
  header {
    /* margin: 0rem 2rem;
    padding: 1rem 2rem; */
    padding: 1rem 4rem;
    height: 5rem;
  }

  /* .header-scroll {
    margin: 0.5rem 4rem;
    padding: 1rem;
  } */
}

/* 1536px */
@media (min-width: 96rem) {
  header {
    /* width: 80rem;
    margin: 0 auto;
    padding: 2rem 2rem; */
    padding: 2rem 8rem;
  }

  /* .header-scroll {
    margin: 0rem auto;
    padding: 1rem 1rem;
  } */
}

/* 1920px */
@media (min-width: 120rem) {
  header {
    width: 100rem;
    height: 5rem;
    margin: 0rem auto;
    padding: 2rem;
  }

  /* .header-scroll {
    margin: 1rem auto;
    padding: 2rem 1.5rem;
  } */

  .header-left,
  .header-right {
    gap: 1.5rem;
  }

  .header-logo {
    width: auto;
    height: 2.75rem;
  }

  .header-nav-list {
    font-size: 1.75rem;
  }
}
