/**
 * Header CTA — v1.0.18
 */

/* ========== DESKTOP (≥981px) ========== */
@media (min-width: 981px) {
  #main-header .container.et_menu_container {
    display: block !important;
    align-items: normal !important;
    justify-content: normal !important;
  }

  #main-header #et-top-navigation {
    display: block !important;
    float: right !important;
    position: relative !important;
    align-items: normal !important;
    justify-content: normal !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }

  #main-header #et-top-navigation > #top-menu-nav {
    display: block !important;
    float: left !important;
    width: auto !important;
  }

  #main-header #et-top-navigation #top-menu {
    display: block !important;
    float: left !important;
    width: auto !important;
    line-height: 0;
  }

  #main-header #et-top-navigation #top-menu > li {
    display: inline-block !important;
    height: auto !important;
  }

  #main-header #et-top-navigation #top-menu > li > a {
    white-space: nowrap;
  }

  /* Reserve slot for absolute CTA (JS sets --ak-cta-slot). */
  #main-header #et-top-navigation > #et_top_search {
    float: right !important;
    display: block !important;
    margin-top: 3px !important;
    margin-bottom: 0 !important;
    margin-left: 22px !important;
    margin-right: var(--ak-cta-slot, 96px) !important;
    position: relative;
  }

  #main-header #et-top-navigation > #et_mobile_nav_menu {
    float: right !important;
  }

  /*
   * Absolute + vertical center in nav (navH === headerH).
   * Avoids float+relative-top drop that push CTA to the bottom edge.
   */
  #main-header #et-top-navigation > .ak-header-cta {
    position: absolute !important;
    float: none !important;
    top: 50% !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    z-index: 30;
  }
}

/* ========== CTA look ========== */
#main-header #et-top-navigation > .ak-header-cta {
  --ak-cta-color: #ffffff;
  --ak-cta-bg: #000000;
  --ak-cta-hover-color: #ffffff;
  --ak-cta-hover-bg: #333333;

  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  left: auto;
  right: auto;
  text-decoration: none;
  color: var(--ak-cta-color);
  background-color: var(--ak-cta-bg);
  transition: background-color 0.2s ease, color 0.2s ease, outline-offset 0.2s ease;
  line-height: 1;
}

#main-header #et-top-navigation > .ak-header-cta:hover,
#main-header #et-top-navigation > .ak-header-cta:focus {
  color: var(--ak-cta-hover-color);
  background-color: var(--ak-cta-hover-bg);
  text-decoration: none;
}

#main-header #et-top-navigation > .ak-header-cta:focus {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

#main-header #et-top-navigation > .ak-header-cta:focus:not(:focus-visible) {
  outline: none;
}

#main-header #et-top-navigation > .ak-header-cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.ak-header-cta--button {
  font-weight: 600;
  border-radius: 3px;
  white-space: nowrap;
}

.ak-header-cta--button.ak-header-cta--size-s {
  font-size: 13px;
  padding: 0 0.85em;
  height: 28px;
}

.ak-header-cta--button.ak-header-cta--size-m {
  font-size: 14px;
  padding: 0 1em;
  height: 30px;
}

.ak-header-cta--button.ak-header-cta--size-l {
  font-size: 16px;
  padding: 0 1.1em;
  height: 34px;
}

.ak-header-cta--icon {
  border-radius: 50%;
  padding: 0;
}

.ak-header-cta--icon.ak-header-cta--size-s {
  width: 28px;
  height: 28px;
}

.ak-header-cta--icon.ak-header-cta--size-m {
  width: 30px;
  height: 30px;
}

.ak-header-cta--icon.ak-header-cta--size-l {
  width: 34px;
  height: 34px;
}

.ak-header-cta--icon svg {
  width: 55%;
  height: 55%;
  display: block;
}

/* ========== MOBILE (≤980px) ========== */
@media (max-width: 980px) {
  /* Must stay visible — overflow:hidden clips #mobile_menu dropdown. */
  #main-header,
  #main-header .container,
  #main-header .container.et_menu_container {
    overflow: visible !important;
  }

  #main-header .container.et_menu_container {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 70px !important;
    gap: 12px;
  }

  /* Keep logo in flow (absolute collapses header height) */
  #main-header .logo_container {
    position: relative !important;
    float: none !important;
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    max-width: 45%;
    height: auto !important;
    margin: 0 auto 0 0 !important;
    flex: 0 1 auto;
  }

  #main-header .logo_container .logo_helper {
    display: none !important;
  }

  /* Beat Divi .et_header_style_left #et-top-navigation { padding-top:24px } */
  /* position:static so #mobile_menu can size against .container / #main-header */
  #main-header #et-top-navigation,
  .et_header_style_left #et-top-navigation,
  .et_header_style_left .et-fixed-header #et-top-navigation {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    justify-content: flex-end !important;
    float: none !important;
    flex: 0 0 auto;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    margin-top: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    position: static !important;
    z-index: 10;
    overflow: visible !important;
  }

  /* Desktop menu only — never hide #mobile_menu */
  #main-header #et-top-navigation > #top-menu-nav,
  #main-header #et-top-navigation > #top-menu-nav > #top-menu {
    display: none !important;
  }

  #main-header #et-top-navigation > #et_top_search {
    float: none !important;
    order: 1;
    position: relative !important;
    top: auto !important;
    margin: 0 12px 0 0 !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible;
  }

  #main-header #et-top-navigation > #et_top_search #et_search_icon {
    position: relative !important;
    display: block !important;
    width: 18px;
    height: 18px;
    line-height: 18px;
  }

  #main-header #et-top-navigation > #et_top_search #et_search_icon:before {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
  }

  #main-header #et-top-navigation > .ak-header-cta {
    position: relative !important;
    float: none !important;
    order: 2;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 20px 0 0 !important;
    z-index: 1;
  }

  #main-header #et-top-navigation > #et_mobile_nav_menu {
    float: none !important;
    order: 3;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    position: static !important;
    z-index: 100000;
    overflow: visible !important;
  }

  #main-header #et-top-navigation .mobile_nav {
    position: static !important;
    overflow: visible !important;
    z-index: 100000 !important;
  }

  /*
   * Burger wrap is ~32px wide; left/right:0 made dropdown 32px.
   * Anchor to header/.container instead and kill Divi open margins.
   */
  #main-header #mobile_menu {
    position: absolute !important;
    top: 100% !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
    z-index: 100000 !important;
  }

  #main-header #mobile_menu > li > a {
    white-space: normal !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  #main-header #et-top-navigation .mobile_menu_bar {
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 32px;
    width: 32px;
  }

  .ak-header-cta--button {
    max-width: 36vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.ak-header-cta .screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
