/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'SimSun', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* 头部容器全宽 */
.header .container {
    max-width: 100%;
    padding: 0 50px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    padding: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    max-width: 100%;
    margin: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
}

.logo-text h1 {
    font-size: 24px;
    margin-bottom: 6px;
    font-weight: bold;
}

.logo-text p {
    font-size: 14px;
    opacity: 0.8;
}

.header-search {
    display: flex;
    gap: 0;
}

.header-search input {
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 25px 0 0 25px;
    width: 240px;
    outline: none;
    font-size: 15px;
}

.header-search button {
    padding: 10px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s;
}

.header-search button:hover {
    background: #ff5252;
}

/* 主导航 */
.main-nav {
    background: rgba(255,255,255,0.1);
    border-top: 1px solid rgba(255,255,255,0.2);
}

.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: space-around;
    padding: 0;
}

.main-nav li {
    flex: 1;
    text-align: center;
}

.main-nav a {
    display: block;
    padding: 15px 18px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.2);
}

.main-nav li:last-child a {
    border-right: none;
}



/* 主内容区域 */
.main-content {
    padding: 40px 0;
}

/* 新闻中心区域 */
.news-section {
    margin-bottom: 40px;
}

.news-center {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 25px;
}

.section-left {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.section-right {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 轮播图区域 */
.carousel-section {
    margin-bottom: 40px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 40px 0;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 45%; /* 16:9 比例，基于800px宽度 */
    overflow: hidden;
}

.carousel-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide .slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 60px 30px 25px;
}

.carousel-slide .slide-title {
    font-size: 22px;
    font-weight: bold;
    line-height: 1.5;
    margin-bottom: 10px;
}

.carousel-slide .slide-date {
    font-size: 15px;
    opacity: 0.8;
}





.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #4a90e2;
}

.section-header h3 {
    color: #4a90e2;
    font-size: 20px;
    font-weight: bold;
}

.more-link {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.more-link:hover {
    color: #4a90e2;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item .date {
    color: #666;
    font-size: 13px;
    background: #f0f8ff;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.news-item a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.6;
    transition: color 0.3s;
}

.news-item a:hover {
    color: #4a90e2;
}



/* 党建工作和政策服务 */
.work-policy-section {
    margin-bottom: 50px;
}

.section-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.work-section,
.policy-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.work-cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.work-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid #4a90e2;
    transition: transform 0.3s;
    text-decoration: none;
}

.work-card:hover {
    transform: translateX(5px);
    background: #f0f8ff;
}

.work-card img {
    width: 90px;
    height: 70px;
    border-radius: 6px;
}

.work-info {
    flex: 1;
}

.work-date {
    color: #4a90e2;
    font-weight: bold;
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 10px;
    display: block;
}

.work-info p {
    color: #333;
    font-size: 15px;
    line-height: 1.5;
}

/* 专题专栏 */
.special-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.special-banner {
    margin-bottom: 20px;
}

.special-banner img {
    width: 100%;
    height: 100px;
    border-radius: 8px;
}

.special-timeline {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.timeline-date {
    text-align: center;
    background: #4a90e2;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-date .day {
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

.timeline-date .month {
    font-size: 10px;
    opacity: 0.9;
}

.timeline-content p {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

/* 万企兴万村和光彩行动 */
.village-guangcai-section {
    margin-bottom: 50px;
}

.village-section,
.guangcai-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.village-content,
.guangcai-content {
    display: flex;
    gap: 18px;
    margin-bottom: 25px;
}

.village-content img,
.guangcai-content img {
    width: 140px;
    height: 95px;
    border-radius: 10px;
    flex-shrink: 0;
}

.village-info,
.guangcai-info {
    flex: 1;
}

.village-info p,
.guangcai-info p {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.village-info .date,
.guangcai-info .date {
    color: #999;
    font-size: 13px;
}

.village-news ul,
.guangcai-news ul {
    list-style: none;
}

.village-news li,
.guangcai-news li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.village-news li:last-child,
.guangcai-news li:last-child {
    border-bottom: none;
}

.village-news a,
.guangcai-news a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    flex: 1;
    margin-right: 12px;
    transition: color 0.3s;
}

.village-news a:hover,
.guangcai-news a:hover {
    color: #4a90e2;
}

.village-news span,
.guangcai-news span {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
}


/* 会员企业 */
.member-companies {
    margin-bottom: 50px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.company-logo {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.company-logo:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.company-logo img {
    width: 100%;
    height: 70px;
    object-fit: contain;
}

/* 会员企业卡片样式 */
.company-card {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border-radius: 10px;
    padding: 25px 18px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.company-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.4);
}

.company-name {
    color: white;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.5;
    word-break: break-all;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-info p {
    margin-bottom: 10px;
    font-size: 15px;
    opacity: 0.9;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    width: 400px;
    text-align: center;
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    color: #4a90e2;
    margin-bottom: 15px;
    font-size: 18px;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.modal-content button {
    padding: 10px 30px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.modal-content button:hover {
    background: #357abd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-search input {
        width: 250px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        flex: none;
        min-width: 80px;
    }
    
    .carousel-container {
        height: 250px;
    }
    
    .carousel-slide .slide-title {
        font-size: 16px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .news-center {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-row {
        grid-template-columns: 1fr;
    }
    
    .special-timeline {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    
    .companies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 16px;
    }
    
    .hero-banner {
        height: 100px;
    }
    
    .news-ticker {
        bottom: 20px;
        padding: 8px 15px;
    }
    
    .news-label {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .work-card {
        flex-direction: column;
        text-align: center;
    }
    
    .work-card img {
        width: 60px;
        height: 45px;
    }
    
    .timeline-date {
        width: 50px;
        height: 50px;
    }
    
    .timeline-date .day {
        font-size: 16px;
    }
    
    .companies-grid {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
.news-section,
.work-policy-section,
.special-section,
.village-guangcai-section,
.member-companies {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #357abd;
}


/* 加载状态样式 */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.loading-state::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #1e3c72;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: rgba(255,255,255,0.5);
    font-size: 18px;
}


/* 党建工作、万企兴万村、光彩行动 - 无图片时保持和有图片一样的间距 */
.work-cards .news-item {
    padding: 18px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid #4a90e2;
    border-bottom: none;
    margin-bottom: 18px;
    transition: transform 0.3s;
}

.work-cards .news-item:last-child {
    margin-bottom: 0;
}

.work-cards .news-item:hover {
    transform: translateX(5px);
    background: #f0f8ff;
}

.work-cards .news-item .date {
    background: transparent;
    padding: 0;
    color: #4a90e2;
    font-weight: bold;
    min-width: auto;
}

.work-cards .news-item a {
    flex: 1;
}

/* 政策服务 - 自适应内容框高度 */
.policy-section {
    display: flex;
    flex-direction: column;
}

.policy-section .policy-list {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.policy-section .policy-item {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.policy-section .policy-item:last-child {
    border-bottom: none;
}

.policy-section .policy-item a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    flex: 1;
    margin-right: 12px;
    transition: color 0.3s;
    line-height: 1.6;
}

.policy-section .policy-item a:hover {
    color: #4a90e2;
}

.policy-section .policy-item span {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
}
