/* 外层白色背景容器 */
.nav-wrapper {
  background-color: #fff;
  padding: 20px 0;
}

/* 组件容器 */
.nav-container {
  box-sizing: border-box;
  width: 1200px;
  margin: 0 auto;
  background-color: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 4px;
  padding: 20px 40px;
  font-family: "微软雅黑";
}

.nav-container *,
.nav-container *::before,
.nav-container *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.nav-container a {
  text-decoration: none;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 40px;
}

/* 一级导航项 */
.nav-item {
  position: relative;
  display: inline-block;
  width: 100px;
  padding: 12px 0;
  color: #333333;
  text-decoration: none;
  font-size: 15px;
  border-radius: 4px;
  transition: color 0.3s, background-color 0.3s;
  cursor: pointer;
  text-align: left;
}

.nav-item:hover {
  color: #bd0000;
}

.nav-item.has-dropdown > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* 下拉弹框 - 改用JS控制显示 */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 10px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.dropdown.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 箭头 */
.dropdown-arrow {
  position: absolute;
  top: 2px;
  left: 40px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #bd0000;
  z-index: 1001;
}

.dropdown-arrow::after {
  content: '';
  position: absolute;
  top: 2px;
  left: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #fff;
}

/* 二级菜单面板 */
.dropdown-panel {
  display: flex;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  width: 900px;
  border: 2px solid #bd0000;
  line-height: 40px;
}

/* 左侧分类菜单 */
.panel-left {
  width: 140px;
  background: linear-gradient(180deg, #f8f9fa 0%, #f0f1f2 100%);
  padding: 15px 0;
  border-right: 1px solid #eee;
}

.category-item {
  padding: 14px 20px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  font-weight: 500;
}

.category-item:hover {
  color: #bd0000;
  background: rgba(189, 0, 0, 0.05);
}

.category-item.active {
  color: #bd0000;
  background: #fff;
  font-weight: 600;
}

.category-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: #bd0000;
  border-radius: 0 2px 2px 0;
}

/* 右侧内容区 */
.panel-right {
  flex: 1;
  padding: 15px 25px;
}

.panel-content {
  display: none;
}

.panel-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 内容头部 */
.content-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.content-header h3 {
  font-size: 18px;
  color: #333;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.content-header h3 a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.content-header h3 a:hover {
  color: #bd0000;
}

/* 描述行：文本+查看详情按钮 */
.desc-row {
  font-size: 13px;
  color: #666;
  line-height: 1.8;
}

.desc-text {
  margin: 0;
}

.btn-detail {
  color: #bd0000 !important;
  text-decoration: none;
  white-space: nowrap;
  margin-left: 8px;
}

/* 内容区块 */
.content-section {
  margin-bottom: 10px;
}

.content-section h4 {
  font-size: 15px;
  color: #333;
  margin: 0 0 8px 0;
  font-weight: 600;
  position: relative;
  padding-left: 12px;
}

.content-section h4::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  background: #bd0000;
  border-radius: 2px;
}

/* 课程列表 */
.course-list,
.book-list {
  display: flex;
  gap: 15px;
}

.course-item,
.book-item {
  width: 140px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.course-item:hover,
.book-item:hover {
  transform: translateY(-3px);
}

.course-img,
.book-img {
  width: 140px;
  height: 80px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-radius: 6px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.course-img::after,
.book-img::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: rgba(189, 0, 0, 0.1);
  border-radius: 50%;
}

.course-title,
.book-title {
  font-size: 12px;
  color: #333;
  line-height: 1.4;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-item:hover .course-title,
.book-item:hover .book-title {
  color: #bd0000;
}

/* 资讯区块 */
.news-section {
  margin-bottom: 0;
}

.news-categories {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.news-category {
  flex: 1;
  min-width: 140px;
  max-width: 160px;
}

.news-tag {
  display: inline-block;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(135deg, #bd0000 0%, #e60000 100%);
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-weight: 500;
}

.news-category a {
  display: block;
  font-size: 12px;
  color: #555;
  line-height: 1.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none;
  padding: 2px 0;
}

.news-category a:hover {
  color: #bd0000;
  padding-left: 5px;
}

.more-link {
  color: #bd0000 !important;
  font-size: 11px !important;
  margin-top: 5px;
}

.more-link:hover {
  text-decoration: underline;
}

/* 新版资讯列表样式 */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.news-tag-small {
  font-size: 12px;
  color: #fff;
  background: #bd0000;
  padding: 2px 8px;
  border-radius: 3px;
  flex-shrink: 0;
  line-height: 1.4;
}

.news-row a {
  font-size: 14px;
  color: #555;
  text-decoration: none;
}

.news-row a:hover {
  color: #bd0000;
}

.news-row .more-link {
  margin-left: auto;
  margin-top: 0;
  flex-shrink: 0;
  font-size: 13px !important;
}

/* 资讯链接样式 */
.news-link {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* 气泡提示 */
.news-tooltip {
  position: fixed;
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.news-tooltip.show {
  opacity: 1;
}

.news-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 20px;
  border: 6px solid transparent;
  border-top-color: #333;
}

/* 快捷入口 */
.quick-links {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.quick-link-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.quick-link-item:hover {
  color: #bd0000;
}

.quick-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #bd0000;
  color: #fff;
  font-size: 12px;
  border-radius: 50%;
}

/* 初级&中级切换标签 */
.top-level-tabs {
  display: inline-flex;
  gap: 0;
  margin-bottom: 12px;
  background: #f5f5f5;
  border-radius: 3px;
  padding: 2px;
}

.top-level-tab {
  font-size: 12px;
  color: #666;
  cursor: pointer;
  padding: 3px 10px;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.top-level-tab:hover {
  color: #bd0000;
}

.top-level-tab.active {
  color: #fff;
  background: #bd0000;
}

.level-panel {
  display: none;
}

.level-panel.active {
  display: block;
}
