/* FARBPALETTE:
 * Akzent: #3A8290
 * Akzent Dunkel (Hover/Schatten): #2d6470
 * Akzent Leicht (Content/Card Hintergrund): #D0EDEA
 * Hintergrund/Filter Boxen: #F9F9F9
*/

/* ============================================================
   1. FILTER STYLES
============================================================ */

.ba-filter-headline {
    font-size: 20px;
    font-weight: 600;
    color: #3A8290;
    margin-top: 35px;
    margin-bottom: 10px;
    display: block;
    width: 100%;
    text-align: left;
}

.ba-filter-form-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 15px 30px;
    width: 100%;
    margin-bottom: 35px;
    justify-content: flex-start;
}

.ba-filter-label {
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 0;
    cursor: pointer;
    font-size: 16px;
    color: #000;
    line-height: 1.3;
    white-space: nowrap;
    z-index: 10;
}


/* --- 1.1 PREMIUM CHECKBOX DESIGN --- */

.ba-filter-label input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0 10px 0 0;
    cursor: pointer;
    border-radius: 4px;
    border: 1.5px solid #3A8290;
    background: #fff;
    display: inline-grid;
    place-items: center;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.6),
        0 1px 2px rgba(0,0,0,0.05);
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.ba-filter-label:hover input[type="checkbox"] {
    border-color: #2d6470;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.7),
        0 2px 6px rgba(58,130,144,0.15);
}

.ba-filter-label input[type="checkbox"]:checked {
    background-color: #3A8290;
    border-color: #3A8290;
    transform: scale(1.05);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.25),
        0 4px 12px rgba(58,130,144,0.35);
}

.ba-filter-label input[type="checkbox"]::after {
    content: "✓";
    font-size: 13px;
    color: #fff;
    line-height: 1;
    transform: scale(0);
    transition: transform 0.15s ease;
}

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


/* --- 1.2 PREMIUM RADIO BUTTON DESIGN --- */

.ba-filter-label input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0 10px 0 0;
    cursor: pointer;
    border-radius: 50%;
    border: 1.5px solid #3A8290;
    background: #fff;
    display: inline-grid;
    place-items: center;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.6),
        0 1px 2px rgba(0,0,0,0.05);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.ba-filter-label:hover input[type="radio"] {
    border-color: #2d6470;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.7),
        0 2px 6px rgba(58,130,144,0.15);
}

.ba-filter-label input[type="radio"]:checked {
    transform: scale(1.05);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.25),
        0 4px 12px rgba(58,130,144,0.35);
}

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

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


/* --- 1.3 DEAKTIVIERTE FILTER OPTIK --- */

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

.ba-filter--checkbox .ba-filter-label.disabled input[type="checkbox"] {
    border-color: #ccc;
    background-color: #F9F9F9;
}

.ba-filter-label.disabled input[type="checkbox"],
.ba-filter-label.disabled input[type="radio"] {
    accent-color: #999;
}


/* ============================================================
   2. GRID LAYOUT & RESPONSIVE
============================================================ */

.case-grid__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    margin-top: 30px;
    align-items: stretch; /* WICHTIG: Gleiche Höhe der Karten im Grid */
}

@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);
    }
}

@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;
    }
}


/* ============================================================
   3. GRID KARTEN & INHALT
============================================================ */

/* --- Die gesamte Karte --- */
.case-card {
    position: relative; /* ANKER für den Button */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
    border-radius: 8px;
    overflow: hidden;
    background-color: #D0EDEA; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    display: flex; 
    flex-direction: column;
    /* PLATZHALTER: Höhe des Buttons (ca. 40px) + Abstand (15px) + unterer Rand (15px) */
    padding-bottom: 70px; 
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* --- Bild und Content --- */
.case-card__figure {
    position: relative;
    display: block; 
    width: 100%;
    flex-grow: 1; /* Füllt den Raum */
}

.case-card__img {
    display: block;
    width: 100%;
    height: 250px; 
    object-fit: cover; 
}

.case-card__content {
    padding: 15px; 
    background-color: #D0EDEA; 
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.case-card__title {
    font-size: 18px;
    font-weight: 600;
    color: #3A8290;
    margin: 0;
    line-height: 1.3;
}

.case-card__category {
    display: block; 
    font-size: 13px;
    font-weight: 400;
    color: #3A8290;
    line-height: 1.3;
    margin-top: 5px;
}
.case-card__category--behandlungsbereich {
    font-style: italic;
}


/* ============================================================
   4. ZUM BEITRAG BUTTON (ABSOLUT AM BODEN)
============================================================ */

.case-btn--post-link {
    /* Absolute Positionierung am unteren Rand der Karte */
    position: absolute; 
    bottom: 15px; /* Abstand zum untersten Kartenrand */
    left: 15px; 
    right: 15px; 

    display: block; 
    text-align: center;
    padding: 10px 15px;
    
    margin: 0; /* Automatische Ränder deaktivieren */
    
    background-color: #3A8290; 
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    transition: background-color 0.2s;
    z-index: 10; 
    width: auto; 
    box-sizing: border-box; 
}

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