Add an nth-child logic to CSS