Let \( g_i : \left[\frac{\pi}{8}, \frac{3\pi}{8}\right] \to \mathbb{R}, \, i=1,2, \) and \( f : \left[\frac{\pi}{8}, \frac{3\pi}{8}\right] \to \mathbb{R} \) be functions such that \( g_1(x) = 1, \, g_2(x) = |4x - \pi| \) and \( f(x) = \sin^2 x \), for all \( x \in \left[\frac{\pi}{8}, \frac{3\pi}{8}\right] \).
Define \( S_i = \displaystyle\int\limits_{\pi/8}^{3\pi/8} f(x) \cdot g_i(x) \, dx, \quad i=1,2 \).
The value of \( \frac{48 S_2}{\pi^2} \) is ______.