/* ==========================================================================
   Mobile First: Stacked Layout
   ========================================================================== */
.rehasport-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.rehasport-item {
    display: flex;
    flex-direction: column;
}

.rehasport-content-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
}

.rehasport-number {
    background-color: var(--rehasport-bg-number, #0f355c);
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25em;
    /* Relativ zum Template beibehalten, da festes UI-Element */
    margin-bottom: 1.25rem;
}

.rehasport-title {
    color: #0bb0a6;
    margin-top: 0;
    margin-bottom: 1rem;
}

.rehasport-text {
    color: #3ba29a;
    margin-bottom: 1.5rem;
}

/* Anpassung für Absätze, die vom Editor generiert werden */
.rehasport-text p,
.rehasport-box-text p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.rehasport-content-bottom {
    background-color: var(--rehasport-bg-box, #e3f9f6);
    padding: 1.5rem;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.rehasport-content-bottom.empty {
    background-color: transparent;
    padding: 0;
}

.rehasport-box-title {
    color: #0bb0a6;
    margin-top: 0;
    margin-bottom: 1rem;
}

.rehasport-box-text {
    color: #3ba29a;
}

.rehasport-box-text a {
    color: #0bb0a6;
    text-decoration: underline;
}

/* ==========================================================================
   Desktop Layout & Subgrid Magic
   ========================================================================== */
@media (min-width: 992px) {
    .rehasport-list {
        grid-template-columns: repeat(4, 1fr);
    }

    @supports (grid-template-rows: subgrid) {
        .rehasport-item {
            display: grid;
            grid-template-rows: subgrid;
            grid-row: span 2;
            gap: 0;
        }

        .rehasport-content-top {
            grid-row: 1;
        }

        .rehasport-content-bottom {
            grid-row: 2;
            height: 100%;
        }
    }
}
