/* Botão circular Voltar ao topo - CSS isolado para evitar conflitos
   Posição: direita (WhatsApp fica à esquerda) */
.btn-back-to-top {
  position: fixed;
  bottom: 50px;
  right: 5px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--main-color, #246E46);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999998;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transition: transform .2s, opacity .2s, box-shadow .2s;
  opacity: 0;
  visibility: hidden;
  text-decoration: none;
}
.btn-back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.btn-back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
  color: #fff;
}
.btn-back-to-top i {
  font-size: 1.25rem;
  background: none !important;
  padding: 0 !important;
}
@media (max-width: 768px) {
  .btn-back-to-top { width: 40px; height: 40px; bottom: 48px; right: 10px; }
  .btn-back-to-top i { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .btn-back-to-top { width: 38px; height: 38px; bottom: 46px; right: 8px; }
  .btn-back-to-top i { font-size: 1rem; }
}

/* Navbar Termos/Política: Voltar alinhado à mesma altura dos outros itens */
.navbar-institucional .navbar-nav { align-items: center; }
.navbar-institucional .nav-link { display: inline-flex; align-items: center; }
.navbar-institucional .nav-link-voltar i { background: none !important; padding: 0 !important; margin-right: 0.35rem; line-height: 1; vertical-align: middle; }

/* Footer-rights mobile: quebra de texto adequada */
@media (max-width: 576px) {
  .footer-rights .div-rights p {
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
  }
}

/* WhatsApp: esquerda, tamanho aumentado */
.wap-link {
  position: fixed !important;
  bottom: 50px;
  left: 5px;
  z-index: 999999;
  display: inline-block;
  width: 106px;
  height: 106px;
}
@media (max-width: 768px) { .wap-link { width: 60px; height: 60px; } }
@media (max-width: 480px) { .wap-link { width: 58px; height: 58px; } }
.wap { left: 5px !important; right: auto !important; width: 106px !important; height: auto !important; transition: transform 0.25s ease; }
@media (max-width: 768px) { .wap { width: 60px !important; } }
@media (max-width: 480px) { .wap { width: 58px !important; } }

/* Badge de notificação no WhatsApp */
.wap-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e53935;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  z-index: 100001;
}

/* Animação: aumentar e diminuir ao receber notificação */
.wap-pulse {
  animation: wapPulse 0.5s ease-in-out;
}
@keyframes wapPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
