Understanding the mechanisms of reaction and release of acid-base indicators entrapped in hybrid gels