.cs-slider-wrapper {
    position: relative;
    padding: 0 50px;
}
@media (min-width: 769px) {
    .cs-slider-wrapper {
        width: calc(100% + 100px);
        margin-left: -50px;
        margin-right: -50px;
    }
}
.cs-slider,
.cs-slider-mobile {
    overflow: hidden;
}

/* Desktop layout */
.cs-slide {
    display: flex;
    gap: 15px;
    height: 450px;
    direction: ltr;
}
.cs-right { flex: 1; }
.cs-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Card base */
.cs-card {
    position: relative;
    display: block;
    height: 100%;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    border-radius: 0;
}
.cs-left .cs-card { height: calc(50% - 7.5px); }

.cs-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}
.cs-card:hover::before { opacity: 0.35; }

.cs-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 45%, transparent 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.cs-meta {
    display: block;
    font-size: 12px;
    color: #fff;
    margin-bottom: 5px;
    text-align: right;
    width: 100%;
}

.cs-title {
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: 18px;
    text-align: right;
    width: 100%;
    direction: rtl;
    unicode-bidi: plaintext;
}
.cs-card-big .cs-title { font-size: 23px; }

/* Excerpt */
.cs-excerpt {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    color: #eee;
    font-size: 13px;
    text-align: right;
    width: 100%;
    margin: 8px 0 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    direction: rtl;
    unicode-bidi: plaintext;
}
.cs-card-big .cs-excerpt {
    max-height: 100px;
    opacity: 1;
}
@media (min-width: 769px) {
    .cs-left .cs-card:hover .cs-excerpt {
        max-height: 60px;
        opacity: 1;
    }
}
@media (max-width: 768px) {
    .cs-card-big .cs-excerpt {
        display: none;
    }
}

/* Nav arrows (desktop) */
.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    color: #000;
}
.swiper-button-prev { left: 0; }
.swiper-button-next { right: 0; }

.cs-slider.swiper-rtl ~ .swiper-button-prev,
.cs-slider-mobile.swiper-rtl ~ .swiper-button-prev {
    left: auto;
    right: 0;
}
.cs-slider.swiper-rtl ~ .swiper-button-next,
.cs-slider-mobile.swiper-rtl ~ .swiper-button-next {
    right: auto;
    left: 0;
}
.cs-slider.swiper-rtl ~ .swiper-button-prev::after,
.cs-slider-mobile.swiper-rtl ~ .swiper-button-prev::after,
.cs-slider.swiper-rtl ~ .swiper-button-next::after,
.cs-slider-mobile.swiper-rtl ~ .swiper-button-next::after {
    transform: rotate(180deg);
}

/* Desktop / mobile slider toggle */
.cs-mobile-only { display: none; }
@media (max-width: 768px) {
    .cs-desktop-only { display: none; }
    .cs-mobile-only { display: block; }
}

/* Mobile layout */
.cs-slide-mobile {
    direction: ltr;
}
@media (max-width: 768px) {
    .cs-slide-mobile {
        display: flex;
        flex-direction: column;
        gap: 6px;
        height: auto;
    }
    .cs-mobile-big .cs-card { height: 300px; }
    .cs-mobile-row { display: flex; gap: 6px; }
    .cs-mobile-row .cs-card { flex: 1; height: 150px; }

    /* Full width, minimal side spacing, no arrows */
    .cs-mobile-only.cs-slider-wrapper { padding: 0 ; }
    .cs-mobile-only .swiper-button-prev,
    .cs-mobile-only .swiper-button-next { display: none; }

    /* Title/meta sizing + spacing off the right edge */
    .cs-overlay { padding: 12px; }
    .cs-slide-mobile .cs-title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
        line-height: normal;
        margin-bottom: 0;
        padding-right: 5px;
    }
    .cs-mobile-big .cs-title { font-size: 16px; }
    .cs-meta {
        font-size: 10px;
        margin-bottom: 3px;
        padding-right: 5px;
    }

    /* Pagination dots */
    .swiper-pagination {
        position: relative;
        margin-top: 10px;
    }
    .swiper-pagination-bullet {
        background: #000;
        opacity: 0.3;
    }
    .swiper-pagination-bullet-active {
        opacity: 1;
        background: #8b0000;
    }
}