/* ============================================================
   登报挂失服务中心 - 前端样式
   风格：简洁大方，蓝白主色调，手机端自适应
   ============================================================ */

:root {
    --primary: #1e4f8f;
    --primary-dark: #163a6b;
    --primary-light: #2f6bb0;
    --accent: #d9a441;
    --text: #2b3a4d;
    --text-light: #6b7a8c;
    --bg: #f4f6fb;
    --card-bg: #ffffff;
    --border: #e3e9f2;
    --radius: 10px;
    --shadow: 0 4px 16px rgba(30, 79, 143, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
    overflow-wrap: break-word;
    word-break: break-word;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary); text-decoration: none; }
a:hover { opacity: .85; }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
    min-width: 0;
    overflow: hidden;
}

/* ---------- 顶部导航 ---------- */
.site-header {
    background: var(--card-bg);
    box-shadow: 0 1px 6px rgba(20, 40, 80, .06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    gap: 6px;
}

.main-nav a {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    transition: background .2s, color .2s;
}

.main-nav a:hover { background: #eef3fb; color: var(--primary); opacity: 1; }
.main-nav a.active { background: var(--primary); color: #fff; }

/* 汉堡按钮（默认隐藏） */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
    color: #fff;
    text-align: center;
    padding: 46px 20px 54px;
}

.hero h1 {
    font-size: 30px;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.hero-slogan {
    font-size: 17px;
    color: rgba(255, 255, 255, .88);
    max-width: 640px;
    margin: 0 auto 28px;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 11px 26px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.18); opacity: 1; }
.btn-light { background: #fff; color: var(--primary); }
.btn-outline-light { border: 1.5px solid rgba(255,255,255,.7); color: #fff; }

/* ---------- 通用区块 ---------- */
.section { padding: 34px 0 10px; }

.section-head { text-align: center; margin-bottom: 22px; }
.section-head h2 {
    font-size: 25px;
    color: var(--text);
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}
.section-head h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 44px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
}
.section-sub { color: var(--text-light); font-size: 14.5px; margin-top: 8px; }

.empty-tip { text-align: center; color: var(--text-light); padding: 30px 0; }

/* ---------- 报纸卡片 ---------- */
.paper-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.paper-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 14px;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    position: relative;
}
.paper-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(30,79,143,.14); }

.paper-badge {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}
.badge-national { background: #fdf3dd; color: #a36a12; }
.badge-province { background: #e3eefb; color: var(--primary); }
.badge-city { background: #e5f6ec; color: #1e7a44; }

.paper-name { font-size: 18px; margin-bottom: 6px; overflow-wrap: break-word; word-break: break-word; }
.paper-desc { color: var(--text-light); font-size: 13.5px; overflow-wrap: break-word; word-break: break-word; }

/* ---------- Tab 切换 ---------- */
.tab-wrap {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #fafbfe;
}

.tab-btn {
    flex: 1;
    padding: 15px 10px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color .2s, border-color .2s, background .2s;
    white-space: nowrap;
}
.tab-btn:hover { color: var(--primary); background: #f0f5fc; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: #fff; }

.tab-panel { padding: 6px 18px 16px; }
.tab-panel[hidden] { display: none; }

/* ---------- 独立栏目页列表容器 ---------- */
.list-wrap {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 6px 18px 16px;
    margin-bottom: 14px;
}

/* ---------- 声明/公告列表 ---------- */
.decl-list { list-style: none; }

.decl-item {
    padding: 14px 4px;
    border-bottom: 1px dashed var(--border);
}
.decl-item:last-child { border-bottom: none; }

.decl-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}
.decl-title { font-size: 16.5px; font-weight: 700; color: var(--text); overflow-wrap: break-word; word-break: break-word; }
.decl-date {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--text-light);
    background: #f1f5fb;
    padding: 2px 10px;
    border-radius: 14px;
}
.decl-content { color: #3c4c60; font-size: 14.5px; overflow-wrap: break-word; word-break: break-word; }

/* ---------- 单条详情页 ---------- */
.detail-card { width: 100%; }
.detail-title { font-size: 24px; color: var(--text); margin-bottom: 12px; line-height: 1.5; }
.detail-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.detail-body { font-size: 15.5px; line-height: 2; color: #3c4c60; }
.detail-back { margin-top: 26px; padding-top: 14px; border-top: 1px dashed var(--border); }
.detail-back a { color: var(--primary); font-weight: 600; }.decl-paper {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--primary);
    background: #eef3fb;
    padding: 3px 12px;
    border-radius: 14px;
}

/* ---------- 页面横幅（联系/关于） ---------- */
.page-banner {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 32px 20px;
    text-align: center;
}
.page-banner h1 { font-size: 28px; margin-bottom: 6px; letter-spacing: 1px; }
.page-banner p { color: rgba(255,255,255,.85); font-size: 15px; }

/* ---------- 联系方式 ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px;
    text-align: center;
    box-shadow: var(--shadow);
}
.contact-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #eef3fb;
    color: var(--primary);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-card h3 { font-size: 16px; margin-bottom: 6px; }
.contact-value { color: var(--primary); font-weight: 600; font-size: 15.5px; }
.tel-link { text-decoration: none; }
.tel-link:hover { text-decoration: underline; }

.contact-note {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
}
.contact-note h3 { margin-bottom: 6px; font-size: 16px; }

/* ---------- 关于我们 ---------- */
.about-section { padding-bottom: 40px; }

.about-text {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    font-size: 15px;
    color: #3c4c60;
    white-space: pre-line;
}

/* 富文本排版内容 */
.rich-content { white-space: normal; line-height: 1.9; }
.rich-content h1, .rich-content h2, .rich-content h3,
.rich-content h4, .rich-content h5, .rich-content h6 {
    color: var(--text);
    margin: 1.2em 0 .5em;
    line-height: 1.4;
}
.rich-content h1 { font-size: 24px; }
.rich-content h2 { font-size: 21px; }
.rich-content h3 { font-size: 18px; }
.rich-content p { margin: .5em 0; }
.rich-content ul, .rich-content ol { margin: .5em 0 .5em 1.4em; }
.rich-content li { margin: .25em 0; }
.rich-content img { max-width: 100%; height: auto; border-radius: 6px; margin: .6em 0; }
.rich-content a { color: var(--primary); text-decoration: underline; }
.rich-content blockquote {
    border-left: 3px solid var(--primary-light);
    background: #f4f7fb;
    padding: 10px 14px;
    margin: .8em 0;
    color: var(--text-light);
}
.rich-content table { border-collapse: collapse; width: 100%; margin: .8em 0; }
.rich-content table td, .rich-content table th {
    border: 1px solid var(--border);
    padding: 6px 10px;
}
.rich-content table th { background: #f1f5fb; }
.rich-content hr { border: none; border-top: 1px dashed var(--border); margin: 1em 0; }

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}
.feature-card h3 { color: var(--primary); font-size: 16.5px; margin-bottom: 8px; }
.feature-card p { color: var(--text-light); font-size: 14px; }

.process-block h2 {
    font-size: 22px;
    text-align: center;
    margin-bottom: 18px;
}

.process-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.process-steps li {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    gap: 12px;
    box-shadow: var(--shadow);
}
.process-steps li > span {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.process-steps strong { display: block; margin-bottom: 4px; font-size: 15px; }
.process-steps p { color: var(--text-light); font-size: 13.5px; }

/* ---------- 页脚 ---------- */
.site-footer {
    background: linear-gradient(135deg, #10233f 0%, var(--primary-dark) 60%, var(--primary) 100%);
    color: #cfd9ea;
    margin-top: 34px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    padding: 28px 20px 20px;
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 700;
}
.footer-col p { font-size: 14px; margin-bottom: 6px; color: #cfd9ea; }
.footer-tels { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.footer-tels p { margin-bottom: 6px; }
.footer-col a { color: #9fc5f0; font-weight: 500; }
.footer-col a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.14);
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    color: #b4c2d6;
}
.footer-bottom a { color: #9fc5f0; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom .footer-icp { margin-top: 2px; }

/* ---------- 响应式：手机端 ---------- */
@media (max-width: 768px) {
    .hero { padding: 34px 16px 40px; }
    .hero h1 { font-size: 20px; }
    .hero-slogan { font-size: 10px; }

    .nav-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 10px 20px 18px;
        box-shadow: 0 8px 20px rgba(20,40,80,.12);
        display: none;
        z-index: 99;
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 14px; font-size: 16px; }

    .section { padding: 28px 0 8px; }
    .section-head h2 { font-size: 22px; }

    .tab-btn { font-size: 15px; padding: 13px 8px; }

    .decl-meta { flex-direction: column; gap: 4px; align-items: flex-start; }

    .page-banner { padding: 24px 16px; }
    .page-banner h1 { font-size: 23px; }

    /* 手机端可选报纸：一行 3 个，两行排完 6 家；卡片紧凑，文字单行不换行 */
    .paper-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .paper-card { padding: 12px 8px; }
    .paper-badge { font-size: 11px; padding: 2px 8px; margin-bottom: 7px; }
    .paper-name { font-size: 14px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .paper-desc { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* 手机端隐藏页脚快速导航列 */
    .footer-col-nav { display: none; }

    .contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
    .contact-grid { grid-template-columns: 1fr; }
}
