Afghanistan bomb attacks leave 40 civilians dead