/* ============ 基础（全部引用 theme 表注入的 CSS 变量） ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg-color, #f5f7fa);
    color: var(--text-color, #1f2937);
    font-family: var(--font-family, Noto Sans SC, Source Han Sans SC, WenQuanYi Micro Hei, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--link-color, #2563eb); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--heading-font, inherit); color: var(--text-color, #1f2937); }
.muted { color: var(--text-muted, #6b7280); font-size: 13px; }
.container { max-width: var(--container-max, 1200px); margin: 0 auto; padding: 0 20px; }
.rich img { max-width: 100%; }

/* ============ 按钮（受主题控制） ============ */
/* 按钮 hover 上浮 */
.btn-primary, .btn-secondary { transition: background .2s, transform .2s, box-shadow .2s; }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.btn-primary {
    display: inline-block;
    background: var(--btn-primary-bg, #2563eb);
    color: var(--btn-primary-color, #fff);
    border: var(--btn-primary-border-width, 1px) solid var(--btn-primary-border, #1d4ed8);
    border-radius: var(--btn-primary-radius, 8px);
    padding: var(--btn-primary-padding, 10px 24px);
    cursor: pointer; font-size: 15px;
}
.btn-primary:hover { background: var(--btn-primary-hover-bg, #1d4ed8); color: var(--btn-primary-color, #fff); }
.btn-secondary {
    display: inline-block;
    background: var(--btn-secondary-bg, #fff);
    color: var(--btn-secondary-color, #2563eb);
    border: var(--btn-secondary-border-width, 1px) solid var(--btn-secondary-border, #2563eb);
    border-radius: var(--btn-secondary-radius, 8px);
    padding: var(--btn-secondary-padding, 10px 24px);
    cursor: pointer; font-size: 15px;
}
.btn-secondary:hover { background: var(--btn-secondary-hover-bg, #eff6ff); }
.btn-block { width: 100%; text-align: center; }

/* ============ 分割线（受主题控制） ============ */
.divider { border: 0; border-top: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb); margin: 24px 0; }

/* ============ 页头 ============ */
.site-header {
    background: var(--header-bg, #fff);
    border-bottom: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb);
    position: sticky; top: 0; z-index: 50;
}
.site-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 20px; color: var(--primary-color, #2563eb); display: flex; align-items: center; }
.logo img { height: 36px; }
.site-nav { display: flex; gap: 22px; }
.nav-item { position: relative; }
.nav-item > a { color: var(--text-color, #1f2937); font-weight: 500; padding: 8px 0; display: inline-block; }
.nav-item > a:hover { color: var(--primary-color, #2563eb); }
.nav-sub { display: none; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12); border-radius: 8px; min-width: 160px; padding: 8px 0; }
.nav-item:hover .nav-sub { display: block; }
.nav-sub a { display: block; padding: 8px 18px; color: var(--text-color, #1f2937); }
.nav-sub a:hover { background: #f3f4f6; color: var(--primary-color, #2563eb); }
.site-lang { color: var(--text-muted, #6b7280); }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ============ 主内容 ============ */
.site-main { min-height: 60vh; }
.section { padding: var(--section-gap, 64px) 0; }
.section-alt { background: var(--block-bg-color, #fff); }
.section-title { text-align: center; font-size: 28px; margin-bottom: 36px; position: relative; }
.section-title::after { content: ""; display: block; width: 48px; height: var(--line-width, 2px); background: var(--primary-color, #2563eb); margin: 14px auto 0; }
.page-title { font-size: 30px; margin-bottom: 24px; text-align: center; }
.page-content { max-width: 900px; margin: 0 auto; }
.rich { font-size: 15px; }

/* ============ 英雄轮播 ============ */
.hero { position: relative; height: 460px; overflow: hidden; background: #0f172a; }
.hero-slider { height: 100%; position: relative; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.hero-slide.active { opacity: 1; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-text { position: relative; z-index: 2; color: #fff; display: flex; flex-direction: column; justify-content: center; height: 100%; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero-text h1 { color: #fff; font-size: 42px; }
.hero-text p { font-size: 18px; margin-top: 12px; }
.hero-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.hero-dots span.active { background: #fff; }

/* ============ 卡片网格 ============ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--card-gap, 24px); }
.card { background: var(--block-bg-color, #fff); border: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb); border-radius: var(--radius, 8px); overflow: hidden; padding: 18px; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.card img { width: 100%; height: 180px; object-fit: cover; border-radius: calc(var(--radius, 8px) - 4px); margin-bottom: 14px; transition: transform .35s; }
.card:hover img { transform: scale(1.04); }
.card h3 { margin-bottom: 8px; font-size: 18px; transition: color .2s; }
.card:hover h3 { color: var(--primary-color, #2563eb); }
.card p { color: var(--text-muted, #6b7280); font-size: 14px; }

/* ============ 关于 ============ */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--card-gap, 24px); }
.about-card { background: var(--block-bg-color, #fff); padding: 24px; border-radius: var(--radius, 8px); border: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb); }
.about-card h3 { margin-bottom: 12px; }

/* ============ 新闻 ============ */
.news-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.news-row { display: flex; gap: 18px; background: var(--block-bg-color, #fff); padding: 16px; border-radius: var(--radius, 8px); border: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb); align-items: center; transition: transform .25s, box-shadow .25s, border-color .25s; }
.news-row:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.07); border-color: var(--primary-color, #2563eb); }
.news-row img { width: 160px; height: 100px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.news-row h3 { font-size: 17px; margin-bottom: 6px; transition: color .2s; }
.news-row:hover h3 { color: var(--primary-color, #2563eb); }
.news-row p { color: var(--text-muted, #6b7280); font-size: 14px; }
.news-date { font-size: 12px; color: #9ca3af; }

/* ============ 新闻详情排版 ============ */
.article-card {
    max-width: 900px; margin: 0 auto; background: var(--block-bg-color, #fff);
    border: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb);
    border-radius: var(--radius, 12px); padding: 40px 48px;
    box-shadow: 0 8px 30px rgba(0,0,0,.05);
}
.article-header { text-align: center; margin-bottom: 28px; padding-bottom: 20px; border-bottom: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb); }
.article-title { font-size: 28px; line-height: 1.4; margin-bottom: 14px; color: var(--text-color, #1f2937); }
.article-meta { display: flex; justify-content: center; gap: 18px; color: var(--text-muted, #6b7280); font-size: 13px; }
.article-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius, 8px); margin-bottom: 28px; }
.article-footer { margin-top: 36px; padding-top: 20px; border-top: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb); text-align: center; }

/* 正文富文本：保留编辑器设置的内联样式，仅补充默认排版 */
.article-content { font-size: 16px; line-height: 2; color: var(--text-color, #374151); word-wrap: break-word; }
.article-content p { margin: 0 0 18px; text-align: justify; }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 { margin: 28px 0 14px; line-height: 1.4; color: var(--text-color, #1f2937); }
.article-content h2 { font-size: 22px; }
.article-content h3 { font-size: 19px; }
.article-content img { display: block; max-width: 100%; height: auto; margin: 20px auto; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.article-content ul, .article-content ol { margin: 0 0 18px; padding-left: 26px; }
.article-content li { margin-bottom: 8px; }
.article-content a { color: var(--link-color, #2563eb); text-decoration: underline; }
.article-content blockquote { margin: 18px 0; padding: 12px 20px; border-left: 4px solid var(--primary-color, #2563eb); background: var(--bg-color, #f5f7fa); color: var(--text-muted, #4b5563); }
.article-content table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.article-content td, .article-content th { border: 1px solid var(--line-color, #e5e7eb); padding: 8px 12px; }
.article-content font[size="2"] { font-size: 13px; }
.article-content font[size="3"] { font-size: 16px; }
.article-content font[size="4"] { font-size: 20px; }
.article-content font[size="5"] { font-size: 26px; }
@media (max-width: 640px) { .article-card { padding: 24px 20px; } .article-title { font-size: 22px; } .article-content { font-size: 15px; } }

/* ============ Logo 墙 / 荣誉 ============ */
.logo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--card-gap, 24px); align-items: center; }
.logo-wall a { background: #fff; border: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb); border-radius: var(--radius, 8px); padding: 20px; display: flex; justify-content: center; transition: transform .25s, box-shadow .25s; }
.logo-wall a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.07); }
.logo-wall img { max-height: 60px; object-fit: contain; }
.honor-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--card-gap, 24px); }
.honor { background: #fff; border: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb); border-radius: var(--radius, 8px); padding: 16px; text-align: center; transition: transform .25s, box-shadow .25s; }
.honor:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.07); }
.honor img { height: 120px; object-fit: contain; margin: 0 auto 12px; }
.honor figcaption { font-size: 14px; }

/* ============ 招聘 ============ */
.career-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.career-list li { background: var(--block-bg-color, #fff); border: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb); border-radius: var(--radius, 8px); padding: 16px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.job-title { font-weight: 700; font-size: 16px; flex: 1; }

/* ============ 联系 / 询盘 ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-grid p { margin-bottom: 10px; }
.inquiry-form { background: #fff; padding: 24px; border-radius: var(--radius, 8px); border: var(--line-width, 1px) var(--line-style, solid) var(--line-color, #e5e7eb); display: flex; flex-direction: column; gap: 12px; }
.inquiry-form input, .inquiry-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-family: inherit; transition: border-color .2s, box-shadow .2s; }
.inquiry-form input:focus, .inquiry-form textarea:focus { outline: none; border-color: var(--primary-color, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-img { height: 42px; border: 1px solid #d1d5db; border-radius: 6px; cursor: pointer; }

/* ============ 页脚 ============ */
.site-footer { background: var(--footer-bg, #1f2937); color: #cbd5e1; padding: 40px 0; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 30px; }
.site-footer h4 { color: #fff; margin-bottom: 12px; }
.site-footer a { color: #93c5fd; display: inline-block; margin-right: 14px; }

/* ============ 返回顶部（滚动后才显示） ============ */
.back-top { position: fixed; right: 20px; bottom: 30px; width: 44px; height: 44px; line-height: 44px; text-align: center; background: var(--primary-color, #2563eb); color: #fff; border-radius: 50%; box-shadow: 0 6px 18px rgba(0,0,0,.2); z-index: 60; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s, visibility .3s, background .2s; }
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--btn-primary-hover-bg, #1d4ed8); }
.pager { text-align: center; margin-top: 20px; }
.pager a, .pager span { display: inline-block; padding: 6px 12px; margin: 0 3px; border: 1px solid #e5e7eb; border-radius: 6px; color: #4b5563; transition: all .2s; }
.pager a:hover { border-color: var(--primary-color, #2563eb); color: var(--primary-color, #2563eb); }
.pager .active { background: var(--primary-color, #2563eb); color: #fff; border-color: var(--primary-color, #2563eb); }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--header-bg, #fff); padding: 12px 20px; box-shadow: 0 10px 24px rgba(0,0,0,.1); }
    .site-nav.open { display: flex; }
    .nav-toggle { display: block; }
    .hero { height: 320px; }
    .hero-text h1 { font-size: 28px; }
}
@media (max-width: 560px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: 1fr; }
    .news-row { flex-direction: column; align-items: flex-start; }
    .news-row img { width: 100%; height: 160px; }
}
