.ba-filter-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.ba-filter-group-wrapper {
    display: flex;
    flex-direction: column;
}

.ba-filter-headline {
    font-size: 18px;
    font-weight: 700;
    color: #3A8290;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ba-filter-form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ba-filter-label {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    line-height: 1.2;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.ba-filter-label:hover {
    color: #3A8290;
}

.ba-filter-label input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin: 0 12px 0 0;
    cursor: pointer;
    border: 2px solid #3A8290;
    border-radius: 4px;
    background: #fff;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
}

.ba-filter-label input[type="checkbox"]:checked {
    background-color: #3A8290;
    border-color: #3A8290;
}

.ba-filter-label input[type="checkbox"]::after {
    content: "";
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
    margin-top: -2px;
}

.ba-filter-label input[type="checkbox"]:checked::after {
    transform: rotate(45deg) scale(1);
}

.ba-filter-label input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin: 0 12px 0 0;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #3A8290;
    background: #fff;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
}

.ba-filter-label input[type="radio"]::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #3A8290;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.ba-filter-label input[type="radio"]:checked::after {
    transform: scale(1);
}

.ba-filter-label.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.ba-filter-label.disabled input {
    border-color: #ccc !important;
    background-color: #f5f5f5 !important;
}

.ba-filter-clear-btn {
    margin-top: 0;
    align-self: flex-start;
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid #3A8290;
    color: #3A8290;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ba-filter-clear-btn:hover {
    background-color: #3A8290;
    color: #fff;
}

.case-grid__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    margin-top: 30px;
    align-items: stretch;
}

.case-card {
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    overflow: hidden;
    background-color: #fff;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #3A8290;
    padding-bottom: 70px;
}

.case-card__figure {
    position: relative;
    display: block;
    width: 100%;
}

.case-card__img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.case-card__content {
    padding: 20px 20px 5px 20px;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.case-card__title {
    font-size: clamp(1.0rem, 0.95rem + 0.3vw, 1.16rem);
    font-weight: 600;
    color: #3A8290;
    margin: 0;
    line-height: 1.3;
    padding-bottom: 15px;
}

.case-card__category {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.case-btn--post-link {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    line-height: 1.4em;
    padding: .7em 2.1em;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    border-radius: 5px;
    display: block;
    text-align: center;
    line-height: 1;
    margin: 0;
    background-color: #3A8290;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s;
    z-index: 10;
    width: auto;
    box-sizing: border-box;
}

.case-btn--post-link:hover {
    background-color: #2d6470;
}

@media (max-width: 980px) {
    .ba-filter-form-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px 30px;
    }

    .case-grid__list {
        grid-template-columns: repeat(2, 1fr);
    }

    .ba-filter-headline {
        font-size: 19px;
    }

    .case-btn--post-link {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .ba-filter-headline {
        font-size: 18px;
    }

    .case-btn--post-link {
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .ba-filter-form-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ba-filter-headline {
        text-align: center;
    }

    .case-grid__list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}