/* ==========================================================
   FERRAMENTAS FLASH V16 — MOBILE + RODAPÉ INSTITUCIONAL
   Mantém a base visual v15 e corrige o cabeçalho compacto,
   favoritos no mobile e o rodapé das páginas institucionais.
   ========================================================== */

/* Rodapé institucional: contraste e hierarquia também no desktop. */
body.ff-v12-institutional .site-footer{
  background:#103f3c!important;
  color:#e9f5f2!important;
  border-top:1px solid #2b6661!important;
}
body.ff-v12-institutional .footer-brand{color:#ffffff!important}
body.ff-v12-institutional .footer-brand em{color:#61d8c8!important}
body.ff-v12-institutional .footer-intro{color:#c8dfda!important}
body.ff-v12-institutional .footer-links{
  border-top-color:#2b5c58!important;
  border-bottom-color:#2b5c58!important;
}
body.ff-v12-institutional .footer-links a{color:#eaf6f3!important}
body.ff-v12-institutional .footer-links a:hover,
body.ff-v12-institutional .footer-links a:focus-visible{color:#82e5d7!important}
body.ff-v12-institutional .footer-bottom{color:#aecac5!important}
body.ff-v12-institutional .footer-bottom a{color:#8fe3d6!important}

@media (max-width:640px){
  /* Cabeçalho: marca + Ferramentas + Favoritos; busca em uma linha própria. */
  #ff-v12-header .ff12-header-inner{
    padding:10px 12px 11px!important;
    gap:9px!important;
    align-items:center!important;
  }
  #ff-v12-header .ff12-brand{
    flex:1 1 auto!important;
    min-width:0!important;
    gap:8px!important;
  }
  #ff-v12-header .ff12-brand-mark{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    border-radius:11px!important;
  }
  #ff-v12-header .ff12-brand-mark svg{width:20px!important;height:20px!important}
  #ff-v12-header .ff12-brand-copy{min-width:0!important}
  #ff-v12-header .ff12-brand-copy strong{
    font-size:14px!important;
    line-height:1!important;
    letter-spacing:-.035em!important;
    white-space:nowrap!important;
  }
  #ff-v12-header .ff12-brand-copy small{display:none!important}

  #ff-v12-header .ff12-nav{
    order:2!important;
    width:auto!important;
    flex:0 0 auto!important;
    margin-left:auto!important;
    overflow:visible!important;
    justify-content:flex-end!important;
    gap:3px!important;
    padding:0!important;
  }
  #ff-v12-header .ff12-nav-link.is-home,
  #ff-v12-header .ff12-nav-item.ff12-docs,
  #ff-v12-header .ff16-about-link{display:none!important}

  #ff-v12-header .ff12-nav-button{
    height:36px!important;
    padding:0 7px!important;
    border-radius:10px!important;
    font-size:11.5px!important;
    gap:5px!important;
  }
  #ff-v12-header .ff12-nav-button>svg:not(.ff12-chevron){width:16px!important;height:16px!important}
  #ff-v12-header .ff12-chevron{width:12px!important;height:12px!important}
  #ff-v12-header .ff12-favorites .ff12-nav-button>span:not(.ff12-count){display:none!important}
  #ff-v12-header .ff12-favorites .ff12-nav-button{padding:0 6px!important}
  #ff-v12-header .ff12-count{min-width:18px!important;height:18px!important;font-size:9.5px!important;padding:0 4px!important}

  #ff-v12-header .ff12-search{
    order:3!important;
    width:100%!important;
    min-width:100%!important;
    max-width:none!important;
    flex:0 0 100%!important;
  }
  #ff-v12-header .ff12-search input{
    height:42px!important;
    border-radius:14px!important;
    font-size:14px!important;
  }

  #ff-v12-header .ff12-mega,
  #ff-v12-header .ff12-fav-popover{
    top:108px!important;
    left:10px!important;
    right:10px!important;
    width:auto!important;
    max-height:calc(100vh - 124px)!important;
  }
  #ff-v12-header .ff12-mega{padding:15px!important}
  #ff-v12-header .ff12-mega-footer{align-items:flex-start!important;flex-direction:column!important}

  /* Rodapé institucional em uma composição mobile clara e compacta. */
  body.ff-v12-institutional .footer-inner{
    padding:28px 18px 22px!important;
    text-align:center!important;
  }
  body.ff-v12-institutional .footer-brand{
    font-size:17px!important;
    line-height:1.2!important;
    letter-spacing:-.02em!important;
  }
  body.ff-v12-institutional .footer-intro{
    max-width:440px!important;
    margin:9px auto 20px!important;
    font-size:12.5px!important;
    line-height:1.6!important;
  }
  body.ff-v12-institutional .footer-links{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px 8px!important;
    padding:14px 0!important;
    margin:0!important;
    text-align:left!important;
  }
  body.ff-v12-institutional .footer-links a{
    display:flex!important;
    align-items:center!important;
    min-height:40px!important;
    padding:7px 9px!important;
    border:1px solid rgba(143,227,214,.16)!important;
    border-radius:10px!important;
    background:rgba(255,255,255,.035)!important;
    font-size:11.5px!important;
    line-height:1.35!important;
  }
  body.ff-v12-institutional .footer-links a:hover,
  body.ff-v12-institutional .footer-links a:focus-visible{
    background:rgba(143,227,214,.09)!important;
    border-color:rgba(143,227,214,.34)!important;
  }
  body.ff-v12-institutional .footer-bottom{
    margin:16px 0 0!important;
    font-size:11px!important;
    line-height:1.6!important;
    text-align:center!important;
  }
  body.ff-v12-institutional .footer-bottom a{
    display:inline-block!important;
    margin-top:4px!important;
    font-weight:800!important;
    text-decoration:none!important;
  }
}

@media (max-width:390px){
  #ff-v12-header .ff12-brand-copy strong{font-size:13.5px!important}
  #ff-v12-header .ff12-brand-mark{width:34px!important;height:34px!important;min-width:34px!important}
  #ff-v12-header .ff16-tools .ff16-nav-label{display:none!important}
  #ff-v12-header .ff16-tools .ff12-nav-button{padding:0 6px!important}
  body.ff-v12-institutional .footer-links{grid-template-columns:1fr!important}
  body.ff-v12-institutional .footer-links a{justify-content:center!important;text-align:center!important}
}
