document.addEventListener('DOMContentLoaded', () => {
  // Espera a que todo cargue (incluido Bricks)
  window.addEventListener('load', () => {
    setTimeout(() => {
      const headerEl = document.getElementById('brx-header');
      const targetEls = Array.from(document.querySelectorAll('.fb-hide-on-scroll'));

      if (!headerEl || !targetEls.length) return;

      let headerHeight = 0;
      let addThreshold = 0;
      let removeThreshold = 0;
      let hidden = false;
      let ticking = false;

      function updateHeights() {
        headerHeight = headerEl.getBoundingClientRect().height;
        addThreshold = Math.ceil(headerHeight) + 1;
        removeThreshold = Math.max(0, Math.floor(headerHeight) - 6);
      }

      function applyHiddenClass(shouldHide) {
        targetEls.forEach(el => {
          el.classList.toggle('fb-hide', shouldHide);
        });
      }

      function onScrollRaf() {
        const scrollY = window.scrollY || window.pageYOffset;

        if (!hidden && scrollY > addThreshold) {
          hidden = true;
          applyHiddenClass(true);
        } else if (hidden && scrollY < removeThreshold) {
          hidden = false;
          applyHiddenClass(false);
        }
        ticking = false;
      }

      function onScroll() {
        if (!ticking) {
          ticking = true;
          requestAnimationFrame(onScrollRaf);
        }
      }

      updateHeights();
      window.addEventListener('scroll', onScroll, { passive: true });

      window.addEventListener('resize', () => {
        updateHeights();
        onScrollRaf();
      });

      if (typeof ResizeObserver !== 'undefined') {
        const ro = new ResizeObserver(() => {
          updateHeights();
          onScrollRaf();
        });
        ro.observe(headerEl);
      }

      onScrollRaf();
    }, 400); // <-- inicia 1 segundo después de la carga completa
  });
});

Testimonials

Our customers speak for us. Below, we present some of the testimonials they have shared with us. Thank you to everyone for trusting in our work and effort!
"
Fancy Bricks templates for bricks builder are easy to use and have helped me create an attractive and functional website without having to hire a designer.
John Doe
Product Manager - Apple
"
After trying out various templates, I found Fancy Bricks templates for bricks builder to be the best fit for my needs. They are easy to use and have excellent site performance.
John Doe
Product Manager - Apple
"
I have been using Fancy Bricks templates for bricks builder for over a year and I am very satisfied with the result. They are easy to customize and the customer support is very helpful.
John Doe
Product Manager - Apple
"
Fancy Bricks templates for bricks builder are the best option for creating a WordPress website quickly and easily. I would recommend these templates to anyone.
John Doe
Product Manager - Apple