Both. The requirement to field the AH-64 was to counter the threat of Warsaw Pact and North Korean armored formations both in the close fight and deep as a counter attack force against 2nd echelon forces.
That their mission was transformed from defensivce to offensive after the end of the cold war?
The entire Army changed course during the height of the Cold War from the Active Defense to Airland Battle. The advent of the Apache was just a small part of that transformation. Other ground systems came into being, such as the M1 Abrams, M2/3 Bradley and MLRS, thanks primarily to Reagan's defense buildup during the early eighties. The Airland Battle concept was played out extensively with Brigade sized formations against a replicate Warsaw Pact opposing force (OPFOR) on the desert floor of Fort Irwin, CA. This concept proved itself during Desert Storm and has been modified over time to the warfighting doctrine used today(and still evolving).
The Russian never used copters for offensive capabilities in Afghanistan - only to transport troops with protection.
Not true. The Soviets used their Mi-24 Hinds extensively in Afghanistan as close air support and overhead protection for ground forces.