/* 轮播外层容器：裁掉圆角处溢出，避免 hover border 四角露白 */
.recent-post-item:has(#swiper_container) {
    overflow: hidden;
}

div#swiper_container {
    opacity: 1 !important;
    width: 100%;
    height: 100%;
    position: relative;
    transition: all .3s;
}

.blog-slider__pagination {
    position: absolute;
    bottom: 0 !important;
    z-index: 21;
    text-align: center
}

.blog-slider__pagination .swiper-pagination-bullet {
    margin: 0 8px;
    width: 11px;
    height: 11px;
    display: inline-block;
    border-radius: 99px;
    background: #fff;
    opacity: .8;
    transition: all .3s
}

.blog-slider__pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--btn-bg);
    width: 30px
}

.blog-slider__item {
    background-size: cover !important;
    background-position: center !important;
    cursor: pointer;
}

.blog-slider__item::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .3);
    z-index: -1;
    left: 0;
    top: 0;
}

.blog-slider__content {
    padding: 0 50px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100%
}

span.blog-slider__title {
    font-size: 1.5rem
}

.blog-slider__code {
    margin-bottom: 0;
    display: block;
    font-weight: 500
}

/* hover 时渐显文章描述 */
.blog-slider__text {
    font-size: 18px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity .3s ease, max-height .3s ease;
}

.blog-slider__item:hover .blog-slider__text {
    opacity: 1;
    max-height: 4em;
}

.blog-slider__content > * {
    text-align: center;
    line-height: 1.5;
    margin: 2px 0;
    color: #fff
}

/* 导航箭头 */
.swiper-button-prev,
.swiper-button-next {
    width: 44px;
    height: 44px;
    left: 6px;
    transition: background .3s;
    background-image: none !important;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255, 255, 255, .3);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.5rem;
    color: var(--june) !important;
}

.swiper-button-next,
.swiper-rtl .swiper-button-prev {
    right: 6px;
    left: auto
}

/* 响应式 */
@media screen and (min-width: 768px) {
    #swiper_container {
        height: 270px !important
    }

    .blog-slider__title {
        font-size: 1.8rem;
        text-align: center
    }

    .blog-slider__content > * {
        margin: 5px !important;
    }
}

@media screen and (max-width: 768px) {
    #swiper_container {
        height: 12rem !important
    }

    span.blog-slider__title {
        font-size: 1.3rem;
        text-align: center
    }

    .blog-slider__content {
        padding: 0 40px
    }

    .blog-slider__text {
        display: none
    }
}