/* 新闻列表样式 */
.news-list-container {
    margin: 20px 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    min-height: 700px;
}

.news-list-nav-item a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

.news-list-nav-item a:hover {
    color: inherit;
    text-decoration: none;
}

/* 左侧导航样式 */
.news-list-sidebar {
    width: 220px;
    background-color: #f5f5f5;
    border-right: 1px solid #eee;
}

.news-list-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list-nav-item {
    padding: 20px 20px; /* 增加上下内边距，从15px改为20px */
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    position: relative;
    transition: all 0.3s;
    line-height: 1.5; /* 增加行高 */
    font-weight: 500; /* 稍微加粗字体 */
}

.news-list-nav-item.active {
    background-color: #fff;
    color: #0056b3;
    font-weight: bold;
    border-left: 4px solid #0056b3;
}

.news-list-nav-item:hover {
    background-color: #e9e9e9;
}

/* 二级抽屉导航（左侧） */
.news-list-nav-item.has-children {
    padding-right: 30px; /* 为箭头和触控区留空间 */
}
.news-list-nav-item.has-children::after {
    content: "▸";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    transition: transform .18s ease, color .18s ease;
}
.news-list-nav-item.open::after,
.news-list-nav-item.has-children:hover::after {
    transform: translateY(-50%) rotate(90deg);
    color: #666;
}

.news-sublist {
    position: absolute;
    left: 100%;
    top: 0;
    width: calc(6em + 24px); /* 约等于6字宽，并考虑内边距 */
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
    border-radius: 8px;
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
    transition: all .18s ease;
    padding: 8px 0;
    z-index: 10;
}
.news-list-nav-item.open .news-sublist,
.news-list-nav-item.has-children:hover .news-sublist {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.news-subitem a { display: block; padding: 8px 12px; color: #333; text-decoration: none; }
.news-subitem a:hover { background: #f5f7fa; }

/* 触控展开热区（仅为提高移动端可点区域，不显示样式） */
.news-list-nav-item .sub-toggle {
    position: absolute;
    right: 0;
    top: 0;
    width: 36px;
    height: 100%;
    cursor: pointer;
    background: transparent;
    z-index: 5; /* 保证在链接之上可点击 */
}

/* 右侧内容区域 */
.news-list-main {
    flex: 1;
}

.news-list-content {
    padding: 15px 20px;
}

.news-list-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-list-item-title {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    position: relative;
    padding-left: 15px;
}

.news-list-item-title:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #0056b3;
}

.news-list-item-title a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.news-list-item-title a:hover {
    color: #0056b3;
}

.news-list-item-date {
    color: #999;
    font-size: 14px;
    margin-left: 20px;
}

.news-list-pane {
    display: none;
}

.news-list-pane.active {
    display: block;
}

/* 分页样式 */
.news-list-pagination {
    display: flex;
    justify-content: left;
    margin-top: 30px;
    padding-bottom: 20px;
}

.news-list-pagination-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    border: 1px solid #ddd;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.news-list-pagination-item:hover {
    border-color: #0056b3;
    color: #0056b3;
}

.news-list-pagination-item.active {
    background-color: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

.news-list-pagination-prev,
.news-list-pagination-next {
    padding: 0 15px;
    width: auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .news-list-container {
        flex-direction: column;
    }
    
    .news-list-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        position: relative; /* 使下拉层可覆盖右侧内容 */
        z-index: 100;
    }
    
    .news-list-nav {
        display: flex;
        overflow-x: auto;
        overflow-y: visible; /* 允许纵向展开子菜单 */
        align-items: stretch;
    }
    
    .news-list-nav-item {
        padding: 10px 15px;
        border-bottom: none;
        border-right: 1px solid #eee;
        white-space: nowrap;
        display: inline-flex; /* 纵向堆叠顶层文字与子菜单 */
        flex-direction: column;
    }
    
    .news-list-nav-item.active {
        border-left: none;
        border-bottom: 3px solid #0056b3;
    }
    
    .news-list-item {
        flex-direction: column;
    }
    
    .news-list-item-date {
        margin-left: 15px;
        margin-top: 5px;
    }

    /* 移动端下：次级菜单以下拉浮层形式在当前项下方展开，不撑高导航栏 */
    .news-list-nav-item { position: relative; display: block; }
    .news-sublist {
        position: absolute;
        left: 0;
        top: calc(100% + 6px);
        min-width: 140px;
        width: auto;
        background: #fff;
        border: 1px solid #eee;
        box-shadow: 0 10px 20px rgba(0,0,0,.08);
        border-radius: 6px;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        display: none;
        z-index: 1000; /* 保证在内容区域之上 */
    }
    .news-list-nav-item.open .news-sublist { display: block; }
    /* 键盘或点击后获得焦点也显示，增强鲁棒性 */
    .news-list-nav-item:focus-within .news-sublist { display: block; }
}

/* 移动端子菜单底部弹出面板（≤768px）样式迁移自 mobile.css */
@media (max-width: 768px) {
  .m-submenu-sheet {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: none;
    z-index: 100000;
  }
  .m-submenu-sheet.is-open { display: block; }
  .m-submenu-panel {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -12px 24px rgba(0,0,0,.18);
    max-height: 70vh;
    overflow: auto;
  }
  .m-submenu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
  }
  .m-submenu-close {
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
  }
  .m-submenu-list { list-style: none; margin: 0; padding: 8px 0; }
  .m-submenu-list li a { display: block; padding: 12px 16px; color: #333; text-decoration: none; }
  .m-submenu-list li a:hover { background: #f5f7fa; }
}

/* 触屏设备下（无论屏幕宽度）：次级菜单在当前项下方展开 */
@media (pointer: coarse) {
    .news-list-nav-item { position: relative; }
    .news-sublist {
        position: absolute;
        left: 0;
        top: calc(100% + 6px);
        min-width: 140px;
        background: #fff;
        border: 1px solid #eee;
        box-shadow: 0 10px 20px rgba(0,0,0,.08);
        border-radius: 6px;
        display: none;
        z-index: 1000;
    }
    .news-list-nav-item.open .news-sublist { display: block; }
    .news-list-nav-item:focus-within .news-sublist { display: block; }
}

/* 移动端子菜单弹窗样式 */
.submenu-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  z-index: 100000;
}
.submenu-modal.show { display: flex; }
.submenu-modal-box {
  width: calc(100% - 32px);
  max-width: 420px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  overflow: hidden;
}
.submenu-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}
.submenu-modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.submenu-modal-list { list-style: none; margin: 0; padding: 8px 0; }
.submenu-modal-list li a {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
}
.submenu-modal-list li a:hover { background: #f5f7fa; }

