Periodic orbits of Hamiltonian flows near symplectic critical submanifolds