/* S1: Grundlayout. Kompakte Karten mit echtem Abstand statt Überlagerung. */
.schraege-auswahl-wrapper {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 24px 28px;
    overflow: visible;
}

.schraege-auswahl {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    width: min(100%, 1530px);
    margin: 0 auto;
    align-items: stretch;
    font-family: inherit;
}

/* S2: Desktop-Karten. Geringere Höhe, alle oberen und unteren Ecken abgerundet. */
.schraege-auswahl .spalte {
    position: relative;
    min-height: 0;
    aspect-ratio: 1.42 / 1;
    height: auto;
    min-width: 0;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--wb-radius-left, 24px) var(--wb-radius-right, 24px) var(--wb-radius-right, 24px) var(--wb-radius-left, 24px) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
    transform: translateY(var(--wb-offset-y, 0px));
    transition: transform .35s ease, box-shadow .35s ease;
    cursor: pointer;
    flex: 0 1 calc((100% - 48px) / 3);
}

.schraege-auswahl .spalte:hover {
    transform: translateY(calc(var(--wb-offset-y, 0px) - 6px));
    box-shadow: 0 18px 34px rgba(15, 23, 42, .24);
    z-index: 2;
}

.schraege-auswahl .bild-hintergrund,
.schraege-auswahl .farb-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.schraege-auswahl .bild-hintergrund {
    z-index: -2;
    background-size: cover;
    background-position: center;
    transition: transform .5s ease;
}

.schraege-auswahl .spalte:hover .bild-hintergrund {
    transform: scale(1.06);
}

.schraege-auswahl .farb-overlay {
    z-index: -1;
    background: linear-gradient(145deg, rgba(4, 24, 43, .25), rgba(4, 24, 43, .78));
}

@media (min-width: 641px) {
    .schraege-auswahl .spalte:hover .farb-overlay,
    .schraege-auswahl .spalte:focus-within .farb-overlay {
        background: linear-gradient(145deg, rgba(4, 24, 43, .42), rgba(4, 24, 43, .9));
    }
}

.schraege-auswahl .inhalt {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 100%;
    box-sizing: border-box;
    padding: 18px 18px;
    color: #fff;
    text-align: center;
}

.schraege-auswahl .inhalt h2 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    color: #fff;
    font-size: clamp(1.25rem, 2.1vw, 1.85rem);
    line-height: 1.2;
    text-align: left;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.schraege-auswahl .hover-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    align-self: flex-start;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: max-height .35s ease, margin-top .35s ease, opacity .25s ease, transform .35s ease;
}


@media (min-width: 641px) {
    .schraege-auswahl .inhalt h2 {
        text-align: left;
    }

    .schraege-auswahl .hover-links a {
        font-size: 1.1rem;
        line-height: 1.25;
    }

    .schraege-auswahl .spalte:hover .hover-links,
    .schraege-auswahl .spalte:focus-within .hover-links {
        max-height: 1000px;
        margin-top: 12px;
        opacity: 1;
        transform: translateY(0);
    }
}

.schraege-auswahl .hover-links a {
    display: block;
    text-align: left;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: transparent;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}

.schraege-auswahl .hover-links a:hover,
.schraege-auswahl .hover-links a:focus-visible {
    background: transparent;
    text-decoration: underline;
}

.schraege-auswahl .mobil-expand-icon {
    display: none;
}

/* S3: Mobile Darstellung mit sichtbarem Abstand zwischen den Karten. */
@media (max-width: 900px) and (min-width: 641px) {
    .schraege-auswahl {
        width: min(100%, 980px);
    }

    .schraege-auswahl .spalte {
        flex-basis: calc((100% - 30px) / 2);
    }
}

@media (max-width: 640px) {
    .schraege-auswahl-wrapper {
        padding: 10px 24px 28px;
    }

    .schraege-auswahl {
        flex-direction: column;
        gap: 14px;
    }

    .schraege-auswahl .spalte,
    .schraege-auswahl .spalte.is-expanded {
        height: auto;
        aspect-ratio: auto;
        min-height: 120px;
        flex: 0 0 auto;
        border-radius: 20px !important;
    }

    .schraege-auswahl .spalte:hover {
        transform: none;
    }

    .schraege-auswahl .inhalt {
        align-items: flex-start;
        justify-content: flex-start;
        min-height: 120px;
        padding: 18px 18px;
        text-align: left;
    }

    .schraege-auswahl .inhalt h2 {
        justify-content: space-between;
        font-size: 1.3rem;
        text-align: left;
    }

    .schraege-auswahl .mobil-expand-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
        margin-left: 12px;
        border: 1px solid rgba(255, 255, 255, .4);
        border-radius: 50%;
        font-size: 1.25rem;
        font-weight: 400;
        transition: transform .3s ease, background .2s ease;
    }

    .schraege-auswahl .spalte.is-expanded .mobil-expand-icon {
        transform: rotate(45deg);
        background: rgba(255, 255, 255, .18);
    }

    .schraege-auswahl .hover-links,
    .schraege-auswahl .spalte:hover .hover-links {
        max-height: 0;
        margin-top: 0;
        opacity: 0;
        transform: translateY(8px);
    }

    .schraege-auswahl .spalte.is-expanded .farb-overlay {
        background: linear-gradient(145deg, rgba(4, 24, 43, .52), rgba(4, 24, 43, .94));
    }

    .schraege-auswahl .spalte.is-expanded .hover-links {
        max-height: 300px;
        margin-top: 16px;
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .schraege-auswahl *,
    .schraege-auswahl *::before,
    .schraege-auswahl *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
