/* ===== 品牌变量 ===== */
:root {
    --brand-primary: #1241a8;
    --brand-dark: #0d3386;
    --brand-light: #e8effb;
    --bs-primary: #1241a8;
    --bs-primary-rgb: 18, 65, 168;
    --bs-link-color: #1241a8;
    --bs-link-hover-color: #0d3386;
    --bs-border-color: #ededed;
}

/* ===== 全局基础 ===== */
body {
    font-size: 14px;
    font-family: 'Microsoft YaHei', '微软雅黑', system-ui, -apple-system, sans-serif;
    background: #f6f6f6;
}
a { text-decoration: none; color: #555; }
a:hover { color: var(--brand-dark); }
li { list-style: none; }
img { border: 0; vertical-align: middle; }
h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
h2, h3 { margin: 0; padding: 0; font-weight: inherit; font-size: inherit; }

/* ===== 自定义容器 ===== */
.page-wrap { width: 1200px; margin: 0 auto; }
@media (max-width: 1200px) {
    .page-wrap { width: 100%; padding: 0 10px; }
    .section-card { height: auto !important; }
}

/* ===== Bootstrap 品牌色覆盖 ===== */
.btn-primary {
    --bs-btn-bg: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
}
.text-primary { color: var(--brand-primary) !important; }
.bg-primary { background-color: var(--brand-primary) !important; }
.border-primary { border-color: var(--brand-primary) !important; }

/* ===== 主导航 ===== */
.main-nav .nav-link {
    color: #fff;
    font-size: 18px;
    padding: 10px 18px;
    white-space: nowrap;
}
.main-nav .nav-link i { margin-right: 6px; }
.main-nav .nav-link.active,
.main-nav .nav-link:hover { color: #fff !important; background: var(--brand-dark); }
@media (max-width: 767px) {
    .main-nav .nav-link { font-size: 15px; padding: 8px 12px; }
    .main-nav .nav-fill > .nav-item { flex: 0 0 auto; }
}

/* ===== 标题底部强调线 ===== */
.card-title-accent {
    line-height: 42px;
    border-bottom: 4px solid var(--brand-primary);
}

/* ===== 新闻列表 ===== */
.news-list li {
    position: relative;
    padding: 0 10px 0 22px;
    display: flex;
    align-items: center;
    height: 33px;
}
.news-list li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    margin-top: -3px;
    width: 6px;
    height: 6px;
    background: var(--brand-primary);
    border-radius: 50%;
}
.news-list li:hover { background: var(--brand-light); }
.news-list li:hover::before { background: var(--brand-dark); }
.news-list .news-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    color: #555;
}
.news-list .news-link:hover { color: var(--brand-primary); }
.news-list .date { color: #b9b9b9; flex-shrink: 0; margin-left: 8px; }

/* ===== 排行列表 ===== */
.rank-list .list-group-item {
    font-size: 14px;
    border: 0;
    border-bottom: 1px dotted #f0f0f0;
    color: #333;
}
.rank-list .list-group-item:last-child { border-bottom: 0; }
.rank-list .list-group-item:hover { color: var(--brand-primary); background: transparent !important; }
.rank-list.list-group-numbered > .list-group-item::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: #c0c0c0;
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 400;
    margin-right: 10px;
    padding: 0;
}
.rank-list.list-group-numbered > .list-group-item:nth-child(1)::before { background: #ff4d4f; }
.rank-list.list-group-numbered > .list-group-item:nth-child(2)::before { background: #ff7a45; }
.rank-list.list-group-numbered > .list-group-item:nth-child(3)::before { background: #ffa940; }

/* ===== 搜索栏 ===== */
.search-bar { background: #d0ddf5; }
.search-bar .search-input { width: 350px; }
@media (max-width: 768px) {
    .search-bar .search-input { width: 100%; }
}

/* ===== 热门关键词 ===== */
.keyword-box {
    max-width: 680px;
    gap: 8px 12px;
    margin-top: 22px;
}
@media (max-width: 767px) {
    .keyword-box { max-width: 100%; margin-top: 10px; justify-content: center; }
}
.keyword-box .kw-title { font-size: 14px; color: #888; flex-shrink: 0; }
.keyword-box .kw-title i { color: var(--brand-primary); margin-right: 3px; }
.keyword-box a { color: var(--brand-primary); font-size: 13px; white-space: nowrap; }
.keyword-box a:hover { color: var(--brand-dark); text-decoration: underline; }

/* ===== 侧栏标题装饰条 ===== */
.sidebar-title .radius-icon {
    position: absolute;
    width: 5px;
    height: 18px;
    background: var(--brand-primary);
    border-radius: 14px;
    left: 10px;
    top: 12px;
}

/* ===== 分类卡片 ===== */
.section-card { height: 360px; overflow: hidden; }
@media (max-width: 992px) {
    .section-card { height: auto; }
}

/* ===== 快速导航 ===== */
.box_toplist ul li {
    line-height: 38px;
    border-bottom: 1px dotted #f0f0f0;
    font-size: 14px;
    padding: 2px 15px;
}
.box_toplist ul li strong { margin-right: 12px; }
.box_toplist ul li strong a { color: var(--brand-primary); }
.box_toplist ul li a { color: #666; margin: 0 8px; white-space: nowrap; }
.box_toplist ul li a:hover { color: var(--brand-primary); }

/* ===== 友情链接 ===== */
.friend-link .link a {
    display: inline-block;
    color: #666;
    margin: 10px;
    font-size: 14px;
}
.friend-link .link a:hover { color: var(--brand-primary); }

/* ===== 底部导航 ===== */
.footer-nav { background: var(--brand-dark); }
.footer-nav .nav a { color: #fff; margin: 0 15px; }
.footer-nav .nav a:hover { text-decoration: underline; }
.footer { border-top: #091f5c solid 1px; color: #333; }
.footer a { color: #333; }

/* ===== 更多按钮 ===== */
.more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary);
    color: #fff;
    height: 22px;
    width: 52px;
    border-radius: 20px;
    margin-right: 15px;
    font-size: 15px;
    font-weight: bold;
    transition: background 0.2s;
}
.more-btn:hover { color: #fff; background: var(--brand-dark); }

/* ===== 面包屑 ===== */
.breadcrumb { color: #A1A1A1; margin: 15px 0; font-size: 14px; }
.breadcrumb a { color: #A1A1A1; margin: 0 5px; }
.breadcrumb a:hover { color: var(--brand-primary); }

/* ===== 子导航标签 ===== */
.subnav-tabs { background: #F2F2F2; padding: 0; }
.subnav-tabs a {
    display: inline-block;
    height: 40px;
    line-height: 40px;
    padding: 0 20px;
    color: #666;
}
.subnav-tabs .active { background: var(--brand-primary); color: #fff; }

/* ===== Logo ===== */
.logo-img { height: 60px; }
@media (max-width: 767px) {
    .logo-img { height: 40px; }
}

/* ===== 内容表格 ===== */
.content-table {
    width: 100%;
    border: #f1f1f1 solid 1px;
    border-collapse: collapse;
    color: #666;
    background: #fff;
}
.content-table td,
.content-table th {
    border: #f1f1f1 solid 1px;
    border-collapse: collapse;
    padding: 12px 15px;
}
.content-table th { background: #f9f9f9; font-weight: 600; color: #333; }
.content-table tr:hover { background: var(--brand-light); }
.content-table .news-link-title {
    display: block;
    width: 100%;
    min-width: 400px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: normal;
    color: #333;
}
.content-table .news-link-title:hover { color: var(--brand-primary); }
.content-table a { display: inline-block; margin: 0 5px; }
.content-table .red { color: var(--brand-primary); }
.content-table .blue { color: #3597CF; }

/* ===== 文章详情页 ===== */
.article-detail { padding: 15px; }
.article-title {
    position: static;
    width: auto;
    height: auto;
    padding: 0 0 10px 0;
    margin: 0 0 15px 0;
    overflow: visible;
    clip: auto;
    border: 0;
    font-size: 25px;
    font-weight: bold;
    text-align: center;
}
.article-meta {
    color: #999;
    margin-top: 10px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: #E1E1E1 dotted 1px;
}
.article-body { line-height: 1.8em; margin: 20px 0; color: #666; }

/* ===== 打印按钮 ===== */
.btn-print {
    color: var(--brand-primary);
    cursor: pointer;
    margin-left: 10px;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}
.btn-print:hover { color: var(--brand-dark); }

/* ===== 分页 ===== */
.pagination { text-align: center; color: #999; margin-top: 20px; margin-bottom: 20px; }
.pagination a {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    color: #aaa;
    border: #cacaca solid 1px;
    background: #f5f5f5;
    padding: 0 6px;
    margin: 0 3px;
    border-radius: 3px;
}
.pagination a.active,
.pagination a:hover {
    color: #fff;
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}
.pagination .num {
    height: 20px;
    line-height: 20px;
    width: 40px;
    vertical-align: middle;
    border: #cacaca solid 1px;
    text-align: center;
}

/* ===== 筛选标签 ===== */
.filter-tag {
    display: inline-block;
    background: var(--brand-primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    margin: 0 5px;
    font-size: 12px;
}
.filter-tag a { color: #fff; margin-left: 5px; }

/* ===== 搜索条件栏 ===== */
.filter-bar { background: #f0f4fc; }
.filter-label { color: var(--brand-primary); }
.filter-clear { color: #999; }

/* ===== 分类描述 ===== */
.category-desc { color: #999; font-size: 14px; }

/* ===== 热门关键词标签 ===== */
.kw-tag {
    display: inline-block;
    padding: 5px 10px;
    border: #EDEDED solid 1px;
    border-radius: 10px;
    color: #666;
    margin: 5px;
}
.kw-tag:hover { color: var(--brand-primary); border-color: var(--brand-primary); }

/* ===== 文章上下篇导航 ===== */
.article-prev-next { border-color: #E1E1E1 !important; }
.article-prev-next .prev,
.article-prev-next .next { max-width: 48%; }
.article-prev-next a { color: #333; }
.article-prev-next a:hover { color: var(--brand-primary); }

/* ===== 侧栏卡片（左侧分类导航） ===== */
.sidebar-card {
    background: #FCFCFC;
    border: #ededed solid 1px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 9px 3px #efefef;
    margin-bottom: 10px;
}
.sidebar-card-header {
    background: var(--brand-primary);
    color: #fff;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: bold;
    font-family: '微软雅黑';
    position: relative;
}
.sidebar-card-header::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(15px, -15px);
}
.sidebar-card-body { padding: 8px; }

/* ===== 侧栏导航项 ===== */
.sidebar-nav-item {
    margin: 2px 0;
    border-radius: 6px;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}
.sidebar-nav-item.active {
    background: var(--brand-light);
    border-left-color: var(--brand-primary);
}
.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #555;
    font-weight: normal;
    font-size: 14px;
}
.sidebar-nav-link.active {
    color: var(--brand-primary);
    font-weight: bold;
}
.sidebar-nav-icon {
    margin-right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-nav-icon i { font-size: 10px; color: #999; }
.sidebar-nav-icon.active { background: var(--brand-primary); }
.sidebar-nav-icon.active i { color: #fff; }

/* ===== 侧栏热门内容项 ===== */
.sidebar-hot-item {
    display: flex;
    padding: 8px 10px;
    margin: 3px 0;
    border-radius: 6px;
    background: var(--brand-light);
    border: 1px solid #a3bbeb;
    transition: all 0.3s;
}
.sidebar-hot-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}
.sidebar-hot-icon i { color: #fff; font-size: 11px; }
.sidebar-hot-text {
    flex: 1;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
