/* When page thin content stacks */ #team div:last-child { justify-content: center; align-items: center; } #team div img { /*width: 100%;*/ max-width: 20em; max-height: 20em; display: block; object-fit: contain; border-radius: var(--rad); } #team div { margin: 0 0 0.5em 0; display: flex; flex-direction: column; text-align: justify; align-items: center; } #team div div { display: block; } #team div p { margin: 0 !important; } #team div span { margin: 0 0.5em; } #team .gallery { display: flex; flex-direction: column; } #team .gallery div { margin: auto -1em -1em; display: flex; } #team .gallery div img { margin: 0.5em; min-width: none; max-width: 100%; height: 23em; object-fit: cover; } #team .gallery h3 { font-size: 24px; margin: 0; } /* Normal page view */ @media (min-width:621px) { #team div { display: flex; flex-direction: row; } #team div img { min-width: 15em; } #team .gallery div img { margin: 0.5em; max-width: calc(50% - 1em); width: 100%; min-width: 20em; } #team .gallery div { margin: auto -0.5em -0.5em; flex-wrap: wrap; justify-content: space-around; } }