Period

I have been having weird pains thought normal days. Then in my past 2 periods my blood has been brown and clumpy with a little bit of red in it, it’s not been brown just at the beginning or at the end it’s been though-out the whole period I have bled after sex but it has only been once. Does anyone know what the brown blood is?