When molto is an adjective it changes with the gender. When it is an adverb, it always remains molto. The explanation I saw said that adjectives modify nouns, but adverbs modify verbs, adjectives or other adverbs. In this case molto is modifying an adjective (contenta). Therefore, molto is an adverb, and does not change.