/* ==========================================================================
   CSS Design System & Styles - CPC 105th Anniversary Page
   ========================================================================== */

/* 声明变量 */
:root {
    --primary-red: #C8102E;
    /* 中华之红 */
    --primary-dark: #8B0000;
    /* 深红色 */
    --footer-bg: #5c0712;
    /* 页脚深红 */
    --accent-gold: #DFB356;
    /* 典雅金色 */
    --accent-light-gold: #FFE6A3;
    /* 亮金色 */
    --bg-warm: #FDFBF7;
    /* 温暖米黄背景 */
    --bg-card: #FFFFFF;
    /* 卡片背景 */
    --bg-news-box: #F4EFE9;
    /* 建议参考图1的右侧要闻米灰背景 */
    --text-dark: #2C2C2C;
    /* 正文字体色 */
    --text-muted: #666666;
    /* 辅助信息色 */
    --border-color: #E6DFD5;
    /* 框线颜色 */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 基础重置与规范 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-warm);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    /* 增加默认字体大小 */
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--primary-red);
}

/* 头部 Banner 区域 */
.site-header {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--primary-red);
}

.header-banner {
    width: 100%;
    height: auto;
    display: block;
}

/* 主内容容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 板块间距 */
.section {
    padding: 40px 0 20px;
    border-bottom: 1px dashed var(--border-color);
}

.section:last-of-type {
    border-bottom: none;
    padding-bottom: 50px;
}

/* ==========================================================================
   第一板块：要闻关注样式
   ========================================================================== */

/* 顶部主标题 */
.main-headline-container {
    text-align: center;
    margin-bottom: 35px;
    padding: 10px 0;
}

.main-headline {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.main-headline a {
    color: var(--primary-red);
}

.main-headline a:hover {
    color: #ff1a24;
    /* 悬停时更鲜艳的红 */
}

.main-subline {
    font-size: 14px;
    color: var(--text-dark);
    /* 小字用黑色 */
    max-width: 900px;
    margin: 0 auto;
    font-weight: 500;
    line-height: 1.8;
}

.main-subline .more-link {
    color: var(--primary-red);
    /* 链接用红色 */
    margin-left: 8px;
    text-decoration: underline;
}

.main-subline .more-link:hover {
    color: #ff1a24;
    /* 悬停时更鲜艳的红 */
}

/* 下方双栏布局 */
.news-layout-row {
    display: flex;
    gap: 24px;
    margin-top: 10px;
}

/* 左侧轮播图 */
.slider-wrapper {
    flex: 3;
    /* 占60%左右 */
    position: relative;
    height: 380px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播图整体链接 */
.slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    color: inherit;
    text-decoration: none;
}

.slide-link:hover {
    color: inherit;
}

/* 轮播图下部渐变盖板与标题 */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
    /* 渐变改为黑色 */
    color: #FFFFFF;
    z-index: 3;
}

.slide-caption-title {
    font-size: 22px;
    font-weight: bold;
    color: #FFFFFF;
    /* 标题设为白色 */
    margin-bottom: 6px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.slide-caption-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

/* 自定义 Swiper 分页指示点样式 */
.swiper-pagination {
    text-align: right !important;
    padding-right: 20px !important;
    padding-bottom: 10px !important;
    z-index: 10;
}

.swiper-pagination-bullet {
    background: #FFFFFF !important;
    opacity: 0.6 !important;
    width: 10px !important;
    height: 10px !important;
    margin: 0 4px !important;
    border-radius: 50%;
    display: inline-block;
    transition: var(--transition-smooth);
}

.swiper-pagination-bullet-active {
    background: var(--primary-red) !important;
    /* 选中的圆点设为红色 */
    opacity: 1 !important;
    transform: scale(1.2);
}

/* 右侧要闻列表 */
.news-list-container {
    flex: 2;
    /* 占40%左右 */
    background-color: var(--bg-news-box);
    padding: 20px 25px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.news-text-list {
    list-style: none;
}

.news-text-list li {
    padding: 16px 0;
    border-bottom: 1px solid rgba(200, 16, 46, 0.1);
}

.news-text-list li:last-child {
    border-bottom: none;
}

.news-item-title {
    font-size: 18px;
    /* 调大字体 */
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-dark);
    display: block;
    position: relative;
    padding-left: 15px;
    transition: var(--transition-smooth);
}

.news-item-title::before {
    content: "■";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-red);
    font-size: 10px;
    margin-right: 6px;
}

.news-text-list li a:hover .news-item-title {
    color: var(--primary-red);
    transform: translateX(4px);
}


/* ==========================================================================
   栏目标题公用样式（拟真还原红底斜边金框及两侧修饰线）
   ========================================================================== */

.section-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0 35px;
    width: 100%;
}

.title-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(200, 16, 46, 0.05), var(--primary-red), rgba(200, 16, 46, 0.05));
    max-width: 150px;
}

.title-diamonds {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.title-diamonds::before,
.title-diamonds::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--primary-red);
    transform: rotate(45deg);
    margin: 0 3px;
}

/* 红色斜边金框 Banner */
.section-title-banner {
    background-color: var(--primary-red);
    transform: skewX(-20deg);
    /* 制作斜角样式 */
    padding: 6px 36px;
    border: 1.5px solid var(--accent-gold);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
    display: inline-block;
}

.section-title-banner {
    color: #FFFFFF;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

/* 反向倾斜以保持文字端正 */
.section-title-banner {
    font-family: "Microsoft YaHei", sans-serif;
}

.section-title-banner {
    display: flex;
    justify-content: center;
}

.section-title-banner {
    text-transform: uppercase;
}


/* ==========================================================================
   第二板块：紧跟党走样式
   ========================================================================== */

/* 桂林本地卡片布局 */
.local-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.local-news-card {
    display: flex;
    background-color: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: var(--transition-smooth);
}

.local-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(200, 16, 46, 0.12);
}

.card-image-box {
    width: 40%;
    min-height: 180px;
    position: relative;
    overflow: hidden;
}

.card-image-box a {
    display: block;
    width: 100%;
    height: 100%;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.local-news-card:hover .card-image-box img {
    transform: scale(1.08);
}

.card-content-box {
    width: 60%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content-box h3 {
    font-size: 18px;
    /* 调大字体 */
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-content-box h3 a {
    color: var(--text-dark);
    display: block;
}

.local-news-card:hover .card-content-box h3 a,
.card-content-box h3 a:hover {
    color: #ff1a24;
    /* 悬停时更鲜艳的红 */
}

.card-content-box p {
    font-size: 15px;
    /* 调大字体 */
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-more {
    align-self: flex-start;
    background-color: var(--primary-red);
    color: #FFFFFF;
    font-size: 14px;
    /* 调大字体 */
    padding: 6px 16px;
    border-radius: 2px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.btn-more:hover {
    background-color: var(--primary-dark);
    color: #FFFFFF;
}

/* 红色圆点新闻列表 */
.bullet-links-container {
    margin-top: 10px;
    padding: 10px 0;
    overflow: hidden;
}

.bullet-list {
    list-style: none;
}

.bullet-list li {
    float: left;
    width: 50%;
    padding: 10px 15px 10px 18px;
    position: relative;
    font-size: 16px;
    border-bottom: 1px dashed rgba(200, 16, 46, 0.08);
    box-sizing: border-box;
}

.bullet-list li:nth-child(2n) {
    clear: none;
}

.bullet-list li:nth-child(2n+1) {
    clear: left;
}

.bullet-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--primary-red);
    border-radius: 50%;
}

.bullet-list li a {
    color: var(--text-dark);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bullet-list li a:hover {
    color: var(--primary-red);
    padding-left: 3px;
}


/* ==========================================================================
   第三板块：党员本色 Swiper 手风琴样式
   ========================================================================== */

/* PC端手风琴容器 */
.member-swiper {
    width: 100%;
    height: 420px;
    margin-top: 10px;
    position: relative;
    overflow: hidden; /* 保留裁剪，靠精确宽度计算让三卡都可见 */
}

/* PC端：Swiper wrapper 改为 flex 横排，覆盖 Swiper 内联 width 与 transform */
@media (min-width: 769px) {
    .member-swiper .swiper-wrapper {
        display: flex !important;
        flex-wrap: nowrap;
        width: max-content !important; /* 关键：覆盖 Swiper 设置的内联 width */
        transform: none !important;   /* 禁用 Swiper 的 translate 位移 */
        gap: 12px;
        height: 100%;
        align-items: stretch;
    }
}

/* 宽度由 JS 根据人物数量动态计算后注入 CSS 变量 --open-w / --closed-w */
.member-swiper .swiper-slide {
    width: var(--closed-w, 160px);
    flex-shrink: 0;
    height: 100%;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--bg-card);
    display: flex;
    position: relative;
    transition: width 0.8s ease-in-out, border-color 0.4s, box-shadow 0.4s;
    cursor: pointer;
}

.member-swiper .swiper-slide:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* PC端手风琴展开状态：使用自定义 is-open 类，与 Swiper 内部状态解耦 */
.member-swiper .swiper-slide.is-open {
    width: var(--open-w, 660px);
    border-color: var(--primary-red);
    box-shadow: 0 8px 25px rgba(200, 16, 46, 0.08);
    cursor: pointer; /* 展开后也保持 pointer，支持点击跳转 */
}

/* 照片区域：折叠时铺满整卡，展开时收缩到固定 220px */
.member-swiper .member-photo-box {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transition: width 0.8s ease-in-out;
    z-index: 2;  /* 高于文字区，动画过程中遮住右侧文字 */
    overflow: hidden;
}

.member-swiper .swiper-slide.is-open .member-photo-box {
    width: 220px; /* 固定像素，展开后图片固定宽度 */
}

.member-swiper .member-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* 详情展示区域：固定 width（不用 right:0），动画期间文字盒宽度恒定，完全无重排 */
.member-swiper .member-details-box {
    position: absolute;
    left: 220px;
    top: 0;
    bottom: 0;
    /* 宽度固定 = 展开卡宽 - 图片宿 - 内边距，动画时不会再变化 */
    width: calc(var(--open-w, 660px) - 220px);
    padding: 30px 36px;
    z-index: 1;  /* 低于图片区，被图片遮住直到图片收缩完毕 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* 展开状态：无需任何额外样式，卡片宽度展开即可揭露 */
.member-swiper .swiper-slide.is-open .member-details-box {
    /* intentionally empty */
}

.member-swiper .member-name {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-red);
    margin-bottom: 4px;
    letter-spacing: 2px;
}

.member-swiper .member-tag {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 500;
}

.member-swiper .member-quote {
    font-size: 19px;
    font-weight: bold;
    color: var(--primary-red);
    border-top: 1px dashed rgba(200, 16, 46, 0.15);
    border-bottom: 1px dashed rgba(200, 16, 46, 0.15);
    padding: 12px 0;
    margin: 15px 0;
    line-height: 1.5;
}

.member-swiper .member-bio {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.8;
    text-align: justify;
}

/* 折叠遮罩（仅电脑端可见） */
.member-swiper .collapsed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #FFFFFF;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, background-color 0.3s ease, visibility 0.3s ease;
    z-index: 3;
}

.member-swiper .swiper-slide:not(.is-open):hover .collapsed-overlay {
    background: rgba(0, 0, 0, 0.05);
}

.member-swiper .swiper-slide.is-open .collapsed-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 移动端分页指示器样式 */
.member-swiper .member-pagination {
    display: none; /* 电脑端隐藏，移动端重新显示 */
}


/* ==========================================================================
   页脚区域样式
   ========================================================================== */

.site-footer {
    background-color: var(--footer-bg);
    color: #ECC7A3;
    /* 典雅金色调 */
    padding: 30px 20px;
    text-align: center;
    font-size: 13.5px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-source {
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.footer-copyright {
    color: rgba(236, 199, 163, 0.7);
}


/* ==========================================================================
   手机端兼容及响应式布局媒体查询
   ========================================================================== */

@media (max-width: 992px) {
    .container {
        padding: 0 16px;
    }

    .main-headline {
        font-size: 28px;
    }

    .news-layout-row {
        gap: 15px;
    }

    .slider-wrapper {
        height: 320px;
    }

    .member-featured-card {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    body {
        background-color: #FAF8F5;
        /* 移动端背景微调 */
    }

    .container {
        padding: 0 16px; /* 手机端内容左右留边 */
    }

    .section {
        padding: 28px 0 14px;
    }

    /* 要闻关注响应式 */
    .main-headline {
        font-size: 22px;
        line-height: 1.4;
    }

    .news-layout-row {
        flex-direction: column;
    }

    .slider-wrapper {
        width: 100%;
        height: 250px;
        flex: none;
        /* 解决移动端 flex 容器内高度塌陷问题 */
    }

    .slide-caption-title {
        font-size: 18px;
    }

    .news-list-container {
        width: 100%;
        padding: 15px;
        flex: none;
        /* 解决移动端 flex 容器内高度塌陷问题 */
    }

    /* 栏目标题响应式 */
    .section-title-wrapper {
        margin: 20px 0 25px;
    }

    .section-title-banner {
        font-size: 18px;
        padding: 5px 24px;
    }

    .title-line {
        max-width: 80px;
    }

    /* 紧跟党走响应式 */
    .local-news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .local-news-card {
        flex-direction: column;
    }

    .card-image-box {
        width: 100%;
        height: 180px;
    }

    .card-content-box {
        width: 100%;
        padding: 15px;
    }

    .bullet-links-container {
        margin-top: 0;
    }

    .bullet-list li {
        float: none;
        width: 100%;
        padding: 10px 0 10px 18px;
    }

    .bullet-list li a {
        font-size: 13.5px;
    }

    /* 党员本色 Swiper 移动端响应式 */
    .member-swiper {
        height: auto;
    }

    .member-swiper .swiper-slide {
        width: 100% !important;
        height: auto;
        flex-direction: column;
        cursor: default;
        border-color: var(--primary-red);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    }

    .member-swiper .member-photo-box {
        position: relative;
        width: 100% !important;
        height: 240px;
    }

    .member-swiper .swiper-slide.is-open .member-photo-box {
        width: 100% !important;
    }

    .member-swiper .member-photo-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .member-swiper .collapsed-overlay {
        display: none !important;
    }

    .member-swiper .member-details-box {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100% !important;
        transform: none !important;
        transition: none !important;
        padding: 20px 15px;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .member-swiper .member-name {
        font-size: 22px;
    }

    .member-swiper .member-quote {
        font-size: 16px;
        margin: 10px 0;
        padding: 8px 0;
    }

    .member-swiper .member-bio {
        font-size: 14.5px;
    }

    /* 移动端圆点分页指示器显示 */
    .member-swiper .member-pagination {
        display: block;
        position: relative;
        text-align: center !important;
        margin-top: 15px;
        padding-right: 0 !important;
        padding-bottom: 0 !important;
    }

    .member-swiper .member-pagination .swiper-pagination-bullet {
        background: var(--text-muted) !important;
        opacity: 0.3 !important;
    }

    .member-swiper .member-pagination .swiper-pagination-bullet-active {
        background: var(--primary-red) !important;
        opacity: 1 !important;
    }
}

@media (max-width: 480px) {
    .main-headline {
        font-size: 19px;
    }

    .slider-wrapper {
        height: 200px;
    }

    .slide-caption-title {
        font-size: 15px;
    }

    .slide-caption-sub {
        display: none;
        /* 小屏幕隐藏轮播次级标题以节省空间 */
    }

    .site-footer {
        padding: 20px 10px;
        font-size: 12px;
    }
}