/*
 * Für wen geeignet? - Frontend
 * Farben kommen aus den --bk-*-Variablen des Templates (sass/_variables.scss).
 * Die Fallback-Werte greifen nur ausserhalb des Beste-Kumpels-Templates
 * (z. B. im OPC-Editor).
 */
.bk-geeignet {
    margin: 24px 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--bk-border, #DFDDDC);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    color: var(--bk-text, #3B3535);
}

.bk-geeignet-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--bk-border-soft, #EBEAE9);
}

.bk-geeignet-overline {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--bk-primary, #CB5550);
}

.bk-geeignet-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--bk-accent, #107C92);
}

.bk-geeignet-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid var(--bk-border, #DFDDDC);
    border-radius: 999px;
    background: var(--bk-surface, #F8F6F5);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bk-text, #3B3535);
    white-space: nowrap;
}

.bk-geeignet-badge i {
    color: var(--bk-accent, #107C92);
}

.bk-geeignet-intro {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--bk-text, #3B3535);
}

.bk-geeignet-body {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.bk-geeignet-image {
    flex: 0 0 38%;
    max-width: 38%;
    min-height: 260px;
    border-radius: 12px;
    overflow: hidden;
}

.bk-geeignet--image-right .bk-geeignet-image {
    order: 2;
}

.bk-geeignet-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bk-geeignet-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-content: start;
}

.bk-geeignet--cols-1 .bk-geeignet-cards {
    grid-template-columns: minmax(0, 1fr);
}

/* Ungerade Anzahl: letzte Karte ueber die volle Breite, wie in der Vorlage */
.bk-geeignet--cols-2 .bk-geeignet-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.bk-geeignet-card {
    padding: 16px 18px;
    background: var(--bk-surface, #F8F6F5);
    border: 1px solid var(--bk-border-soft, #EBEAE9);
    border-radius: 12px;
}

.bk-geeignet-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--bk-accent, #107C92);
    color: #ffffff;
    font-size: 14px;
}

.bk-geeignet-card-title {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bk-text, #3B3535);
}

.bk-geeignet-card-text {
    display: block;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--bk-text, #3B3535);
}

@media (max-width: 991.98px) {
    .bk-geeignet-body {
        flex-direction: column;
    }
    /* Feste Hoehe statt max-height, damit object-fit das Bild mittig beschneidet */
    .bk-geeignet-image,
    .bk-geeignet--image-right .bk-geeignet-image {
        flex: 0 0 auto;
        max-width: 100%;
        min-height: 0;
        height: 280px;
        order: 0;
    }
}

@media (max-width: 767.98px) {
    .bk-geeignet {
        padding: 16px;
    }
    .bk-geeignet-title {
        font-size: 19px;
    }
    .bk-geeignet-cards,
    .bk-geeignet--cols-2 .bk-geeignet-cards {
        grid-template-columns: minmax(0, 1fr);
    }
    .bk-geeignet--cols-2 .bk-geeignet-card:last-child:nth-child(odd) {
        grid-column: auto;
    }
}
