/* Main Header Menu Redesign */
header.main-header .main-menu {
  background: transparent !important;
  border-bottom: 0 !important;
  margin-top: 8px;
  padding: 0;
}

#main_menu {
  --menu-bg: #ffffff;
  --menu-border: #dce7f3;
  --menu-text: #284765;
  --menu-muted: #6f869d;
  --menu-accent: #0c75b8;
  --submenu-title: #0a527e;

  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 8px;
  list-style: none;
  position: relative;
  top: 0;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(17, 61, 99, .08);
}

#main_menu .main_list {
  list-style: none;
  position: relative;
  margin: 0;
  padding: 0;
}

#main_menu .main_list > a {
  color: var(--menu-text) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 36px;
  white-space: nowrap;
  border-radius: 10px;
  transition: all .2s ease;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

#main_menu .main_list > a .icon {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-left: 2px solid #8da2b8;
  border-bottom: 2px solid #8da2b8;
  transform: rotate(-45deg);
  margin-top: -1px;
  transition: transform .2s ease, border-color .2s ease;
}

#main_menu .main_list:not(:has(ul)) > a .icon {
  display: none;
}

#main_menu .main_list:hover > a,
#main_menu .main_list > a:hover {
  color: var(--menu-accent) !important;
  background: #eef6fd;
}

#main_menu .main_list:hover > a .icon {
  transform: rotate(135deg);
  border-color: var(--menu-accent);
}

.main_list ul {
  background: #fff;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(920px, 92vw);
  padding: 10px;
  z-index: 9999;
  border: 1px solid #dce7f3;
  box-shadow: 0 16px 32px rgba(13, 45, 76, .13);
  border-radius: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .2s ease;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  max-height: 68vh;
  overflow: auto;
}

.main_list ul::after {
  content: "";
  display: block;
  clear: both;
}

.main_list ul ol {
  float: none;
  margin: 0;
  list-style: none;
  width: 25%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-left: 1px solid #edf3f9;
  background: transparent;
}

.main_list ul ol:nth-child(4n) {
  border-left: none;
}

.main_list ul ol li {
  line-height: 22px;
  font-size: 12px;
  color: var(--menu-muted);
  font-weight: 500;
  text-align: right;
}

.main_list ul ol a li {
  color: #5f7387 !important;
  transition: color .2s ease !important;
  margin-right: 6px;
}

.main_list ul ol a:hover li {
  color: var(--menu-accent) !important;
}

.main_list ul ol li:first-of-type {
  list-style: none;
  font-size: 12px;
  color: var(--submenu-title);
  font-weight: 800;
  text-align: right;
  padding: 4px 0 8px;
  border-bottom: 1px solid #edf3f9;
  margin-bottom: 4px;
  line-height: 1.6;
}

.main_list ul ol a.mmmk li:first-of-type {
  color: var(--submenu-title) !important;
}

.main_list2 {
  margin-right: 8px !important;
  line-height: 21px !important;
  font-size: 11px !important;
}

.main_list:hover ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 1399px) {
  #main_menu {
    gap: 2px;
    padding: 6px;
  }

  #main_menu .main_list > a {
    padding: 8px 10px;
    font-size: 11px;
  }

  .main_list ul {
    width: min(860px, 94vw);
  }
}

@media (max-width: 1199px) {
  .main_list ul ol {
    width: 33.3333%;
  }

  .main_list ul ol:nth-child(4n) {
    border-left: 1px solid #edf3f9;
  }

  .main_list ul ol:nth-child(3n) {
    border-left: none;
  }
}

/* Mobile Header Menu Redesign */
@media (max-width: 991px) {
  nav.header-responsive {
    background: #ffffff !important;
    border-bottom: 1px solid #e5edf5 !important;
    box-shadow: 0 6px 18px rgba(12, 44, 73, .08);
  }

  nav.header-responsive .navbar-translate {
    min-height: 56px;
    align-items: center;
  }

  nav.header-responsive .navbar-brand img {
    height: 28px !important;
    width: auto;
  }

  nav.header-responsive .navbar-toggler {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f3f8fd;
    border: 1px solid #d8e6f4;
    padding: 8px;
  }

  nav.header-responsive .navbar-toggler .navbar-toggler-bar {
    background: #1f4f77 !important;
  }

  nav.header-responsive .search-nav {
    margin-top: 0;
  }

  nav.header-responsive .search-nav ul li a {
    color: #2e5b83;
  }

  nav.header-responsive .navbar-collapse {
    background: #ffffff;
    border: 1px solid #dbe7f3;
    border-radius: 12px;
    margin-top: 10px;
    padding: 10px 8px;
    box-shadow: 0 14px 30px rgba(13, 45, 76, .14);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }

  nav.header-responsive ul.navbar-nav.default {
    padding: 0;
    margin: 0;
  }

  nav.header-responsive > ul li,
  nav.header-responsive ul.navbar-nav.default > li {
    float: none;
    width: 100%;
  }

  nav.header-responsive ul.navbar-nav.default > li > a {
    display: block;
    padding: 10px 40px 10px 10px;
    border-radius: 10px;
    color: #24496c !important;
    font-size: 13px;
    font-weight: 700;
    background: #f8fbff;
    margin-bottom: 6px;
    line-height: 1.6;
    position: relative;
  }

  nav.header-responsive ul.navbar-nav.default > li.sub-menu > a::before,
  nav.header-responsive ul.navbar-nav.default > li.sub-menu > a::after {
    display: none !important;
  }

  nav.header-responsive ul.navbar-nav.default > li.sub-menu::before {
    content: "";
    position: absolute;
    right: 14px;
    top: 16px;
    width: 7px;
    height: 7px;
    border-left: 2px solid #7690a8;
    border-bottom: 2px solid #7690a8;
    transform: rotate(-45deg);
    z-index: 2;
    transition: transform .2s ease;
  }

  nav.header-responsive ul.navbar-nav.default > li.sub-menu.open::before {
    transform: rotate(135deg);
  }

  nav.header-responsive ul ul {
    display: none;
    background: #ffffff;
    border: 1px solid #e7eff7;
    border-radius: 10px;
    padding: 6px;
    margin: 0 0 8px;
    direction: rtl;
  }

  nav.header-responsive ul > li > ul > li > a {
    color: #56728f !important;
    font-size: 12px;
    padding: 8px 10px;
    line-height: 1.6;
    border-radius: 8px;
    background: #fbfdff;
    margin-bottom: 4px;
  }

  nav.header-responsive ul > li > ul > li > a:hover {
    color: #0c75b8 !important;
    background: #eef6fd;
  }

  nav.header-responsive ul > li > ul > li::before {
    display: none !important;
  }
}
