to think on one's feet, to be flexible
Para ser professor, é preciso ter muito jogo de cintura.
To be a teacher, you need to really think on your feet.
The image behind ter jogo de cintura comes from sport and combat: the loose, agile play of the hips and waist that lets a fighter or footballer slip a blow or dodge a tackle. From this physical nimbleness the phrase came to mean handling tricky situations deftly and adapting on the fly.
Source: Ciberdúvidas da Língua Portuguesa.
Falando's Idiom Trainer teaches you to recognize idiom meanings and create sentences using them, so you can speak like a Brazilian.