diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx
index 2c7c09b..67dd028 100644
--- a/src/components/Layout.jsx
+++ b/src/components/Layout.jsx
@@ -494,7 +494,7 @@ const Layout = ({ children }) => {
{/* Scroll Controls */}
-
+
);
};
diff --git a/src/components/ScrollControls.jsx b/src/components/ScrollControls.jsx
index 85de275..ccaf3ee 100644
--- a/src/components/ScrollControls.jsx
+++ b/src/components/ScrollControls.jsx
@@ -4,7 +4,7 @@ import { ScrollToPlugin } from "gsap/ScrollToPlugin";
gsap.registerPlugin(ScrollToPlugin);
-const ScrollControls = () => {
+const ScrollControls = ({ isMobileMenuOpen = false }) => {
const [scrollProgress, setScrollProgress] = useState(0);
const [showTopBtn, setShowTopBtn] = useState(false);
const [showBottomBtn, setShowBottomBtn] = useState(true);
@@ -60,7 +60,7 @@ const ScrollControls = () => {
},
});
- // Button press “blink”
+ // Button press "blink"
gsap.to(".scroll-to-top", {
scale: 0.9,
duration: 0.1,
@@ -99,8 +99,11 @@ const ScrollControls = () => {
const modalOverlay = document.querySelector(".modal-overlay");
const isModalOpen = Boolean(modalOverlay);
- // If the modal is open, do not render any scroll buttons or ring:
- if (isModalOpen) {
+ /* Hide scroll controls if:
+ * Modal is open
+ * Mobile menu is open
+ */
+ if (isModalOpen || isMobileMenuOpen) {
return null;
}
@@ -112,7 +115,7 @@ const ScrollControls = () => {
onClick={scrollToTop}
disabled={isScrolling}
className={`
- scroll-to-top fixed right-6 bottom-20 z-50 group transition-all duration-500
+ scroll-to-top fixed right-3 bottom-16 md:right-6 md:bottom-20 z-50 group transition-all duration-500
${
showTopBtn
? "opacity-100 translate-y-0 pointer-events-auto"
@@ -122,29 +125,29 @@ const ScrollControls = () => {
`}
aria-label='Scroll to top'
>
-
+
{/* Background Ring */}
-