.view-posts-slider {
    position: relative;
    direction: rtl;
    display: inline-block
}

.view-posts-slider .swiper {
    overflow: hidden
}

.view-posts-slider .swiper-slide {
    height: auto;
    box-sizing: border-box
}

/* Card */
.view-posts-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(34, 31, 71, 1);
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
}

.view-posts-media {
    position: relative;
    background: #1a1a1d;
    height: 360px
}

.view-posts-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.view-posts-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2f, #1a1a1d)
}

/* Time badge center-top */
.view-posts-badge-time {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, .55);
    padding: 6px 10px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    font-weight: 600;
}

.view-posts-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    display: inline-block
}

/* Caption gradient bottom */
.view-posts-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 16px 22px;
    background: rgba(34, 31, 71, 1);
}

.view-posts-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2
}

.view-posts-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #e9e9e9
}

/* Arrows */
.view-posts-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--view-secondary);
    color: #fff;
    cursor: pointer;
    z-index: 3;
    user-select: none;
    box-shadow: 0 8px 20px rgba(255, 61, 87, .35);
}

.view-posts-prev {
    left: -14px
}

.view-posts-next {
    right: -14px
}

/* Optional pagination */
.view-posts-pagination {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 3
}

.view-posts-pagination .swiper-pagination-bullet {
    background: #fff;
    opacity: .35
}

.view-posts-pagination .swiper-pagination-bullet-active {
    opacity: 1
}

/* --- پایه ها (مثل قبل) --- */
.view-posts-slider {
    position: relative;
    display: inline-block
}

.view-posts-slider .swiper {
    overflow: hidden
}

.view-posts-slider .swiper-slide {
    height: auto;
    box-sizing: border-box
}


.view-posts-like {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 14px;
    width: fit-content;
    padding: 0;
    margin: 0;
}

.view-posts-like svg {
    width: 20px;
    height: 19px;
    display: block
}

.view-posts-title {
    font-size: 16px;
    font-weight: 900;
    line-height: 40px;
    text-align: right;
    color: #fff;
    padding: 0;
    margin: 0;
    width: fit-content;
}


.view-posts-prev {
    left: -14px
}

.view-posts-next {
    right: -14px
}

/* اگر قبلاً برای کپشن گرادیان تنظیم کرده بودی، این‌ها مطمئن می‌کند یک‌دست باشد */
.view-posts-caption {
    background-image: none !important;
}
