I have an idea of finding one fixed point of $f$.
\begin{align}
\dfrac{\mathrm{d}x}{\mathrm{d}t}=q(t)\cos^2x-\sin^2x. \tag{$\star$}
\end{align}
Fact 1: Due to the periodicity of $q$ and $\sin,\cos$, we can easily verify if $\phi(t)$ is a solution of $(\star)$, then so are $\phi(t+1)$ and $\phi(t)+\pi$.
For any $x\in\mathbb{R}$, let $\phi(t,x)$ be the solution of $(\star)$ with initial value $\phi(0,x)=x$.
Claim: $f(x)=\phi(1,x)$ satisfies:
(1) $f^{n}(x):=f(f(\cdots f(x)))=\phi(n,x)$;
(2) $f(x+\pi)=f(x)+\pi$;
(3) $f$ is strictly increasing.
Proof: For (1), $\phi(t+1,x)$ is the solution of $(\star)$ with initial value $\phi(1,x)=f(x)$, thus $\phi(t+1,x)=\phi(t,f(x))$. In particular, take $t=1$, we have $\phi(2,x)=f(f(x)):=f^2(x)$. Inductively, we can get $\phi(n,x)=f(f(\cdots f(x)))=f^{n}(x)$.
For (2), $\phi(t,x)+\pi$ is the solution of $(\star)$ with initial value $x+\pi$, thus $\phi(t,x)+\pi=\phi(t,x+\pi)$. In particular, take $t=1$, we have $f(x)+\pi=f(x+\pi)$.
To see (3), we compute the equation that $\partial_{x}\phi(t,x)$ satisfies.
\begin{align}
\dfrac{\partial }{\partial t}\left(\dfrac{\partial}{\partial x}\phi(t,x)\right)&=\dfrac{\partial }{\partial x}\left(\dfrac{\partial}{\partial t}\phi(t,x)\right)=\dfrac{\partial }{\partial x}\left(q(t)\cos^2\phi(t,x)-\sin^2\phi(t,x)\right)\\
&=-2(q(t)+1)\sin\phi(t,x)\cos\phi(t,x) \dfrac{\partial }{\partial x}\phi(t,x).
\end{align}
Therefore,
\begin{align*}
\dfrac{\partial }{\partial x}\phi(t,x)=\exp\left\{\int_{0}^{t}-2(q(s)+1)\sin\phi(s,x)\cos\phi(s,x)\mathrm{d}s\right\}>0.
\end{align*}
In particular, $f'(x)=\dfrac{\partial }{\partial x}\phi(1,x)>0$, hence $f$ is strictly increasing.
Now, by the property of rotation number, the limit
\begin{align}
\rho(f):=\lim_{n\to\infty}\dfrac{f^{n}(x)-x}{n}
\end{align}
exists, and it is independent on $x$. In particular, take $x=0$. By $(2)$, $f^{n}(0)=\phi(n,0)$. Since $\phi(t,0)$ is bounded, then we must have
\begin{align}
\rho(f)=\lim_{n\to\infty}\dfrac{f^{n}(0)}{n}=0.
\end{align}
In fact, this implies $f$ has a fixed point in $[0,\pi]$. If not, then $g(x):=f(x)-x$ has no zero in $[0,\pi]$. WLOG, assume $g>0$. Note that $g(x+\pi)=f(x+\pi)-x-\pi=f(x)-x=g(x)$, then $g$ has period $\pi$. Now, we can assume that $\min_{\mathbb{R}}g=\min_{[0,\pi]}g=\delta>0$. Then
\begin{align}
f(x)-x&=g(x)\ge \delta\\
f(f(x))-f(x)&=g(f(x))\ge \delta\\
&\vdots\\
f^{n}(x)-f^{n-1}(x)&=g(f^{n-1}(x))\ge\delta
\end{align}
Therefore, $f^{n}(x)-x\ge n\delta$, hence $0=\lim_{n\to\infty}\dfrac{f^{n}(x)-x}{n}\ge\delta>0$, a contradiction.