/* ============================================================
   门户资讯版（portal）样式
   配色：新闻蓝 + 中性灰；焦点图 + 多栏信息流
   ============================================================ */
:root {
    --pt-blue: #1d4ed8;
    --pt-blue-dark: #1e3a8a;
    --pt-blue-soft: #eff4ff;
    --pt-ink: #172033;
    --pt-muted: #64748b;
    --pt-line: #e5eaf2;
    --pt-bg: #f5f7fb;
    --pt-card: #ffffff;
    --pt-radius: 10px;
    --pt-shadow: 0 4px 16px rgba(23, 32, 51, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--pt-bg);
    color: var(--pt-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.7;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--pt-blue); }
h1, h2, h3 { line-height: 1.4; }

.t-container,
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
.muted { color: var(--pt-muted); }
.req { color: #dc2626; margin-left: 2px; }
.page-main { padding-top: 12px; padding-bottom: 36px; }

.alert { margin: 12px 0; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.alert-success { background: #ecfdf5; color: #047857; }
.alert-error { background: #fef2f2; color: #b42318; }

/* 页头 */
.site-header {
    background: #fff;
    border-bottom: 3px solid var(--pt-blue);
    position: sticky;
    top: 0;
    z-index: 30;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 19px;
    font-weight: 800;
    color: var(--pt-blue-dark);
    white-space: nowrap;
}
.logo-img { height: 32px; width: auto; }
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    font-size: 15px;
    color: #334155;
}
.site-nav a { padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.is-current { border-color: var(--pt-blue); color: var(--pt-blue); }
.site-search {
    display: flex;
    margin-left: auto;
    border: 1px solid var(--pt-line);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}
.site-search input {
    width: 170px;
    padding: 8px 14px;
    border: 0;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: transparent;
}
.site-search button {
    padding: 0 16px;
    border: 0;
    background: var(--pt-blue);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.site-search button:hover { background: var(--pt-blue-dark); }
.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 7px 14px;
    border: 1px solid var(--pt-line);
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 14px;
    cursor: pointer;
}

/* 面包屑 */
.crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 10px;
    font-size: 13px;
    color: var(--pt-muted);
}
.crumb a:hover { color: var(--pt-blue); }

/* 焦点区 */
.portal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.hero-main {
    background: #fff;
    border-radius: var(--pt-radius);
    overflow: hidden;
    box-shadow: var(--pt-shadow);
    display: flex;
    flex-direction: column;
}
.hero-cover {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #38bdf8);
}
.hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
}
.hero-text { padding: 16px 18px 18px; }
.hero-text h1 { margin: 6px 0 8px; font-size: 24px; }
.hero-text p { margin: 0 0 8px; color: var(--pt-muted); font-size: 14px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--pt-muted); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 4px;
    background: var(--pt-blue-soft);
    color: var(--pt-blue);
    font-size: 12px;
}
.tag-city { background: #eef7ee; color: #15803d; }
.tag-top { background: #fef2f2; color: #b91c1c; }
.hero-side { display: flex; flex-direction: column; gap: 14px; }
.hero-sub {
    background: #fff;
    border-radius: var(--pt-radius);
    padding: 14px 16px;
    box-shadow: var(--pt-shadow);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-sub h2 { margin: 0 0 6px; font-size: 17px; }
.hero-sub p { margin: 0 0 6px; color: var(--pt-muted); font-size: 13px; }

/* 列表 */
.list-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 20px;
    align-items: start;
}
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pt-line);
}
.section-head h1, .section-head h2 { margin: 0; font-size: 21px; color: var(--pt-blue-dark); }
.section-head .muted { font-size: 13px; }

.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    background: #fff;
    border-radius: var(--pt-radius);
    padding: 12px;
    box-shadow: var(--pt-shadow);
    width: 100%;
    min-width: 0;
}
.news-item.has-thumb { grid-template-columns: 190px minmax(0, 1fr); }
.news-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #eef2f7; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; width: 100%; }
.news-body h2 { margin: 0; font-size: 18px; overflow-wrap: break-word; word-break: normal; }
.news-body p { margin: 0; color: var(--pt-muted); font-size: 13px; overflow-wrap: break-word; word-break: normal; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: auto; font-size: 12px; color: var(--pt-muted); }
.news-meta > span { white-space: nowrap; }
.news-city { color: #15803d; }

/* 侧栏 */
.list-side { display: flex; flex-direction: column; gap: 14px; }
.side-card, .qr-card, .side-contact {
    background: #fff;
    border-radius: var(--pt-radius);
    padding: 14px 16px;
    box-shadow: var(--pt-shadow);
}
.side-card h3, .qr-card h3, .side-contact h3 { margin: 0 0 10px; font-size: 15px; color: var(--pt-blue-dark); border-left: 3px solid var(--pt-blue); padding-left: 8px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 4px;
    background: #f6f8fc;
    border: 1px solid var(--pt-line);
    color: #475569;
    font-size: 13px;
}
.chip:hover { border-color: var(--pt-blue); color: var(--pt-blue); }
.chip.is-active { background: var(--pt-blue); border-color: var(--pt-blue); color: #fff; }
.chip-count { padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, .06); font-size: 11px; }
.side-more { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--pt-blue); }
.hot-list { margin: 0; padding-left: 18px; font-size: 13px; }
.hot-list li { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.hot-list li span { color: var(--pt-muted); font-size: 12px; }
.side-tel { display: block; font-size: 20px; font-weight: 800; color: var(--pt-blue); margin: 4px 0; }
.side-contact p { margin: 0; font-size: 13px; color: var(--pt-muted); }

/* 分页 */
.pager { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 6px; }
.pager-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--pt-line);
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #475569;
}
.pager-link:hover { border-color: var(--pt-blue); color: var(--pt-blue); }
.pager-link.is-active { background: var(--pt-blue); border-color: var(--pt-blue); color: #fff; }
.pager-dots { align-self: center; color: var(--pt-muted); }

.empty-box {
    padding: 40px 18px;
    text-align: center;
    background: #fff;
    border: 1px dashed var(--pt-line);
    border-radius: var(--pt-radius);
    color: var(--pt-muted);
}

/* 底部 CTA */
.portal-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 26px;
    padding: 20px 24px;
    border-radius: var(--pt-radius);
    background: linear-gradient(120deg, #eff4ff, #e0f2fe);
    border: 1px solid #dbeafe;
}
.portal-cta h2 { margin: 0 0 4px; font-size: 19px; color: var(--pt-blue-dark); }
.portal-cta p { margin: 0; font-size: 13px; color: var(--pt-muted); }
.portal-btn {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 22px;
    border-radius: 6px;
    background: var(--pt-blue);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}
.portal-btn:hover { background: var(--pt-blue-dark); color: #fff; }

/* 详情 */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}
.article-main {
    background: #fff;
    border-radius: var(--pt-radius);
    padding: 24px 26px;
    box-shadow: var(--pt-shadow);
}
.article-title { margin: 0 0 10px; font-size: 27px; color: var(--pt-blue-dark); }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pt-line);
    font-size: 13px;
    color: var(--pt-muted);
}
.article-cover { margin: 16px 0; border-radius: 8px; overflow: hidden; }
.article-content { font-size: 16px; color: #26303f; }
.article-content p { margin: 12px 0; }
.article-content h2, .article-content h3 { color: var(--pt-blue-dark); }
.article-content table { width: 100%; border-collapse: collapse; }
.article-content td, .article-content th { border: 1px solid var(--pt-line); padding: 8px; }
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; font-size: 13px; }
.share-btn {
    padding: 5px 12px;
    border: 1px solid var(--pt-line);
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
}
.share-btn:hover { border-color: var(--pt-blue); color: var(--pt-blue); }
.prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--pt-line);
    font-size: 14px;
}
.prev-next-item { display: flex; flex-direction: column; gap: 2px; }
.prev-next-item.next { text-align: right; }
.article-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; }
.qr-card { text-align: center; }
.qr-card img { width: 160px; height: 160px; object-fit: contain; }
.related-section { margin-top: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.related-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    min-width: 0;
    background: #fff;
    border-radius: var(--pt-radius);
    padding: 14px 16px;
    font-size: 14px;
    box-shadow: var(--pt-shadow);
    overflow-wrap: break-word;
    word-break: normal;
}
.related-item:hover { color: var(--pt-blue); }

/* 表单（复用 template/form.php） */
.cms-form { background: #fff; border-radius: var(--pt-radius); padding: 20px 22px; box-shadow: var(--pt-shadow); }
.form-title { margin: 0 0 4px; font-size: 19px; color: var(--pt-blue-dark); }
.form-sub { margin: 0 0 14px; color: var(--pt-muted); font-size: 13px; }
.form-item { margin-bottom: 14px; }
.form-item > label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: #334155; }
.form-item input[type="text"], .form-item input[type="tel"], .form-item input[type="email"],
.form-item input[type="date"], .form-item textarea, .form-item select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pt-line);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    outline: none;
}
.form-item input:focus, .form-item textarea:focus, .form-item select:focus {
    border-color: var(--pt-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}
.choice-group { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.choice { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-img { height: 42px; width: 110px; object-fit: cover; border: 1px solid var(--pt-line); border-radius: 6px; cursor: pointer; }
.btn-submit {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 6px;
    background: var(--pt-blue);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.btn-submit:hover { background: var(--pt-blue-dark); }

/* 城市页 / 404 */
.city-nav-page { background: #fff; border-radius: var(--pt-radius); padding: 20px 22px; box-shadow: var(--pt-shadow); }
.city-filter { margin-bottom: 14px; }
.city-filter input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pt-line);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
}
.city-province { margin-bottom: 18px; }
.city-province-title { margin: 0 0 10px; font-size: 17px; color: var(--pt-blue-dark); }
.city-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.error-page { text-align: center; padding: 60px 16px; }
.error-code { font-size: 76px; font-weight: 800; color: var(--pt-blue); line-height: 1; }
.error-page h1 { margin: 10px 0; font-size: 22px; }
.btn-back {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 24px;
    border-radius: 6px;
    background: var(--pt-blue);
    color: #fff;
    font-size: 15px;
}

/* 页脚 */
.site-footer { margin-top: 30px; background: #0f1b33; color: rgba(255, 255, 255, .76); }
.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    font-size: 14px;
}
.footer-top a { color: rgba(255, 255, 255, .8); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; padding: 22px 16px 28px; }
.footer-brand strong { display: block; font-size: 17px; color: #fff; }
.footer-brand p { margin: 4px 0 0; font-size: 13px; }
.footer-meta { font-size: 13px; }
.footer-meta p { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 10px 0 0; }
.footer-meta a { color: rgba(255, 255, 255, .76); }

@media (max-width: 1024px) {
    .list-layout, .article-layout { grid-template-columns: minmax(0, 1fr) 280px; }
    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .nav-toggle { display: inline-block; }
    .site-search { display: none; }
    .header-inner { flex-wrap: wrap; padding-bottom: 10px; }
    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 2px;
        padding: 6px 0 12px;
    }
    body.nav-open .site-nav { display: flex; }
    .site-nav a { padding: 9px 4px; border-bottom: 1px solid var(--pt-line); }
    .portal-hero { grid-template-columns: 1fr; }
    .hero-side { flex-direction: row; }
    .hero-sub { flex: 1; }
    .list-layout, .article-layout { grid-template-columns: 1fr; }
    .article-side { position: static; }
    .article-main { padding: 18px 16px; }
    .article-title { font-size: 23px; }
    .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .news-item, .news-item.has-thumb { grid-template-columns: minmax(0, 1fr); }
    .news-thumb { aspect-ratio: 16 / 9; }
    .hero-side { flex-direction: column; }
    .related-grid { grid-template-columns: 1fr; }
    .prev-next { grid-template-columns: 1fr; }
    .prev-next-item.next { text-align: left; }
    .hero-text h1 { font-size: 20px; }
    .portal-cta { padding: 16px; }
    .portal-btn { width: 100%; justify-content: center; }
}
@media (max-width: 360px) {
    .t-container, .container { padding: 0 12px; }
    .logo { font-size: 16px; }
    .hero-text { padding: 12px 14px 16px; }
}
@media (min-width: 1440px) {
    .t-container, .container { max-width: 1260px; }
}

/* ============================================================
 * 兼容加固 + 布局防塌缩（旧版 Chrome/Firefox/Edge）
 * ============================================================ */
.site-header, .article-side { position: -webkit-sticky; }
.news-item, .news-body, .related-item, .side-card, .article-content {
    min-width: 0;
}
.news-body, .article-content, .related-item {
    overflow-wrap: break-word;
    word-break: normal;
    -ms-word-break: break-word;
}
.article-content img, .news-thumb img { max-width: 100%; height: auto; }
.article-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
}
.article-content pre, .article-content code {
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-width: 100%;
}
@supports not (aspect-ratio: 4 / 3) {
    .news-thumb { position: relative; height: 0; padding-top: 75%; }
    .news-thumb img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
}
@supports not (gap: 1px) {
    .news-meta > * + * { margin-left: 10px; }
    .chip-list > * + * { margin-left: 6px; }
}
@media (max-width: 860px) {
    .site-nav a, .portal-btn, .pager a, .prev-next a, .share-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    /* 移动端底部漂浮条留出空间，避免遮挡页脚 */
    .site-footer { margin-bottom: 0; }
}
@media (max-width: 414px) {
    .news-body h2 { font-size: 16px; }
    .related-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
    .related-grid { grid-template-columns: minmax(0, 1fr); }
    .news-item { padding: 10px; }
}

/* 文章目录 */
.article-toc {
    margin: 0 0 18px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e6edf4;
    border-radius: var(--pt-radius);
    box-shadow: var(--pt-shadow);
}
.article-toc-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: #24313f; }
.article-toc ol { margin: 0; padding-left: 20px; }
.article-toc li { margin: 4px 0; font-size: 14px; line-height: 1.5; }
.article-toc li a { color: #2f6fed; text-decoration: none; }
.article-toc li a:hover { text-decoration: underline; }
.article-toc .toc-lv3 { margin-left: 14px; font-size: 13px; }
.article-toc .toc-lv3 a { color: #5b6b7c; }

/* 友情链接 + 全局免责声明 */
.site-disclaimer,
.friend-links { grid-column: 1 / -1; }
.site-disclaimer {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .55);
}
.friend-links {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.friend-links h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.fl-list { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.fl-list li { min-width: 0; max-width: 100%; }
.fl-list a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    font-size: 13px;
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
}
.fl-list a:hover { color: #fff; text-decoration: underline; }
.fl-list img { height: 18px; width: auto; max-width: 80px; object-fit: contain; }
.fl-list span { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 600px) {
    .fl-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
    .fl-list a { font-size: 12px; }
    .site-disclaimer { font-size: 11px; }
}
