﻿body {
    background: #f9f9f9;
}

/* 主容器 */
.container {
    width: 70%;
}
/* 响应式适配 */
@media (max-width: 768px) {
    .container {
        width: 90%;
    }
}

/* ========= 已加：红色党建背景图 Banner ========= */
.banner {
    height: 300px;
    background: linear-gradient(rgba(196,0,0,0.75), rgba(196,0,0,0.75)), url("../image/pcylconstruc_bg.jpeg") center center no-repeat;
    background-size: cover;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

    .banner h1 {
        font-size: 46px;
        font-weight: bold;
        margin-bottom: 14px;
        letter-spacing: 2px;
    }

    .banner p {
        font-size: 18px;
        opacity: 0.95;
    }

/* 标题 */
.item-title {
    text-align: center;
    margin: 35px 0 25px;
    font-size: 22px;
    color: #c40000;;
    position: relative;
}

    .item-title::after {
        content: "";
        width: 50px;
        height: 3px;
        background: #c40000;
        position: absolute;
        left: 50%;
        bottom: -10px;
        transform: translateX(-50%);
    }

/* 卡片布局 */
.card-box {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: 0.3s;
}

    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
        cursor:pointer;
    }

    .card i {
        font-size: 36px;
        color: #c40000;
    }

    .card h3 {
        font-size: 16px;
        margin-top:15px;
        margin-bottom: 8px;
    }

    .card p {
        font-size: 14px;
        color: #666;
        line-height: 1.6;
    }

/* 最新动态 → 图片卡片 */
.news-box {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
    margin-bottom: 40px;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: 0.3s;
    cursor: pointer;
}

    .news-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    }

.news-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.news-info {
    padding: 12px;
}

.news-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.news-title {
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 通知公告 */
.notice {
    background: #fff;
    padding: 10px 25px;
    border-radius: 8px;
    margin-bottom: 40px;
    border-left: 4px solid #c40000;
}

.notice-item {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    transition: 0.2s;
    cursor: pointer;
}

    .notice-item:last-child {
        border: 0
    }

    .notice-item:link, .notice-item:visited {
        color:#000000;
        text-decoration:none;
    }

    .notice-item:hover {
        color: #c40000;
        padding-left: 6px;
    }

/* 学习资料 */
.study-box {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.study-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: 0.3s;
}

    .study-item:hover {
        background: #fff5f5;
        transform: translateY(-3px);
        cursor:pointer;
    }

    .study-item i {
        font-size: 24px;
        color: #c40000;
    }

    .study-item h3 {
        margin-top: 10px;
    }

/* 手机适配 */
@media(max-width:768px) {
    .nav {
        flex-direction: column;
        gap: 15px
    }

    .card-box, .study-box {
        grid-template-columns: 1fr
    }

    .news-box {
        grid-template-columns: repeat(2,1fr)
    }

    .banner h1 {
        font-size: 32px
    }

    .banner p {
        font-size: 16px
    }

    .banner {
        height: 240px
    }
}