* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  scroll-behavior: smooth;
  background-color: #f5f7fa;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.navbg {
  position: fixed;
  top: 0;
  left: 0;
  width: 28%;
  height: 170px;
  background-image: url('../images/nav.png');
  /* background: transparent; */
  /* background-color: black; */
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  z-index: 1000;
}

.navbg.nav-scrolled {
  display: none;
  visibility: hidden;
  width: 0;
  height: 0;
}

/* 主要内容区域 */
.main-content {
  padding: 20px;
  min-height: 100vh;
  background-color: #fff;
}

/* 面包屑导航样式调整 */
.breadcrumb {
  width: 100%;
  margin: 0 auto;
  padding: 20px 0 20px;
  padding-left: 0px;
  z-index: 10;
}

/* 默认状态（导航栏未滚动） */
body:not(.nav-scrolled) .breadcrumb {
  margin-top: 20px;
}

/* 滚动状态（导航栏变小） */
body.nav-scrolled .breadcrumb {
  margin-top: 90px;
  /* 70px（导航栏高度）+ 20px（额外间距） */
}

/* 移动端适配 */
@media (max-width: 768px) {
  .breadcrumb {
    width: 90%;
    padding: 20px 0 15px;
  }

  body.nav-scrolled .breadcrumb {
    margin-top: 80px;
    /* 移动端导航栏高度 + 间距 */
  }
}

/* 为固定导航栏添加顶部间距 - 仅对首页 */
body[data-page="home"] .main-body {
  padding-top: 170px;
}

body[data-page="home"].nav-scrolled .main-body {
  padding-top: 70px;
}

/* 顶部导航 */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* background: linear-gradient(135deg, #0d2a6e 0%, #1a3c8b 100%); */
  background: linear-gradient(135deg, #008ceb 0%, #0e2b6e 100%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  padding: 0;
  height: 170px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
}

/* .nav::before {
  content: "";
  position: fixed;
  top: 0;
  margin-left: 28%;
  inset: 0;
  width: 72%;
  background-image: url('../images/Home/navBc.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: -1;
} */

/* 滚动后的导航栏样式 */
.nav.scrolled {
  height: 70px;
  background-image: none;
  background-color: #0d2a6e;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.nav.scrolled .logo-container {
  display: flex;
  width: auto;
  margin: 0;
  padding: 0 10px;
  flex-shrink: 0;
}

.nav.scrolled .logo img {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.nav.scrolled .nav-tabs {
  width: auto;
  flex: 1;
  max-width: none;
  margin: 0;
  padding: 0 20px;
  background-color: transparent;
  position: relative;
  justify-content: flex-end;
  background-color: white;
}

.nav.scrolled .nav-tabs::before {
  display: none;
}

/* Logo容器 - 位于导航栏顶部左侧 */
.nav .logo-container {
  padding-top: 0;
  width: 90%;
  display: flex;
  /* justify-content: flex-start; */
  margin-bottom: 5px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1001;
}

.nav .logo img {
  max-width: 260px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
  transition: all 0.3s ease;
}

/* 标签栏容器 */
.nav-tabs {
  width: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  /* background-color: rgba(255, 255, 255, 0.1); */
  background-color: white;
  /* border-radius: 4px; */
  border-radius: 50px;
  padding: 5px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1001;
}

/* 标签样式 */
.nav-tabs a {
  /* color: #fff; */
  color: black;
  font-size: 18px;
  font-weight: 500;
  padding: 5px 5px;
  border-radius: 4px;
  transition: all 0.3s;
  margin: 0;
  display: block;
  text-align: center;
  flex: 1;
  min-width: 0;
}

.nav.scrolled .nav-tabs a {
  padding: 8px 16px;
  font-size: 15px;
  white-space: nowrap;
}

/* hover效果 */
.nav-tabs a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* 选中效果 */
.nav-tabs a.active {
  color: #1a3c8b;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50px;
}

/* 二级菜单样式 */
.nav-item {
  position: relative;
  flex: 1;
}

/* 桌面端：nav-item-header不影响布局，展开按钮隐藏 */
.nav-item-header {
  display: contents;
}

.submenu-toggle {
  display: none;
}


/* .nav-item:nth-child(1) {
  border-top-left-radius: 50%;
  border-bottom-left-radius: 50%;
}

.nav-item:nth-child(last-child) {
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
} */

.nav-item:hover .submenu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 4px 4px;
  display: none;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
}

.submenu a {
  font-size: 16px;
  padding: 14px 28px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
}

.submenu a:hover {
  background: #f5f7fa;
  color: #1a3c8b;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .nav-tabs {
    width: 90%;
    /* 在较小屏幕上稍微增加宽度 */
  }
}

@media (max-width: 992px) {
  .nav {
    padding: 10px 3%;
  }

  .nav .logo-container {
    padding: 0 5%;
  }

  .nav-tabs a {
    font-size: 16px;
    padding: 12px 20px;
  }

  .nav.scrolled .nav-tabs a {
    padding: 8px 16px;
    font-size: 15px;
  }

  .nav .logo img {
    max-width: 200px;
  }

  .submenu {
    visibility: hidden;
    display: none;
    width: 0;
    height: 0;
  }

  .nav.scrolled .nav-tabs {
    display: flex;
    flex-direction: row;
    width: 50px;
  }

  .nav.scrolled .nav-tabs::before {
    width: 50px;
    height: 50px;
  }
}

/* 移动端汉堡菜单按钮 */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  z-index: 1003;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: #1a3c8b;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* 移动端菜单遮罩 */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  /* 确保移动端菜单按钮始终显示 */
  .mobile-menu-toggle {
    display: flex !important;
    z-index: 1003 !important;
  }

  .nav {
    height: 90px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 0 12px 0 15px;
  }

  .nav.scrolled {
    height: 60px;
    min-height: 60px;
    flex-direction: row;
    padding: 0 10px;
    justify-content: space-between;
  }

  .nav .logo-container {
    width: auto;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }

  .nav.scrolled .logo-container {
    justify-content: flex-start;
  }

  .nav.scrolled .logo-container {
    padding: 0;
  }

  .nav .logo img {
    max-width: 180px;
  }

  .nav.scrolled .logo img {
    max-width: 120px;
  }


  .nav-tabs {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 280px !important;
    max-width: 80% !important;
    height: 100vh !important;
    background: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 60px 0 20px !important;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2) !important;
    transition: right 0.3s ease !important;
    z-index: 1002 !important;
    overflow-y: auto !important;
    border-radius: 0 !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
  }

  .nav-tabs.active {
    right: 0 !important;
  }

  .nav-tabs .nav-item {
    width: 100% !important;
    flex: none !important;
    flex-shrink: 0 !important;
    border-bottom: 1px solid #f0f0f0;
    position: relative !important;
  }

  /* 移动端导航项头部容器 */
  .nav-tabs .nav-item-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .nav-tabs .nav-item-header a {
    font-size: 16px !important;
    padding: 16px 20px !important;
    text-align: left !important;
    border-radius: 0 !important;
    display: block !important;
    flex: 1 !important;
    min-width: 0 !important;
    white-space: normal !important;
  }

  /* 移动端展开按钮 */
  .nav-tabs .submenu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-right: 10px !important;
    color: #666 !important;
    font-size: 12px !important;
    transition: transform 0.3s ease !important;
    flex-shrink: 0 !important;
  }

  .nav-tabs .submenu-toggle span {
    display: block !important;
    transition: transform 0.3s ease !important;
  }

  .nav-tabs .nav-item.active .submenu-toggle span {
    transform: rotate(180deg) !important;
  }

  /* 移动端子菜单默认隐藏 - 覆盖992px媒体查询的样式 */
  .nav-tabs .nav-item .submenu {
    position: static !important;
    display: none !important;
    width: 100% !important;
    box-shadow: none !important;
    background: #f8f9fa !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    height: auto !important;
  }

  /* 移动端展开时显示子菜单 - 使用更高优先级的选择器 */
  .nav-tabs .nav-item.active .submenu {
    display: block !important;
    visibility: visible !important;
  }

  .nav-tabs .submenu a {
    padding: 12px 40px !important;
    font-size: 14px !important;
    color: #666 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    display: block !important;
  }

  .nav-tabs .submenu a:hover {
    background: #f0f0f0 !important;
    color: #1a3c8b !important;
  }

  /* 确保移动端滚动后菜单样式正确 - 覆盖992px媒体查询的样式 */
  .nav.scrolled .nav-tabs {
    display: flex !important;
    flex-direction: column !important;
    width: 280px !important;
    max-width: 80% !important;
    position: fixed !important;
    right: -100% !important;
    height: 100vh !important;
    background: #fff !important;
    padding: 60px 0 20px !important;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2) !important;
    z-index: 1002 !important;
    overflow-y: auto !important;
    border-radius: 0 !important;
  }

  .nav.scrolled .nav-tabs.active {
    right: 0 !important;
  }

  /* 确保移动端菜单在未滚动时也能正确显示 */
  .nav:not(.scrolled) .nav-tabs.active {
    right: 0 !important;
  }

  .nav-search {
    display: none;
  }

  .navbg {
    display: none;
  }

  body[data-page="home"].nav-scrolled .main-body {
    padding-top: 60px;
  }

  body.nav-scrolled .banner-container {
    top: 60px;
  }

  body.nav-scrolled .center-intro-wrapper,
  body.nav-scrolled .news-page-wrapper,
  body.nav-scrolled .conference-wrapper,
  body.nav-scrolled .service-detail-wrapper,
  body.nav-scrolled .service-center-wrapper,
  body.nav-scrolled .recruitment-wrapper,
  body.nav-scrolled .cluster-container,
  body.nav-scrolled .news-detail-wrapper {
    padding-top: 60px;
  }
}

/* 页脚 */
.footer {
  padding-top: 50px;
  background: #1a3c8b;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  width: 80%;
  max-width: 1400px;
  margin: 0 auto;
  gap: 24px;
}

.footer-links {
  position: relative;
  float: left;
  display: flex;
  flex-direction: row;
  gap: 60px;
}

.footer .logo-area {
  flex-shrink: 0;
  text-align: center;
  margin-left: 30px;
}

.footer .logo-area .icons {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.footer .logo-area .icons p {
  padding-top: 20px;
}

.footer .logo-area .icon img {
  width: 150px;
  height: 150px;
  border-radius: 6px;
  object-fit: cover;
}

.footer .link-column h3 {
  margin-bottom: 12px;
  font-size: 16px;
  text-align: left;
}

.footer .link-column ul {
  list-style: none;
  text-align: left;
  padding: 0;
}

.footer .link-column ul li {
  margin-bottom: 6px;
}

.footer .link-column ul a {
  color: #e0e0e0;
  font-size: 13px;
  transition: color 0.3s;
  text-decoration: none;
}

.footer .link-column ul a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  background: #0d2a5c;
  margin-top: 50px;
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: #d6d6d6;
  margin: 0;
}

@media (max-width: 1024px) {
  .footer-links {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .footer .container {
    flex-direction: column;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    order: 2;
    gap: 30px;
    display: none;
    visibility: hidden;
    width: 0;
    height: 0;
  }

  .footer .logo-area {
    margin-left: 0;
    margin-bottom: 30px;
    order: 1;
  }
}

@media (max-width: 480px) {
  .footer-links {
    grid-template-columns: 1fr;
    display: none;
    visibility: hidden;
    width: 0;
    height: 0;
  }

  .nav.scrolled {
    height: 55px;
  }

  .nav.scrolled .logo img {
    max-width: 100px;
  }

  .mobile-menu-toggle {
    width: 36px;
    height: 36px;
    top: 8px;
    right: 8px;
  }

  body[data-page="home"].nav-scrolled .main-body,
  body.nav-scrolled .center-intro-wrapper,
  body.nav-scrolled .news-page-wrapper,
  body.nav-scrolled .conference-wrapper,
  body.nav-scrolled .service-detail-wrapper,
  body.nav-scrolled .service-center-wrapper,
  body.nav-scrolled .recruitment-wrapper,
  body.nav-scrolled .cluster-container,
  body.nav-scrolled .news-detail-wrapper {
    padding-top: 55px;
  }

  body.nav-scrolled .banner-container {
    top: 55px;
  }
}

/* 导航栏搜索框样式 */
.nav-search {
  position: fixed;
  top: 30px;
  margin-left: auto;
  right: 100px;
  z-index: 1001;
}

.search-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 4px 8px;
  min-width: 200px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 8px;
  font-size: 14px;
  color: #333;
  outline: none;
}

.search-input::placeholder {
  color: #666;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #1a3c8b;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.search-btn:hover {
  background-color: rgba(26, 60, 139, 0.1);
}

/* 滚动后隐藏搜索框 */
.nav.scrolled .nav-search {
  display: none;
}