/* Ajustes da migração WordPress -> Astro. O layout vem do CSS original do
   Elementor; aqui só o que o JS do WordPress fazia e deixou de existir. */

/* Animações: só esconde o que está abaixo da dobra e só com JS ativo */
.js .anim-espera:not(.anim-feito) { opacity: 0; }

/* Carrossel de avaliações sem Swiper */
.elementor-main-swiper.carrossel { overflow: hidden; }
.elementor-main-swiper.carrossel .swiper-wrapper {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  transform: none !important;
}
.elementor-main-swiper.carrossel .swiper-wrapper::-webkit-scrollbar { display: none; }
.elementor-main-swiper.carrossel .swiper-slide {
  flex: 0 0 calc((100% - (var(--slides, 3) - 1) * 10px) / var(--slides, 3));
  scroll-snap-align: start;
  height: auto;
}

/* Popup de atendimento (antes: popup do Elementor Pro) */
.atendimento-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0, 0, 0, .6);
}
.atendimento-modal[hidden] { display: none; }
.atendimento-modal__caixa {
  position: relative; width: 100%; max-width: 420px;
  max-height: calc(100vh - 32px); overflow: auto;
  animation: fadeInUp 1.2s both;
}
.atendimento-modal__fechar {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .35); color: #fff; font-size: 22px; line-height: 32px; cursor: pointer;
}
.atendimento-modal .elementor-location-popup { display: block; }
body.modal-aberto, body.menu-aberto { overflow: hidden; }

/* H1 promovido a partir do H2 original: mesmo corpo de texto do H2 */
main h1.elementor-heading-title { margin-block: 0; }

/* Menu mobile: no WordPress a regra .active{left:0} do Happy Addons não vale
   abaixo de 1024px e o painel nunca abria no celular. Correção: */
@media (max-width: 1024px) {
  .ha-navbar-nav-default.ha-menu-offcanvas-elements.active { left: 0; z-index: 9998; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
}

/* Âncoras do menu (Sobre, Contato, Localização) */
html { scroll-behavior: smooth; }
#sobre, #contato, #loc { scroll-margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
