.dropdown-menu {
  min-width: 1100px;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: none;
  flex-wrap: wrap;
  left: 50% !important;
  transform: translateX(-50%);
  background-color: white;
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-top: 20px;
}

/* 一级菜单项容器样式 */
.dropdown-menu > li {
  flex: 0 0 33.333%;
  padding: 1px 20px;
  min-width: 250px;
  display: flex;
  flex-direction: column;
}
.dropdown-menu.kkli > li {
  flex: 0 0 25%;
}

/* 一级菜单项样式 */
.dropdown-menu > li > a {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-blue);
  padding: 0 0 10px 0;
  white-space: normal;
  border-bottom: 2px solid var(--primary-blue);
  margin-bottom: 12px;
  text-decoration: none;
  letter-spacing: 0.3px;
  height: 52px;
  display: flex;
  align-items: flex-end;
  line-height: 1.3;
}

/* 二级菜单项容器样式 */
.dropdown-menu > li > .submenu-items {
  padding-left: 8px;
  border-left: 2px solid #f0f0f0;
  margin-left: 5px;
  flex: 1;
}

/* 二级菜单项样式 */
.dropdown-menu > li > .submenu-items a {
  font-size: 14px;
  font-weight: 500;
  color: #3081cd;
  padding: 8px 15px;
  display: block;
  white-space: normal;
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 6px;
  transition: all 0.2s ease;
  border-radius: 6px;
}

/* 三级菜单项容器样式 */
.dropdown-menu > li > .submenu-items .sub-submenu-items {
  padding-left: 15px;
  margin-top: 6px;
  margin-bottom: 10px;
  border-left: 1px solid #f0f0f0;
}

/* 三级菜单项样式 */
.dropdown-menu > li > .submenu-items .sub-submenu-items a {
  font-size: 13px;
  color: #666;
  padding: 6px 15px 6px 25px;
  font-weight: 400;
  position: relative;
}

.dropdown-menu > li > .submenu-items .sub-submenu-items a::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background-color: #999;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.dropdown-menu > li > .submenu-items .sub-submenu-items a:hover::before {
  background-color: var(--primary-blue);
}

/* 悬停效果 */
.dropdown-menu > li > a:hover {
  color: var(--secondary-blue);
  background-color: transparent;
}

.dropdown-menu > li > .submenu-items a:hover {
  color: var(--primary-blue);
  background-color: #f8f9fa;
}

.dropdown-menu > li > .submenu-items .sub-submenu-items a:hover {
  color: var(--primary-blue);
  background-color: #f8f9fa;
}

/* 展开所有子菜单 */
.dropdown-menu.show {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.submenu-items {
  display: none;
  opacity: 1;
  visibility: visible;
}

.submenu-items.show {
  display: block !important;
}

/* 二级菜单默认显示 */
.dropdown-menu.show .submenu-items {
  display: block;
}

/* 三级菜单默认显示 */
.dropdown-menu.show .sub-submenu-items {
  display: block;
}

/* 添加过渡动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

/* 响应式处理 */
@media (max-width: 991px) {
  .dropdown-menu {
    min-width: 100%;
    flex-direction: column;
    transform: none;
    left: 0 !important;
    padding: 15px;
  }

  .dropdown-menu > li {
    flex: 0 0 100%;
    padding: 10px;
  }

  .dropdown-menu > li > a {
    white-space: normal;
    font-size: 16px;
  }

  .dropdown-menu > li > .submenu-items a {
    font-size: 14px;
  }

  .dropdown-menu > li > .submenu-items .sub-submenu-items a {
    font-size: 13px;
  }

  /* 减少移动端导航栏高度 */
  .navbar {
    min-height: auto !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .navbar-brand img {
    max-height: 40px !important;
    width: auto !important;
  }

  .navbar-toggler {
    padding: 4px 8px !important;
    font-size: 1rem !important;
  }

  .navbar .container,
  .navbar .container-fluid {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .navbar-nav > li > a {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
}

body {
  /*background-image: url("path/to/dna-background.jpg");*/
  background-repeat: no-repeat;
  background-size: 50%;
  background-position: center;
}

/* 修改抽屉标题样式，确保在滚动时始终可见 */
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: var(--primary-blue);
  position: sticky;
  top: 0;
  z-index: 1060;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 确保抽屉内容不会覆盖标题 */
.drawer-content {
  padding: 15px 0;
  position: relative;
  z-index: 1050;
}

.drawer-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: var(--primary-blue);
  z-index: 1050;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  padding: 0;
}

.drawer-menu.open {
  right: 0;
}

.drawer-title {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.drawer-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.drawer-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.drawer-menu-item {
  margin-bottom: 5px;
}

.drawer-menu-link {
  display: block;
  padding: 12px 20px;
  color: white;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 16px;
  transition: background-color 0.2s ease;
}

.drawer-menu-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.drawer-submenu {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 5px 0;
}

.drawer-submenu-link {
  display: block;
  padding: 10px 20px 10px 35px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  position: relative;
  transition: background-color 0.2s ease;
}

.drawer-submenu-link::before {
  content: "•";
  position: absolute;
  left: 20px;
  color: var(--secondary-yellow);
}

.drawer-submenu-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
}

.drawer-subsubmenu {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 5px 0;
}

.drawer-subsubmenu-link {
  display: block;
  padding: 8px 20px 8px 50px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 13px;
  position: relative;
  transition: background-color 0.2s ease;
}

.drawer-subsubmenu-link::before {
  content: "-";
  position: absolute;
  left: 35px;
  color: var(--secondary-yellow);
}

.drawer-subsubmenu-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.show {
  display: block;
  opacity: 1;
}

@media (min-width: 992px) {
  .drawer-menu,
  .drawer-backdrop {
    display: none !important;
  }
}

/* 移动端导航栏高度调整 */
@media (max-width: 767px) {
  .navbar {
    min-height: auto !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }

  .navbar-brand img {
    max-height: 35px !important;
  }

  .navbar-toggler {
    padding: 3px 6px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

/* Update the positioning for resourcesDropdown to match servicesDropdown */
#resourcesDropdown + .dropdown-menu {
  width: 260px !important; /* Keep the width */
  max-width: 260px !important;
  min-width: 260px !important;
  padding: 0 !important;
  background-color: white !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden !important;
  margin-top: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  transform-origin: top center !important;
  animation: resourcesDropdownFadeIn 0.3s ease !important;

  /* Add these properties to match servicesDropdown positioning */
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

/* Update the animation to account for the new transform */
@keyframes resourcesDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}
