/* Header Component - BEM CSS */

/* Block: header */
.header {
  padding: 27px 0 0;
  position: fixed;
  top: 0;
  transition:
    background-color 0.1s cubic-bezier(0, 0, 0.2, 1),
    padding 0.1s cubic-bezier(0, 0, 0.2, 1);
  width: 100%;
  z-index: 999;
}

/* Modifier: header--fixed */
.header--fixed {
  background: #000;
  padding-top: 0;
}

/* Element: header__container */
.header__container {
  align-items: center;
  display: flex;
  height: 75px;
  justify-content: space-between;
  width: 100%;
}

/* Element: header__logo */
.header__logo {
  display: block;
  text-decoration: none;
}

/* Element: header__nav */
.header__nav {
  margin-inline: auto 1.25rem;
}

/* Element: header__nav-list */
.header__nav-list {
  align-items: center;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.header__nav-list--show .header__mobile-toggle::before {
  background-position: -31px -1px;
  width: 14px;
}

.header__nav-list--show .header__submenu-trigger--open {
  background: var(--text-white);
  color: #080c16;
  font:
    700 1rem/1.5rem "Inter",
    sans-serif;
}

.header__nav-list--show .header__submenu-trigger--open::after {
  transform: rotate(180deg);
}

.header__nav-list--show
  .header__submenu-trigger--open
  + .header__submenu-content {
  border-top: 1px solid #e0e0e0;
  visibility: visible;
}

/* Element: header__nav-item */
.header__nav-link {
  padding: 0 1.5rem;
}

.header__nav-link:hover {
  color: var(--armada-light-color);
}

/* Modifier: header__nav-item--active */
.header__nav-item--active .header__nav-link {
  color: var(--primary-active-color);
}

/* Modifier: header__nav-item--submenu */
@media (min-width: 768px) {
  .header__nav-item--submenu:hover .header__nav-link {
    color: var(--armada-light-color);
  }

  .header__nav-item--submenu {
    position: relative;
  }

  .header__nav-item--submenu:hover .header__submenu-trigger::before {
    bottom: -20px;
    content: "";
    display: block;
    height: 20px;
    left: 0;
    position: absolute;
    width: 100%;
  }

  .header__nav-item--submenu:hover .header__submenu-trigger::after {
    background-position: -15px 0;
    transform: rotate(0);
  }

  .header__nav-item--submenu:hover .header__submenu-content {
    visibility: visible;
  }

  .header__nav-item--submenu.header__nav-item--link-trigger
    .header__submenu-trigger {
    display: none;
  }

  .header__nav-item--mobile-only {
    display: none;
  }
}

/* Element: header__nav-link */
.header__nav-link {
  align-items: center;
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  font:
    500 1rem/1.5rem "Red Hat Display",
    sans-serif;
  justify-content: center;
  text-decoration: none;
}

.header__nav-link::after {
  content: attr(data-text);
  display: block;
  font-weight: 700;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}

/* Modifier: header__nav-link--highlight */
.header__nav-link--highlight {
  color: var(--armada-light-color);
}

.header__nav-link--highlight:hover {
  color: var(--primary-armada-color);
  font-weight: 700;
}

/* Element: header__submenu-trigger */
.header__submenu-trigger {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  height: 24px;
  line-height: inherit;
  padding: 0;
}

.header__submenu-trigger::after {
  background: url("https://assets.armadalogics.com/global/utility_icons.svg")
    no-repeat 0 0;
  content: "";
  display: block;
  flex-shrink: 0;
  height: 5px;
  transform: rotate(180deg);
  width: 8px;
}

/* Element: header__submenu-content */
.header__submenu-content {
  background: var(--text-white);
  border-radius: 10px;
  left: 50%;
  margin-top: 0.8125rem;
  min-width: 18.5rem;
  position: absolute;
  transform: translateX(-50%);
  visibility: hidden;
  width: max-content;
}

.header__submenu-content::before {
  background: var(--text-white);
  content: "";
  display: block;
  height: 0.625rem;
  left: 50%;
  position: absolute;
  rotate: 45deg;
  top: -4px;
  transform: translateX(-50%);
  transform-origin: left;
  width: 0.625rem;
}

.header__submenu-content a {
  color: var(--armada-darkest-07);
  display: block;
  font:
    400 1rem/1.5rem "Inter",
    sans-serif;
  padding: 0.5rem 0;
}

.header__submenu-content a:hover,
.header__submenu-content a.active {
  color: var(--primary-active-color);
  font-weight: 700;
}

.header__submenu-content ul {
  padding: 1rem 1.5rem 0.625rem;
}

.header__submenu-content ul + ul {
  padding: 0 0.875rem;
}

.header__submenu-content ul + ul li:first-child {
  border-top: 1px solid #e0e0e0;
  padding-top: 0.625rem;
}

.header__submenu-content ul:only-child {
  padding-bottom: 0.875rem;
}

/* Element: header__mobile-toggle */
.header__mobile-toggle {
  background: transparent;
  border: none;
  display: none;
}

/* Element: header__cta */
.header__cta {
  align-items: center;
  background: var(--primary-armada-color);
  border-radius: 10px;
  color: #e0e0e0;
  display: flex;
  font:
    800 1rem/1.375rem "Red Hat Display",
    sans-serif;
  height: 48px;
  justify-content: center;
  text-decoration: none;
  transition: background 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  width: 133px;
}

.header__cta:hover {
  background: var(--primary-active-color);
  color: var(--text-white);
}

/* ========================================
   RESPONSIVE STYLES
======================================== */

/* Desktop (max-width: 1439px) */
@media (max-width: 1439px) {
  .header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    max-width: unset;
  }

  .header__logo img {
    width: 202px;
  }
}

/* Tablet (max-width: 1023px) */
@media (max-width: 1023px) {
  .header__container {
    height: 70px;
  }

  .header__logo img {
    width: 180px;
  }

  .header__nav-link {
    padding: 0 1.25rem;
  }

  .header__cta {
    font:
      500 14px/19px "Red Hat Display",
      sans-serif;
    height: 39px;
    width: 112px;
  }

  .header__nav {
    margin-inline: auto 0.75rem;
  }

  .header__nav-link {
    padding: 0 0.75rem;
  }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  .header {
    background: var(--surface-container);
    padding: 0rem;
  }

  .header__container {
    height: 57px;
    padding: 0 0 0 16px;
  }

  .header__logo img {
    width: 138px;
  }

  .header__nav {
    margin: 0;
  }

  .header__nav-list {
    background: #080c16;
    bottom: 0;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px 16px;
    position: fixed;
    right: -100%;
    row-gap: 0.5rem;
    top: 57px;
    transition:
      transform 0.2s ease-in-out,
      visibility 0.2s ease-in-out;
    visibility: hidden;
    width: 100%;
  }

  /* Modifier: header__nav-list--show */
  .header__nav-list--show {
    transform: translateX(-100%);
    visibility: visible;
  }

  .header__nav-item {
    width: 100%;
  }

  .header__nav-item:last-child {
    width: 100%;
  }

  .header__nav-item--submenu.header__nav-item--link-trigger
    .header__submenu-trigger {
    display: flex;
  }

  .header__nav-item--submenu.header__nav-item--link-trigger .header__nav-link {
    display: none;
  }

  .header__nav-link {
    align-items: start;
    font:
      400 1rem/1.5rem "Inter",
      sans-serif;
    padding: 19px 24px;
    width: 100%;
  }

  .header__nav-link:not(.header__nav-link--highlight) {
    color: var(--text-light);
  }

  .header__submenu-trigger {
    border-radius: 8px 8px 0 0;
    height: auto;
    justify-content: space-between;
    transition:
      color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
      background 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .header__submenu-trigger::after {
    background: url("https://assets.armadalogics.com/global/mobile_nav_icons.svg")
      no-repeat -57px -1px;
    height: 9px;
    transform: rotate(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 15px;
  }

  .header__submenu-content {
    border-radius: 0 0 8px 8px;
    height: 0;
    margin-top: 0;
    min-width: 100%;
    overflow: hidden;
    position: revert;
    transform: revert;
    transition:
      height 0.2s ease-out,
      visibility 0.2s ease-out;
    width: 100%;
  }

  .header__submenu-content::before {
    display: none;
  }

  .header__submenu-content ul {
    padding: 12px 24px;
  }

  .header__submenu-content ul:not(:first-child) {
    padding: 0 12px;
  }

  .header__submenu-content ul:not(:first-child) li:first-child {
    padding-top: 0.75rem;
  }

  .header__submenu-content ul li a {
    padding: 12px 0;
  }

  .header__mobile-toggle {
    align-items: center;
    background: transparent;
    border: none;
    display: flex;
    height: 57px;
    justify-content: center;
    position: relative;
    width: 48px;
  }

  .header__mobile-toggle::before {
    background: url("https://assets.armadalogics.com/global/mobile_nav_icons.svg")
      no-repeat 0 0;
    content: "";
    height: 14px;
    width: 19px;
  }

  .header__mobile-toggle--open::before {
    background-position: -31px -1px;
    width: 14px;
  }

  .header__cta {
    font:
      800 20px/26px "Red Hat Display",
      sans-serif;
    height: 62px;
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
  }

  .header__cta--desktop-only {
    display: none;
  }
}
