/* 顶部导航栏整体 */
.out {
  width: 100%;
  /* 背景占满整个页面宽度 */
  background: #007a8a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  z-index: 1000;
  box-sizing: border-box;
  position: relative;
  /* 非 fixed */
  padding: 0;
  /* 背景不留边距 */
}

.ministerial-nav {
  background: #007a8a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  /* 垂直排列 */
  z-index: 1000;
  box-sizing: border-box;
  position: relative;
  /* 非 fixed */
  max-width: 1200px;
  /* 固定宽度 */
  margin: 0 auto;
  /* 居中 */
  padding: 0 1.5rem;
  /* 固定左右内边距 */
}

/* 顶部区域容器 */
.site-title-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* 左右分开 */
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: none;
}

/* 菜单按钮靠右 */
.menu-toggle {
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* 菜单文字靠左 */
.menu-label {
  font-size: 1.3rem;
  color: white;
  display: none;
  /* 默认隐藏，大屏幕不显示 */
  font-weight: bold;
}

/* 内部布局 */
.nav-inner {
  padding: 0 20px;
  display: flex;
  flex-direction: row;
  gap: 6px;
  padding: 2px 0;
}

/* 链接样式 */
.nav-link {
  color: rgba(255, 255, 255, 0.95);
  padding: 12px 24px;
  text-decoration: none;
  position: relative;
  font-size: 16px;
  transition: all 0.3s ease;
  display: block;
}

/* hover 效果 */
.nav-link:hover {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}

/* 激活态 */
.nav-link.active {
  color: #ffd700;
  background: rgba(0, 0, 0, 0.25);
  border-left: 4px solid #ffd700;
  border-right: 4px solid #ffd700;
  font-weight: 600;
}



/* 响应式处理：在手机上改为顶部栏 */
@media (max-width: 768px) {
  .ministerial-nav {
    position: relative;
    height: auto;
    width: 100%;
    flex-direction: column;
    padding: 0;
  }

  .menu-label {
    display: inline;
  }

  .site-title-box {
    padding: 12px 25px 12px 25px;
    display: flex;
  }

  /* 菜单按钮 */
  .menu-toggle {
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: block;
    /* 确保显示 */
  }

  .nav-inner {
    flex-direction: row;
    justify-content: space-around;
    padding: 10px 0;
  }

  .nav-link {
    padding: 10px 12px;
  }

  body {
    margin-left: 0;
  }
}

/* 响应式处理 */
@media (max-width: 768px) {
  .ministerial-nav {
    position: relative;
    height: auto;
    width: 100%;
    flex-direction: column;
  }

  .nav-inner {
    flex-direction: column;
    width: 100%;
    background: #007a8a;
    display: none;
    /* 默认隐藏菜单 */
  }

  /* 展开菜单时显示 */
  .nav-inner.show {
    display: flex;
  }

  .nav-link {
    padding: 12px 20px;
    text-align: center;
  }

  body {
    margin-left: 0;
  }
}
