.view-topposts {
    position: relative;
}

.view-topposts .view-topposts__swiper {
    overflow: hidden;
}

.view-topposts .swiper-wrapper {
    align-items: stretch;
}

.view-topposts .swiper-slide {
    display: flex;
}

.view-topposts .view-topposts__card {
    display: flex;
    gap: 28px;
    align-items: flex-end;
    justify-content: center;
    border-radius: 28px;
    width: 100%;
    flex-direction: row-reverse;
}

.view-topposts .view-topposts__left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
    width: 46%;
}

.view-topposts .view-topposts__likes {
    margin-right: 30px;
    direction: ltr;
    text-align: right;
}

span.view-topposts__likes-sep {
    font-size: 40px !important;
}

.view-topposts .view-topposts__likes b {
    display: block;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: var(--view-accent);
}

.view-topposts .view-topposts__likes span {
    display: inline-block;
    font-size: 18px;
    color: var(--view-accent-300);
    font-weight: 500;
    margin-inline-start: 4px;
}

.view-topposts .view-topposts__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--view-accent);
    margin: 0;
    line-height: 30px;
}

.view-topposts .view-topposts__title a {
    color: inherit;
    text-decoration: none;
}


.view-topposts .view-topposts__excerpt {
    font-size: 14px;
    color: var(--view-accent-300);
    margin: 0;
    font-weight: 500;
    line-height: 22px;
}

.view-topposts .view-topposts__pills {
    display: flex;
    gap: 14px;
    flex-direction: row-reverse;
}

.view-topposts .view-topposts__pill {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-width: 130px;
    min-height: 115px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--view-secondary-50);
}

.view-topposts .view-topposts__pill::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 90%;
    height: 90%;
    border-radius: 12px;
    border: 1px solid var(--view-secondary-400);
    pointer-events: none;
}

.view-topposts .view-topposts__pill-ico {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 16px;
}

.view-topposts .view-topposts__pill-txt {
    text-align: center;
}

.view-topposts .view-topposts__pill-txt b {
    display: block;
    font-weight: 500;
    color: var(--view-accent);
    font-size: 20px;
}

.view-topposts .view-topposts__pill-txt span {
    display: block;
    font-size: 12px;
    color: #585c73;
    margin-top: 2px;
}

/* ستون تصویر (راست) */
.view-topposts .view-topposts__thumb {
    display: block;
    border-radius: 22px;
    overflow: hidden;
    width: 50%;
}

.view-topposts .view-topposts__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Pagination */
.view-topposts .view-topposts__pagination {
    text-align: center;
    margin-top: 14px;
}

.view-topposts .view-topposts__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #cbd0dc;
    opacity: 1;
}

.view-topposts .view-topposts__pagination .swiper-pagination-bullet-active {
    background: #6b6bea;
}

/* Navigation (خارج از .swiper تا قیچی نشه) */
.view-topposts .view-topposts__prev,
.view-topposts .view-topposts__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    z-index: 5;
    background: radial-gradient(closest-side, #ff5a7a 62%, #ff5a7a 100%);
    box-shadow: 0 0 0 12px color-mix(in srgb, #ff5a7a 30%, transparent),
    0 12px 28px color-mix(in srgb, #ff5a7a 55%, transparent);
}

/* فلش‌های داخل دکمه */
.view-topposts .view-topposts__prev::before,
.view-topposts .view-topposts__next::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin: 0 auto;
}

.view-topposts .view-topposts__prev::before {
    border-right: 11px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

.view-topposts .view-topposts__next::before {
    border-left: 11px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

/* موقعیتِ پیش‌فرض دکمه‌ها — لبه‌های کانتینر */
.view-topposts .view-topposts__prev {
    left: 8px;
}

.view-topposts .view-topposts__next {
    right: 8px;
}

/* ریسپانسیو ساده */
@media (max-width: 1024px) {
    .view-topposts .view-topposts__card {
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .view-topposts .view-topposts__card {
        flex-direction: column-reverse;
    }

    .view-topposts .view-topposts__thumb {
        width: 100%;
    }

    .view-topposts .view-topposts__left {
        width: 100%;
    }

    .view-topposts .view-topposts__likes,
    .view-topposts .view-topposts__title,
    .view-topposts .view-topposts__excerpt {
        text-align: center;
    }

    .view-topposts .view-topposts__pills{
        justify-content: center;
        margin: 0;
    }

    .view-topposts .view-topposts__pill{
        flex-direction: row;
    }

    .view-topposts .view-topposts__pill-txt{
        text-align: right;
    }
}
