the russians had the weapons,but not the funds.
read a book about it just few days ago
Soviets.
Large part of the men fighting in Afghanistan, besides officers, were from other Soviet republics than Russian SFSR.
I once had an honor to talk with Estonian man who was here working as construction man. He said he served in Afghanistan back in the day.
Soviet challenges in Afghanistan were due to that military was for decades built to roll over Europe in battlefields full of tactical nukes and massive armored columns.
As is known, Afghanistan was very different. And still is.
Their fighters hide in mountains in small groups with light equipment and high mobility. Difficult to eliminate them with military tactics designed against an organized opponent.