.elementor-kit-18{--e-global-color-primary:#0D0D29;--e-global-color-secondary:#FFFFFF;--e-global-color-text:#0D0D29;--e-global-color-accent:#CFCFCF;--e-global-typography-primary-font-family:"Aleo";--e-global-typography-primary-font-weight:600;--e-global-typography-secondary-font-family:"Aleo";--e-global-typography-secondary-font-weight:400;--e-global-typography-text-font-family:"Roboto";--e-global-typography-text-font-weight:400;--e-global-typography-accent-font-family:"Roboto";--e-global-typography-accent-font-weight:500;}.elementor-kit-18 e-page-transition{background-color:#FFBC7D;}.elementor-section.elementor-section-boxed > .elementor-container{max-width:1140px;}.e-con{--container-max-width:1140px;}.elementor-widget:not(:last-child){--kit-widget-spacing:20px;}.elementor-element{--widgets-spacing:20px 20px;--widgets-spacing-row:20px;--widgets-spacing-column:20px;}{}h1.entry-title{display:var(--page-title-display);}.site-header .site-branding{flex-direction:column;align-items:stretch;}.site-header{padding-inline-end:0px;padding-inline-start:0px;}.site-footer .site-branding{flex-direction:column;align-items:stretch;}@media(max-width:1024px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:1024px;}.e-con{--container-max-width:1024px;}}@media(max-width:767px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:767px;}.e-con{--container-max-width:767px;}}/* Start custom CSS */<script>
document.addEventListener('click', function(e) {
  const btn = e.target.closest('.close-and-scroll');
  if (!btn) return;

  // ha a link hash (#consultation), mentsük el
  const href = btn.getAttribute('href') || '';
  const hash = href.startsWith('#') ? href : btn.dataset.target || '';

  // ne ugorjon azonnal, előbb zárjuk a popupot
  e.preventDefault();

  // 1) pop-up bezárás (Elementor Pro API)
  try {
    if (window.elementorProFrontend?.modules?.popup) {
      elementorProFrontend.modules.popup.closePopup();
    } else {
      // Fallback: próbáljuk megkattintani a bezáró gombot
      document.querySelector('.dialog-close-button')?.click();
    }
  } catch (err) { /* csendben elnyeljük */ }

  // 2) görgetés a szekcióhoz, kis késleltetéssel
  const go = () => {
    if (hash) {
      const target = document.querySelector(hash);
      if (target) {
        target.scrollIntoView({ behavior: 'smooth', block: 'start' });
        history.pushState(null, '', hash);
      } else if (href) {
        // ha mégis teljes URL lenne, menjünk rá
        location.assign(href);
      }
    }
  };
  setTimeout(go, 200); // adjunk 200ms-t a popup animációnak
});
</script>/* End custom CSS */