.case-study-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.case-study-item {
    position: relative;
    border-radius: 16px;
    border: 1px solid rgba(16, 17, 15, 0.10);
    overflow: hidden;
    background: #fff;
}

.before-after-slider-container {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
}

.before-after-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.before-image {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
    /* Start by revealing half of the before image */
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 60px;
    /* Adjust width to accommodate the icon */
    height: 100%;
    cursor: ew-resize;
    z-index: 3;
    display: flex;
    /* Flexbox to centre the icon */
    justify-content: center;
    align-items: center;
    transform: translateX(-50%);
    /* Centre the handle horizontally */
}

.slider-handle img {
    position: relative;
    z-index: 10;
}

.case-study-link {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.case-study-title {
    font-size: 28px;
    font-style: normal;
    font-weight: 600;
    line-height: 100%;
    letter-spacing: -0.28px;
    color: #10110f;
}

.case-study-location {
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    color: #10110F;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width:1024px) {
    .case-study-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width:767px) {
    .before-after-slider-container {
        height: 300px;

        .slider-handle {
            width: 40px;
        }
    }
}




.case-study-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
}

.case-study-grid .swiper-container {
    width: 100%;
    overflow: hidden;
}

.case-study-grid .swiper-wrapper {
    display: flex;
}

.case-study-grid .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.filter-item {
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    padding: 8px 16px;
    border: 1px solid #0E278D;
    border-radius: 50px;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
}

.filter-item.active {
    background-color: var(--Secondary, #0E278D);
}

.filter-item:hover {
    background-color: var(--Secondary, #0E278D);
}

@media (min-width: 768px) {

    .case-study-grid .swiper-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
    }

    .case-study-grid .swiper-slide {
        flex: 0 1 auto;
    }
}


/* Css for the slider */
.case-study-intro {
    font-size: 20px;
    font-weight: 500;
}

.case-study-intro,
.case-study-first-paragraph,
.case-study-rest-of-text {
    margin-bottom: 24px;
}

.case-study-before-after {
    margin: 32px 0;
}

.before-after-slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
/*     border-radius: 16px; */
}

.before-after-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.before-image {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 60px;
    height: 100%;
    cursor: ew-resize;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(-50%);
}

.slider-handle img {
    position: relative;
    z-index: 10;
}

@media (max-width: 767px) {
    .slider-handle {
        width: 40px;
    }
}