/* 图文轮播样式 */
.news-gallery {
    position: relative;
    /* margin: 2rem 0; */
    /* border-radius: 12px; */
    overflow: visible; /* 允许按钮超出图片区域显示 */
    /* box-shadow: 0 8px 25px rgba(215, 0, 15, 0.1); */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.news-gallery .swiper-container {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.news-gallery .swiper-slide {
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
}
/* .news-gallery .swiper-slide img {
            display: none;
        }
        .news-gallery .swiper-slide-active img {
            display: block;
        } */
.news-gallery .slide-image-container {
    position: relative;
    width: 100%;
    height: 434px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-gallery .slide-image {
    width: 650px;
    height: 434px;
    object-fit: cover;
    /* border-radius: 12px 12px 0 0; */
    display: block;
}

/* 图片计数器 */
.news-gallery .image-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.news-gallery .slide-content {
    padding: 1rem 0;
    background: white;
    border-radius: 0 0 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* min-height: 200px; */
}

.news-gallery .slide-text {
    color: #666;
    line-height: 1.8;
    font-size: 1.1rem;
    text-align: justify;
    margin: 0;
}

.news-gallery .swiper-pagination {
    bottom: 25px;
    z-index: 10;
}

.news-gallery .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 14px;
    height: 14px;
}

.news-gallery .swiper-pagination-bullet-active {
    background: #D7000F;
    transform: scale(1.2);
}

.news-gallery .swiper-button-next,
.news-gallery .swiper-button-prev {
    color: #D7000F;
    background: #ffffff; /* 背景调整为纯白 */
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    top: 217px;
    transform: translateY(-50%);
    z-index: 15;
}

    .news-gallery .swiper-button-next:after,
    .news-gallery .swiper-button-prev:after {
        font-size: 20px;
        font-weight: bold;
    }

    .news-gallery .swiper-button-next:hover,
    .news-gallery .swiper-button-prev:hover {
        background: #D7000F; /* 悬停变品牌红 */
        color: #ffffff;
        transform: translateY(-50%) scale(1.06);
    }

/* 放到图片外侧 */
.news-gallery .swiper-button-next {
    right: -74px;
}

.news-gallery .swiper-button-prev {
    left: -74px;
}

/* 移动端按钮回到图片内部，避免超出屏幕 */
@media (max-width: 768px) {
    .news-gallery {
        max-width: 100%;
        margin: 1rem 0;
        overflow: hidden; /* 小屏仍隐藏溢出，避免布局抖动 */
    }

        .news-gallery .swiper-button-next,
        .news-gallery .swiper-button-prev {
            display: none;
            width: 50px;
            height: 50px;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.95);
        }

        .news-gallery .swiper-button-next {
            right: 12px;
        }

        .news-gallery .swiper-button-prev {
            left: 12px;
        }

            .news-gallery .swiper-button-next:hover,
            .news-gallery .swiper-button-prev:hover {
                transform: translateY(-50%) scale(1.06);
            }
}

/* 确保图片正确显示 */
.news-gallery img {
    width: 650px;
    height: 434px;
    object-fit: cover;
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-gallery {
        max-width: 100%;
        margin: 1rem 0;
        overflow: hidden;
    }

        .news-gallery .swiper-container {
            height: auto;
        }

        .news-gallery .slide-image-container {
            height: auto;
        }

        .news-gallery .slide-image,
        .news-gallery img {
            width: 100%;
            height: auto;
            max-height: 350px;
        }

        .news-gallery .slide-content {
            /* padding: 2rem; */
            /* min-height: 180px; */
        }

        .news-gallery .slide-text {
            font-size: 1rem;
        }

        .news-gallery .image-counter {
            top: 10px;
            right: 10px;
            padding: 6px 10px;
            font-size: 0.85rem;
        }

        .news-gallery .swiper-button-next,
        .news-gallery .swiper-button-prev {
            width: 32px;
            height: 32px;
            top: 50%;
            transform: translateY(-200%);
        }

            .news-gallery .swiper-button-next:after,
            .news-gallery .swiper-button-prev:after {
                font-size: 16px;
            }

            .news-gallery .swiper-button-next:hover,
            .news-gallery .swiper-button-prev:hover {
                transform: translateY(-50%) scale(1.1);
            }

        .news-gallery .swiper-button-next {
            right: 15px;
        }

        .news-gallery .swiper-button-prev {
            left: 15px;
        }
}

.news-body img {
    display: inline-block;
}

/* 上一篇/下一篇导航样式 */
.news-navigation {
    /* margin-top: 3rem; */
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .nav-item.disabled {
        opacity: 0.4;
        pointer-events: none;
    }

.nav-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.nav-link {
    color: #1f2937;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .nav-link:hover {
        color: #D7000F;
    }

.nav-item.prev .nav-link:before {
    content: '← ';
    margin-right: 0.5rem;
}

.nav-item.next {
    text-align: right;
}

    .nav-item.next .nav-link:after {
        content: ' →';
        margin-left: 0.5rem;
    }

@media (max-width: 768px) {
    .news-navigation {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav-item.next {
        text-align: left;
    }
}

