/* ==========================================================================
   全局设置 & 变量
   ========================================================================== */
:root {
    --primary-color: #0052cc;
    /* 主题色：行政蓝 */
    --primary-dark: #003399;
    /* 深蓝色：用于悬停 */
    --light-gray: #f5f5f5;
    /* 页面整体背景灰 */
    --white: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e5e5e5;
    --light-blue-bg: #f0f6ff;
    /* 浅蓝背景：用于下载块 */
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Heiti SC", Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    border: 0;
    vertical-align: middle;
}

/* 通用容器：居中且定宽 */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================================================
   头部 Header
   ========================================================================== */
.header {
    width: 100%;
    background-color: var(--white);
    border-bottom: 1px solid #ddd;
}

.header-top {
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo-link {
    display: block;
}

.custom-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

/* 搜索框 */
.search-box {
    display: flex;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    width: 280px;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    outline: none;
    font-size: 13px;
}

.search-box button {
    border: none;
    background: var(--primary-color);
    color: var(--white);
    padding: 0 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* ==========================================================================
   导航栏 Nav
   ========================================================================== */
.nav {
    background-color: var(--primary-color);
    width: 100%;
    /* 增加阴影增加层次感 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav .container {
    /* 确保容器本身没有内边距影响居中 */
    padding: 0;
}

.nav ul {
    display: flex;
    justify-content: center;
    /* 核心：水平居中 */
    align-items: center;
    /* 垂直居中 */
    flex-wrap: wrap;
    /* 允许换行 */
}

.nav ul li {
    /* 移除默认样式 */
    list-style: none;
}

.nav ul li a {
    color: #fff;
    font-size: 16px;
    padding: 15px 30px;
    /* 增加一点左右间距，显得更大气 */
    display: block;
    font-weight: 500;
    transition: all 0.3s ease;
    /* 添加平滑过渡动画 */
    position: relative;
    text-align: center;
}

/* 鼠标悬停 & 激活状态优化 */
.nav ul li a:hover,
.nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.15);
    /* 稍微调亮背景 */
    color: #fff;
}

/* 底部高亮线条效果 */
.nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: #ffcc00;
    /* 使用对比色（如黄色）强调 */
    transition: width 0.3s ease, left 0.3s ease;
}

.nav ul li a:hover::after,
.nav ul li a.active::after {
    width: 100%;
    left: 0;
}

/* ==========================================================================
   轮播图 Banner Carousel
   ========================================================================== */
.banner-carousel {
    width: 100%;
    margin-bottom: 25px;
    background: #fff;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    /* 设定轮播图高度 */
    overflow: hidden;
}

/* 轮播项 */
.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    /* 默认隐藏 */
    transition: opacity 0.8s ease-in-out;
    /* 淡入淡出效果 */
    z-index: 1;
}

.carousel-item.active {
    opacity: 1;
    z-index: 2;
}

/* 关键：让img标签填满容器并保持比例 */
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 左右切换按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* 底部圆点 */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active,
.dot:hover {
    background: #fff;
}

/* ==========================================================================
   主要内容区 Main
   ========================================================================== */
.main {
    padding-top: 10px;
}

.content-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.col-half {
    width: 49%;
    /* 两列布局 */
}

/* 信息卡片 (Info Card) */
.info-card {
    background: var(--white);
    height: 420px;
    /* 固定高度，保证页面整齐 */
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* 阴影凸显效果 */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 卡片头部 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-shrink: 0;
    /* 防止头部被压缩 */
}

.theme-title {
    font-size: 20px;
    color: var(--primary-color);
    font-weight: bold;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}

.more {
    font-size: 13px;
    color: #999;
}

.more:hover {
    color: var(--primary-color);
}

.theme-line {
    height: 1px;
    background: var(--border-color);
    margin-bottom: 15px;
    flex-shrink: 0;
}

/* 内部滚动区域 */
.scroll-content {
    flex: 1;
    /* 占据剩余空间 */
    overflow-y: auto;
    /* 垂直滚动 */
    padding-right: 8px;
    /* 给滚动条留点空隙 */
}

/* 自定义滚动条样式 (Webkit浏览器) */
.scroll-content::-webkit-scrollbar {
    width: 6px;
}

.scroll-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.scroll-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* 新闻列表样式 */
.news-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}

.news-list li a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
    color: var(--text-color);
}

.news-list li a:hover {
    color: var(--primary-color);
}

.news-list li span {
    color: #999;
    font-size: 12px;
    font-family: Arial, sans-serif;
}

/* 资料下载 Grid 样式 */
.download-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.download-item {
    width: 48%;
    /* 一行两个 */
    text-align: center;
    padding: 15px 10px;
    background: var(--light-blue-bg);
    border-radius: 6px;
    margin-bottom: 15px;
    transition: background 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.download-item:hover {
    background: #e1ecff;
}

.download-item .icon-box {
    font-size: 24px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.download-item h4 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-color);
}

.download-item a {
    display: inline-block;
    padding: 4px 15px;
    font-size: 12px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 15px;
}

.download-item a:hover {
    background: var(--primary-dark);
}

/* ==========================================================================
   底部 Footer
   ========================================================================== */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo {
    margin-right: 50px;
    padding-right: 50px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.logo-text-white {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
}

.footer-info p {
    margin: 6px 0;
    font-size: 13px;
    opacity: 0.9;
}

/* ==========================================================================
   首页移动端适配 (Responsive - Index)
   ========================================================================== */
@media screen and (max-width: 768px) {

    /* 头部堆叠 */
    .header-top {
        height: auto;
        flex-direction: column;
        padding: 15px 0;
        gap: 15px;
    }

    /* 轮播图高度减小 */
    .carousel-container {
        height: 200px;
    }

    /* 内容单列 */
    .col-half {
        width: 100%;
        margin-bottom: 20px;
    }

    /* 手机端卡片高度自动，取消内部滚动 */
    .info-card {
        height: auto;
    }

    .scroll-content {
        overflow: visible;
    }

    /* 底部布局 */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-logo {
        margin: 0 0 20px 0;
        padding: 0 0 20px 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* ==========================================================================
   内页专用样式 (Subpage Styles) - 新增部分
   ========================================================================== */

/* 面包屑导航条 */
.breadcrumb-bar {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}

.breadcrumb-text a {
    color: #666;
}

.breadcrumb-text a:hover {
    color: var(--primary-color);
}

.breadcrumb-text .current {
    color: var(--primary-color);
    font-weight: bold;
}

/* 内页主容器布局：Flexbox */
.main-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* 顶部对齐 */
    margin-bottom: 50px;
    min-height: 500px;
}

/* --- 左侧侧边栏 --- */
.sidebar {
    width: 260px;
    /* 固定宽度 */
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.sidebar-title {
    background-color: var(--primary-color);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 15px 20px;
    letter-spacing: 1px;
}

.sidebar-menu {
    padding: 10px 0;
}

.menu-item {
    border-bottom: 1px solid #f5f5f5;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item a {
    display: block;
    padding: 14px 25px;
    color: #333;
    font-size: 15px;
    transition: all 0.3s;
    position: relative;
}

/* 菜单悬停效果 */
.menu-item a:hover {
    color: var(--primary-color);
    background-color: #f9f9f9;
    padding-left: 35px;
    /* 文字右移效果 */
}

/* 激活状态的菜单项 */
.menu-item.active a {
    color: var(--primary-color);
    background-color: #e6f0ff;
    /* 浅蓝背景 */
    border-left: 4px solid var(--primary-color);
    font-weight: bold;
}

/* --- 右侧内容框 --- */
.content-box {
    flex: 1;
    /* 占据剩余宽度 */
    margin-left: 25px;
    background: #fff;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.article-header {
    text-align: center;
    margin-bottom: 20px;
}

.article-title {
    font-size: 26px;
    color: #333;
    font-weight: bold;
    margin-bottom: 15px;
}

.article-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.article-divider {
    height: 1px;
    background-color: #eee;
    margin-bottom: 30px;
}

.article-body {
    font-size: 16px;
    line-height: 2;
    /* 增加行高，提升阅读体验 */
    color: #444;
}

.article-body p {
    margin-bottom: 20px;
    text-indent: 2em;
    /* 首行缩进 */
    text-align: justify;
    /* 两端对齐 */
}

.article-body strong {
    color: #000;
}

.intro-image {
    text-align: center;
    margin-bottom: 25px;
}

.intro-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- 内页移动端适配修正 --- */
@media screen and (max-width: 768px) {
    .main-container {
        flex-direction: column;
        /* 上下排列 */
    }

    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }

    .content-box {
        margin-left: 0;
        width: 100%;
        padding: 20px;
        /* 减少内边距 */
    }

    .article-title {
        font-size: 20px;
    }
}