/* Masonry-style layout for the current-week team cards.
   Cards flow vertically into responsive columns so shorter cards can sit beneath
   other cards instead of leaving row-sized gaps. */

.team-grid,
.team-grid.density-large {
    display: block;
    column-width: 270px;
    column-gap: 0.8rem;
}

.team-grid.density-large {
    column-width: 235px;
    column-gap: 0.65rem;
}

.team-group,
.team-grid.density-large .team-group {
    display: inline-block;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0 0 0.8rem;
    break-inside: avoid;
    page-break-inside: avoid;
    vertical-align: top;
}

.team-grid.density-large .team-group {
    margin-bottom: 0.65rem;
}

@media (max-width: 767.98px) {
    .team-grid,
    .team-grid.density-large {
        column-width: 210px;
        column-gap: 0.65rem;
    }

    .team-group,
    .team-grid.density-large .team-group {
        width: 100%;
        min-width: 0;
        margin-bottom: 0.65rem;
    }
}

@media (max-width: 520px) {
    .team-grid,
    .team-grid.density-large {
        column-count: 1;
        column-width: auto;
    }
}
