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

/**
 * Global header rules
 */

.header {
  max-width: 1476px;
  position: sticky;
  top: 48px;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 1rem 1rem;
  margin-top: 15px;
  margin-bottom: 15px;
  box-shadow: 0px 10px 20px -10px rgba(0,0,0,0.05);
}

.menu__link {
  text-decoration: none;
}

.header-wrapper {
  z-index: 10;
}

.path-user .main__header-wrapper {
  display: none;
}

ul.menu a.is-active {
  color: var(--color-neutral--1);
}
@media all and (min-width: 1000px) {
  .header {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    position: relative;
    top: inherit;
    left: inherit;
    right: inherit;
    box-shadow: none;
    padding: 0;
    margin-top: 30px;
    margin-bottom: 10px;
    margin-left: 1rem;
    margin-right: 1rem;
  }
}
@media all and (min-width: 1200px) {
  .header {
    gap: 9.37rem;
  }
}
@media all and (min-width: 1500px) {
  .header {
    margin: 0 auto;
    margin-top: 30px;
    margin-bottom: 10px;
  }
}

/**
 * Site Brand
 */

.header__brand {
  position: relative;
  display: flex;
  align-items: center;
}

.header__brand .site-logo > *{
  max-width: 342px;
  max-height: 81px;
}
@media all and (min-width: 1000px) {
  .header__brand,
  .region-header,
  .header__brand .block-system-branding-block,
  .header__brand .site-logo {
    height: 100%;
  }
  .header__brand .site-logo {
    padding: 0.5rem 0;
    align-items: center;
  }
  .header__brand .site-logo img {
    max-height: 100%;
  }
}
@media all and (min-width: 1200px) {
  .header__brand .site-logo {
    max-width: 143px;
  }
}

@media all and (max-width: 1000px) {
  .header__brand .site-logo img{
    max-width: 212px;
    max-height: 50px;
  }
}

@media all and (min-width: 1200px) {
  .header__brand .site-logo {
    max-width: 143px;
  }
}

/**
 * Menu
 */

.header__menu {
  position: fixed;
  right: 100%;
  left: 0;
  top: 115px;
  bottom: 0;
  transition: 0.3s ease;
  background: var(--color-brand--2);
  z-index: 10;
  overflow-y: scroll;
}

.user-logged-in .header__menu {
  top: 154px;
}
.header.js-active .header__menu {
  right: 0;
}
.header__menu ul.menu {
  margin: 0;
}
.header__menu .menu--level-0 .menu__link{
  padding: 2.5rem 1.875rem 0;
}

.header__menu .menu__link {
  /* color: #fff; */
  width: 100%;
  padding: 0.5rem;
  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;
  font-weight: 700;
}



/* Text decoration into the menu */

.header__menu  .menu__link:hover {
  text-decoration: none;
}


/* Expended */
.menu__main .menu--level-1 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 0;
  overflow: hidden;
  color: #fff;
}
.menu__main .menu__item--expanded.js-active .menu--level-1 {
  gap: 0.3rem;
  height: max-content;
  overflow: unset;
  background-color: var(--color-brand--1);
  padding: 1.25rem 0;
}
.header__menu .menu--level-1 .menu__link {
  font-weight: 700;
  color: var(--color-neutral--6);
  text-transform: unset;
  font-size: 18px;
  font-weight: 400;
  padding: 0.5rem 1.875rem 0;
}
.header__menu .menu--level-1 .menu__link::after {
  display: none;
}

.menu__main .menu__item--expanded.js-active > .menu__link::after{
  transform: rotate(90deg);
}
@media all and (min-width: 975px) {
  .user-logged-in .header__menu {
    top: 168px;
  }
}
@media all and (min-width: 1000px) {
  .header__menu,
  .menu__main,
  .region-primary-menu,
  .menu--main,
  .header__menu .menu--level-0,
  .header__menu .menu__item {
    height: 100%;
  }
  .menu--main.contextual-region {
    position: static;
  }
  .header__menu {
    display: flex;
    position: static;
    justify-content: space-between;
    right: inherit;
    left: inherit;
    bottom: inherit;
    transition: none;
    background: inherit;
    overflow-y: inherit;
    top: inherit;
    gap: 1rem;
    justify-content: space-between;
    width: calc(100% - 158px);
  }
  .user-logged-in .header__menu {
    top: inherit;
  }
  .header.js-active .header__menu {
    transform: none;
  }
  .header__menu .menu--level-0 {
    display: flex;
    align-items: center;
    padding: 0;
  }
  .header__menu .menu--level-0 .menu__link{
    padding: 2.5rem 1.875rem;
  }
  .header__menu .menu__item {
    display: flex;
    position: relative;
    flex-direction: column;
    justify-content: center;
  }
  .header__menu .menu--level-0 .submenu-lvl-2 + .menu--level-1 .menu__item--level-1:hover .menu__link {
    color: unset;
  }
  .header__menu .menu__item--level-1:hover .menu__link,
  .header__menu .menu--level-0 .submenu-wrapper + .menu--level-1 .menu__item--level-2:hover .menu__link {
    color: #eaf0ffc4;
  }
  .header__menu .menu__item:nth-child(2) {
    position: unset;
  }
  .header__menu .menu__link {
    /* color: white; */
    padding: 0 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0;
  }
  .menu__main .menu__link:after {
    content: none;
  }
  .header__menu .menu--level-0 > .menu__item > .menu__link {
    cursor: default;
    font-size: var(--content-size);
    text-transform: uppercase;
  }

  /* Expended */
  .menu__main .menu--level-1 {
    display: none;
    position: absolute;
    top: 80%;
    left: -2rem;
    width: 370px;
    height: max-content;
    padding: 2rem 3.75rem 3rem 3.75rem;
    background-color: var(--color-brand--1);
    overflow: unset;
  }
  .menu__main .menu__item--expanded:hover .menu--level-1 {
    display: flex;
  }
  .menu__main .menu--level-1 .menu__link {
    padding: 0rem;
    margin-top: 8px;
  }
  .menu__main .menu--level-1 .menu__link:after {
    content: '';
    transition: 0.2s;
  }
  .menu__main .menu--level-1 .menu__link:hover:after {
    transform: translateX(5px);
  }
  .menu__main .menu__item--expanded.js-active .menu--level-1 {
    background-color: var(--color-brand--1);
  }
}
@media all and (min-width: 1200px) {
  .header__menu {
    gap: 2rem;
    width: calc(100% - 40px);
  }
  .header__menu .menu__link {
    font-size: 1rem;
  }
}
@media all and (min-width: 1350px) {
  .header__menu .menu__link {
    padding: 0 1rem;
  }
}


/**
 * Submenu
 */
 .header__menu .menu--level-1 .submenu-wrapper {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  border-bottom: 1px solid #fff;
  width: 80%;
  margin: 0 2rem;
  margin-bottom: 1rem;
  padding: 1.25rem 0 1rem 0;
}
.header__menu .menu--level-0 .submenu-lvl-2 + .menu--level-1,
.header__menu .menu--level-0 .submenu-wrapper + .menu--level-1 {
  padding: unset;
}

.header__menu .menu--level-0 .submenu-wrapper + .menu--level-1 {
  padding: unset;
  position: static;
  width: initial;
}

@media all and (min-width: 1000px) {
  .header__menu .menu--level-1 .submenu-wrapper {
    padding: 1rem 0;
    border-bottom: 1px solid #fff;
    margin: unset;
    width: 100%;
    font-size: 20px;
  }
  .header__menu .menu--level-0 .submenu-lvl-2 + .menu--level-1 {
    flex-direction: row;
    left: 0;
    right: 0;
    width: 100%;
    padding: 2rem 4rem;
    gap:2rem;
  }
  .header__menu .menu--level-0 .submenu-lvl-2 + .menu--level-1 .menu__item--level-1 {
    width: 25%;
  }
}


/**
 * Custom Element Header
 */

.menu__link.menu__link-cta {
  display: inline-block;
  padding: 0.5rem 1rem;
  width: fit-content;
  border: 1px solid var(--color-neutral--1);
  color: var(--color-neutral--1);
  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-neutral--2);
}
.menu__link.menu__link-cta::after {
  content: none;
}
.header__menu .menu--level-0 > .menu__item > .menu__link.menu__link-cta {
  cursor: pointer;
}
.header__menu .link-home{
  display: none;
}
@media all and (min-width: 1000px) {
  .menu__link.menu__link-cta {
    height: fit-content;
    margin: auto 0 auto 1rem;
  }
  .header__menu .link-home {
    display: flex;
    background-image: url('../../images/header/logo-header.svg');
    background-repeat: no-repeat;
    text-indent: -9999px;
    width: 199px;
    height: 86px;
  }
  .header__menu .menu--level-0 > .menu__item > .link-home {
    cursor: pointer;
    margin: 1rem 2rem;
  }


}

/**
 * Mobile menu button
 */

.menu-toggle{
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 22px;
  height: 16px;
  transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
}
.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:0;
  top:0;
}
.menu-toggle span {
  position: absolute;
  left: 1px;
  display: block;
  width: 20px;
  height: 2px;
  /* background-color:#000; */
  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;
}
.menu-toggle span:nth-child(3) {
  top: 13px;
}
.menu-toggle:hover span:nth-child(1),
.header.js-active .menu-toggle span:nth-child(1),
.menu-toggle:hover span:nth-child(3),
.header.js-active .menu-toggle span:nth-child(3){
  width: 20px;
}
.header.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);
}
.header.js-active .menu-toggle span:nth-child(2) {
  width: 0;
  left: 22px;
}
.header.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;
  }
}

.menu__item--level-0 {
  color: white;
}
.path-frontpage .menu__item--level-0 {
  color: white;
}
@media all and (min-width: 1000px) {
  .menu__item--level-0 {
    color: black;
  }
}

.menu--level-0 .menu__item span::after  {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 10px;
  background-image: url('../images/header/nav_arrow--white.svg');
  background-size: cover;
  fill: black;
}

.path-frontpage .menu--level-0 .menu__item span::after  {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 10px;
  background-image: url('../images/header/nav_arrow--white.svg');
  background-size: cover;
  fill: white;
}

.header-wrapper {
  background-color: white;
}
.menu-toggle__bar {
  background-color: var(--color-neutral--1);
}
.path-frontpage .header-wrapper {
  background-color: var(--primary-light);
}
.path-frontpage .menu-toggle__bar {
  background-color: white;
}

@media all and (min-width: 1000px) {
  .menu--level-0 .menu__item span::after  {
    background-image: url('../images/header/nav_arrow--black.svg');
  }
}


/**
 * Special code for homepage header.
 */

.dark__logo {
  display: block;
}
.white__logo {
  display: none;
}
.path-frontpage .dark__logo {
  display: none;
}
.path-frontpage .white__logo {
  display: block;
}
.white__logo {
  display: none;
}
