مَرَرْتُ بِمَسَاجِدِ الْمَدِينَةِ — “I passed by the city’s mosques.”
مَسَاجِدِ: genitive after bi-, with kasrah, and first member of iḍāfah. الْمَدِينَةِ: second member (muḍāf ilayh), also genitive.
The kasrah on masājid comes from its use in iḍāfah. It still takes no tanwīn: the first member of an iḍāfah cannot take tanwīn.