/* ==========================================================================
   全局设置 & 变量
   ========================================================================== */
:root {
    --primary-color: #0052cc;
    --light-gray: #f2f2f2;
    --text-gray: #666;
    --border-color: #ddd;
    --light-blue-bg: #f0f6ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Heiti SC", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ================== 头部 Header ================== */
.header {
    width: 100%;
    background-color: #fff;
}

.header-top {
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.custom-logo {
    display: block;
    max-height: 70px;
    width: auto;
    object-fit: contain;
}

.search-box {
    display: flex;
    background: #e8e8e8;
    border-radius: 20px;
    padding: 5px 15px;
    width: 250px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 13px;
    padding: 5px;
}

.search-box button {
    border: none;
    background: transparent;
    cursor: pointer;
    color: #888;
}

/* ================== 导航栏 (优化版) ================== */
.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轮播图 ================== */
.banner-carousel {
    width: 100%;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 350px;
}

.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;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
}

.carousel-btn:hover {
    background-color: 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 {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s;
}

.dot.active,
.dot:hover {
    background-color: #fff;
}

/* ================== 主要内容区域 ================== */
.main {
    padding-top: 10px;
}

.content-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.col-half {
    width: 49%;
}

/* 卡片容器 */
.info-card {
    background-color: #fff;
    height: 420px;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    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 {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: bold;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.more {
    font-size: 13px;
    color: #999;
}

.more:hover {
    color: var(--primary-color);
}

.theme-line {
    border: none;
    height: 1px;
    background-color: #e5e5e5;
    margin-bottom: 15px;
    flex-shrink: 0;
}

/* 滚动区域 */
.scroll-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.scroll-content::-webkit-scrollbar {
    width: 6px;
}

.scroll-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.scroll-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.scroll-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.news-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    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%;
}

.news-list li span {
    color: #999;
    font-family: Arial;
    font-size: 12px;
}

/* 资料下载 */
.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;
    transition: 0.3s;
    margin-bottom: 15px;
    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;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.download-item a {
    font-size: 12px;
    color: #fff;
    background-color: var(--primary-color);
    padding: 3px 12px;
    border-radius: 12px;
    display: inline-block;
}

/* ================== 底部 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;
}


/* ================== 移动端适配 ================== */

@media screen and (max-width: 1024px) {
    .carousel-container {
        height: 280px;
    }

    .col-half {
        width: 48%;
    }
}

@media screen and (max-width: 768px) {
    .header-top {
        height: auto;
        flex-direction: column;
        padding: 15px 0;
    }

    .logo {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 15px;
    }

    .custom-logo {
        max-height: 55px;
    }

    .search-box {
        width: 100%;
        max-width: 90%;
    }

    /* 移动端导航优化 */
    .nav {
        background-color: var(--primary-color);
    }

    .nav .container {
        padding: 0;
        /* 移动端去掉容器内边距 */
    }

    .nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        /* 移动端不需要完全居中，整齐排列更好 */
    }

    .nav ul li {
        width: 33.33%;
        /* 一行三个，看起来更整齐 */
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        box-sizing: border-box;
    }

    /* 去掉每行最后一个的右边框 */
    .nav ul li:nth-child(3n) {
        border-right: none;
    }

    .nav ul li a {
        padding: 12px 5px;
        font-size: 14px;
    }

    /* 移动端去掉下划线动画 */
    .nav ul li a::after {
        display: none;
    }

    .carousel-container {
        height: 200px;
    }

    .info-card {
        height: auto;
        margin-bottom: 20px;
    }

    .scroll-content {
        overflow-y: visible;
    }

    .col-half {
        width: 100%;
        margin-bottom: 10px;
    }

    .footer-links {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-logo {
        margin-right: 0;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding-bottom: 15px;
        margin-bottom: 15px;
        width: 100%;
        justify-content: center;
        display: flex;
    }
}