/* css/party.css */

/* =========================================
   1. 党建新闻双栏区域
   ========================================= */
.party-news-section {
    padding: 3rem 0;
    background-color: #fff;
}

.party-columns-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 3rem; /* 左右栏间距 */
}

.party-col {
    width: 50%; /* 各占一半 */
}

/* --- 栏目头部 --- */
.col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #b70006; /* 党建红 */
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
}

.col-title {
    font-size: 1.5rem;
    color: #333;
    font-weight: bold;
}

.btn-view-more {
    font-size: 0.9rem;
    color: #b70006;
    border: 1px solid #b70006;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    transition: all 0.3s;
}

.btn-view-more:hover {
    background-color: #b70006;
    color: #fff;
}

/* --- 头条推荐 (图文卡片) --- */
.feature-news {
    display: flex;
    margin-bottom: 1.5rem;
    background-color: #fff9f2; /* 浅米色背景 */
}

.feature-img {
    width: 240px;
    height: 160px;
    flex-shrink: 0;
    overflow: hidden;
}

.feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

/* 图片悬停放大 */
.feature-news:hover .feature-img img {
    transform: scale(1.1);
}

.feature-content {
    flex-grow: 1;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.f-title {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.f-title a {
    color: #b70006; /* 标题红色 */
    text-decoration: none;
    /* 限制显示3行 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.f-link {
    align-self: flex-end; /* 靠右下角 */
    font-size: 0.9rem;
    color: #999;
}
.f-link:hover {
    color: #b70006;
    text-decoration: underline;
}

/* --- 下方列表 --- */
.party-list {
    list-style: none;
}

.party-list li {
    border-bottom: 1px dashed #ddd; /* 虚线分割 */
    padding: 1rem 0;
}

.party-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    font-size: 1rem;
}

.p-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 2rem;
}

.p-date {
    color: #aaa;
    font-size: 0.9rem;
    font-family: Arial;
}

.party-list li:hover .p-title {
    color: #b70006;
}

/* =========================================
   2. 底部专题轮播区域
   ========================================= */
.party-topics-section {
    padding-bottom: 4rem;
}

.topic-slider-container {
    position: relative;
    padding: 0 4rem; /* 给左右箭头留位置 */
}

.slider-viewport {
    overflow: hidden; /* 隐藏超出部分 */
}

.slider-track {
    display: flex;
    gap: 1.5rem; /* 卡片间距 */
    transition: transform 0.5s ease; /* 滑动动画 */
}

/* 专题卡片样式 */
.topic-card {
    flex: 0 0 calc(33.333% - 1rem); /* 一行显示3个 */
    height: 140px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-decoration: none;
    border-radius: 4px;
}

.topic-bg-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
    z-index: 1;
}

/* 背景颜色覆盖层 (如果没有图片时显示颜色) */
.topic-card.bg-red { background-color: #b70006; }
.topic-card.bg-light { background-color: #eef5ff; }
.topic-card.bg-blue { background-color: #005bac; }

.topic-text {
    position: relative;
    z-index: 2;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}
.topic-text.text-blue { color: #005bac; text-shadow: none; }

.topic-card:hover .topic-bg-img {
    transform: scale(1.1);
}

/* --- 轮播箭头 --- */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    background-color: #b70006;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s;
}
.slider-arrow:hover { opacity: 1; }

.prev-btn { left: 0; border-radius: 0 4px 4px 0; }
.next-btn { right: 0; border-radius: 4px 0 0 4px; }


/* 响应式适配 */
@media screen and (max-width: 1024px) {
    .party-columns-wrapper {
        flex-direction: column;
    }
    .party-col {
        width: 100%;
    }
    .topic-card {
        flex: 0 0 calc(50% - 1rem); /* 平板显示2个 */
    }
}

@media screen and (max-width: 768px) {
    .feature-news {
        flex-direction: column;
    }
    .feature-img {
        width: 100%;
        height: 200px;
    }
    .topic-card {
        flex: 0 0 100%; /* 手机显示1个 */
    }
}