Flat photonic bands in two-dimensional photonic crystals with kagome lattices