( CNN ) -- More than 40 people , most of them women and children , died Wednesday when the second floor of a house collapsed during a wedding party in northern Afghanistan , the provincial governor said .