/* ============================================================
   CEA Post Carousel
   ============================================================ */

/* Swiper 核心最小集（不依赖外部 swiper.min.css）*/
.cea-post-carousel.swiper {
    overflow: hidden;
}
.cea-post-carousel .swiper-wrapper {
    display: flex;
    align-items: stretch;
    box-sizing: content-box;
}
.cea-post-carousel .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    position: relative;
}

/* ---- 外层容器：剪裁溢出幻灯片，放置箭头 ---- */
.cea-post-carousel-wrapper {
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* 让 Swiper 幻灯片向两侧可见（peek 效果的关键）*/
.cea-post-carousel-wrapper .cea-post-carousel.swiper {
    overflow: visible !important;
}

/* ---- 单张卡片内层 ---- */
.cea-slide-inner {
    display: block;
    width: 100%;
    height: 480px;
    background-color: #c8cdd2;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* ---- 遮罩：默认隐藏，只有中间激活卡片显示 ---- */
.cea-slide-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(50, 70, 90, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.cea-post-carousel .swiper-slide-active .cea-slide-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* ---- 中间卡片放大，遮挡两侧边缘 ---- */
.cea-post-carousel .swiper-slide {
    transform: scale(0.9);
    transition: transform 0.4s ease;
    z-index: 1;
}

.cea-post-carousel .swiper-slide-active {
    transform: scale(1.08);
    z-index: 2;
}

/* ---- 遮罩内容区 ---- */
.cea-slide-content {
    text-align: center;
    width: 100%;
    max-width: 480px;
}

.cea-slide-title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
}

.cea-slide-title a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.cea-slide-title a:hover {
    opacity: 0.85;
}

.cea-slide-excerpt {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
}

/* ---- Read More 按钮 ---- */
.cea-slide-btn {
    display: inline-block;
    padding: 10px 30px;
    background-color: #ff6b35;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: opacity 0.2s, transform 0.2s;
}

.cea-slide-btn:hover {
    opacity: 0.88;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ---- 导航箭头 ---- */
.cea-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.35);
    border: none;
    border-radius: 50%;
    padding: 0;
    transition: background-color 0.2s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.cea-carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.cea-carousel-nav svg {
    display: block;
    pointer-events: none;
}

.cea-carousel-prev {
    left: 10px;
}

.cea-carousel-next {
    right: 10px;
}

/* 箭头禁用状态（loop=false 时首尾禁用）*/
.cea-carousel-nav.swiper-button-disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ---- 响应式 ---- */
@media (max-width: 1023px) {
    .cea-slide-title {
        font-size: 18px;
    }
}

@media (max-width: 767px) {
    .cea-slide-inner {
        height: 320px;
    }

    .cea-slide-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .cea-slide-excerpt {
        display: none;
    }

    .cea-slide-btn {
        padding: 8px 20px;
        font-size: 13px;
    }

    .cea-carousel-nav {
        width: 34px;
        height: 34px;
    }

    .cea-carousel-nav svg {
        width: 16px;
        height: 16px;
    }

    .cea-carousel-prev {
        left: 6px;
    }

    .cea-carousel-next {
        right: 6px;
    }
}
