Pakistan says it struck militant hideouts in Afghanistan as cross-border fighting intensified and both sides traded blame.