Page Layout with Flexbox
Flexbox arranges items in a row or column and helps distribute space between them.
Make a flex container
Set display: flex on the parent element. Its direct children become flex items. Use gap for spacing and flex-wrap to let items move onto another line when necessary.
.cards {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
}