/* ===== header (sticky, independent from hero) ===== */
.ebmnt1-header {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background-color: var(--ebmnt1-header-bg-color);
  border-bottom: 1px solid var(--ebmnt1-header-border-bottom-color);
  z-index: var(--ebmnt1-header-z-index);
  transition: box-shadow 0.3s ease-in-out;
}

.ebmnt1-header.is-scrolled {
  box-shadow: 0 0.5em 1.5em var(--ebmnt1-header-shadow-color);
}

.ebmnt1-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  width: calc(100% - 2em);
  max-width: var(--ebmnt1-container-max-width);
  min-height: var(--ebmnt1-header-height);
  margin-inline: auto;
}

/* ----- logo ----- */
.ebmnt1-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--ebmnt1-header-logo-text-color);
}

.ebmnt1-logo__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4em;
  aspect-ratio: 1;
  border-radius: var(--ebmnt1-radius-circle);
  font-size: 1.1rem;
  color: var(--ebmnt1-header-logo-icon-color);
  background-color: var(--ebmnt1-header-logo-icon-bg-color);
}

.ebmnt1-logo__text {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.75rem);
  font-weight: var(--ebmnt1-font-weight-bold);
  line-height: 1;
}

/* ----- burger ----- */
.ebmnt1-header__burger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75em;
  aspect-ratio: 1;
  border-radius: var(--ebmnt1-radius-circle);
  font-size: 1.15rem;
  color: var(--ebmnt1-header-burger-icon-color);
  background-color: var(--ebmnt1-header-burger-bg-color);
  z-index: calc(var(--ebmnt1-menu-overlay-z-index) + 1);
  transition: var(--ebmnt1-transition-fast);
}

.ebmnt1-header__burger-icon {
  position: absolute;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.ebmnt1-header__burger-icon--close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.ebmnt1-header.is-menu-open .ebmnt1-header__burger-icon--open {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.ebmnt1-header.is-menu-open .ebmnt1-header__burger-icon--close {
  opacity: 1;
  transform: none;
}

.ebmnt1-header.is-menu-open .ebmnt1-header__burger {
  color: var(--ebmnt1-menu-aside-close-icon-color);
  background-color: var(--ebmnt1-menu-aside-bg-color);
}

.ebmnt1-header__cta {
  display: none;
}

/* ----- nav parent = transparent full-width overlay on small screens ----- */
.ebmnt1-nav {
  position: fixed;
  inset: 0;
  display: flex;
  background-color: var(--ebmnt1-menu-overlay-bg-color);
  visibility: hidden;
  z-index: var(--ebmnt1-menu-overlay-z-index);
  transition: visibility 0.4s ease;
}

.ebmnt1-header.is-menu-open .ebmnt1-nav {
  visibility: visible;
}

/* ----- nav inner = aside menu on small screens ----- */
.ebmnt1-nav__inner {
  position: absolute;
  inset-block: var(--ebmnt1-header-height) 0;
  inset-inline-start: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-y: auto;
  background-color: var(--ebmnt1-menu-aside-bg-color);
  box-shadow: 0 0 2em var(--ebmnt1-menu-aside-shadow-color);
  transform: translateX(100%);
  transition: transform 0.4s ease-in-out;
}

.ebmnt1-header.is-menu-open .ebmnt1-nav__inner {
  transform: translateX(0);
}

.ebmnt1-nav__list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.ebmnt1-nav__item {
  border-bottom: 1px solid var(--ebmnt1-menu-aside-divider-color);
}

.ebmnt1-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  width: 100%;
  padding: 0.9em 1.25em;
  font-size: var(--ebmnt1-font-size-menu-link);
  font-weight: var(--ebmnt1-font-weight-semibold);
  line-height: 1.3;
  color: var(--ebmnt1-menu-aside-link-text-color);
  text-align: start;
  transition: var(--ebmnt1-transition-fast);
}

.ebmnt1-nav__link.is-active,
.ebmnt1-nav__link:hover {
  color: var(--ebmnt1-menu-aside-link-active-text-color);
}

.ebmnt1-nav__chevron {
  font-size: 0.75em;
  transition: transform 0.3s ease-in-out;
}

.ebmnt1-nav__item.is-open .ebmnt1-nav__chevron {
  transform: rotate(180deg);
}

/* dropdown: accordion on small screens */
.ebmnt1-nav__dropdown-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease-in-out;
}

.ebmnt1-nav__item.is-open .ebmnt1-nav__dropdown-wrap {
  grid-template-rows: 1fr;
}

.ebmnt1-nav__dropdown {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ebmnt1-nav__dropdown-link {
  display: block;
  padding: 0.7em 2.25em;
  font-size: var(--ebmnt1-font-size-menu-link);
  font-weight: var(--ebmnt1-font-weight-semibold);
  line-height: 1.3;
  color: var(--ebmnt1-menu-aside-link-text-color);
  transition: var(--ebmnt1-transition-fast);
}

.ebmnt1-nav__dropdown-link:hover {
  color: var(--ebmnt1-menu-aside-link-active-text-color);
}

.ebmnt1-nav__cta-item {
  display: flex;
  padding: 1.25em;
}

.ebmnt1-nav__cta-item .ebmnt1-btn {
  width: 100%;
  color: var(--ebmnt1-button-primary-hover-text-color);
  background-color: var(--ebmnt1-button-primary-hover-bg-color);
}

.ebmnt1-nav__cta-item .ebmnt1-btn .ebmnt1-btn__icon {
  color: var(--ebmnt1-button-primary-hover-icon-color);
}

@media (min-width: 425px) {
  .ebmnt1-nav__inner {
    width: min(100%, 24rem);
  }
}

/* ----- desktop: inline links + hover dropdown ----- */
@media (min-width: 1024px) {
  .ebmnt1-header__burger {
    display: none;
  }

  .ebmnt1-header__cta {
    display: inline-flex;
  }

  .ebmnt1-nav {
    position: static;
    flex: 1 1 auto;
    justify-content: center;
    background-color: transparent;
    visibility: visible;
    z-index: auto;
  }

  .ebmnt1-nav__inner {
    position: static;
    flex-direction: row;
    align-items: center;
    width: auto;
    overflow: visible;
    background-color: transparent;
    box-shadow: none;
    transform: none;
  }

  .ebmnt1-nav__list {
    flex-direction: row;
    align-items: center;
    gap: 0.5em;
    width: auto;
  }

  .ebmnt1-nav__item {
    position: relative;
    border-bottom: none;
  }

  .ebmnt1-nav__link {
    width: auto;
    padding: 0.8em 0.9em;
    color: var(--ebmnt1-header-link-text-color);
  }

  .ebmnt1-nav__link.is-active,
  .ebmnt1-nav__link:hover,
  .ebmnt1-nav__item:hover > .ebmnt1-nav__link,
  .ebmnt1-nav__item:focus-within > .ebmnt1-nav__link {
    color: var(--ebmnt1-header-link-hover-text-color);
  }

  .ebmnt1-nav__item:hover .ebmnt1-nav__chevron,
  .ebmnt1-nav__item:focus-within .ebmnt1-nav__chevron,
  .ebmnt1-nav__item.is-open .ebmnt1-nav__chevron {
    transform: rotate(180deg);
  }

  .ebmnt1-nav__dropdown-wrap {
    position: absolute;
    inset-block-start: 100%;
    inset-inline-start: 0;
    display: block;
    width: 15em;
    border-radius: var(--ebmnt1-radius-card);
    background-color: var(--ebmnt1-header-dropdown-bg-color);
    box-shadow: 0 1em 2em var(--ebmnt1-header-dropdown-shadow-color);
    visibility: hidden;
    opacity: 0;
    transform: scale(1, 0.8);
    transform-origin: top;
    transition: var(--ebmnt1-transition-fast);
  }

  .ebmnt1-nav__item:hover .ebmnt1-nav__dropdown-wrap,
  .ebmnt1-nav__item:focus-within .ebmnt1-nav__dropdown-wrap,
  .ebmnt1-nav__item.is-open .ebmnt1-nav__dropdown-wrap {
    visibility: visible;
    opacity: 1;
    transform: scale(1, 1);
  }

  .ebmnt1-nav__dropdown {
    gap: 0.15em;
    padding: 0.75em;
    overflow: visible;
  }

  .ebmnt1-nav__dropdown-link {
    padding: 0.6em 1em;
    border-radius: var(--ebmnt1-radius-button);
    color: var(--ebmnt1-header-dropdown-link-text-color);
  }

  .ebmnt1-nav__dropdown-link:hover {
    color: var(--ebmnt1-header-dropdown-link-hover-text-color);
    background-color: var(--ebmnt1-header-dropdown-link-hover-bg-color);
  }

  .ebmnt1-nav__cta-item {
    display: none;
  }
}
