.team-mosaic-body {
    background: #fff;
}

.tm3-hero .tm-hero-grid {
    grid-template-columns: minmax(0, 0.82fr) minmax(590px, 1.18fr);
    gap: clamp(38px, 5vw, 72px);
}

/* Freie Portraitcollage statt eines geordneten Kartenrasters. */
.tm3-collage {
    position: relative;
    display: block;
    min-height: 565px;
    padding: 0;
}

.tm3-collage .tm-collage-photo {
    position: absolute;
    inset: auto;
    overflow: hidden;
    margin: 0;
    border: 5px solid #fff;
    border-radius: 23px;
    background: #eef1ec;
    box-shadow: 0 22px 55px rgba(10, 37, 64, 0.18);
    transform: rotate(var(--tm3-rotation, 0deg));
    transition: transform 280ms ease, box-shadow 280ms ease;
}

.tm3-collage .tm-collage-photo:nth-child(1) {
    z-index: 2;
    top: 15%;
    left: 0;
    width: 31%;
    height: 41%;
    --tm3-rotation: -5deg;
}

.tm3-collage .tm-collage-photo:nth-child(2) {
    z-index: 5;
    top: 2%;
    left: 22%;
    width: 32%;
    height: 42%;
    --tm3-rotation: 2.8deg;
}

.tm3-collage .tm-collage-photo:nth-child(3) {
    z-index: 4;
    top: 12%;
    left: 47%;
    width: 31%;
    height: 42%;
    --tm3-rotation: -1.8deg;
}

.tm3-collage .tm-collage-photo:nth-child(4) {
    z-index: 2;
    top: 5%;
    left: 72%;
    width: 29%;
    height: 41%;
    --tm3-rotation: 4.2deg;
}

.tm3-collage .tm-collage-photo:nth-child(5) {
    z-index: 3;
    top: 55%;
    left: 4%;
    width: 30%;
    height: 40%;
    --tm3-rotation: 3.5deg;
}

.tm3-collage .tm-collage-photo:nth-child(6) {
    z-index: 6;
    top: 51%;
    left: 27%;
    width: 31%;
    height: 41%;
    --tm3-rotation: -3deg;
}

.tm3-collage .tm-collage-photo:nth-child(7) {
    z-index: 5;
    top: 56%;
    left: 52%;
    width: 31%;
    height: 40%;
    --tm3-rotation: 3deg;
}

.tm3-collage .tm-collage-photo:nth-child(8) {
    z-index: 4;
    top: 52%;
    left: 76%;
    width: 27%;
    height: 39%;
    --tm3-rotation: -2.5deg;
}

.tm3-collage .tm-collage-photo:hover {
    z-index: 10;
    box-shadow: 0 30px 65px rgba(10, 37, 64, 0.25);
    transform: translateY(-8px) rotate(0deg) scale(1.035);
}

.tm3-collage .tm-collage-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 29%;
}

.tm3-collage .tm-collage-photo:nth-child(5) img {
    object-position: center 35%;
}

/* Ausführliche Teamgalerie: alle acht Karten gleichwertig in zwei Reihen. */
.team-mosaic-body .tm-team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-mosaic-body .tm-person,
.team-mosaic-body .tm-person--lead {
    grid-column: auto;
}

.team-mosaic-body .tm-person-media,
.team-mosaic-body .tm-person--lead .tm-person-media {
    aspect-ratio: 4 / 5;
}

@media (max-width: 1150px) {
    .tm3-hero .tm-hero-grid {
        grid-template-columns: minmax(0, 0.72fr) minmax(530px, 1.28fr);
        gap: 28px;
    }

    .tm3-collage {
        min-height: 520px;
    }
}

@media (max-width: 900px) {
    .tm3-hero .tm-hero-grid {
        grid-template-columns: 1fr;
    }

    .tm3-collage {
        width: min(100%, 660px);
        min-height: 570px;
        margin: 24px auto 0;
    }

    .team-mosaic-body .tm-team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .tm3-collage {
        width: 100%;
        min-height: 710px;
        margin-top: 28px;
    }

    .tm3-collage .tm-collage-photo {
        width: 54%;
        height: 24%;
        border-width: 4px;
        border-radius: 18px;
    }

    .tm3-collage .tm-collage-photo:nth-child(1) {
        top: 0;
        left: 0;
        --tm3-rotation: -3deg;
    }

    .tm3-collage .tm-collage-photo:nth-child(2) {
        top: 1.5%;
        left: 47%;
        --tm3-rotation: 2.5deg;
    }

    .tm3-collage .tm-collage-photo:nth-child(3) {
        top: 23%;
        left: 1%;
        --tm3-rotation: 2.4deg;
    }

    .tm3-collage .tm-collage-photo:nth-child(4) {
        top: 24.5%;
        left: 46%;
        --tm3-rotation: -2.5deg;
    }

    .tm3-collage .tm-collage-photo:nth-child(5) {
        top: 46%;
        left: 0;
        --tm3-rotation: -2.8deg;
    }

    .tm3-collage .tm-collage-photo:nth-child(6) {
        top: 47.5%;
        left: 47%;
        --tm3-rotation: 2.4deg;
    }

    .tm3-collage .tm-collage-photo:nth-child(7) {
        top: 69%;
        left: 1%;
        --tm3-rotation: 2.6deg;
    }

    .tm3-collage .tm-collage-photo:nth-child(8) {
        top: 70.5%;
        left: 46%;
        --tm3-rotation: -2.5deg;
    }

    .tm3-collage .tm-collage-photo:nth-child(n) {
        width: 54%;
        height: 24%;
    }

    .team-mosaic-body .tm-team-grid {
        grid-template-columns: 1fr;
    }

}

@media (prefers-reduced-motion: reduce) {
    .tm3-collage .tm-collage-photo {
        transition: none;
    }
}
