/* Page module - Case Study List (big cards, image side alternating). Stats: assets/css/case-study-stats.css */
.el-cslist-head {
    max-width: 780px;
    margin: 0 auto clamp(32px, calc(32px + 20 * (100vw - 1280px) / 640), 52px);
    text-align: center;
}

.el-cslist-title {
    margin: 0 0 14px;
}

.el-cslist-intro {
    margin: 0;
    font-size: clamp(17px, 1.1vw, 19px);
    color: var(--el-color-muted);
}

.el-cslist-items {
    display: grid;
    gap: clamp(24px, 2.4vw, 44px);
}

.el-cs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #e3eaf0;
    border-radius: clamp(24px, 2.2vw, 40px);
    background: var(--el-color-white);
    box-shadow: 0 2px 10px rgba(12, 29, 39, 0.04);
    transition: box-shadow 0.25s;
}

.el-cs:hover {
    box-shadow: 0 18px 44px rgba(12, 29, 39, 0.1);
}

.el-cs:nth-child(even) .el-cs-media {
    order: 2;
}

/* Side by side (1200px and up) the photo covers its whole half, cropped from the centre. Stacked
   (below 1200px) it keeps its own ratio. The dark gradient fills the half until an image is set. */
.el-cs-media {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(70% 90% at 90% 0%, rgba(241, 98, 42, 0.28), transparent 60%), radial-gradient(60% 80% at 0% 100%, rgba(51, 121, 190, 0.35), transparent 60%), #0d2236;
}

.el-cs-media.is-empty {
    min-height: 420px;
}

.el-cs-media a {
    display: block;
    width: 100%;
}

.el-cs-media img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.el-cs:hover .el-cs-media img {
    transform: scale(1.03);
}

.el-cs-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 3.4vw, 64px);
}

.el-cs-client {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0 0 18px;
    font-size: clamp(18px, 1.2vw, 22px);
    font-weight: 600;
    color: var(--el-color-heading);
}

.el-cs-client img,
.el-cs-client svg {
    width: auto;
    max-width: 200px;
    max-height: 44px;
}

.el-cs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.el-cs-tags li {
    padding: 6px 14px;
    border-radius: 999px;
    background: #eef2f5;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--el-color-blue-dark);
}

.el-cs-tags li:first-child {
    background: #fdeee6;
    color: var(--el-color-orange);
}

.el-cs-title {
    margin: 0 0 14px;
}

.el-cs-title a {
    color: inherit;
}

.el-cs-text {
    margin: 0 0 26px;
    font-size: clamp(17px, 1.1vw, 19px);
    color: var(--el-color-muted);
}

.el-cs .el-cs-stats {
    margin-bottom: 30px;
}

.el-cs-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
}

/* Tablet: image on top (full width, so the uncropped image fills it). */
@media (min-width: 1200px) {
    .el-cs-media a {
        height: 100%;
    }

    .el-cs-media img {
        height: 100%;
        object-fit: cover;
    }
}

@media (max-width: 1199px) {
    .el-cs {
        grid-template-columns: 1fr;
    }

    .el-cs:nth-child(even) .el-cs-media {
        order: 0;
    }

    .el-cs-media.is-empty {
        min-height: 260px;
    }
}

@media (max-width: 575px) {
    .el-cs-foot .btn {
        width: 100%;
    }
}

.el-cs[hidden],
.el-cslist-more[hidden] {
    display: none;
}

.el-cslist-more {
    margin-top: clamp(28px, 3vw, 52px);
    text-align: center;
}

/* Load More: spinner replaces the label while loading; the button is disabled so it can't be clicked twice. */
.el-cslist-more-btn {
    position: relative;
}

.el-cslist-more-btn:disabled {
    cursor: wait;
}

.el-cslist-more-btn.is-loading {
    color: transparent;
}

.el-cslist-more-btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: el-cslist-spin 0.7s linear infinite;
}

@keyframes el-cslist-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .el-cslist-more-btn.is-loading::after {
        animation-duration: 1.6s;
    }
}
