Щ and Ц don't have hard and soft variants. For example, "щ" is pronounced equally in "кладбище" and "кладбища". There are grammatical rules about spelling of "ша/ща", "жи/ши" and so on.