+
{items.map((item) => {
const isHovered = hoveredId === item.id;
const hasOtherHovered = hoveredId !== null && !isHovered;
@@ -182,7 +182,7 @@ function ShiftableRow({ items }: { items: ToolMediaItem[] }) {
flexShrink: 1,
flexBasis: '0%',
}}
- className="w-full transition-[flex-grow] duration-1000 ease-[cubic-bezier(0.16,1,0.3,1)] will-change-[flex-grow] flex flex-col min-w-0"
+ className="w-[82vw] sm:w-[320px] md:w-full shrink-0 md:shrink snap-start transition-[flex-grow] duration-1000 ease-[cubic-bezier(0.16,1,0.3,1)] will-change-[flex-grow] flex flex-col min-w-0"
>
{/* Window Container with strictly locked pixel height & landscape aspect */}
{item.mediaType === 'comparison' ? (
diff --git a/src/components/sections/ToolGridSection.tsx b/src/components/sections/ToolGridSection.tsx
index 20b94e8..f91becf 100644
--- a/src/components/sections/ToolGridSection.tsx
+++ b/src/components/sections/ToolGridSection.tsx
@@ -478,12 +478,23 @@ export function ToolGridSection({
{searchResults.length > 0 ? (
- /* High-Density 2-Col Grid on Phones, Responsive 3-Col Grid on Web */
-
- {searchResults.map((tool) => (
-
- ))}
-
+ <>
+ {/* Search Results Mobile Horizontal Scroller */}
+
+ {searchResults.map((tool) => (
+
+
+
+ ))}
+
+
+ {/* Search Results Web Responsive Grid */}
+
+ {searchResults.map((tool) => (
+
+ ))}
+
+ >
) : (
@@ -569,10 +580,18 @@ export function ToolGridSection({
- {/* Responsive Visual Grid:
- - 2-Column High-Density Visual Gallery on Phones (< sm)
- - 3-Column Responsive Grid on Web/Desktop (>= sm) that continuously fills as tools are added */}
-
+ {/* Category Tools Layout:
+ - Phones (< sm): Smooth horizontal scroller with prominent cards & snapping
+ - Web / Desktop (>= sm): Grid that keeps filling inside naturally */}
+
+ {group.tools.map((tool) => (
+
+
+
+ ))}
+
+
+
{group.tools.map((tool) => (
))}
diff --git a/src/components/ui/Navbar.tsx b/src/components/ui/Navbar.tsx
index f2f978c..9ad0407 100644
--- a/src/components/ui/Navbar.tsx
+++ b/src/components/ui/Navbar.tsx
@@ -17,36 +17,22 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
const pathname = usePathname();
- // 100% Off-Main-Thread Observer: 0% CPU, 0 Scroll Lag
+ // Fast, scroll-aware navbar transformation:
+ // - Homepage at rest (scrollY <= 25): Transparent text buttons over dark hero
+ // - As soon as scrolled (scrollY > 25) or on any other page: Transforms into solid navbar
useEffect(() => {
- // On non-homepage pages, navbar is immediately in solid state
if (pathname !== '/') {
setIsScrolled(true);
return;
}
- setIsScrolled(false);
- const sentinel = document.getElementById('hero-sentinel');
- if (!sentinel) {
- const handleScroll = () => {
- setIsScrolled(window.scrollY > 400);
- };
- window.addEventListener('scroll', handleScroll, { passive: true });
- return () => window.removeEventListener('scroll', handleScroll);
- }
+ const checkScroll = () => {
+ setIsScrolled(window.scrollY > 25);
+ };
- const observer = new IntersectionObserver(
- ([entry]) => {
- setIsScrolled(!entry.isIntersecting && entry.boundingClientRect.top < 0);
- },
- {
- threshold: 0,
- rootMargin: '-60px 0px 0px 0px',
- }
- );
-
- observer.observe(sentinel);
- return () => observer.disconnect();
+ checkScroll();
+ window.addEventListener('scroll', checkScroll, { passive: true });
+ return () => window.removeEventListener('scroll', checkScroll);
}, [pathname]);
// Close mobile menu on Escape key