Fixed an issue with detecting the correct position of the card in the RecyclerView; optimized the card layout