Resonantly absorbing one-dimensional photonic crystals