/* header and nav layout */
header .nav-wrapper {
  background-color: var(--background-color);
  width: 100%;
  z-index: 2;
  position: fixed;
}

header nav {
  box-sizing: border-box;
  display: grid;
  grid-template:
    'hamburger brand tools' var(--nav-height)
    'sections sections sections' 1fr / auto 1fr auto;
  align-items: center;
  gap: 0 2em;
  margin: auto;
  max-width: 1264px;
  height: var(--nav-height);
  padding: 0 1rem;
  font-family: var(--body-font-family);
}

header nav[aria-expanded='true'] {
  grid-template:
    'hamburger brand' var(--nav-height)
    'sections sections' 1fr
    'tools tools' var(--nav-height) / auto 1fr;
  overflow-y: auto;
}

header {
  height: 174px;
}

header .header .nav-wrapper nav {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--text-white);
}

header .header .nav-wrapper nav .nav-hamburger {
  display: none;
  position: absolute;
  transform: translateY(295%);
  right: 5%;
}

.fr header .header .nav-wrapper nav .nav-hamburger {
  transform: translateY(308%);
}
/*post din hamburger*/
.home .header .nav-wrapper nav .nav-hamburger,
.safety-information .header .nav-wrapper nav .nav-hamburger {
  display: flex;
}

header .header .nav-wrapper nav .nav-sections {
  display: none;
  width: 100%;
  flex-basis: auto;
  background-color: var(--header-bg-color);
}

header .header .nav-wrapper nav[aria-expanded='true'] .nav-sections {
  display: block;
  top: 105px;
  align-self: end;
  position: absolute;
  width: 85%;
  height: 100%;
  min-height: 100vh;
  flex: 0;
  z-index: 99999;
}

header .header .nav-wrapper nav .nav-sections p {
  display: flex;
  width: 100%;
  padding: 20px;
  align-items: center;
  border-bottom: 1px solid #f9f9fb;
  font-family: var(--font-noto-sans);
}

header .header .nav-wrapper nav .nav-sections p a {
  font-family: var(--font-noto-sans);
  font-size: var(--font-18);
  line-height: var(--line-height-24);
  font-weight: var(--font-weight-700);
  color: var(--footer-text-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

header .header .nav-wrapper nav .nav-sections p a .icon {
  display: none;
}

header .header .nav-wrapper nav .nav-sections p a .icon svg {
  width: 8px;
  height: 11px;
  margin: 0;
}

header .header .nav-wrapper nav .nav-brand {
  background-color: var(--text-white);
  order: 2;
  width: 90%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex-basis: auto;
  margin: 0 20px;
  border-bottom: 1px solid var(--learn-b-color); 
  align-items: center;
}

header .header .nav-wrapper nav .nav-brand-velsipity-mob {
  display: flex;
  background-color: var(--text-white);
  order: 3;
  width: 90%;
  margin: 0 20px;
  justify-content: center;
}

header .header .nav-wrapper nav .nav-tools {
  width: 100%;
  background-color: var(--header-bg-color);
  display: flex;
  justify-content: center;
  order: 1;
}

header .header .nav-wrapper nav .nav-tools p  {
  color: var(--header-blue-text);
  padding: 8px 0; 
  font-family: var(--font-noto-sans);
  font-size: var(--font-15);
  line-height: var(--line-height-24);
}

header .header .nav-wrapper nav .nav-brand ul {
  list-style-type: none;
  display: flex;
  flex-direction: row;
  align-items: center;
}

header .header .nav-wrapper nav .nav-brand > ul li a:hover,
header .header .nav-wrapper nav div p a:hover,
header .header .nav-wrapper nav div a {
  text-decoration: none;
}

header .header .nav-wrapper nav .nav-brand  ul  li {
  font-family: var(--font-noto-sans);
  color: var(--callout-bg-color);
  font-weight: var(--font-weight-400);
}

header .header .nav-wrapper nav .nav-brand > ul > li:first-of-type ul {
  display: none;
}

header .header .nav-wrapper nav .nav-brand > ul  li:last-of-type {
  margin-right: 2px;
}
/*post din hamburger*/
.home header .header .nav-wrapper nav .nav-brand > ul  li:last-of-type,
.safety-information header .header .nav-wrapper nav .nav-brand > ul  li:last-of-type {
  margin-right: 52px;
}

header .header .nav-wrapper nav .nav-brand-velsipity-mob p {
  margin: 12px 0;
}

header .header .nav-wrapper nav .nav-brand p:first-of-type {
  margin: 8px 0;
}

header .header .nav-wrapper nav .nav-brand p span,
header .header .nav-wrapper nav .nav-brand p span a,
header .header .nav-wrapper nav .nav-brand-velsipity-mob p a,
header .header .nav-wrapper nav .nav-brand-velsipity-mob p a span {
  display: block;
  width: 100%;
  height: 100%;
}

header .header .nav-wrapper nav .nav-brand p:first-of-type span svg {
  width: 106px;
  height: 47px;
  margin: 0;
}

header .header .nav-wrapper nav .nav-brand-velsipity-mob p span svg {
  width: 102px;
  height: 36px;
  margin: 0;
}

header .header .nav-wrapper nav .nav-brand p:nth-child(2),
header .header .nav-wrapper nav[aria-expanded='true'] .nav-hamburger-icon::before, 
header .header .nav-wrapper nav[aria-expanded='true'] .nav-hamburger-icon::after {
  display: none;
}

header .header .nav-wrapper nav .nav-sections p:last-of-type {
  display: none;
}

.home header .header .nav-wrapper nav .nav-sections p:last-of-type,
.safety-information .header .nav-wrapper nav .nav-sections p:last-of-type {
  display: flex;
}

@media (min-width: 600px) {
  header nav {
    padding: 0 2rem;
  }
}

@media (min-width: 900px) {
  header nav {
    display: flex;
    justify-content: space-between;
  }

  header nav[aria-expanded='true'] {
    min-height: 0;
    overflow: visible;
  }

  header {
    height: 121px;
  }

  header .header .nav-wrapper nav .nav-sections,
  header .header .nav-wrapper nav .nav-brand-velsipity-mob,
  header .header .nav-wrapper nav[aria-expanded='true'] .nav-sections {
    display: none;
  }
  /*post-din*/
  .home header .header .nav-wrapper nav .nav-sections,
  .safety-information header .header .nav-wrapper nav .nav-sections {
    display: flex;
    flex-direction: column;
    top: 0;
    align-self: center;
    position: relative;
    width: 100%;
    height: auto;
    min-height: auto;
    background-color: transparent;
  }

  .home header .header .nav-wrapper nav .nav-brand,
  .safety-information header .header .nav-wrapper nav .nav-brand {
    margin-top: -40px;
  }

  .home header .header .nav-wrapper nav .nav-sections p:first-of-type,
  .safety-information header .header .nav-wrapper nav .nav-sections p:first-of-type {
    background-color: var(--header-bg-color);
    padding: 2px;
  }

  .home header .header .nav-wrapper nav .nav-sections p:last-of-type,
  .safety-information header .header .nav-wrapper nav .nav-sections p:last-of-type {
    display: flex;
    max-width: 1440px;
    margin: 0 auto;
    justify-content: end;
    padding-right: 67px;
  }

  .home header .header .nav-wrapper nav .nav-sections p:last-of-type,
  .home header .header .nav-wrapper nav .nav-sections p a.logout-btn,
  .safety-information header .header .nav-wrapper nav .nav-sections p:last-of-type,
  .safety-information header .header .nav-wrapper nav .nav-sections p a.logout-btn {
    font-size: var(--font-14);
    line-height: var(--line-height-20);
    text-decoration: underline;
    font-weight: var(--font-weight-400);
    color: var(--footer-text-color)
  }

  .home header .header .nav-wrapper nav .nav-tools p,
  .safety-information header .header .nav-wrapper nav .nav-tools p {
    height: 26px;
  }

  .home header .header .nav-wrapper nav .nav-tools p a,
  .safety-information header .header .nav-wrapper nav .nav-tools p a {
    display: none;
  }

  .home header,
  .safety-information header {
    height: 149px;
  }

  .home header .header .nav-wrapper nav .nav-brand > ul li:last-of-type, 
  .safety-information header .header .nav-wrapper nav .nav-brand > ul li:last-of-type {
    margin-right: 0;
  }

  header .header .nav-wrapper nav {
    flex-direction: column;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  header .header .nav-wrapper nav .nav-brand {
    width: 100%;
    margin: 0;
    border-bottom: none;
    max-width: 1440px;
  }

  header .header .nav-wrapper nav .nav-sections p {
    padding: 10px 0;
    justify-content: center;
    border-bottom: none;
  }

  header .header .nav-wrapper nav .nav-sections p a:not(.logout-btn) {
    font-size: var(--font-16);
    color: var(--callout-bg-color);
  }
  
  header .header .nav-wrapper nav .nav-sections p a .icon {
    display: block;
  }

  header .header .nav-wrapper nav .nav-brand p {
    padding: 8px 0;
  }

  header .header .nav-wrapper nav .nav-brand p:first-of-type {
    padding-left: 79px;
    margin: 0;
  }

  header .header .nav-wrapper nav .nav-brand p:first-of-type span svg {
    width: 166px;
    height: auto;
  }

  header .header .nav-wrapper nav .nav-brand p:nth-child(2) {
    display: flex;
  }

  header .header .nav-wrapper nav .nav-brand p:nth-child(2) span svg {
    width: 207px;
    height: auto;
    margin: 0;
  }

  header .header .nav-wrapper nav .nav-brand > ul {
    margin: 40px 67px 20px 0;
    gap: 20px;
    padding-left: 0;
  }

  header .header .nav-wrapper nav .nav-brand > ul > li:first-of-type ul {
    display: flex;
    gap: 4px;
    align-items: baseline;
    padding-left: 0;
  }

  header .header .nav-wrapper nav .nav-brand > ul > li:first-of-type ul li {
    cursor: pointer;
  }
  
  header .header .nav-wrapper nav .nav-brand > ul > li:first-of-type ul li:first-of-type {
    font-size: var(--font-20);
    line-height: var(--line-height-35);
  }

  header .header .nav-wrapper nav .nav-brand > ul > li:first-of-type ul li:nth-child(2) {
    font-size: var(--font-16);
    line-height: var(--line-height-27);
  }

  header .header .nav-wrapper nav .nav-brand > ul > li:first-of-type ul li:last-of-type {
    font-size: var(--font-14);
    line-height: var(--line-height-22);
  }

  header .header .nav-wrapper nav .nav-brand > ul  li:last-of-type {
    margin: 0;
  }

  header .header .nav-wrapper nav .nav-brand > ul > li:last-of-type a {
    font-size: var(--font-16);
    line-height: var(--line-height-30);
  }

  header .header .nav-wrapper nav .nav-tools {
    order: 3;
    justify-content: flex-end;
  }

  header .header .nav-wrapper nav .nav-tools p  {
    font-size: var(--font-14);
    padding: 1px 65px 1px 0;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    text-align: end;
  }
}

header nav p {
  margin: 0;
  line-height: 1;
}

header nav a:any-link {
  color: currentcolor;
}

/* hamburger */
header nav .nav-hamburger {
  grid-area: hamburger;
  height: 22px;
  display: flex;
  align-items: center;
}

header nav .nav-hamburger button {
  height: 22px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background-color: var(--background-color);
  color: inherit;
  overflow: initial;
  text-overflow: initial;
  white-space: initial;
}

header nav .nav-hamburger-icon,
header nav .nav-hamburger-icon::before,
header nav .nav-hamburger-icon::after {
  box-sizing: border-box;
  display: block;
  position: relative;
  width: 27px;
}

header nav .nav-hamburger-icon::before,
header nav .nav-hamburger-icon::after {
  content: '';
  position: absolute;
  background: currentcolor;
}

header nav[aria-expanded='false'] .nav-hamburger-icon,
header nav[aria-expanded='false'] .nav-hamburger-icon::before,
header nav[aria-expanded='false'] .nav-hamburger-icon::after {
  height: 0;
  border-radius: 2px;
  background: currentcolor;
}

header nav[aria-expanded='false'] .nav-hamburger-icon::before {
  top: -6px;
}

header nav[aria-expanded='false'] .nav-hamburger-icon::after {
  top: 6px;
}

header nav[aria-expanded='true'] .nav-hamburger-icon {
  height: 22px;
}

header nav[aria-expanded='true'] .nav-hamburger-icon::before,
header nav[aria-expanded='true'] .nav-hamburger-icon::after {
  top: 3px;
  left: 1px;
  transform: rotate(45deg);
  transform-origin: 2px 1px;
  width: 24px;
  height: 2px;
  border-radius: 2px;
}

header nav[aria-expanded='true'] .nav-hamburger-icon::after {
  top: unset;
  bottom: 3px;
  transform: rotate(-45deg);
}

@media (min-width: 900px) {
  header nav .nav-hamburger {
    display: none;
    visibility: hidden;
  }
}

/* brand */
header .nav-brand {
  grid-area: brand;
  flex-basis: 128px;
  font-size: var(--heading-font-size-s);
  font-weight: 700;
  line-height: 1;
}

header nav .nav-brand img {
  width: 128px;
  height: auto;
}

/* sections */
header nav .nav-sections {
  grid-area: sections;
  flex: 1 1 auto;
  display: none;
  visibility: hidden;
  background-color: var(--overlay-color);
}

header nav[aria-expanded='true'] .nav-sections {
  display: block;
  visibility: visible;
  align-self: start;
}

header nav .nav-sections ul {
  list-style: none;
  padding-left: 0;
  font-size: var(--body-font-size-s);
  font-weight: 500;
}

header nav .nav-sections ul > li {
  font-weight: 700;
}

header nav .nav-sections ul > li > ul {
  margin-top: 0;
}

header nav .nav-sections ul > li > ul > li {
  font-weight: 500;
}

header .nav-wrapper nav .nav-hamburger button {
  background: url(../../../icons/menu_icon.svg);
  height: 21px;
  cursor: pointer;
}

@media (min-width: 900px) {
  header nav .nav-sections {
    display: block;
    visibility: visible;
    white-space: nowrap;
  }

  header nav[aria-expanded='true'] .nav-sections {
    align-self: unset;
  }

  header nav .nav-sections .nav-drop {
    position: relative;
    padding-right: 16px;
    cursor: pointer;
  }

  header nav .nav-sections .nav-drop::after {
    content: '';
    display: none;
    position: absolute;
    top: 0.5em;
    right: 2px;
    transform: rotate(135deg);
    width: 6px;
    height: 6px;
    border: 2px solid currentcolor;
    border-radius: 0 1px 0 0;
    border-width: 2px 2px 0 0;
  }

  header nav .nav-sections .nav-drop[aria-expanded='true']::after {
    top: unset;
    bottom: 0.5em;
    transform: rotate(315deg);
  }

  header nav .nav-sections ul {
    display: flex;
    gap: 2em;
    margin: 0;
    font-size: var(--body-font-size-xs);
  }

  header nav .nav-sections > ul > li {
    flex: 0 1 auto;
    position: relative;
    font-weight: 500;
  }

  header nav .nav-sections > ul > li > ul {
    display: none;
    position: relative;
  }

  header nav .nav-sections > ul > li[aria-expanded='true'] > ul {
    display: block;
    position: absolute;
    left: -1em;
    width: 200px;
    margin-top: 12px;
    padding: 1em;
    background-color: var(--highlight-background-color);
    white-space: initial;
  }

  header nav .nav-sections > ul > li > ul::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--highlight-background-color);
  }

  header nav .nav-sections > ul > li > ul > li {
    padding: 8px 0;
  }
}

/* tools */
header nav .nav-tools {
  grid-area: tools;
}
