/* --- 通用模块样式 --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #0056b3;
    padding-left: 10px;
    border-left: 4px solid #0056b3;
    /* 左侧蓝条 */
}

.more-link {
    color: #999;
    font-size: 12px;
}

/* 新闻列表样式 */
.news-list {
    width: 100%;
    min-width: 0;
    /* 确保可以收缩，防止长文本撑开宽度 */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.news-list-hidden li:first-child {
    display: none;
}

.news-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #555;
    min-width: 0;
    /* 确保 flex 项可以收缩，防止撑开列表 */
    width: 100%;
    max-width: 100%;
    height: 14.28%;
    overflow: hidden;
}

.news-list li::before {
    content: "◆";
    /* 菱形图标 */
    color: #999;
    font-size: 10px;
    margin-right: 8px;
}

.news-link {
    flex: 1;
    min-width: 0;
    /* 允许 flex 项收缩，确保文本截断生效 */
    max-width: 100%;
    /* 确保不会超出父容器宽度 */
    display: block;
    /* 确保作为块级元素正确应用宽度限制 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 20px;
}

.news-date {
    color: #999;
    font-size: 12px;
}

/* --- 第一部分：轮播图 + 工程动态 --- */
.top-section {
    padding: 20px 0;
    display: flex;
    gap: 20px;
}

.carousel-container {
    flex: 6;
    /* 左侧占60% */
    position: relative;
    height: 350px;
    overflow: hidden;
}

/* 轮播幻灯片容器（JS 动态生成时使用） */
.carousel-slides-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: none;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 10px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 轮播图指示点 */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 5px;
    z-index: 2;
}

.dot {
    width: 20px;
    height: 4px;
    background: #fff;
    opacity: 0.5;
    cursor: pointer;
}

.dot.active {
    opacity: 1;
    background: #0056b3;
}

.top-news {
    flex: 4;
    /* 右侧占40% */
    min-width: 0;
    /* 允许 flex 项收缩，防止长文本撑开列表宽度 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 新闻中心/通知公告 标签切换样式 */
.section-tabs {
    border-bottom: 1px solid #eee;
    padding-bottom: 0;
    gap: 20px;
    justify-content: flex-start;
}

.section-tab {
    font-size: 18px;
    font-weight: bold;
    color: #666;
    padding: 5px 0 10px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.section-tab:hover,
.section-tab.active {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

/* 标签内容面板：默认隐藏，激活时显示 */
.top-news .tab-content {
    display: none;
    min-width: 0;
    overflow: hidden;
}

.top-news .tab-content.active {
    display: flex;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* --- 红色横幅区域 --- */
.banner-section {
    margin-bottom: 20px;
    position: relative;
}

.banner-carousel {
    /* 默认：桌面端仅作为包裹容器，不改变原来的三栏布局 */
    position: relative;
}

.banner-dots {
    /* 默认隐藏：仅移动端轮播时显示 */
    display: none;
}

.banner-full {
    width: 100%;
    max-height: 135px;
    /* 模拟红色渐变背景 */
    background: linear-gradient(to right, #e60012, #ff4d4d);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
}


.banner-full img {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-split {
    display: flex;
    gap: 10px;
}

.banner-half {
    flex: 1;
    max-height: 112px;
    background: #d32f2f;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 20px;
}

.banner-half a {
    width: 100%;
    height: 100%;
}

.banner-half img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 微信公众号和管理系统悬浮窗 */
.news-client {
    position: absolute;
    top: 50px;
    bottom: 0;
    right: -70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding: 30px 0;
}

.news-client .project-management-box {
    display: flex;
    width: 65px;
    height: 65px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #bbb;
    border-radius: 10px;
}

.news-client .project-management-box a {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 微信公众号悬停显示二维码 */
.wechat-qrcode-box {
    /* 暂时隐藏掉微信二维码 */
    display: none !important;
    position: relative;
    cursor: pointer;
}

.wechat-qrcode-box .wechat-icon {
    width: 48px;
    height: 48px;
}

.wechat-qrcode-box .wechat-qrcode-img {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    width: 150px;
    height: 150px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wechat-qrcode-box:hover .wechat-qrcode-img {
    opacity: 1;
    visibility: visible;
}


/* --- 中间灰色背景区域 (领导视察 & 标准化建设) --- */
.gray-bg-section {
    background-color: #f9f9f9;
    padding: 30px 0;
}

.dual-columns {
    display: flex;
    gap: 30px;
}

.column-block {
    flex: 1;
    min-width: 0;
    /* 允许 flex 项收缩，防止长文本撑宽容器 */
}

.feature-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    /* 防止图片透明 */
}

.feature-img {
    width: 180px;
    height: 120px;
    object-fit: cover;
}

.feature-content {
    flex: 1;
    min-width: 0;
    /* 允许 flex 项收缩，防止长文本撑宽容器 */
}

.feature-content h3 {
    font-size: 16px;
    color: #0056b3;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feature-content h3 a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feature-content p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 底部白色区域 (工程掠影 & 党风廉政) --- */
.bottom-section {
    padding: 30px 0;
    display: flex;
    gap: 30px;
}

/* 工程掠影布局 */
.photo-gallery {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    height: 300px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item.main {
    grid-row: 1 / 3;
    /* 左侧大图跨两行 */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
    padding: 5px;
    text-align: center;
    /* 单行显示，超出部分显示省略号 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 项目概况：图片浮动，文字环绕（图文混排） */
.project-overview {
    min-width: 0;
}

.project-overview::after {
    content: "";
    display: table;
    clear: both;
}

.project-overview-img {
    float: left;
    width: 280px;
    height: 180px;
    object-fit: cover;
    margin-right: 15px;
    margin-bottom: 10px;
}

.project-overview-title {
    font-size: 16px;
    color: #0056b3;
    margin: 0 0 10px 0;
}

.project-overview-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.party-news {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- 响应式适配(移动端) --- */
@media (max-width: 768px) {

    .top-section,
    .dual-columns,
    .bottom-section {
        flex-direction: column;
    }

    .carousel-container {
        height: 200px;
    }


    /* --- 移动端：专题专栏三图轮播 --- */
    .banner-carousel {
        overflow: hidden;
        /* 视口裁切 */
        touch-action: pan-y;
        /* 允许垂直滚动；横向滑动由 JS 接管 */
    }

    .banner-carousel .banner-split {
        display: flex;
        /* 作为“轨道”横向排列 */
        gap: 0;
        /* 轮播不需要间隙，避免出现空白缝隙 */
        will-change: transform;
        /* 提示浏览器优化滑动性能 */
    }

    .banner-carousel .banner-half {
        flex: 0 0 100%;
        /* 每次显示一张 */
    }

    .banner-carousel .banner-dots {
        display: flex;
        position: relative;
        left: auto;
        bottom: auto;
        transform: none;
        justify-content: center;
        margin-top: 13px;
        gap: 6px;
        z-index: 2;
    }

    .banner-carousel .banner-dot {
        width: 22px;
        height: 4px;
        background: #999999;
        opacity: 0.55;
        border-radius: 2px;
        cursor: pointer;
    }

    .banner-carousel .banner-dot.active {
        opacity: 1;
        background: #0070BB;
    }

    .feature-item {
        flex-direction: column;
        display: none;
    }

    .news-list-hidden li:first-child {
        display: flex;
    }

    .gray-bg-section {
        background-color: transparent;
        padding: 0;
    }

    .feature-img {
        width: 100%;
        height: auto;
    }

    .photo-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
    }

    /* .photo-gallery 下的 .gallery-item隐藏,但是同时有.main的显示 */
    .photo-gallery .gallery-item:not(.main) {
        display: none;
    }

    /* 移动端：项目概况图片取消浮动，上下排列 */
    .project-overview-img {
        float: none;
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .project-overview-title {
        margin-top: 10px;
    }
}