/* ═══════════════════════════════════════════════
   cases-slider.css  –  Home Page Cases Slider
   ═══════════════════════════════════════════════ */

/* ── SECTION WRAPPER ── */
.cs-section {
    padding: clamp(3rem, 8vw, 8.75rem) 0 clamp(2rem, 6vw, 5rem);
    background: var(--tp-common-white);
    /* #ede8f5 */
    overflow: hidden;
    position: relative;
}

.cs-section::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -120px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(36, 35, 104, .09) 0%, transparent 70%);
    pointer-events: none;
}

/* ── SECTION HEADER ── */
.cs-section-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: left;
}

[dir="rtl"] .cs-section-header {
    text-align: right;
}

/* ── HEADER ── */
.cs-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 24px;
    flex-wrap: wrap;
}

.cs-header__eyebrow {
    display: block;
    font-family: var(--tp-ff-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tp-theme-secondary);
    margin-bottom: 8px;
}

.cs-header__title {
    font-family: var(--tp-ff-heading);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 600;
    color: var(--tp-heading-primary);
    line-height: 1.2;
    margin: 0;
}

.cs-header__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--tp-ff-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--tp-theme-primary);
    text-decoration: none;
    border: 1.5px solid var(--tp-purple-light);
    border-radius: 24px;
    padding: 9px 20px;
    white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s;
    flex-shrink: 0;
}

.cs-header__cta:hover {
    background: var(--tp-theme-primary);
    color: var(--tp-common-white);
    border-color: var(--tp-theme-primary);
    text-decoration: none;
}

.cs-header__cta svg {
    transition: transform .2s;
}

.cs-header__cta:hover svg {
    transform: translateX(3px);
}

/* ── SWIPER CONTAINER ── */
.cs-swiper-outer {
    overflow: hidden;
    width: 100%;
}

.cs-swiper {
    width: 100%;
    margin: 0 auto;
    padding: 10px 24px 56px;
    position: relative;
    overflow: hidden;
}

.cs-header,
.cs-swiper {
    max-width: 1320px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* إخفاء الأسهم لما يكون في slide أو 2 بس */
.cs-swiper.cs-hide-nav .cs-nav {
    display: none !important;
}

/* ── SLIDE ── */
.cs-slide {
    width: 368px !important;
    height: auto;
}

/* ── CARD ── */
.cs-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: var(--tp-common-white);
    border: 1px solid var(--tp-purple-light);
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: transform .25s, box-shadow .25s;
    box-shadow: 0 2px 12px rgba(36, 35, 104, .08);
}

.cs-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(36, 35, 104, .18);
    text-decoration: none;
}

/* ── CARD IMAGE ── */
.cs-card__img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--tp-purple-lightest);
}

.cs-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s;
}

.cs-card:hover .cs-card__img {
    transform: scale(1.05);
}

.cs-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tp-purple-lightest);
    color: var(--tp-purple-light);
}

.cs-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(36, 35, 104, .82);
    backdrop-filter: blur(6px);
    color: var(--tp-common-white);
    font-family: var(--tp-ff-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    padding: 2px 8px;
    border-radius: 20px;
}

/* ── CARD BODY ── */
.cs-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.cs-card__service {
    font-family: var(--tp-ff-heading);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--tp-heading-primary);
    margin: 0;
}

.cs-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cs-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--tp-ff-body);
    font-size: 13px;
    color: var(--tp-text-body);
    background: var(--tp-purple-lightest);
    border-radius: 20px;
    padding: 4px 10px;
}

.cs-card__meta-item svg {
    flex-shrink: 0;
    stroke: var(--tp-theme-primary);
}

.cs-card__arrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--tp-ff-body);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    margin-top: auto;
    font-weight: 600;
    color: var(--tp-theme-secondary);
    letter-spacing: .04em;
    transition: color .2s, gap .2s;
}

.cs-card:hover .cs-card__arrow {
    color: var(--tp-theme-primary);
    gap: 8px;
}

.cs-card__arrow svg {
    stroke: currentColor;
}

/* ── NAVIGATION ── */
.cs-nav {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 28px));
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--tp-purple-light);
    background: var(--tp-common-white);
    color: var(--tp-theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
    box-shadow: 0 2px 10px rgba(36, 35, 104, .10);
}

.cs-nav:hover {
    background: var(--tp-theme-primary);
    color: var(--tp-common-white);
    border-color: var(--tp-theme-primary);
    box-shadow: 0 4px 16px rgba(36, 35, 104, .28);
}

.cs-nav.swiper-button-disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

.cs-nav--prev {
    left: 0;
}

.cs-nav--next {
    right: 0;
}

/* ── PAGINATION ── */
.cs-pagination {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.cs-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tp-purple-light);
    opacity: 1;
    transition: width .25s, background .25s, border-radius .25s;
    cursor: pointer;
}

.cs-pagination .swiper-pagination-bullet-active {
    width: 24px;
    border-radius: 4px;
    background: var(--tp-theme-primary);
}

/* ════════════════ RTL ════════════════ */
[dir="rtl"] .cs-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .cs-header__cta svg {
    transform: scaleX(-1);
}

[dir="rtl"] .cs-header__cta:hover svg {
    transform: scaleX(-1) translateX(-3px);
}

[dir="rtl"] .cs-card__badge {
    right: auto;
    left: 10px;
}

[dir="rtl"] .cs-card__body {
    text-align: right;
}

[dir="rtl"] .cs-card__meta {
    flex-direction: row-reverse;
}

[dir="rtl"] .cs-card__arrow {
    flex-direction: row-reverse;
}

[dir="rtl"] .cs-card__arrow svg {
    transform: scaleX(-1);
}

[dir="rtl"] .cs-nav--prev {
    left: auto;
    right: 0;
}

[dir="rtl"] .cs-nav--next {
    right: auto;
    left: 0;
}

[dir="rtl"] .cs-nav--prev svg {
    transform: scaleX(-1);
}

[dir="rtl"] .cs-nav--next svg {
    transform: scaleX(-1);
}

/* ════════════════ RESPONSIVE ════════════════ */
@media (max-width: 1024px) {
    .cs-swiper {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 768px) {
    .cs-section {
        padding: 48px 0 60px;
    }

    .cs-header {
        margin-bottom: 28px;
        padding: 0 16px;
    }

    .cs-swiper {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cs-nav {
        display: none;
    }

    .cs-section-header {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .cs-slide {
        width: 280px !important;
    }

    .cs-header__title {
        font-size: 22px;
    }

    .cs-card__body {
        padding: 14px 14px 16px;
    }
}

.cs-card {
    cursor: default;
}

.cs-card__img-wrap a.cs-popup-img {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.cs-card__zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(36, 35, 104, 0);
    color: white;
    transition: background .3s;
}

.cs-popup-img:hover .cs-card__zoom {
    background: rgba(36, 35, 104, .45);
}

.cs-card__service-link {
    text-decoration: none;
    color: inherit;
}

.cs-card__service-link:hover .cs-card__service {
    color: var(--tp-theme-primary);
    text-decoration: underline;
}