diff --git a/qa/ahorra-luz-qa.html b/qa/ahorra-luz-qa.html index 65cbd02..57878b3 100644 --- a/qa/ahorra-luz-qa.html +++ b/qa/ahorra-luz-qa.html @@ -20,13 +20,14 @@ details > summary { list-style: none; cursor: pointer; } details > summary::-webkit-details-marker { display: none; } details[open] .chev { transform: rotate(180deg); } - .wa-float { box-shadow: 0 8px 24px rgba(16,185,129,0.35); } + .wa-float { box-shadow: 0 8px 24px rgba(16,185,129,0.35); transition: opacity 0.25s ease, transform 0.25s ease; } + .wa-float.wa-hidden { opacity: 0; transform: scale(0.8); pointer-events: none; }
-
@@ -437,6 +438,15 @@
});
});
+ const waBtn = document.querySelector('.wa-float');
+ const heroSection = document.getElementById('hero');
+ if (waBtn && heroSection && 'IntersectionObserver' in window) {
+ const heroObserver = new IntersectionObserver((entries) => {
+ entries.forEach((entry) => waBtn.classList.toggle('wa-hidden', entry.isIntersecting));
+ }, { threshold: 0.2 });
+ heroObserver.observe(heroSection);
+ }
+
lucide.createIcons();