/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 页面头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-area img {
    height: 60px;
    width: auto;
}

.logo-text h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 5px;
}

.logo-text p {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1890ff;
    transition: width 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #1890ff;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .logo-area {
        margin-bottom: 15px;
    }

    .main-nav {
        width: 100%;
    }

    .main-nav ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        width: 100%;
        margin: 0;
        padding: 10px 0;
        gap: 15px;
    }

    .main-nav li {
        display: inline-block !important;
        float: none !important;
        width: auto !important;
        flex: 0 0 auto !important;
        margin: 0;
    }

    .main-nav a {
        display: block;
        padding: 5px 10px;
        font-size: 14px;
        white-space: nowrap;
    }

    .logo-text h1 {
        font-size: 20px;
    }
}

/* 主标题区样式 */
.page-title {
    margin-top: 120px;
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.page-title h1 {
    font-size: 36px;
    color: #1890ff;
    margin-bottom: 15px;
}

.page-title .subtitle {
    font-size: 18px;
    color: #666;
}

/* 通用section样式 */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 15px;
}

section h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #1890ff;
    margin: 15px auto 0;
}

/* 页脚样式 */
.footer {
    background-color: #2f3640;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.contact-info {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
    margin-bottom: 30px;
}

.copyright {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.copyright p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin: 5px 0;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .page-title {
        margin-top: 180px;
    }

    .page-title h1 {
        font-size: 28px;
    }

    .page-title .subtitle {
        font-size: 16px;
    }

    section h2 {
        font-size: 24px;
    }
}

/* 在现有样式后添加 */

/* 政策和动态板块容器 */
.policy-news-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.policy-section,
.enterprise-news {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    min-width: 0;  /* 防止flex子项溢出 */
    width: 100%;   /* 确保宽度100% */
}

.policy-nav {
    width: 100%;  /* 确保导航栏宽度100% */
}

.policy-tabs {
    display: flex;
    list-style: none;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    width: 100%;  /* 确保标签栏宽度100% */
}

/* 标签页样式 */
.policy-tabs .tab-item {
    position: relative;
    padding: 8px 15px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s;
}

.policy-tabs .tab-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1890ff;
    transition: width 0.3s ease;
}

.policy-tabs .tab-item.active {
    color: #1890ff;
}

.policy-tabs .tab-item.active::after {
    width: 100%;
}

/* 内容区域样式 */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;  /* 添加固定宽度 */
    position: relative;  /* 添加定位 */
}

.tab-content.active {
    display: block;
    opacity: 1;
}

.policy-list ul,
.news-list ul {
    list-style: none;
    width: 100%;  /* 确保列表宽度100% */
}

.policy-list li,
.news-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    width: 100%;  /* 确保列表项宽度100% */
}

.policy-list .date,
.news-list .date {
    color: #999;
    font-size: 14px;
    margin-right: 15px;
    min-width: 90px;
}

.policy-list li a,
.news-list li a {
    color: #333;
    text-decoration: none;
    flex: 1;
    transition: color 0.3s;
    white-space: nowrap;        /* 不换行 */
    overflow: hidden;           /* 超出隐藏 */
    text-overflow: ellipsis;    /* 显示省略号 */
    display: block;             /* 确保省略号效果生效 */
}

.policy-list li,
.news-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    overflow: hidden;           /* 确保内容不会溢出 */
}

.policy-list .date,
.news-list .date {
    color: #999;
    font-size: 14px;
    margin-right: 15px;
    min-width: 90px;           /* 确保日期宽度固定 */
    flex-shrink: 0;            /* 防止日期被压缩 */
}

.policy-list a:hover,
.news-list a:hover {
    color: #1890ff;
}

/* 新闻亮点样式 */
.news-highlight {
    margin-bottom: 20px;
}

.highlight-item {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.highlight-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.highlight-item h3 {
    padding: 15px;
    font-size: 18px;
    margin: 0;
}

.highlight-item .news-brief {
    padding: 0 15px 15px;
    color: #666;
    font-size: 14px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .policy-news-container {
        flex-direction: column;
    }
}

/* 企业名单滚动展示样式 */
/* 优化企业名单滚动样式 */
.enterprise-scroll-container {
    max-width: 1000px;
    height: 500px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.enterprise-scroll-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    animation: infiniteScroll 40s linear infinite;
}

@keyframes infiniteScroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(calc(-100% + 500px));
    }
}

.enterprise-scroll-wrapper:hover {
    animation-play-state: paused;
}

.enterprise-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    height: 140px;
}

.enterprise-item h3 {
    color: #1890ff;  /* 恢复标题蓝色 */
    font-size: 18px;
    margin-bottom: 10px;
}

.enterprise-item p {
    color: #666;  /* 恢复描述文字灰色 */
    font-size: 14px;
    line-height: 1.6;
}

.enterprise-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #1890ff;
}

/* 响应式布局调整 */
@media screen and (max-width: 992px) {
    .enterprise-scroll-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .enterprise-scroll-wrapper {
        grid-template-columns: 1fr;
    }
    
    .enterprise-scroll-container {
        height: 400px;
    }
}

/* 响应式适配 */
@media screen and (max-width: 768px) {
    .enterprise-item {
        width: 100%;
        min-width: auto;
    }
}

/* 助残机构轮播样式 */
.institution-carousel {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.institution-wrapper {
    display: flex;
    gap: 20px;
    animation: scrollInstitution 20s linear infinite;
}

.institution-item {
    flex: 0 0 300px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    text-align: center;
}

.institution-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.institution-item h3 {
    color: #1890ff;
    font-size: 18px;
    margin-bottom: 15px;
}

.institution-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.institution-item .contact {
    color: #999;
    font-size: 14px;
}

@keyframes scrollInstitution {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% - 20px));
    }
}

/* 响应式适配 */
@media screen and (max-width: 768px) {
    .institution-item {
        flex: 0 0 260px;
    }
}

/* 修改企业名单标题样式 */
.enterprise-list {
    position: relative;
}

.enterprise-list h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* 修改助残机构标题样式 */
.institution-section {
    position: relative;
}

.institution-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* 查看更多按钮样式 */
.view-more {
    position: absolute;
    right: 20px;
    top: 45px;
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 15px;
    border: 1px solid #1890ff;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.view-more:hover {
    background-color: #1890ff;
    color: #fff;
}

/* 捐款二维码样式 */
.qrcode-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin: 30px auto;
    max-width: 800px;
}

.qrcode-item {
    text-align: center;
}

.qrcode-item img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px;
    background: #fff;
}

.qrcode-item p {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
}

/* 响应式适配 */
@media screen and (max-width: 768px) {
    .qrcode-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .qrcode-item img {
        width: 180px;
        height: 180px;
    }
}
section h2 a {
    color: inherit;
    text-decoration: none;
}

section h2 a:hover {
    color: inherit;
    text-decoration: none;
}

/* 轮播图样式 */
.news-highlight {
    margin-bottom: 30px;
    overflow: hidden;
}

.news-carousel {
    position: relative;
    width: 100%;
    height: 300px; /* 从400px调整为300px */
    overflow: hidden;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .news-carousel {
        height: 200px; /* 从300px调整为200px */
    }
}
.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none; /* 默认不接收点击事件 */
}

.carousel-item.active {
    opacity: 1;
    pointer-events: auto; /* 激活状态时接收点击事件 */
}

.carousel-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1; /* 确保链接在控制按钮和指示器之下 */
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3; /* 提高控制按钮的层级 */
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3; /* 提高指示器的层级 */
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}

.carousel-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.carousel-content p {
    font-size: 16px;
    opacity: 0.9;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .carousel-control {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .carousel-control.prev {
        left: 10px;
    }
    
    .carousel-control.next {
        right: 10px;
    }
}
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background: #fff;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .news-carousel {
        height: 200px;
    }

    .carousel-content h3 {
        font-size: 18px;
    }

    .carousel-content p {
        font-size: 14px;
    }

    .carousel-control {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}
section h2 a {
    color: inherit;
    text-decoration: none;
}

section h2 a:hover {
    color: inherit;
    text-decoration: none;
}
