\mode<presentation>

% Frame title
\defbeamertemplate*{frametitle}{-esmad}[1][]
{
   \begin{beamercolorbox}[wd=\paperwidth,ht=15mm]{frametitle} 
   \begin{tikzpicture}[font=\bodyfont]
 
    \path[fill=white, fill overzoom image=esmad, fill image opacity=0.25] (0,-2mm) rectangle (\the\paperwidth,15mm);
  \node[anchor=east] (ipp) at (\the\paperwidth-5mm,-2mm)
      {\includegraphics[width=.25\textwidth]{logo-ipp}};

    \ifx\insertframesubtitle\@empty%
       {\node[anchor= west, color=black] at (.2,0.44){\LARGE\insertframetitle};}
       \else%
       {\node[anchor= west, color=black] at (.2,0.44){\LARGE\insertframetitle};%
        \node[anchor= west, text=darkgray,font=\small] at (.2,0){\insertframesubtitle};}%
       \fi
   \end{tikzpicture}
   \end{beamercolorbox}
}

\mode<all>