/*  COMPONENT: WOHNPROJEKTE-LISTE
//////////////////////////////////////////////////////////////////////////////*/

@layer components {
    .component--wohnprojekte-liste {
    }

    .wohnprojekte-liste {
        border-top: var(--spacing-xs) solid var(--color-mbz-grey-100);
    }
    .wohnprojekte-liste ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .wohnprojekt__link {
        text-decoration: none;
    }
    .wohnprojekt {
        border-bottom: var(--border);
    }
    .wohnprojekt__header {
        display: flex;
        align-items: center;
        gap: var(--size-gap);
        cursor: pointer;
    }
    .wohnprojekt__header::after {
        content: "";
        display: block;
        width: var(--size-icon);
        height: var(--size-icon);
        transform: rotate(0);
        transition: transform 0.3s;
        background-image: url(../../images/icons/icon--next.svg);
        background-size: 30px;
        background-repeat: no-repeat;
        background-position: center;
        margin-left: auto;
        flex-shrink: 0;
    }

    .wohnprojekt__number {
        width: var(--size-icon);
        height: var(--size-icon);
        text-align: center;
        line-height: var(--size-icon);
        font-weight: var(--font-weight-bold);
        flex-shrink: 0;
    }

    .wohnprojekt__title {
        margin: 0 !important;
    }
    .wohnprojekt__body {
        position: relative;
        z-index: 9999999999;
    }

    .wohnprojekt .wohnprojekt__modal {
        background: transparent;

        max-height: 100%;
        outline: none;
        border: none;
        padding: 0;

        width: 80vw;
        max-width: 77.5rem;
        margin: 0 auto;
        top: 13.875rem;
        top: 8.75rem;

        left: 0;
        right: 0;
        position: fixed;
        display: none;
        z-index: 111111;
        soverflow: auto;
    }

    .wohnprojekt__modal:target {
        display: block;
        sbox-shadow: 0 0 2000px rgba(0 0 0 / 1);
    }
    .wohnprojekt__modal::before {
        content: "";
        position: absolute;
        top: -100vh;
        right: -50vw;
        bottom: -100vh;
        left: -50vw;
        background: rgb(0 0 0 / 0.8);
    }
    .section--main:has(.wohnprojekt__modal:target) {
        z-index: 9999999;
    }

    .wohnprojekt .wohnprojekt__modal::backdrop {
        background: rgb(0 0 0 / 0.8);
        cursor: pointer;
    }
    .wohnprojekt__body {
        background: var(--color-white);
        padding: var(--spacing-l);
    }

    @media (min-width: 640px) {
        .wohnprojekt__body {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: var(--size-gap);
        }
        .wohnprojekt__body .wohnprojekt__text {
            grid-column: 2;
            grid-row: 1;
        }
        .wohnprojekt__body .wohnprojekt__gallery {
            grid-column: 1;
            grid-row: 1;
        }
        .wohnprojekt__body .wohnprojekt__gallery ul {
            grid-template-columns: 1fr 1fr;
        }
    }
    @media (max-width: 640px) {
        .wohnprojekt .wohnprojekt__modal {
            top: 2rem;
        }
        .wohnprojekt__gallery .file {
            grid-template-columns: 100%;
        }
    }

    .wohnprojekt__text {
    }
    .wohnprojekt__text a:focus {
        border: none;
        outline: none;
    }
    .wohnprojekt__gallery {
    }
    .wohnprojekt__gallery ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: var(--spacing-s);
    }
    .wohnprojekt__gallery ul li figure {
        overflow: hidden;
    }
    .wohnprojekt__gallery ul li figure img {
        object-fit: cover;
        width: 100%;
        aspect-ratio: 4/3;
    }
    .wohnprojekt__close {
        display: block;
        width: var(--size-icon);
        height: var(--size-icon);
        background-image: url("../../images/icons/icon--close.svg");
    }
    .wohnprojekt__controls {
        position: absolute;
        top: var(--spacing-m);
        right: var(--spacing-m);
        overflow: hidden;
    }
    .wohnprojekt__controls button {
        display: none;
        width: var(--size-icon);
        height: var(--size-icon);

        background-image: url("../images/icons/icon--close.svg");
    }
    .wohnprojekt__controls button:hover {
        outline: var(--border);
        outline-offset: -1px;
    }
    .wohnprojekt__controls * {
        font-size: 0;
    }
}
