/* Asmorix All Courses mega menu — category panels */
.rts-header,
.rts-header__wrapper,
.rts-header__menu,
.hostie-menu,
.hostie-desktop-menu {
  overflow: visible !important;
}

/* Desktop: push main nav toward the right (near Search / Enquire) */
@media (min-width: 992px) {
  .rts-header__wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 20px;
  }

  .rts-header__logo {
    flex: 0 0 auto;
  }

  .rts-header__menu {
    flex: 1 1 auto;
    display: flex !important;
    align-items: center;
    justify-content: flex-end !important;
    margin-left: auto;
    margin-right: 8px;
    min-width: 0;
  }

  .rts-header__menu .hostie-menu {
    width: auto;
    margin-left: auto;
  }

  .hostie-menu .hostie-desktop-menu {
    justify-content: flex-end !important;
  }

  .rts-header__right {
    flex: 0 0 auto;
    margin-left: 12px;
  }

  /* Blog header previously forced center — keep right-aligned */
  body.ax-blog-page .ax-blog-header .rts-header__menu,
  body.ax-blog-page .ax-blog-header .hostie-menu .hostie-desktop-menu {
    justify-content: flex-end !important;
  }
}

/* Even spacing between main nav items */
.hostie-menu .hostie-desktop-menu {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap;
  gap: 28px !important;
}

.hostie-menu .hostie-desktop-menu .menu-item {
  padding: 0 !important;
  margin: 0 !important;
}

.rts-header__menu ul.hostie-desktop-menu > li:not(:last-child),
.rts-header__menu .hostie-desktop-menu .menu-item:not(:last-child) {
  margin-right: 0 !important;
}

/* Keep dropdown chevron inside the item so gaps stay even */
.hostie-menu .hostie-desktop-menu .hostie-has-dropdown .hostie-dropdown-main-element {
  position: relative;
  padding-right: 18px !important;
}

.hostie-menu .hostie-desktop-menu .hostie-has-dropdown .hostie-dropdown-main-element::before {
  content: "\f078";
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
  font-weight: 900;
  font-style: normal;
  font-size: 10px;
  line-height: 1;
  position: absolute;
  right: 0 !important;
  top: 50%;
  transform: translateY(-50%);
  color: inherit;
  opacity: 0.85;
}

body.ax-blog-page .ax-blog-header .hostie-menu .hostie-desktop-menu {
  gap: 28px !important;
}

body.ax-blog-page .ax-blog-header .hostie-menu .hostie-desktop-menu .menu-item .hostie-dropdown-main-element {
  padding: 12px 0 !important;
}

body.ax-blog-page .ax-blog-header .hostie-menu .hostie-desktop-menu .hostie-has-dropdown .hostie-dropdown-main-element {
  padding-right: 18px !important;
}

@media (max-width: 1200px) {
  .hostie-menu .hostie-desktop-menu {
    gap: 20px !important;
  }

  .hostie-menu .hostie-desktop-menu .menu-item {
    padding: 0 !important;
  }
}

.asmorix-mm-courses {
  position: static !important;
}

.asmorix-courses-mega.rts-mega-menu {
  width: min(1360px, calc(100vw - 24px));
  max-width: 1360px;
  left: 50%;
  right: auto;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 139, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 80, 0.16);
  background: #fff;
  overflow: hidden;
  transform: translateY(15px) translateX(-50%);
  z-index: 1200;
  display: flex !important;
  flex-direction: column !important;
  max-height: min(78vh, 640px);
}

.asmorix-courses-mega .asmorix-courses-mega__cats > li {
  margin: 0;
  padding: 0;
  width: auto;
  display: block;
}

.asmorix-courses-mega .asmorix-courses-mega__cats > li:last-child {
  margin-bottom: 4px;
}

.hostie-has-dropdown.mega-menu.big.asmorix-mm-courses:hover .asmorix-courses-mega.rts-mega-menu,
.asmorix-mm-courses:focus-within .asmorix-courses-mega.rts-mega-menu {
  transform: translateY(5px) translateX(-50%);
  opacity: 1;
  visibility: visible;
}

.asmorix-courses-mega__layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 360px;
  height: auto;
  max-height: none;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.asmorix-courses-mega__cats {
  list-style: none;
  margin: 0;
  padding: 12px 8px 18px 0;
  background: linear-gradient(180deg, #f4f6fb 0%, #eef1f8 100%);
  border-right: 1px solid rgba(0, 0, 139, 0.08);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #d8dbe3 #f1f2f6;
}

/* Custom scrollbar — categories + course list */
.asmorix-courses-mega__cats::-webkit-scrollbar,
.asmorix-courses-mega__links::-webkit-scrollbar {
  width: 6px;
}

.asmorix-courses-mega__cats::-webkit-scrollbar-track,
.asmorix-courses-mega__links::-webkit-scrollbar-track {
  background: #f1f2f6;
  border-radius: 999px;
  margin: 10px 0;
}

.asmorix-courses-mega__cats::-webkit-scrollbar-thumb,
.asmorix-courses-mega__links::-webkit-scrollbar-thumb {
  background: #d8dbe3;
  border-radius: 999px;
  border: 1px solid #eceef3;
}

.asmorix-courses-mega__cats::-webkit-scrollbar-thumb:hover,
.asmorix-courses-mega__links::-webkit-scrollbar-thumb:hover {
  background: #c5c9d4;
}

.asmorix-courses-mega__cat-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 13px 18px 13px 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #1e2a44;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border-left: 3px solid transparent;
  border-radius: 0 10px 10px 0;
}

.asmorix-courses-mega__cat-btn i {
  width: 20px;
  text-align: center;
  color: #00008b;
  opacity: 0.75;
  font-size: 14px;
}

.asmorix-courses-mega__cat-btn:hover {
  background: rgba(0, 0, 139, 0.06);
  color: #00008b;
}

.asmorix-courses-mega__cat-btn.is-active {
  background: #fff;
  color: #00008b;
  border-left-color: #ff6900;
  box-shadow: 0 2px 10px rgba(0, 0, 80, 0.06);
  width: 100%;
}

.asmorix-courses-mega__cat-btn.is-active i {
  opacity: 1;
  color: #ff6900;
}

.asmorix-courses-mega__panels {
  position: relative;
  overflow: hidden;
  background: #f8f9fd;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
}

.asmorix-courses-mega__panel {
  display: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  height: 100%;
  max-height: 100%;
  padding: 14px 16px 12px;
  overflow: hidden;
  box-sizing: border-box;
  min-width: 0;
}

.asmorix-courses-mega__panel.is-active {
  display: flex;
}

.asmorix-courses-mega__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  margin: 0 0 10px;
  padding: 0 4px 10px;
  border-bottom: 1px solid rgba(0, 0, 139, 0.1);
}

.asmorix-courses-mega__panel-head h3 {
  margin: 0;
  padding-left: 10px;
  border-left: 3px solid #ff6900;
  font-size: 15px;
  font-weight: 700;
  color: #00008b !important;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.asmorix-courses-mega__count {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 139, 0.08);
  font-size: 11px;
  font-weight: 700;
  color: #00008b !important;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.asmorix-courses-mega__links {
  list-style: none;
  margin: 0;
  padding: 4px 4px 6px 2px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 62px;
  gap: 10px;
  align-content: start;
  justify-items: stretch;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #d8dbe3 #f1f2f6;
}

.asmorix-courses-mega .asmorix-courses-mega__links > li {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 62px;
  list-style: none;
}

/* Beat theme rule: .rts-header__menu ul li a { color: var(--body-bg) } (white) */
.rts-header__menu .asmorix-courses-mega__links li a,
.asmorix-courses-mega__links li a {
  position: relative;
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  align-content: center;
  width: 100%;
  height: 62px;
  min-height: 62px;
  max-height: 62px;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 30px 9px 13px !important;
  font-size: 15px !important;
  font-weight: 600;
  line-height: 1.3;
  color: #1a2744 !important;
  text-decoration: none !important;
  font-family: inherit !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 139, 0.1);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(0, 0, 80, 0.03);
  overflow: hidden;
  transform: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.rts-header__menu .asmorix-courses-mega__links li a::after,
.asmorix-courses-mega__links li a::after {
  content: "›";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: #9aa3b8;
  transition: color 0.15s ease, transform 0.15s ease;
}

.rts-header__menu .asmorix-courses-mega__links li a:hover,
.asmorix-courses-mega__links li a:hover {
  color: #00008b !important;
  background: #eef1ff !important;
  border-color: rgba(0, 0, 139, 0.28);
  box-shadow: 0 2px 8px rgba(0, 0, 139, 0.1);
  transform: none;
  padding-left: 11px !important;
  z-index: 1;
}

.rts-header__menu .asmorix-courses-mega__links li a:hover::after,
.asmorix-courses-mega__links li a:hover::after {
  color: #ff6900;
  transform: translateY(-50%) translateX(2px);
}

.asmorix-courses-mega__footer {
  position: relative;
  z-index: 6;
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  margin: 0;
  background: linear-gradient(90deg, #00008b 0%, #0a0aa8 55%, #1212b8 100%);
  border-top: 3px solid #ff6900;
  box-shadow: none;
  isolation: isolate;
}

/* Soft fade only over category column so last item doesn't kiss the band */
.asmorix-courses-mega__layout::after {
  content: "";
  position: absolute;
  left: 0;
  width: 320px;
  bottom: 0;
  height: 20px;
  background: linear-gradient(180deg, rgba(238, 241, 248, 0) 0%, #eef1f8 100%);
  pointer-events: none;
  z-index: 2;
}

.asmorix-courses-mega__footer p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #ffffff !important;
}

.rts-header__menu .asmorix-courses-mega__footer a,
.asmorix-courses-mega__footer a {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 14px !important;
  border-radius: 999px;
  background: #ffd200 !important;
  color: #1a1400 !important;
  font-size: 13px !important;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.rts-header__menu .asmorix-courses-mega__footer a:hover,
.asmorix-courses-mega__footer a:hover {
  background: #ffbe00 !important;
  color: #000000 !important;
  filter: none;
}

@media (max-width: 1100px) {
  .asmorix-courses-mega__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
}

@media (max-width: 991px) {
  .asmorix-courses-mega.rts-mega-menu {
    display: none !important;
  }
}

/* Mobile nested category lists */
#mobile-menu-active .asmorix-mm-cat > a.mobile-menu-link {
  font-weight: 600;
  color: #00008b;
}

#mobile-menu-active .asmorix-mm-cat .submenu .mobile-menu-link {
  font-weight: 500;
  font-size: 14px;
}

/* Flattened All Courses list: indent so it is clearly a submenu, not a dump of blog posts */
#mobile-menu-active .asmorix-mm-courses-mobile > .submenu {
  padding: 4px 0 10px;
  background: #f7f8fc;
}

#mobile-menu-active .asmorix-mm-courses-mobile > .submenu > li > a.mobile-menu-link {
  display: block;
  padding: 10px 22px 10px 36px !important;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  line-height: 1.35;
}

#mobile-menu-active .asmorix-mm-courses-mobile > .submenu > li > a.mobile-menu-link:hover,
#mobile-menu-active .asmorix-mm-courses-mobile > .submenu > li > a.mobile-menu-link:focus {
  color: #00008b;
  background: #eef0f8;
}
