Phase transitions in multiband periodic all-dielectric photonic structures