/**
 * @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: 1840px;
  background-color: var(--color-neutral--4);
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0.5rem 2rem;
  box-shadow: 0px 10px 20px -10px rgba(0,0,0,0.05);
}
ul.menu a.is-active {
  color: var(--color-primary--1);
}
@media all and (min-width: 1000px) {
  .header {
    display: grid;
    grid-template-columns: auto 1fr;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: none;
    padding: 0 40px;
    height: unset;
    gap: 0.0;
    margin: 40px auto 0 auto;
    background-color: unset;
  }
}


/**
 * Site Brand
 */

.header__brand {
  position: relative;
  display: flex;
  align-items: center;
}
.header__brand .site-logo {
  display: inline-block;
  max-width: 90px;
}
@media all and (min-width: 1000px) {
  .header__brand,
  .region-header,
  .header__brand .block-system-branding-block,
  .header__brand .site-logo {
    height: 100%;
  }
  .header__brand {
    padding-left: 32px;
    background-color: var(--color-white);
    position: relative;
    min-width: 100px;
  }
  .header__brand::after {
    content: "";
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 40px;
    height: 100%;
    background-image: url('../../images/header/Subtract.svg');
    background-position: bottom center;
    background-size: contain;
    background-repeat: no-repeat;
  }
  .header__brand .site-logo {
    display: flex;
    align-items: center;
    padding: 8px 0 ;
  }
  .header__brand .site-logo img {
    max-height: 100%;
  }
  .header__brand .site-logo {
    max-width: 165px;
  }
}
@media all and (min-width: 1200px) {
  .header__brand {
    padding-left: 70px;
  }

}
@media all and (min-width: 1500px){
  .header__brand {
    padding-left: 100px;
  }
}

/**
 * Menu
 */

.header__menu {
  position: fixed;
  right: 100%;
  left: 0;
  top: 69.73px;
  bottom: 0;
  transition: 0.3s ease;
  background: var(--color-neutral--4);
  z-index: 10;
  overflow-y: scroll;
}
.user-logged-in .header__menu {
  top: 113px;
}
.header.js-active .header__menu {
  right: 0;
}
.header__menu ul.menu {
  margin: 0;
}
.header__menu .menu--level-0 {
  padding: 1.5rem 1.5rem 0;
}
.header__menu .menu__link {
  color: var(--color-primary--1);
  width: 100%;
  padding: 0.5rem;
  font-style: normal;
  font-weight: 700;
  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;
}
.header__menu .menu__link:hover {
  text-decoration: none;
}
.menu__main .menu__item--level-0.menu__item--expanded > .menu__link::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url('../../images/header/arrow.svg');
}

/* Expended */

.menu__main .menu--level-1 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 0;
  overflow: hidden;
  padding-left: 1rem;
}
.menu__main .menu__item--expanded.js-active .menu--level-1 {
  gap: 0.3rem;
  height: max-content;
  overflow: unset;
}
.header__menu .menu--level-1 .menu__link {
  font-weight: 700;
  color: var(--color-primary--2);
}

.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-header-menu,
  .menu--main,
  .header__menu .menu--level-0,
  .header__menu .menu__item {
    height: 100%;
  }
  .menu__main {
    background-color: var(--color-white);
    border-bottom-right-radius: 40px;
    padding-left: 32px;
    padding-right: 32px;
    position: relative;
  }
  .menu__main::after {
    content: "";
    position: absolute;
    top: 0;
    right: -40px;
    width: 40px;
    height: 100%;
    background-image: url('../../images/header/Subtract.svg');
    background-position: top center;
    background-size: contain;
    background-repeat: no-repeat;
  }
  .header__menu {
    display: flex;
    justify-content: space-between;
    position: relative;
    right: inherit;
    left: inherit;
    bottom: inherit;
    transition: none;
    background: inherit;
    overflow-y: inherit;
    top: inherit;
    gap: 1rem;
    justify-content: space-between;
    width: 100%
  }
  .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__item {
    display: flex;
    position: relative;
  }
  .header__menu .menu__link {
    padding: 0 0.5rem;
    font-size: 20px;
    margin-bottom: 0;
  }
  .menu__main .menu__link:after {
    content: none;
  }
  .header__menu .menu--level-0 > .menu__item > a.menu__link {
    cursor: pointer;
  }
    .header__menu .menu--level-0 > .menu__item > span.menu__link {
    cursor: default;
  }
  .header__menu .menu--level-0 > .menu__item:hover > .menu__link {
    background-color: var(--color-primary-x-light);
  }


  /* Expended */
  .menu__main .menu--level-1 {
    display: none;
    position: absolute;
    top: 100%;
    left: -2rem;
    width: 270px;
    height: max-content;
    padding: 1rem 2rem;
    background-color: var(--color-primary-x-light);
    border-radius: 5px;
    transform: translateY(-10px);
  }
  .menu__main .menu__item--expanded:hover .menu--level-1 {
    display: flex;
  }
  .menu__main .menu--level-1 .menu__link {
    padding: 0.5rem;
  }
  .menu__main .menu--level-1 .menu__link:after {
    content: '';
    transition: 0.2s;
  }
  .menu__main .menu--level-1 .menu__link:hover:after {
    transform: translateX(5px);
  }
  .header__menu .menu--level-1 .menu__link::before {
    bottom: -0.5rem;
  }
  .header__menu .menu--level-1 .menu__item:last-child .menu__link::before {
    content: none;
  }
  .menu__main .menu__item--level-0.menu__item--expanded > .menu__link::after {
    content: none;
  }
}
@media all and (min-width: 1200px) {
  .header__menu {
    gap: 2rem;
  }
  .menu__main {
    padding-left: 60px;
    padding-right: 90px;
  }
@media all and (min-width: 1350px) {
  .header__menu .menu__link {
    padding: 0 1rem;
  }
}
}
/**
 * Menu secondary
 */
.menu-secondary__cta.cta {
  color: var(--color-white);
  text-transform: uppercase;
  padding: 14px 29px;
  width: fit-content;
}
.menu-secondary__cta.cta:hover {
  color: var(--color-primary--1);
}
@media all and (min-width: 1000px){
  .menu__secondary {
    background-color: var(--color-white);
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom-left-radius: 40px;
    position: relative;
    padding: 0 16px;
  }
  .menu__secondary::before {
    content: "";
    position: absolute;
    bottom: -40px;
    right: 0;
    width: 40px;
    height: 100%;
    background-image: url('../../images/header/Subtract.svg');
    background-position: bottom center;
    background-size: contain;
    background-repeat: no-repeat;
    transform: scaleX(-1);
  }
  .menu__secondary::after {
    content: "";
    position: absolute;
    left: -40px;
    top: 0;
    width: 40px;
    height: 100%;
    background-image: url('../../images/header/Subtract.svg');
    background-position: top center;
    background-size: contain;
    background-repeat: no-repeat;
    transform: scaleX(-1);
  }
}
@media all and (min-width: 1200px){
  .menu__secondary {
    padding: 0 36px;
  }
}
/**
 * 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: absolute;
  right: 0;
  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:var(--color-primary--1);
  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;
  }
}

