/* BIM Excellence — camada de melhorias (transições, animações e micro-interações).
   Não altera o layout original: só adiciona movimento e acabamento. */
:root { --bim-orange: #e9501f; --bim-orange-light: #ff8a5c; --bim-ease: cubic-bezier(.2, .65, .25, 1); }

/* A transição entre páginas é a cortina com o símbolo da marca (ui.css / enhance.js). */

html { scroll-behavior: smooth; scrollbar-color: var(--bim-orange) #0b0b0b; }
::selection { background: var(--bim-orange); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0b0b; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--bim-orange), #b53a12); border-radius: 10px; border: 2px solid #0b0b0b; }

/* Barra de progresso de leitura */
.bim-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 2147483646; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--bim-orange), var(--bim-orange-light));
  box-shadow: 0 0 12px rgba(233, 80, 31, .65);
}

/* Entrada do topo (hero) ao abrir a página */
@keyframes bim-rise { from { opacity: 0; transform: translate3d(0, 26px, 0); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
#bx-main > .e-con:first-child .elementor-widget:not(.elementor-widget-html):not(:is(.cima, .baixo, .esquerda, .direita) *):not(.cima, .baixo, .esquerda, .direita) {
  animation: bim-rise 1s var(--bim-ease) both;
}
#bx-main > .e-con:first-child .elementor-widget:nth-child(2) { animation-delay: .1s; }
#bx-main > .e-con:first-child .elementor-widget:nth-child(3) { animation-delay: .2s; }
#bx-main > .e-con:first-child .elementor-widget:nth-child(4) { animation-delay: .3s; }
#bx-main > .e-con:first-child .elementor-widget:nth-child(5) { animation-delay: .4s; }
#bx-main > .e-con:first-child .elementor-widget:nth-child(n+6) { animation-delay: .5s; }
.bx-article__head > * { animation: bim-rise 1s var(--bim-ease) both; }
.bx-article__head > :nth-child(2) { animation-delay: .08s; } .bx-article__head > :nth-child(3) { animation-delay: .16s; } .bx-article__head > :nth-child(4) { animation-delay: .24s; }

/* Revelação ao rolar (somente elementos que não têm animação própria) */
.bim-reveal { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .85s var(--bim-ease), transform .85s var(--bim-ease); transition-delay: var(--bim-delay, 0s); }
.bim-reveal.bim-in { opacity: 1; transform: none; }

/* Imagens surgem suavemente quando terminam de carregar */
img.bim-img-fade { opacity: 0; transition: opacity .7s ease; }
img.bim-img-fade.bim-loaded { opacity: 1; }

/* Botões: reflexo que atravessa + leve elevação */
a.elementor-button[href] { position: relative; overflow: hidden; isolation: isolate; }
a.elementor-button[href]::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%; z-index: 1; pointer-events: none;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .38), transparent); transform: skewX(-20deg);
  transition: left .75s ease;
}
a.elementor-button[href]:hover::after { left: 150%; }
a.elementor-button[href]:hover { transform: translateY(-2px); }
a.elementor-button[href]:active { transform: translateY(0) scale(.98); }

/* Botão flutuante do WhatsApp: pulso discreto */
.wa__btn_popup .wa__btn_popup_icon { animation: bim-pulse 2.6s ease-out infinite; }
@keyframes bim-pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 183, 66, .55); }
  70% { box-shadow: 0 0 0 16px rgba(45, 183, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 183, 66, 0); }
}

/* Formulário: foco destacado */
.elementor-form .elementor-field-textual { transition: border-color .25s ease, box-shadow .25s ease; }
.elementor-form .elementor-field-textual:focus { border-color: var(--bim-orange) !important; box-shadow: 0 0 0 3px rgba(233, 80, 31, .22) !important; outline: none; }
.elementor-form .elementor-message { animation: bim-rise .6s var(--bim-ease) both; }

/* Acessibilidade: foco visível no teclado */
a:focus-visible, button:focus-visible { outline: 2px solid var(--bim-orange); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .bim-reveal, img.bim-img-fade { opacity: 1 !important; transform: none !important; }
}
