.recent-case-studies-header {
    align-items: end;
    display: flex;
    justify-content: space-between;
}

.case-study-filter-bar {
    background: #fafafa;
    border: 1px solid #e5e9f0;
    border-radius: 18px;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    margin: 22px 0 0;
    padding: 22px;
}

.case-study-filter-group {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.case-study-filter-group legend {
    color: #222;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.case-study-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.case-study-filter {
    background: #fff;
    border: 1px solid #d7d9df;
    border-radius: 999px;
    color: #333;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    padding: 9px 14px;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.case-study-filter:hover {
    border-color: #6145f1;
    color: #6145f1;
    transform: translateY(-1px);
}

.case-study-filter.is-active {
    background: #6145f1;
    border-color: #6145f1;
    color: #fff;
}

.case-study-filter-clear {
    align-self: end;
    background: transparent;
    border: 0;
    color: #1080d1;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 2px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.case-study-filter-summary {
    color: #5e5e68;
    font-size: 14px;
    margin: 14px 2px 22px;
}

.case-study-company {
    color: #222;
    display: block !important;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    margin: 14px 0 8px;
    width: 100%;
}

.case-studies-grid .resource-info > div {
    display: block !important;
    width: 100%;
}

.case-studies-grid .resource-inner {
    cursor: default;
    display: flex;
    flex-direction: column;
}

/* Case Studies and Videos each declare their own .case-studies-grid
   grid-template-columns (2 columns, in page-casestudy.php and
   page-videos.php respectively) sized for their card content. This file
   used to force 3 narrow columns here with !important regardless of that,
   which left long card titles wrapping down to one word per line -- see
   the item 3/5 write-up. Removed so each page's own 2-column layout
   applies; the narrower-viewport overrides below (<=1100px) already
   assumed 2 columns was the fallback, so this just makes that the
   default everywhere instead of only below 1100px. */

.case-studies-grid .case-study-logo-card-media {
    align-items: center;
    background: linear-gradient(135deg, #f7f4ff 0%, #f4f8ff 100%);
    box-sizing: border-box;
    display: flex;
    height: 150px;
    justify-content: center;
    padding: 30px;
    width: 100%;
}

.case-studies-grid .case-study-logo-card-media img {
    display: block;
    height: 100% !important;
    max-height: 86px;
    max-width: 82%;
    object-fit: contain !important;
    width: auto !important;
}

.case-study-logo-fallback {
    color: #222;
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.1;
    text-align: center;
}

.case-studies-grid .resource-info {
    padding: 24px !important;
}

.case-studies-grid .resource-info h3 {
    font-size: 22px;
    line-height: 1.25;
    margin: 0;
}

.featured-case-study-card {
    align-items: stretch !important;
    aspect-ratio: 8 / 3;
    border: 1px solid #e5e9f0;
    border-radius: 20px !important;
    cursor: default !important;
    gap: 0 !important;
    min-height: 0;
    overflow: hidden;
}

.featured-case-study-card:hover {
    transform: none !important;
}

.featured-case-study-image {
    align-items: center;
    background: transparent;
    display: flex;
    flex: 0 0 50%;
    height: auto !important;
    min-height: 0;
}

.featured-case-study-image img {
    border-radius: 0 !important;
    display: block;
    height: 100% !important;
    object-fit: contain !important;
    width: 100%;
}

.featured-case-study-content {
    align-self: center;
    box-sizing: border-box;
    padding: 36px 40px !important;
}

.featured-case-study-type {
    margin: 0 0 20px !important;
}

.featured-case-study-content .case-study-company {
    font-size: 21px;
    margin: 0 0 24px;
}

.featured-case-study-title {
    font-size: clamp(24px, 2vw, 32px) !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em;
    line-height: 1.2 !important;
    margin: 0 !important;
}

.featured-case-study-content .case-study-product-tags {
    margin: 20px 0 24px;
}

.featured-case-study-excerpt {
    line-height: 1.5 !important;
    margin: 0 0 20px !important;
    max-width: 650px;
}

.featured-case-study-meta {
    margin: 0 !important;
}

.case-studies-grid .resource-info {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.case-studies-grid .resource-info > .btn {
    align-self: flex-start;
    margin-top: auto;
}

.case-studies-grid .resource-typenew {
    display: inline-flex;
}

.case-study-company::before {
    color: #6145f1;
    content: "Company";
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    line-height: 1;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.case-study-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 16px 0 28px;
}

.case-study-product-tag {
    background: #eef4fc;
    border-radius: 999px;
    color: #1080d1;
    display: inline-flex !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    padding: 6px 11px;
}

.case-study-product-tag--wellbeing {
    background: #eaf5f3;
    color: #287b73;
}

.case-study-product-tag--rewards_recognition {
    background: #f5eef8;
    color: #8c3581;
}

.case-study-product-tag--communities {
    background: #fff2e9;
    color: #a84d22;
}

.resource-inner[hidden] {
    display: none !important;
}

@media (min-width: 1351px) {
    .featured-case-study-content {
        padding: 24px 40px !important;
    }

    .featured-case-study-type {
        margin-bottom: 12px !important;
    }

    .featured-case-study-content .case-study-company {
        margin-bottom: 16px;
    }

    .featured-case-study-title {
        font-size: clamp(24px, 1.65vw, 30px) !important;
    }

    .featured-case-study-content .case-study-product-tags {
        margin: 16px 0 18px;
    }

    .featured-case-study-excerpt {
        line-height: 1.4 !important;
        margin-bottom: 14px !important;
    }
}

@media (max-width: 900px) {
    .case-study-filter-bar {
        grid-template-columns: 1fr;
    }

    .case-study-filter-clear {
        justify-self: start;
    }
}

@media (max-width: 1100px) and (min-width: 769px) {
    .case-studies-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .featured-case-study-card {
        align-items: stretch;
        aspect-ratio: auto;
        flex-direction: column !important;
    }

    .featured-case-study-image {
        flex: 0 0 auto;
        aspect-ratio: auto;
        min-height: 0;
        width: 100%;
    }

    .featured-case-study-content {
        align-self: stretch;
        padding: 32px !important;
    }
}

@media (max-width: 1350px) and (min-width: 769px) {
    .featured-case-study-card {
        aspect-ratio: auto;
        flex-direction: column !important;
    }

    .featured-case-study-image {
        flex: 0 0 auto;
        width: 100%;
    }

    .featured-case-study-image img {
        height: auto !important;
    }

    .featured-case-study-content {
        align-self: stretch;
        padding: 32px !important;
    }
}

@media (max-width: 600px) {
    .case-studies-grid {
        grid-template-columns: 1fr !important;
    }

    .featured-case-study-card {
        aspect-ratio: auto;
        min-height: 0;
    }

    .featured-case-study-image {
        aspect-ratio: auto;
        min-height: 0;
    }

    .featured-case-study-image img {
        height: auto !important;
    }

    .featured-case-study-content {
        align-self: stretch;
        padding: 24px !important;
    }

    .featured-case-study-type {
        margin-bottom: 16px !important;
    }

    .featured-case-study-content .case-study-company {
        margin-bottom: 20px;
    }

    .featured-case-study-content .case-study-product-tags {
        margin: 18px 0 20px;
    }

    .case-study-filter-bar {
        padding: 18px;
    }

    .case-study-filter-options {
        flex-wrap: nowrap;
        margin-right: -18px;
        overflow-x: auto;
        padding-bottom: 6px;
        padding-right: 18px;
    }

    .case-study-filter {
        flex: 0 0 auto;
    }
}
