/*--------------------------------------------------------------
# activeX header & mega menu
# Every selector is prefixed with .axm- so this file cannot leak
# into other components, and legacy .nav-link / .dropdown-menu
# styles in main.css do not apply to this markup.
--------------------------------------------------------------*/

.axm-header {
  --axm-ink: #17191c;
  --axm-body: #5b5f68;
  --axm-muted: #8a8e97;
  --axm-line: #ececee;
  --axm-soft: #f6f7f9;
  --axm-red: #d30000;
  --axm-red-dark: #b10000;
  --axm-red-soft: #fff2f2;
  /* Matches the site theme (hero CTA .btn-get-started uses 4px) */
  --axm-radius: 4px;
  background: #ffffff;
  /* Same font the theme's nav links and CTAs inherit */
  font-family: var(--default-font);
}

.axm-header .container-xl {
  min-height: 74px;
}

.axm-nav {
  width: 100%;
  align-items: center;
}

.axm-brand {
  display: flex;
  align-items: center;
  padding: 0;
  margin-right: 10px;
}

.axm-brand .logo {
  max-height: 40px;
  margin-right: 0;
}

.axm-nav-list {
  align-items: center;
  gap: 2px;
}

.axm-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 74px;
  padding: 0 13px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--axm-ink);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.axm-nav-link::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--axm-red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.axm-nav-link:hover,
.axm-nav-link:focus-visible,
.axm-has-mega:hover > .axm-nav-link,
.axm-has-mega:focus-within > .axm-nav-link,
.axm-has-mega.is-open > .axm-nav-link {
  color: var(--axm-red);
}

.axm-nav-link:hover::after,
.axm-has-mega:hover > .axm-nav-link::after,
.axm-has-mega:focus-within > .axm-nav-link::after,
.axm-has-mega.is-open > .axm-nav-link::after {
  transform: scaleX(1);
}

.axm-chev {
  font-size: 10px;
  transition: transform 0.22s ease;
}

.axm-has-mega:hover .axm-chev,
.axm-has-mega:focus-within .axm-chev,
.axm-has-mega.is-open .axm-chev {
  transform: rotate(180deg);
}

/* Icons are shown in the mobile panel only */
.axm-ico {
  display: none;
}

.axm-nav-cta {
  display: flex;
  align-items: center;
  margin-left: 8px;
}

.axm-nav-cta .axm-btn {
  padding: 12px 20px;
  font-size: 13.5px;
  border-radius: var(--axm-radius);
  box-shadow: 0 10px 22px -14px rgba(211, 0, 0, 0.85);
}

/*--------------------------------------------------------------
# Shared mega menu pieces
--------------------------------------------------------------*/
.axm-mega__panel {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--axm-line);
  border-top: 0;
  border-radius: 0 0 var(--axm-radius) var(--axm-radius);
  box-shadow: 0 40px 70px -30px rgba(12, 12, 12, 0.35),
    0 12px 24px -18px rgba(12, 12, 12, 0.15);
  overflow: hidden;
}

.axm-mega__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--axm-red), #ff6a4d 45%, #f7b267);
  z-index: 2;
}

.axm-mega__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
}

.axm-mega__groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 26px 10px 24px 22px;
}

.axm-group {
  min-width: 0;
  padding: 0 16px;
  border-left: 1px solid #f2f2f4;
}

.axm-group:first-child {
  border-left: 0;
  padding-left: 8px;
}

.axm-group__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 2px 0 12px;
}

.axm-ico-box,
.axm-res__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: var(--axm-radius);
  background: var(--axm-red-soft);
  color: var(--axm-red);
  font-size: 17px;
  transition: 0.2s ease;
}

.axm-group__head:hover .axm-ico-box,
.axm-res__card:hover .axm-res__icon {
  background: var(--axm-red);
  color: #ffffff;
  transform: translateY(-1px);
}

.axm-group__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.axm-group__title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--axm-ink);
  transition: color 0.2s ease;
}

.axm-group__title i {
  font-size: 10px;
  color: var(--axm-red);
  opacity: 0;
  transform: translate(-2px, 2px);
  transition: 0.2s ease;
}

.axm-group__head:hover .axm-group__title {
  color: var(--axm-red);
}

.axm-group__head:hover .axm-group__title i {
  opacity: 1;
  transform: none;
}

.axm-group__sub {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--axm-muted);
}

.axm-group__links {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.axm-group__links a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 12.8px;
  line-height: 1.35;
  color: var(--axm-body);
  transition: color 0.15s ease;
}

.axm-group__links a::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  margin-top: 7px;
  border-radius: 50%;
  background: #d9dbe1;
  transition: 0.15s ease;
}

.axm-group__links a:hover {
  color: var(--axm-red);
}

.axm-group__links a:hover::before {
  background: var(--axm-red);
  transform: scale(1.4);
}

/* Featured rail */
.axm-mega__aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 26px 24px;
  color: #ffffff;
  /* Smooth dark-grey blend with a deep red edge instead of a radial glow */
  background: linear-gradient(160deg, #121214 0%, #1a1a1d 40%, #282426 70%, #4a1a1a 100%);
}

.axm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff9d9d;
}

.axm-aside__title {
  margin: 10px 0 8px;
  font-family: var(--heading-font);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

.axm-aside__text {
  margin: 0 0 16px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #b9bcc4;
}

.axm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 0;
  border-radius: var(--axm-radius);
  background: var(--axm-red);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  transition: 0.2s ease;
}

.axm-btn:hover {
  background: var(--axm-red-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.axm-aside__contact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12.5px;
  color: #e6e7ea;
  transition: color 0.2s ease;
}

.axm-aside__contact i {
  color: #ff9d9d;
}

.axm-aside__contact:hover {
  color: #ffffff;
}

/* Panel footer strip */
.axm-mega__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-top: 1px solid #f1f1f3;
  background: #fbfbfc;
  font-size: 12.5px;
  color: var(--axm-muted);
}

.axm-mega__footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--axm-red);
}

.axm-mega__footer a:hover {
  color: var(--axm-red-dark);
}

/* Resources */
.axm-res__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 26px 20px;
}

.axm-res__card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 16px;
  border: 1px solid var(--axm-line);
  border-radius: var(--axm-radius);
  background: #ffffff;
  transition: 0.2s ease;
}

.axm-res__card:hover {
  border-color: #f2caca;
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -22px rgba(211, 0, 0, 0.45);
}

.axm-res__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--axm-ink);
}

.axm-res__text {
  flex: 1;
  margin: 0;
  font-size: 12.3px;
  line-height: 1.5;
  color: var(--axm-muted);
}

.axm-res__more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--axm-red);
}

.axm-res__card--soon {
  cursor: default;
}

.axm-res__card--soon:hover {
  border-color: var(--axm-line);
  transform: none;
  box-shadow: none;
}

.axm-res__card--soon .axm-res__more {
  color: var(--axm-muted);
  font-weight: 500;
}

.axm-chip {
  padding: 3px 7px;
  border-radius: var(--axm-radius);
  background: #f2f3f5;
  color: var(--axm-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* About */
.axm-about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 24px 22px 10px;
}

.axm-about__link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--axm-radius);
  transition: background 0.18s ease;
}

.axm-about__link:hover {
  background: var(--axm-soft);
}

.axm-about__link .axm-ico-box {
  width: 34px;
  height: 34px;
  border-radius: var(--axm-radius);
  font-size: 15px;
}

.axm-about__link:hover .axm-ico-box {
  background: var(--axm-red);
  color: #ffffff;
}

.axm-about__label {
  display: block;
  font-size: 13.2px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--axm-ink);
}

.axm-about__sub {
  display: block;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--axm-muted);
}

.axm-about__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px 18px;
  border-top: 1px solid #f1f1f3;
  background: #fbfbfc;
}

.axm-about__foottext {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--axm-ink);
}

.axm-about__footsub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--axm-muted);
}

/*--------------------------------------------------------------
# Desktop mega menu behaviour
--------------------------------------------------------------*/
@media (min-width: 992px) {
  .axm-has-mega {
    position: static;
  }

  .axm-mega {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 995;
    padding: 0 10px 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    pointer-events: none;
  }

  .axm-has-mega:hover > .axm-mega,
  .axm-has-mega:focus-within > .axm-mega {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .axm-mega--resources {
    left: auto;
    right: 0;
    width: 900px;
    max-width: calc(100% - 16px);
  }

  .axm-mega--resources .axm-mega__body {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .axm-mega--about {
    left: auto;
    right: 0;
    width: 600px;
    max-width: calc(100% - 16px);
  }
}

/* Keep service columns readable on smaller desktops */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .axm-mega__body {
    grid-template-columns: 1fr;
  }

  .axm-mega__aside {
    display: none;
  }

  .axm-mega__groups {
    padding: 20px 14px 18px;
  }

  .axm-group {
    padding: 0 12px;
  }

  .axm-mega--resources {
    width: 100%;
  }

  .axm-mega--about {
    width: 560px;
  }
}

/* Services: the CTA rail runs the full height of the panel so the footer
   strip sits beside it in the left column instead of under it. */
@media (min-width: 1200px) {
  .axm-mega--services .axm-mega__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 296px;
    grid-template-rows: auto auto;
  }

  .axm-mega--services .axm-mega__body {
    display: contents;
  }

  .axm-mega--services .axm-mega__groups {
    grid-column: 1;
    grid-row: 1;
  }

  .axm-mega--services .axm-mega__aside {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .axm-mega--services .axm-mega__footer {
    grid-column: 1;
    grid-row: 2;
    padding-right: 32px;
  }
}

/*--------------------------------------------------------------
# Mobile / tablet
--------------------------------------------------------------*/
@media (max-width: 991.98px) {
  .axm-header .container-xl {
    min-height: 64px;
    height: 64px;
  }

  .axm-brand .logo {
    max-height: 34px;
  }

  .axm-nav {
    position: static;
    flex-wrap: wrap;
    padding: 0 2px;
  }

  .axm-mobile-actions {
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }

  .axm-call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--axm-red-soft);
    color: var(--axm-red);
    font-size: 15px;
    transition: 0.2s ease;
  }

  .axm-call-btn:hover {
    background: var(--axm-red);
    color: #ffffff;
  }

  .axm-header .navbar-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--axm-radius);
    background: var(--axm-soft);
    color: var(--axm-ink);
    font-size: 20px;
    line-height: 1;
  }

  /* Absolute panel: the header keeps its 64px height, so the logo and
     hamburger never move when the menu opens. The panel scrolls as one
     list (no nested scroll areas) and the scrollbar is on-brand. */
  #main_nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    margin-top: 0;
    padding: 4px 14px 14px;
    background: #ffffff;
    border-top: 1px solid var(--axm-line);
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 22px 36px -26px rgba(14, 14, 14, 0.35);
    scrollbar-width: thin;
    scrollbar-color: #f0a8a8 #ffffff;
  }

  #main_nav::-webkit-scrollbar {
    width: 6px;
  }

  #main_nav::-webkit-scrollbar-track {
    background: #ffffff;
  }

  #main_nav::-webkit-scrollbar-thumb {
    background: #f0a8a8;
    border-radius: 999px;
  }

  #main_nav .navbar-nav {
    width: 100%;
    margin: 0 !important;
  }

  .axm-nav-list {
    align-items: stretch;
    gap: 0;
  }

  .axm-nav-list > .nav-item {
    width: 100%;
  }

  .axm-nav-link {
    height: auto;
    justify-content: flex-start;
    gap: 10px;
    padding: 15px 2px;
    font-size: 15px;
    border-bottom: 1px solid #f2f2f4;
  }

  .axm-nav-list {
    padding: 0;
  }

  .axm-nav-link::after {
    display: none;
  }

  .axm-nav-link .axm-ico {
    display: inline-flex;
    justify-content: center;
    width: 22px;
    color: var(--axm-red);
    font-size: 15px;
  }

  .axm-chev {
    margin-left: auto;
    font-size: 11px;
    color: #9aa0a8;
  }

  .axm-has-mega {
    width: 100%;
  }

  .axm-mega {
    position: static;
    display: grid;
    grid-template-rows: 0fr;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: grid-template-rows 0.28s ease;
    pointer-events: auto;
    z-index: auto;
  }

  .axm-has-mega.is-open > .axm-mega {
    grid-template-rows: 1fr;
  }

  .axm-mega__panel {
    min-height: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .axm-mega__panel::before {
    display: none;
  }

  .axm-mega__body {
    display: block;
  }

  .axm-mega__groups {
    display: block;
    padding: 6px 0 10px;
  }

  .axm-group,
  .axm-group:first-child {
    border-left: 0;
    padding: 14px 0 6px;
    border-top: 1px dashed #ececee;
  }

  .axm-group:first-child {
    border-top: 0;
    padding-top: 10px;
  }

  .axm-group__head {
    padding: 0 0 10px;
  }

  .axm-group__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
  }

  .axm-group__links a {
    padding: 6px 0;
    font-size: 13px;
  }

  .axm-mega__aside {
    display: none;
  }

  .axm-mega__footer {
    padding: 12px 0 4px;
    background: transparent;
    border-top: 1px dashed #ececee;
  }

  .axm-mega--resources,
  .axm-mega--about {
    width: 100%;
    max-width: 100%;
  }

  .axm-res__cards {
    display: block;
    padding: 10px 0 2px;
  }

  .axm-res__card {
    margin-bottom: 10px;
    padding: 14px;
  }

  .axm-res__text {
    flex: none;
  }

  .axm-about__grid {
    display: block;
    padding: 8px 0 0;
  }

  .axm-about__link {
    padding: 10px 2px;
  }

  .axm-about__foot {
    flex-wrap: wrap;
    padding: 14px 0 4px;
    border-top: 1px dashed #ececee;
    background: transparent;
  }

  .axm-about__foot .axm-btn {
    width: 100%;
  }

  .axm-mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 0 4px;
  }

  .axm-mobile-cta .axm-btn {
    width: 100%;
    padding: 13px 16px;
    font-size: 14px;
  }

  .axm-mobile-cta__ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid var(--axm-line);
    border-radius: var(--axm-radius);
    color: var(--axm-ink);
    font-size: 13.5px;
    font-weight: 600;
    transition: 0.2s ease;
  }

  .axm-mobile-cta__ghost:hover {
    border-color: #f0caca;
    color: var(--axm-red);
  }

  .axm-nav-cta {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .axm-group__links {
    grid-template-columns: 1fr;
  }
}

/* Lock the page (not just the body) while the mobile menu is open, and keep
   the layout width stable when the page scrollbar disappears. */
html.axm-locked {
  overflow: hidden;
}

html.axm-locked body {
  padding-right: var(--axm-scrollbar-width, 0px);
  /* body.no-scroll (set by main.js) would break the sticky header, so the
     page is locked on <html> instead and the body stays non-scrolling. */
  overflow: visible;
}

@media (min-width: 992px) {
  .axm-mobile-cta,
  .axm-mobile-actions {
    display: none !important;
  }
}
