moved card offset calculation to card.to_offset