Why does «مَسَاجِدِ» show kasra in «فِي مَسَاجِدِ الْمَدِينَةِ»?

Noun Case Classes: Type 3 — Diptote (Ghayr Munṣarif)