/**
 * @file
 * The header components.
 *
 * It includes styles for the header itself and their
 * component as the logotype or the main menu.
 */

/**
 * Global header rules
 */

ul.menu a.is-active {
  color: var(--color-neutral--2);
}

/**
 * Header Brand
 */

.header__brand {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

/**
 * Menu
 */

.header__menu {
  position: fixed;
  right: 100%;
  left: 0;
  top: 0;
  bottom: 0;
  transition: 0.3s ease;
  z-index: 10;
  overflow-y: scroll;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.main-navigation.js-active .header__menu {
  right: 0;
  background: var(--color-white);
}
.header__menu ul.menu {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.header__menu .menu--level-0 {
  padding: 1.5rem 1.5rem 0;
}
.header__menu .menu__link {
  color: var(--color-primary);
  width: 100%;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  font-size: 1rem;
  position: relative;
  cursor: pointer;
  margin-bottom: 0.625rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
  text-transform: uppercase;
  transition: all .50s cubic-bezier(.475,.425,0,.995);
}

.header__menu .menu__link:hover {
  text-decoration: none;
}
.menu__main .menu__link::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url('../../images/header/arrow.svg');
}

.cta.cta--menu {
  color: var(--color-white);
  text-align: center;
  letter-spacing: var(--letter-spacing-m);
  line-height: 30px;
  justify-content: center;
  align-items: center;
  transition: all .50s cubic-bezier(.475,.425,0,.995);
  font-weight: 300;
}
.cta.cta--menu:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
}
.cta.cta--menu::after {
  content: none;
}
@media all and (min-width: 1000px) {
  .main-navigation {
    position: sticky;
    top: 4.5rem;
    z-index: 99;
  }
  .header__menu,
  .menu__main,
  .region-header-menu,
  .menu--main{
    height: 100%;
    width: 100%;
  }
  .header__menu ul.menu {
    flex-direction: row;
  }
  .header__menu .menu--level-0,
  .header__menu .menu__item {
    height: 100%;
  }
  .header__menu {
    flex-direction: row;
    justify-content: space-between;
    position: relative;
    right: inherit;
    left: inherit;
    bottom: inherit;
    transition: none;
    overflow-y: inherit;
    justify-content: space-between;
    margin: auto;
    max-width: 90vw;
    height: 117px;
    top: -61px;
    background: var(--color-white);
    padding: 0;
    padding-left: 30px;
    box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.12);
    border-bottom: var(--color-primary) 5px solid;
  }
  .main-navigation.js-active .header__menu {
    transform: none;
  }
  .header__menu .menu--level-0 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    gap: 1rem;
  }
  .header__menu .menu__item {
    display: flex;
    position: relative;
  }
  .header__menu .menu__link {
    font-size: 0.9rem;
    margin-bottom: 0;
  }
  /* .menu__main .menu__link:after {
    content: none;
  } */
  .header__menu .menu__link:not(.cta)::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
    width: 7px;
    height: 7px;
    background-color: var(--color-secondary);
    background-image: none;
    border-radius: 100%;
    z-index: -1;
    opacity: 0;
    transition: all .50s cubic-bezier(.475,.425,0,.995);
  }
  .header__menu .menu__link:hover::after {
    opacity: 1;
    transform: translate(-50%, 18px);
  }


  .header__menu .menu__item--alt {
    max-width: 250px;
  }

  .header__menu .menu__item--alt .cta.cta--menu{
    font-size: var(--content-size-l);
  }

}
@media all and (min-width: 1200px) {
  .header__menu {
    max-width: 1096px;
    gap: 0;
  }
  .header__menu .menu__link {
    font-size: 1rem;
  }
  .header__menu ul.menu{
    gap: 68px;
    justify-content: end;
  }
}


/**
 * Custom Element
 */

.menu__link.menu__link-cta {
  display: inline-block;
  padding: 0.5rem 1rem;
  width: fit-content;
  border: 1px solid var(--color-neutral--2);
  color: var(--color-neutral--2);
  font-weight: 700;
  border-radius: 40px;
  transition: background-color 0.2s;
  margin-top: 0.5rem;
}
.menu__link.menu__link-cta:hover {
  background-color: var(--color-primary--4);
}
.menu__link.menu__link-cta::after {
  content: none;
}
.header__menu .menu--level-0 > .menu__item > .menu__link.menu__link-cta {
  cursor: pointer;
}
@media all and (min-width: 1000px) {
  .menu__link.menu__link-cta {
    height: fit-content;
    margin: auto 0 auto 1rem;
  }
}

/**
 * Mobile menu button
 */
.menu-toggle{
  position: fixed;
  z-index: 99;
  right: 1rem;
  top: 32px;
  width: 22px;
  height: 16px;
  background-color: var(--color-primary);
  border-radius: 100px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-toggle__button{
  border: none;
  width: 22px;
  height: 16px;
  padding: 0;
  text-indent: 100px;
  background-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  z-index:1;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.menu-toggle span {
  position: absolute;
  left: 1px;
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--color-white);
  transition: all ease .25s;
  -webkit-transition: all ease .25s;
  -moz-transition: all ease .25s;
  -ms-transition: all ease .25s;
  -o-transition: all ease .25s;
  border-radius: 0px;
  -webkit-border-radius: 0px;
  -moz-border-radius: 0px;
  -ms-border-radius: 0px;
  -o-border-radius: 0px;
}
.menu-toggle span:nth-child(1) {
  top: 1px;
}
.menu-toggle span:nth-child(2) {
  top: 7px;
  width: 20px;
}
.menu-toggle span:nth-child(3) {
  top: 13px;
}

.main-navigation.js-active .menu-toggle span:nth-child(1),
.main-navigation.js-active .menu-toggle span:nth-child(3){
  width: 20px;
}
.main-navigation.js-active .menu-toggle span:nth-child(1) {
  top: 7px;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}
.main-navigation.js-active .menu-toggle span:nth-child(2) {
  width: 0;
  left: 22px;
}
.main-navigation.js-active .menu-toggle span:nth-child(3) {
  top: 7px;
  -webkit-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
}
@media all and (min-width: 1000px) {
  .menu-toggle{
    display: none;
  }
}

