/* --- 通用模块样式 --- */
.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;
}

.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%; /* 确保占据父容器的全部宽度 */
    height: 14.28%;
}

.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% */
    display: flex;
    flex-direction: column;
}

/* --- 红色横幅区域 --- */
.banner-section {
    margin-bottom: 20px;
}

.banner-carousel {
    /* 默认：桌面端仅作为包裹容器，不改变原来的三栏布局 */
    position: relative;
}

.banner-dots {
    /* 默认隐藏：仅移动端轮播时显示 */
    display: none;
}

.banner-full {
    width: 100%;
    mwx-height: 135px;
    /* 模拟红色渐变背景 */
    background: linear-gradient(to right, #e60012, #ff4d4d);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.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;
}

/* 使用文字模拟图片中的文字效果 */
.banner-text {
    color: yellow;
    font-weight: 900;
    font-size: 24px;
    text-shadow: 1px 1px 2px #000;
}

/* --- 中间灰色背景区域 (领导视察 & 标准化建设) --- */
.gray-bg-section {
    background-color: #f4f4f4;
    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;
}

.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-full {
        height: 38px;
    }

    /* --- 移动端：专题专栏三图轮播 --- */
    .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;
    }

    .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;
    }
}

