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

/**
 * Global header rules
 */

.main__header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 200;
  width: 100%;
  background-color: var(--color-neutral--1);
}
.main__header-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding: .5rem 1rem;
}
.main__header.js-active .main__header-wrapper {
  padding-bottom: 2rem;
}
.site-logo {
  display: block;
}
.site-logo::before {
  content: '';
  background-image: url('../../images/logos/adc-logo-mobile.svg');
  width: 132px;
  height: 66px;
  display: block;
}
.main__header-brand {
  display: grid;
  justify-content: center;
}
@media all and (min-width: 1000px) {
  .main__header {
    position: relative;
    z-index: 500;
    background: transparent;
    margin-top: 1rem;
    height: 104px;
  }
  .main__header-wrapper {
    flex-direction: row;
    width: 100%;
    margin: 0 auto;
    max-width: 1444px;
    align-items: center;
    padding: 0 2rem;
    height: 100%;
  }
  .site-logo::before {
    background-image: url('../../images/logos/adc-logo-desktop.svg');
    width: 113px;
    height: 104px;
  }
}
@media all and (min-width: 1500px) {
  .main__header-wrapper {
    padding: 0;
  }
}


/**
 * Menu
 */

.main__header-navigation {
  padding-left: 2rem;
  background-color: var(--color-neutral--1);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - 82px);
  transform: translateX(-100%);
  transition: all 150ms ease-in-out;
  z-index: 99;
  overflow-y: scroll;
}
.main__header.js-active .main__header-navigation {
  transform: translateX(0);
}
.main__header-navigation .menu--level-0 {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.main__header-navigation {
  font-family: "source-sans-3", sans-serif;
  font-weight: 600;
  width: 100%;
  display: flex;
}

.main__header-navigation .menu__item--expanded > .menu__link {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--color-neutral--7);
}
.main__header-navigation .menu__item--expanded > .menu__link::after {
  content: '';
  background-image: url('../../images/menu/arrow-right.svg');
  display: block;
  width: 10px;
  height: 17.5px;
  position: absolute;
  left: 14rem;
  background-repeat: no-repeat;
}
.main__header-navigation .menu__item--expanded.is-active > .menu__link::after {
  background-image: url('../../images/menu/arrow-bottom.svg');
  width: 17.5px;
  height: 10px;
}
.main__header-navigation .menu--level-1 {
  display: none;
  padding: 2rem 0 0 1rem;
  gap: 1.5rem;
  margin: 0;
}
.main__header-navigation .menu--level-1 a {
  color: var(--color-neutral--5);
  font-weight: 400;
}
.main__header-navigation .menu__item--expanded.is-active .menu--level-1 {
  display: grid;
}
.main__header-wrapper .main__header-phone {
  margin-left: 1rem;
}
.main__header-wrapper .main__header-phone a {
  width: max-content;
}
@media all and (min-width: 1000px) {
  .main__header-navigation {
    all: unset;
    position: relative;
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    gap: 1.7rem;
  }
  .main__header-menu {
    margin: auto;
    height: 100%;
  }
  .region-header-menu{
    height: 100%;
  }
  .menu--main{
    height: 100%;
  }
  .main__header-navigation .menu--level-0 {
    display: flex;
    flex-direction: row;
    gap: 1.4rem;
    margin: 0;
    height: 100%;
    align-items: baseline;
    font-weight: 700;
    white-space: nowrap;
  }
  .main__header-navigation .menu__item--expanded {
    position: relative;
    width: min-content;
    cursor: default;
  }
  .main__header-navigation .menu__item--expanded > .menu__link {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    /* padding: 0 1rem; */
  }
  .main__header-navigation .menu--level-0 > li {
    height: 100%;
    display: flex;
    width: min-content;
  }
  .main__header-navigation .menu__item--expanded > a,
  .main__header-navigation a {
    height: 100%;
    align-items: baseline;
    font-size: 14px;
  }
  .main__header-navigation .menu--level-1 a {
    color: #000;
  }
  .main__header-navigation .menu__item--expanded > .menu__link::after {
    content: none;
  }
  .main__header-navigation .menu--level-1 {
    display: none;
    position: absolute;
    padding: 3rem 4rem;
    /* gap: 1.5rem; */
    background-color: #EFEFEF;
    margin: 0;
    transform: translateX(-50%);
    left: 50%;
    width: max-content;
    margin-top: -20px;
  }
  .main__header-navigation .menu__item--expanded:hover .menu--level-1 {
    display: grid;
  }
  .main__header-navigation .menu__item--expanded .menu--level-1::before {
    content: '';
    background-image: url('../../images/menu/arrow-full-top.svg');
    width: 17px;
    height: 21px;
    top: -1.3rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .main__header-wrapper .main__header-phone {
    margin: 0;
  }

  .main__header-wrapper .menu--level-0 .menu__item {
    position: relative;
    display: inline-block;
    text-decoration: none;
    height: 100%;
  }

  .main__header-wrapper .menu--level-0 .menu__item::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: transparent;
    bottom: 38px;
    left: 0;
    transition: background-color 0.3s ease;
  }

  .main__header-wrapper .menu--level-0 .menu__item:hover::after {
    background-color: var(--color-primary--3);
  }

  .main__header-wrapper .menu--level-1 .menu__item {
    position: relative;
    display: inline-block;
    text-decoration: none;
  }
  .main__header-wrapper .menu--level-0 .menu__item--expanded::after,
  .main__header-wrapper .menu--level-1 .menu__item::after {
    position: inherit;
  }

  .main__header-wrapper .menu--level-1 .menu__item:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-primary--3);
    text-decoration-thickness: 2px;
  }




}
@media all and (min-width: 1100px) {
  .main__header-navigation .menu__item--expanded > a,
  .main__header-navigation a {
    font-size: 1rem;
  }
}
@media all and (min-width: 1350px) {
  .main__header-navigation a {
    white-space: nowrap;
  }
  .main__header-navigation .menu--level-0 {
    gap: 2.2rem;
  }
  .main__header-navigation .menu__item--expanded > a,
  .main__header-navigation a {
    align-items: center;
    height: 100%;
    display: flex;
  }
}



/**
 * Mobile menu button
 */

.menu-trigger {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 2.5rem;
  left: 1.3rem;
}
.menu-trigger__button {
  all: unset;
  position: relative;
  width: 40px;
  height: 30px;
  background: transparent;
  cursor: pointer;
  scale: 50%;
}
.menu-trigger__bar {
  display: block;
  position: absolute;
  height: 5px;
  width: 100%;
  background: var(--color-neutral--7);
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}
.menu-trigger .menu-trigger__bar:nth-child(1) {
  top: 0px;
  transform-origin: left center;
}
.menu-trigger .menu-trigger__bar:nth-child(3) {
  top: 100%;
  transform-origin: left center;
  transform: translateY(-100%);
}
.menu-trigger .menu-trigger__bar:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
}
.main__header.js-active .menu-trigger .menu-trigger__bar:nth-child(1) {
  transform: rotate(45deg);
  top: 0px;
  left: 5px;
}
.main__header.js-active .menu-trigger .menu-trigger__bar:nth-child(3) {
  transform: rotate(-45deg);
  top: 28px;
  left: 5px;
}
.main__header.js-active .menu-trigger .menu-trigger__bar:nth-child(2) {
  width: 0%;
  opacity: 0;
}
@media all and (min-width: 1000px) {
  .menu-trigger{
    display: none;
  }
}

