/* ===== GovBlog 政府门户风主题 ===== */
:root {
    --c-blue: #015293;
    --c-red: #c9302c;
    --c-red-deep: #d43b33;
    --topbar-bg: #eaf4ff;
    --topbar-border: #d0e2f7;
    --nav-hover-bg: #f0f4ff;
    --bg: #ffffff;
    --text: #333333;
    --light-text: #666666;
    --muted: #999999;
    --border: #eeeeee;
    --dot-border: #e0e0e0;
    --footer-bg: #f5f5f5;
    --slide-bg: #1a1a2e;
    --input-bg: #ffffff;
    --scroll-bg: #fff8f8;
    --scroll-text: #c0392b;
    --link-hover: #c9302c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", SimHei, Arial, sans-serif;
    font-size: 16px; color: var(--text); background: var(--bg);
    line-height: 1.6; transition: background .2s, color .2s;
}
a { text-decoration: none; color: var(--text); }
a:hover { text-decoration: underline; color: var(--link-hover); }

.container { width: 1100px; max-width: 100%; margin: 0 auto; }
.padding { padding: 0 15px; }

/* ===== 顶部工具条 ===== */
.topbar { background: var(--topbar-bg); border-bottom: 1px solid var(--topbar-border); padding: 6px 0; font-size: 13px; overflow: hidden; }
.topbar-left { float: left; color: var(--light-text); font-size: 11px; line-height: 24px; }
.topbar-right { float: right; }
.a11y-toggle { cursor: pointer; font-size: 13px; padding: 0 6px; color: var(--light-text); text-decoration: none; }
.a11y-toggle:hover { color: var(--link-hover); text-decoration: underline; }

/* ===== 无障碍工具条 ===== */
.a11y-bar { display: none; position: fixed; background: var(--bg); border: 1px solid var(--dot-border); border-radius: 12px; z-index: 9999; box-shadow: 0 8px 30px rgba(0,0,0,.18); min-width: 220px; padding: 14px 16px 10px; }
.a11y-bar.show { display: block; }
.a11y-bar::before { content: "无障碍工具"; display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.a11y-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.a11y-row button { flex-shrink: 0; width: 38px; height: 32px; border: 1px solid var(--dot-border); border-radius: 8px; background: var(--footer-bg); font-size: 14px; cursor: pointer; color: var(--light-text); }
.a11y-row button:hover { background: var(--nav-hover-bg); border-color: var(--c-blue); color: var(--c-blue); }
.a11y-row button.a11y-active { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }
.a11y-label { font-size: 11px; color: var(--muted); margin-left: 2px; flex: 1; }
.a11y-row .a11y-reset { width: auto; padding: 0 14px; background: #fee2e2; border-color: #fecaca; color: #dc2626; font-size: 12px; font-weight: 600; }
body.a11y-high-contrast { background: #000; color: #ff0; }
body.a11y-high-contrast a { color: #0ff; }
body.a11y-dyslexia * { font-family: "OpenDyslexic", "Comic Sans MS", sans-serif !important; letter-spacing: .05em; }
body.a11y-pause-anim * { animation-play-state: paused !important; transition: none !important; }

/* ===== 阅读标尺 ===== */
.a11y-ruler { display: none; position: fixed; left: 0; right: 0; height: 2px; background: rgba(201, 48, 44, .55); z-index: 9997; pointer-events: none; }
.a11y-ruler.show { display: block; }
body.a11y-high-contrast .a11y-ruler { background: #ff0; }

/* ===== 主头部 ===== */
.header { overflow: hidden; padding: 14px 0 10px; border-bottom: 2px solid var(--c-red); background: var(--bg); }
.header_logo { float: left; display: flex; align-items: center; }
.header-logo-link { display: flex; align-items: center; text-decoration: none; }
.header-logo-link:hover { text-decoration: none; }
.logo-img { height: 26px; width: auto; vertical-align: middle; margin-right: 12px; }
.stext .mg { font-size: 15px; color: var(--c-red); display: block; line-height: 1.2; margin-bottom: 2px; letter-spacing: 2px; font-weight: bold; }
.stext .cn { font-size: 24px; color: var(--c-blue); font-weight: bold; display: block; line-height: 1.1; }
.stext .en { font-size: 12px; color: var(--muted); display: block; line-height: 1.1; margin-top: 1px; }
.header_nav { float: right; padding-top: 14px; }
.header_nav a { color: var(--text); padding: 0 14px; display: inline-block; font-size: 15px; text-decoration: none; line-height: 36px; border-radius: 4px; transition: all .15s; }
.header_nav a:hover { background: var(--nav-hover-bg); color: var(--c-blue); text-decoration: none; }
.header_nav a.on { background: var(--c-red); color: #fff; border-radius: 4px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--dot-border); border-radius: 4px; padding: 6px 12px; font-size: 18px; cursor: pointer; float: right; margin-top: 8px; color: var(--text); }

/* ===== 侧栏搜索 ===== */
.side-search { display: flex; gap: 6px; }
.side-search input { flex: 1; padding: 8px 10px; border: 1px solid var(--dot-border); border-radius: 4px; font-size: 14px; background: var(--input-bg); color: var(--text); outline: none; }
.side-search input:focus { border-color: var(--c-blue); }
.side-search button { padding: 8px 14px; background: var(--c-red); color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; }

/* ===== 滚动公告 ===== */
.scroll-text { background: linear-gradient(90deg, var(--scroll-bg), var(--scroll-bg), var(--scroll-bg)); padding: 0; overflow: hidden; height: 40px; display: flex; align-items: center; position: relative; border-bottom: 1px solid var(--border); }
.scroll-text a { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; align-items: center; overflow: hidden; text-decoration: none; }
.scroll-track { display: inline-block; white-space: nowrap; animation: scrollText 35s linear infinite; font-size: 14px; color: var(--scroll-text); font-weight: 500; letter-spacing: 0.5px; padding-left: 100%; }
.scroll-track:hover { animation-play-state: paused; }
@keyframes scrollText { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.scroll-hr { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ===== 布局 ===== */
.home-dual { display: flex; gap: 24px; margin: 16px 0 20px; }
.dual-left { flex: 1; min-width: 0; }
.dual-right { width: 340px; flex-shrink: 0; }

/* ===== 横幅轮播（BannerSlider 插件样式融合） ===== */
.home-banner { margin: 16px 0 0; }
.home-banner .bslider { max-width: 1100px; margin: 0 auto; background: var(--slide-bg); border-radius: 6px; overflow: hidden; }
.bslider-arrow { background: rgba(0,0,0,.35); color: #fff; }
.bslider-dot { background: rgba(255,255,255,.5); }
.bslider-dot.is-active { background: #fff; }

/* ===== 页面标题 ===== */
.pagetitle { text-align: center; padding: 20px 0 14px; }
.pagetitle h1 { font-size: 26px; color: var(--c-blue); font-weight: normal; }
.pagetitle .bread { font-size: 14px; color: var(--muted); margin-top: 4px; }
.pagetitle .bread a { color: var(--light-text); }
.pagetitle .bread a:hover { color: var(--link-hover); }

/* ===== 栏目标题 ===== */
.cattitle { border-bottom: 2px solid var(--c-red-deep); margin-bottom: 10px; padding-bottom: 4px; }
.cattitle h3 { font-size: 16px; font-weight: normal; color: var(--c-blue); }

/* ===== 文章列表 ===== */
.art-item { padding: 14px 0; border-bottom: 1px dotted var(--border); }
.art-item:last-child { border-bottom: none; }
.art-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.art-meta span { margin-right: 14px; }
.art-cate a { color: var(--c-red); }
.art-cate a:hover { color: var(--c-red); text-decoration: underline; }
.art-title { font-size: 18px; font-weight: normal; line-height: 1.4; }
.art-title a { color: var(--text); }
.art-title a:hover { color: var(--link-hover); text-decoration: none; }
.art-summary { font-size: 14px; color: var(--light-text); margin-top: 6px; }

/* ===== 空状态 ===== */
.empty-box { padding: 60px 0; text-align: center; color: var(--muted); font-size: 15px; }

/* ===== 文章详情 ===== */
.art-detail-meta { border-bottom: 1px solid var(--border); padding: 10px 0; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.art-detail-meta span { margin-right: 18px; }
.post-content { font-size: 16px; line-height: 1.9; word-wrap: break-word; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 { margin: 1.2em 0 .6em; color: var(--c-blue); font-weight: bold; }
.post-content h1 { font-size: 24px; } .post-content h2 { font-size: 21px; }
.post-content h3 { font-size: 18px; } .post-content h4 { font-size: 16px; }
.post-content p { margin: .8em 0; }
.post-content img { max-width: 100%; height: auto; border: 1px solid var(--border); }
.post-content a { color: var(--c-blue); }
.post-content a:hover { color: var(--link-hover); }
.post-content blockquote { border-left: 4px solid var(--c-red-deep); background: var(--footer-bg); padding: 10px 16px; margin: 1em 0; color: var(--light-text); }
.post-content pre { background: #282c34; color: #abb2bf; padding: 14px 16px; border-radius: 6px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.post-content code { background: var(--footer-bg); padding: 2px 6px; border-radius: 3px; font-size: 14px; }
.post-content pre code { background: none; padding: 0; }
.post-content ul, .post-content ol { margin: .8em 0 .8em 2em; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 8px 12px; }
.post-content th { background: var(--footer-bg); }
.post-tags { margin: 20px 0; font-size: 13px; color: var(--muted); }
.post-tags a { color: var(--c-blue); margin-right: 8px; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); padding-top: 14px; margin: 20px 0; font-size: 14px; }
.post-nav a { color: var(--c-blue); }
.post-nav a:hover { color: var(--link-hover); }

/* ===== 侧栏 ===== */
.side-box { margin-bottom: 18px; }
.hot-item { padding: 8px 0; border-bottom: 1px dotted var(--border); display: flex; align-items: center; gap: 8px; }
.hot-item:last-child { border-bottom: none; }
.hot-item a { font-size: 14px; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-item a:hover { color: var(--link-hover); }
.hot-item .date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item { font-size: 13px; color: var(--c-blue); border: 1px solid var(--dot-border); border-radius: 4px; padding: 3px 10px; }
.tag-item:hover { color: var(--link-hover); border-color: var(--c-red); text-decoration: none; }

/* ===== 分页 ===== */
.page-navi { text-align: center; margin: 20px 0; }
.pagination { display: inline-block; }
.pagination li { display: inline-block; margin: 0 3px; }
.pagination a, .pagination span { display: inline-block; padding: 6px 12px; border: 1px solid var(--dot-border); border-radius: 4px; font-size: 14px; color: var(--light-text); background: var(--bg); }
.pagination a:hover { color: var(--c-red); border-color: var(--c-red); text-decoration: none; }
.pagination .current span, .pagination span.current { background: var(--c-red); color: #fff; border-color: var(--c-red); }

/* ===== 评论 ===== */
.comment-wrap { margin-top: 24px; }
.comment-list { list-style: none; }
.comment-list .comment-body { padding: 12px 0; border-bottom: 1px dotted var(--border); }
.comment-list .comment-child { margin-left: 28px; border-bottom: none; padding-bottom: 4px; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.comment-author { font-weight: bold; color: var(--c-blue); font-size: 14px; }
.comment-meta { font-size: 12px; color: var(--muted); }
.comment-waiting { color: var(--c-red); font-style: normal; margin-left: 4px; }
.comment-content { font-size: 14px; line-height: 1.7; word-break: break-word; }
.comment-reply { font-size: 12px; margin-top: 4px; }
.comment-reply a { color: var(--c-blue); }
.comment-reply a:hover { color: var(--link-hover); }
.comment-by-author .comment-author::after { content: "\2003博主"; color: var(--c-red); font-size: 11px; font-weight: normal; }
.comment-form-box { margin-top: 24px; }
.comment-login-info { font-size: 13px; color: var(--light-text); margin-bottom: 10px; }
.comment-login-info a { color: var(--c-blue); margin: 0 6px; }
.comment-form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.comment-form-row input { flex: 1; padding: 9px 12px; border: 1px solid var(--dot-border); border-radius: 4px; font-size: 14px; background: var(--input-bg); color: var(--text); outline: none; }
.comment-form-row input:focus { border-color: var(--c-blue); }
.comment-form-box textarea { width: 100%; min-height: 110px; padding: 10px 12px; border: 1px solid var(--dot-border); border-radius: 4px; font-size: 14px; font-family: inherit; background: var(--input-bg); color: var(--text); outline: none; resize: vertical; }
.comment-form-box textarea:focus { border-color: var(--c-blue); }
.comment-form-submit { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.comment-form-submit .submit { padding: 9px 26px; background: var(--c-red); color: #fff; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; }
.comment-form-submit .submit:hover { background: var(--c-red-deep); }
.comment-form-submit a { font-size: 13px; color: var(--muted); }

/* ===== 页脚 ===== */
.footer { background: var(--footer-bg); border-top: 2px solid var(--c-red-deep); padding: 28px 0 18px; margin-top: 24px; font-size: 13px; color: var(--light-text); text-align: center; }
.footer a { color: var(--light-text); text-decoration: none; }
.footer a:hover { color: var(--c-blue); text-decoration: underline; }
.footer p { margin-bottom: 4px; }
.footer-cols { display: flex; gap: 36px; text-align: left; margin-bottom: 20px; }
.footer-col { flex: 1; }
.footer-col h4 { font-size: 15px; font-weight: normal; color: var(--c-blue); margin-bottom: 10px; padding: 0 0 8px 10px; border-bottom: 1px solid var(--border); position: relative; }
.footer-col h4::before { content: ""; position: absolute; left: 0; top: 5px; width: 4px; height: 14px; background: var(--c-red); border-radius: 2px; }
.footer-col p { font-size: 13px; color: var(--muted); line-height: 1.9; }
.footer-col a { display: block; font-size: 13px; line-height: 2.1; color: var(--light-text); }
.footer-col a:hover { color: var(--c-red); text-decoration: none; }
.footer-col a::before { content: "> "; color: var(--muted); font-size: 11px; margin-right: 2px; }
.footer-copy { border-top: 1px solid var(--border); padding-top: 14px; }
.footer-copy p { line-height: 1.8; }
.footer-extra { font-size: 13px; color: var(--muted); margin-top: 4px; }
.footer-beian { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.footer-beian a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.footer-beian a:hover { color: var(--c-blue); text-decoration: none; }
.footer-beian img { height: 12px; width: auto; }
.footer-cn { margin-top: 10px; }
.footer-cn img { height: 22px; width: auto; opacity: .85; }

/* ===== FooterTools 插件样式融合 ===== */
.fext-footer { margin: 6px 0 0; }
.fext-footer a { color: var(--muted) !important; }
.fext-footer a:hover { color: var(--c-blue) !important; }

/* ===== 移动端优化 ===== */
@media (max-width: 768px) {
    .container { width: 100%; }
    .padding { padding: 0 12px; }

    /* 顶部工具条：精简 */
    .topbar { padding: 4px 0; }
    .topbar-left { font-size: 10px; line-height: 22px; }
    .topbar-right .a11y-toggle { font-size: 12px; padding: 0 4px; }

    /* 头部：紧凑 */
    .header { padding: 10px 0 8px; }
    .header_logo { float: none; display: flex; align-items: center; justify-content: space-between; }
    .logo-img { height: 34px !important; width: auto !important; margin-right: 8px; }
    .nav-toggle { display: block; float: none; margin: 0; }
    .stext .mg { font-size: 11px; }
    .stext .cn { font-size: 20px; }
    .stext .en { font-size: 9px; }
    .header_nav { display: none; float: none; clear: both; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; margin-top: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
    .header_nav.show { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .header_nav a { display: block; line-height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--footer-bg); text-align: center; font-size: 14px; }
    .header_nav a.on { background: var(--c-red); color: #fff; border-color: var(--c-red); }

    /* 滚动公告 */
    .scroll-text { height: 34px; }
    .scroll-track { font-size: 12px; }

    /* 布局单栏 */
    .home-dual { flex-direction: column; gap: 16px; margin: 12px 0 16px; }
    .dual-right { display: none; }
    .home-banner { margin: 12px 0 0; }
    .home-banner .bslider { border-radius: 4px; }

    /* 文章列表 */
    .art-item { padding: 12px 0; }
    .art-title { font-size: 16px; }
    .art-summary { font-size: 13px; }
    .art-meta { font-size: 11px; }
    .art-meta span { margin-right: 10px; }

    /* 页面标题 */
    .pagetitle { padding: 14px 0 10px; }
    .pagetitle h1 { font-size: 20px; }

    /* 文章详情 */
    .art-detail-meta { font-size: 12px; }
    .art-detail-meta span { display: inline-block; margin: 0 12px 4px 0; }
    .post-content { font-size: 15px; }
    .post-content img { border-radius: 4px; }
    .post-content table { display: block; overflow-x: auto; white-space: nowrap; }
    .post-nav { flex-direction: column; gap: 8px; }

    /* 侧栏 */
    .side-box { margin-bottom: 14px; }

    /* 分页 */
    .pagination a, .pagination span { padding: 5px 10px; font-size: 13px; }

    /* 评论 */
    .comment-form-row { flex-direction: column; gap: 8px; }
    .comment-form-box textarea { min-height: 90px; }

    /* 页脚 */
    .footer { padding: 18px 0 14px; }
    .footer-cols { flex-direction: column; gap: 14px; }
    .footer-col h4 { font-size: 14px; }
}

/* 小屏（≤480px）进一步精简 */
@media (max-width: 480px) {
    .topbar-left { display: none; }
    .stext .cn { font-size: 18px; }
    .art-detail-meta span { display: block; margin: 0 0 2px; }
    .art-meta { line-height: 1.8; }
}
