/* ================= 全局重置 ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background-color: #f0f4f8;
    /* 浅蓝灰背景 */
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

ul {
    list-style: none;
}

/* 通用容器 */
.container {
    width: 96%;
    max-width: 1280px;
    margin: 0 auto;
}

/* ================= 头部 (Logo + 搜索框) ================= */
.site-header {
    background: linear-gradient(to right, #0056b3, #004494);
    color: #fff;
    padding: 20px 0;
}

.header-inner {
    width: 96%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* 适配手机换行 */
}

.logo-area {
    font-size: 26px;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px;
    border-radius: 4px;
}

.search-input {
    border: none;
    outline: none;
    padding: 8px 12px;
    border-radius: 2px;
    font-size: 14px;
    width: 220px;
    color: #333;
}

.search-btn {
    background-color: #002a5c;
    color: #fff;
    border: none;
    padding: 0 15px;
    margin-left: 4px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
}

.search-btn:hover {
    background-color: #001f3f;
}

/* ================= 导航栏 ================= */
.nav-bar {
    background-color: #003d80;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
}

.nav-list li {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.nav-list a {
    display: block;
    color: #fff;
    padding: 15px 0;
    font-size: 16px;
}

.nav-list a:hover,
.nav-list a.active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ================= 首页轮播图 ================= */
.hero-carousel {
    width: 100%;
    height: 420px;
    /* 您可以根据图片实际高度调整这里，比如改成 500px */
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    background-color: #001f3f;
    /* 图片加载失败时的底色 */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s;
    /* 去掉了 display: flex 等居中属性，因为 img 不需要 */
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

/* 新增：专门控制轮播图图片的样式 */
.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 关键属性：保证图片铺满盒子且不拉伸变形 */
    display: block;
}

/* 标题遮罩保持不变 */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    background: linear-gradient(transparent, rgba(0, 31, 63, 0.8));
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}

/* 指示器保持不变 */
.indicators {
    position: absolute;
    bottom: 20px;
    right: 5%;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* ================= 首页网格系统 (8个栏目) ================= */
.grid-box {
    display: grid;
    /* 核心：4列布局，8个栏目正好占2行 */
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 50, 100, 0.08);
    display: flex;
    flex-direction: column;
    height: 380px;
    /* 固定高度确保对齐 */
    border-top: 3px solid #0056b3;
}

.panel-head {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8faff;
}

.panel-title {
    font-size: 18px;
    color: #0056b3;
    font-weight: bold;
    border-left: 4px solid #0056b3;
    padding-left: 12px;
}

.panel-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.news-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e9ecef;
    font-size: 14px;
}

.news-list a {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.news-list a::before {
    content: "•";
    color: #0056b3;
    margin-right: 5px;
}

.news-list a:hover {
    color: #0056b3;
}

.news-date {
    color: #aaa;
    font-size: 12px;
}

/* ================= 内页布局 (列表/详情/简介) ================= */
.page-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    /* 左大右小 */
    gap: 25px;
    margin-bottom: 40px;
}

.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a:hover {
    color: #0056b3;
}

.main-content-box {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 50, 100, 0.08);
    border-top: 3px solid #0056b3;
    min-height: 600px;
}

.page-title-large {
    font-size: 26px;
    color: #0056b3;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

/* 列表页元素 */
.list-group li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #e0e0e0;
    font-size: 15px;
}

.badge-new {
    background-color: #ff4757;
    color: #fff;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 5px;
}

.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.page-item {
    min-width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.page-item.active {
    background-color: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

/* 详情页元素 */
.article-header {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.article-meta {
    font-size: 13px;
    color: #999;
    margin-top: 10px;
}

.article-content p {
    text-indent: 2em;
    margin-bottom: 20px;
    text-align: justify;
}

/* 简介页元素 */
.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}

.org-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.dept-box {
    background: #f8faff;
    border: 1px solid #b3d7ff;
    color: #0056b3;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.function-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.func-card {
    border: 1px solid #eee;
    padding: 15px;
    text-align: center;
    border-radius: 6px;
}

.func-icon {
    width: 40px;
    height: 40px;
    background: #e3f2fd;
    color: #0056b3;
    border-radius: 50%;
    line-height: 40px;
    margin: 0 auto 10px;
    font-weight: bold;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-panel {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-top: 3px solid #0056b3;
}

.side-header {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    color: #0056b3;
    background: #f8faff;
}

.side-nav-list a {
    display: block;
    padding: 12px 20px;
    color: #555;
    border-bottom: 1px solid #f5f5f5;
    border-left: 3px solid transparent;
}

.side-nav-list a:hover,
.side-nav-list a.active {
    color: #0056b3;
    background-color: #f0f7ff;
    border-left-color: #0056b3;
}

/* ================= 底部 ================= */
.site-footer {
    background: #263238;
    color: #cfd8dc;
    text-align: center;
    padding: 40px 0;
    font-size: 14px;
}

/* ================= 响应式 ================= */
@media (max-width: 900px) {
    .grid-box {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 平板2列 */
    .page-layout {
        grid-template-columns: 1fr;
    }

    /* 内页单列 */
    .function-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .search-wrapper {
        width: 100%;
    }

    .search-input {
        width: 100%;
        flex: 1;
    }

    .nav-list li {
        width: 33.33%;
        flex: none;
    }

    .hero-carousel {
        height: 200px;
    }

    .grid-box {
        grid-template-columns: 1fr;
    }

    /* 手机单列 */
}

/* ================= 搜索结果页专用样式 (添加到 style.css 末尾) ================= */

/* 搜索状态栏 (显示关键词和结果数) */
.search-stat-bar {
    background-color: #f8faff;
    border: 1px solid #e3f2fd;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 30px;
    font-size: 14px;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.keyword-highlight {
    color: #d32f2f;
    /* 红色高亮关键词 */
    font-weight: bold;
    margin: 0 4px;
}

/* 搜索结果列表容器 */
.search-result-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    /* 结果之间的间距 */
}

/* 单个搜索结果项 */
.search-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.search-item:last-child {
    border-bottom: none;
}

/* 结果标题 */
.result-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #0056b3;
}

.result-title a:hover {
    text-decoration: underline;
}

/* 结果摘要/简介 */
.result-snippet {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
    /* 限制显示两行 (可选) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 关键词高亮 (模拟搜索命中) */
.result-snippet b {
    color: #d32f2f;
    font-weight: normal;
}

/* 结果元信息 (日期、栏目) */
.result-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 15px;
}

.result-tag {
    background-color: #f0f4f8;
    padding: 2px 6px;
    border-radius: 2px;
    color: #0056b3;
}