/* ============================================================
   政府门户网站 - 统一布局样式
   设计原则：单一主色调、统一按钮、整洁布局
   ============================================================ */

/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
    line-height: 1.6;
}
a { color: #333; text-decoration: none; transition: color 0.2s; }
a:hover { color: #1e5ba8; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
.wrap { width: 1200px; margin: 0 auto; }

/* ===== 主色调变量 =====
   --primary: 主色（深蓝）
   --primary-light: 浅色（背景、hover）
   --text: 主文字色
   --text-light: 次要文字色
   --border: 边框色
   --bg-alt: 交替背景
*/

/* ===== 顶部条 ===== */
.topbar {
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    font-size: 12px;
    color: #666;
    line-height: 32px;
}
.topbar .wrap { display: flex; justify-content: space-between; }
.topbar a { color: #666; margin: 0 5px; }
.topbar a:hover { color: #1e5ba8; }

/* ===== 头部 ===== */
.header {
    background: #fff;
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; }
.logo .emblem {
    width: 60px;
    height: 60px;
    background: #1e5ba8;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 60px;
    font-size: 24px;
    font-weight: bold;
    margin-right: 15px;
}
.logo h1 {
    font-size: 24px;
    color: #1e5ba8;
    font-weight: bold;
}
.logo .subtitle { color: #888; font-size: 13px; margin-top: 4px; }
.search { display: flex; flex-direction: column; align-items: flex-end; }
.search form { display: flex; margin-bottom: 5px; }
.search input[type="text"] {
    width: 280px;
    height: 38px;
    padding: 0 12px;
    border: 2px solid #1e5ba8;
    border-right: 0;
    outline: none;
    font-size: 14px;
}
.search button {
    height: 38px;
    padding: 0 25px;
    background: #1e5ba8;
    color: #fff;
    border: 0;
    cursor: pointer;
    font-size: 14px;
}
.search .links { font-size: 12px; color: #999; }
.search .links a { color: #999; margin: 0 3px; }

/* ===== 主导航 ===== */
.navbar {
    background: #1e5ba8;
}
.navbar .wrap { display: flex; height: 48px; }
.navbar a {
    color: #fff;
    padding: 0 28px;
    line-height: 48px;
    font-size: 15px;
}
.navbar a:hover, .navbar a.active { background: rgba(0,0,0,0.2); color: #fff; }
.navbar .more { margin-left: auto; }
.navbar .more a { font-weight: normal; font-size: 13px; padding: 0 18px; }
.navbar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ===== 通用按钮（统一风格）=====
   .btn-primary  - 主按钮（深蓝填充）
   .btn-default  - 次按钮（白底蓝边）
   .btn-link     - 文字按钮
*/
.btn-primary, .btn-default, .btn-link, .btn-submit {
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    border: 1px solid #1e5ba8;
    background: #1e5ba8;
    color: #fff;
    text-decoration: none;
    line-height: 1.4;
}
.btn-primary:hover { background: #174a8c; border-color: #174a8c; color: #fff; }
.btn-default { background: #fff; color: #1e5ba8; }
.btn-default:hover { background: #1e5ba8; color: #fff; }
.btn-link { background: transparent; color: #1e5ba8; border: 0; padding: 4px 8px; }
.btn-link:hover { color: #174a8c; background: transparent; text-decoration: underline; }
.btn-submit { /* 同 btn-primary */ }

/* ===== 通用区段 ===== */
.section {
    padding: 35px 0;
    background: #fff;
}
.section-alt { background: #f5f8fc; }

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #1e5ba8;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.section-title h3 {
    font-size: 20px;
    color: #1e5ba8;
    font-weight: bold;
    position: relative;
    padding-left: 12px;
}
.section-title h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: #1e5ba8;
}
.section-title .more { font-size: 13px; color: #999; }

/* ===== 面包屑 ===== */
.crumbs {
    padding: 12px 0;
    background: #f5f8fc;
    border-bottom: 1px solid #e8e8e8;
    font-size: 13px;
    color: #666;
}
.crumbs a { color: #666; }
.crumbs a:hover { color: #1e5ba8; }
.crumbs .sep { margin: 0 8px; color: #999; }

/* ===== 大图轮播 ===== */
.banner-section {
    position: relative;
    height: 420px;
    overflow: hidden;
    background: #f0f0f0;
}
.banner-section .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s;
}
.banner-section .slide.active { opacity: 1; z-index: 1; }
.banner-section .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-section .slide-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 60px;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
.banner-section .slide-text h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.banner-section .banner-link {
    display: inline-block;
    padding: 6px 20px;
    background: #1e5ba8;
    color: #fff;
    border-radius: 3px;
    font-size: 13px;
    max-width: 1200px;
}
.banner-section .banner-link:hover { background: #fff; color: #1e5ba8; }

.banner-section .banner-prev,
.banner-section .banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    text-align: center;
    line-height: 48px;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
}
.banner-section .banner-prev { left: 20px; }
.banner-section .banner-next { right: 20px; }
.banner-section .banner-prev:hover,
.banner-section .banner-next:hover { background: rgba(0,0,0,0.5); }

.banner-section .dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 80px;
    text-align: center;
    z-index: 5;
}
.banner-section .dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    margin: 0 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.banner-section .dots span.active { background: #1e5ba8; }

/* ===== 头条 + 要闻 ===== */
.headline-row { display: flex; gap: 20px; margin-bottom: 30px; }
.headline { flex: 1; }
.headline .h-img { width: 100%; height: 300px; overflow: hidden; background: #eee; }
.headline .h-img img { width: 100%; height: 100%; object-fit: cover; }
.headline .h-title {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: #1e5ba8;
    margin: 15px 0 8px;
    line-height: 1.4;
}
.headline .h-summary { color: #666; font-size: 14px; line-height: 1.7; }

.news-list { flex: 1; }
.news-list ul li {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.news-list ul li .title { color: #333; flex: 1; padding-right: 10px; }
.news-list ul li .title:hover { color: #1e5ba8; }
.news-list ul li .date { color: #999; font-size: 12px; flex-shrink: 0; }

/* ===== 三栏列表 ===== */
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.col {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px 20px;
}
.section-alt .col { background: #fff; }
.col h4 {
    font-size: 16px;
    color: #1e5ba8;
    font-weight: bold;
    border-bottom: 1px solid #1e5ba8;
    padding-bottom: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.col h4 .more { font-size: 12px; color: #999; font-weight: normal; }
.col ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    display: flex;
    justify-content: space-between;
}
.col ul li:last-child { border-bottom: 0; }
.col ul li a { color: #333; }
.col ul li a:hover { color: #1e5ba8; }
.col ul li .date { color: #999; font-size: 12px; }

/* ===== 信息公开入口 ===== */
.info-entry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.info-entry .item {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.2s;
}
.info-entry .item:hover {
    border-color: #1e5ba8;
    box-shadow: 0 4px 12px rgba(30,91,168,0.1);
    transform: translateY(-2px);
}
.info-entry .item h4 { color: #1e5ba8; font-size: 16px; margin-bottom: 6px; }
.info-entry .item p { color: #888; font-size: 13px; }

/* ===== 服务列表 ===== */
.service-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.service-list .item {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 20px;
    display: block;
    transition: all 0.2s;
}
.service-list .item:hover {
    border-color: #1e5ba8;
    box-shadow: 0 4px 12px rgba(30,91,168,0.1);
}
.service-list .item h4 {
    color: #333;
    font-size: 15px;
    margin-bottom: 10px;
    height: 22px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.service-list .item .meta {
    color: #888;
    font-size: 12px;
    line-height: 1.7;
}
.service-list .item .meta span { display: block; }

.section-actions {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}
.section-actions .btn-primary { margin: 0 8px; }

/* ===== 信箱 ===== */
.mailbox-wrap { display: flex; gap: 20px; }
.mailbox-cats {
    width: 200px;
    background: #fff;
    padding: 15px;
    border: 1px solid #eee;
}
.mailbox-cats .cat {
    display: block;
    padding: 10px 0;
    border-bottom: 1px dashed #f0f0f0;
    color: #333;
}
.mailbox-cats .cat:last-child { border-bottom: 0; }
.mailbox-cats .cat:hover { color: #1e5ba8; padding-left: 5px; }

.mailbox-list { flex: 1; }
.mailbox-list ul li {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
}
.mailbox-list ul li a { color: #333; }
.mailbox-list ul li a:hover { color: #1e5ba8; }
.mailbox-list ul li .date { color: #999; font-size: 12px; }
.mailbox-actions { margin-top: 20px; }
.mailbox-actions a { margin-right: 10px; }

/* ===== 互动交流 ===== */
.survey-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 20px; }
.survey-list h4, .interview-list h4 {
    font-size: 16px;
    color: #1e5ba8;
    font-weight: bold;
    border-bottom: 1px solid #1e5ba8;
    padding-bottom: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.survey-list h4 .more, .interview-list h4 .more { font-size: 12px; color: #999; font-weight: normal; }
.survey-list ul li, .interview-list ul li {
    padding: 10px 0;
    border-bottom: 1px dashed #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.survey-list ul li .title, .interview-list ul li .title { color: #333; flex: 1; }
.survey-list ul li .title:hover, .interview-list ul li .title:hover { color: #1e5ba8; }
.survey-list ul li .date, .interview-list ul li .date { color: #999; font-size: 12px; }

.feedback-row {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    margin-top: 15px;
}
.feedback-row h4 {
    font-size: 16px;
    color: #1e5ba8;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.feedback-row h4 .more { font-size: 12px; color: #999; font-weight: normal; }
.feedback-row .item {
    padding: 10px 0;
    border-bottom: 1px dashed #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.feedback-row .item:last-child { border-bottom: 0; }
.feedback-row .item a { color: #333; flex: 1; }
.feedback-row .item a:hover { color: #1e5ba8; }
.feedback-row .item .meta-dept { color: #999; font-size: 12px; }

/* ===== 领导卡片 ===== */
.leader-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
}
.leader-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px 10px;
    text-align: center;
    transition: all 0.2s;
}
.leader-card:hover {
    border-color: #1e5ba8;
    box-shadow: 0 4px 12px rgba(30,91,168,0.1);
}
.leader-card .photo {
    width: 80px;
    height: 100px;
    background: #1e5ba8;
    color: #fff;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    border-radius: 4px;
    overflow: hidden;
}
.leader-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.leader-card h4 { font-size: 14px; color: #333; margin-bottom: 4px; }
.leader-card p { color: #888; font-size: 12px; }

/* ===== 机构设置 ===== */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.dept-item {
    background: #fff;
    padding: 18px 15px;
    border: 1px solid #eee;
    transition: all 0.2s;
    display: block;
}
.dept-item:hover {
    border-color: #1e5ba8;
    box-shadow: 0 4px 12px rgba(30,91,168,0.1);
}
.dept-item h4 { font-size: 14px; color: #1e5ba8; margin-bottom: 6px; }
.dept-item p { color: #888; font-size: 12px; }

/* ===== 列表页 ===== */
.list-page { padding: 25px 0; }
.list-page .row { display: flex; gap: 20px; }
.list-page .sidebar {
    width: 220px;
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    flex-shrink: 0;
}
.list-page .side-title {
    font-size: 16px;
    font-weight: bold;
    color: #1e5ba8;
    border-bottom: 2px solid #1e5ba8;
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.list-page .sidebar ul li a {
    display: block;
    padding: 8px 10px;
    color: #333;
    border-bottom: 1px dashed #f0f0f0;
}
.list-page .sidebar ul li a:hover,
.list-page .sidebar ul li a.active { color: #1e5ba8; background: #f5f8fc; }

.list-page .content { flex: 1; background: #fff; border: 1px solid #eee; padding: 25px; }

/* 列表项 */
.list-item {
    display: flex;
    padding: 18px 0;
    border-bottom: 1px dashed #eee;
}
.list-item .thumb { width: 200px; height: 130px; margin-right: 20px; flex-shrink: 0; }
.list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-item .info { flex: 1; }
.list-item .info h3 { font-size: 18px; margin-bottom: 8px; }
.list-item .info h3 a { color: #1e5ba8; }
.list-item .info .summary { color: #666; font-size: 13px; line-height: 1.7; margin-bottom: 8px; }
.list-item .info .meta { color: #999; font-size: 12px; }
.list-item .info .meta span { margin-right: 15px; }

/* 文章详情 */
.article-page { padding: 25px 0; }
.article-page .row { display: flex; gap: 20px; }
.article-page .main {
    flex: 1;
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
}
.article-page .main h1 {
    font-size: 26px;
    color: #333;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 15px;
}
.article-page .main .meta {
    text-align: center;
    color: #999;
    font-size: 13px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.article-page .main .meta span { margin: 0 10px; }
.article-page .main .content {
    line-height: 1.9;
    color: #333;
    font-size: 15px;
}
.article-page .main .content p { margin-bottom: 15px; }
.article-page .main .content img { max-width: 100%; margin: 10px 0; }
.article-page .main .content h2, .article-page .main .content h3, .article-page .main .content h4 {
    color: #1e5ba8;
    margin: 20px 0 10px;
    font-weight: bold;
}
.article-page .main .content table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.article-page .main .content th, .article-page .main .content td {
    border: 1px solid #ddd;
    padding: 8px 12px;
}
.article-page .main .content th { background: #f5f8fc; }

.prev-next {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.prev-next .item { padding: 8px 0; color: #666; }
.prev-next .item a { color: #1e5ba8; }

.article-page .right { width: 280px; flex-shrink: 0; }
.article-page .right .box {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 15px;
}
.article-page .right .box h4 {
    font-size: 16px;
    color: #1e5ba8;
    font-weight: bold;
    border-bottom: 2px solid #1e5ba8;
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.article-page .right .box ul li { padding: 6px 0; }
.article-page .right .box ul li a { color: #333; }
.article-page .right .box ul li a:hover { color: #1e5ba8; }

/* ===== 表单 ===== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; color: #333; font-size: 14px; }
.form-group label .req { color: #f5222d; }
.form-control {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.form-control:focus { border-color: #1e5ba8; }
textarea.form-control { height: auto; min-height: 80px; padding: 8px 10px; }
select.form-control { background: #fff; }

/* ===== 表格 ===== */
.env-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.env-table th, .env-table td {
    border: 1px solid #e8e8e8;
    padding: 10px 12px;
    text-align: left;
}
.env-table th { background: #f5f8fc; color: #1e5ba8; font-weight: bold; }
.env-table tr:hover { background: #fafbfc; }

/* ===== 分页 ===== */
.pagination { text-align: center; padding: 25px 0; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 3px;
    font-size: 13px;
}
.pagination a:hover { border-color: #1e5ba8; color: #1e5ba8; }
.pagination .active { background: #1e5ba8; border-color: #1e5ba8; color: #fff; }
.pagination .disabled { color: #ccc; cursor: not-allowed; }
.pagination .total { border: 0; color: #999; }

/* ===== 标签页 ===== */
.tabs-bar {
    display: flex;
    border-bottom: 2px solid #1e5ba8;
    margin-bottom: 20px;
}
.tabs-bar a {
    padding: 10px 20px;
    color: #333;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.tabs-bar a:hover, .tabs-bar a.active {
    color: #1e5ba8;
    border-bottom-color: #1e5ba8;
    font-weight: bold;
}

/* ===== 提示信息 ===== */
.alert {
    padding: 10px 20px;
    border-radius: 3px;
    margin-bottom: 15px;
    font-size: 14px;
}
.alert-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.alert-error, .alert-danger { background: #fff1f0; color: #f5222d; border: 1px solid #ffa39e; }
.alert-warning { background: #fffbe6; color: #faad14; border: 1px solid #ffe58f; }
.alert-info { background: #e6f7ff; color: #1e5ba8; border: 1px solid #91d5ff; }

/* ===== 底部 ===== */
.footer {
    background: #2a3f5a;
    color: #b0b8c5;
    padding: 25px 0;
    text-align: center;
    font-size: 13px;
    margin-top: 30px;
}
.footer a { color: #b0b8c5; margin: 0 8px; }
.footer a:hover { color: #fff; }
.footer .links { margin-bottom: 8px; }
.footer .copyright { color: #6c7a8a; font-size: 12px; margin-top: 5px; }

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 50px;
    width: 46px;
    height: 46px;
    background: #1e5ba8;
    color: #fff;
    text-align: center;
    line-height: 46px;
    font-size: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s;
}
.back-to-top:hover { background: #174a8c; transform: translateY(-3px); }

/* ===== 通用工具 ===== */
.text-center { text-align: center; }
.text-muted { color: #999; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .wrap { width: 100%; padding: 0 15px; }
    .leader-row { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .headline-row, .list-page .row, .article-page .row, .mailbox-wrap, .survey-row {
        flex-direction: column;
    }
    .list-page .sidebar, .article-page .right {
        width: 100%;
    }
    .three-col, .info-entry, .service-list, .dept-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .leader-row {
        grid-template-columns: repeat(3, 1fr);
    }
}
