We have investigated multifunctional periodic structures in which electromagnetic waves and spin waves can be confined in the same areas. Such simultaneous localization of both sorts of excitations can potentially enhance the interaction between electromagnetic waves and spin waves. The system we considered has a form of one dimensional photonic-magnonic crystal with two types of magnetic layers (thicker and thinner ones) separated by sections of the dielectric photonic crystals. We focused on the electromagnetic defect modes localized in the magnetic layers (areas where spin waves can be exited) and decaying in the sections of conventional (nonmagnetic) photonic crystals. We showed how the change of relative thickness of two types of the magnetic layers can influence on the spectrum of spin waves and electromagnetic defect modes, both localized in magnetic parts of the system.