Speed of light in different states of matter