diff --git a/components/Header.tsx b/components/Header.tsx index 2eda8836..fe5c23fa 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -2,6 +2,7 @@ import Link from 'next/link'; import Image from 'next/image'; +import { motion } from 'framer-motion'; import { useTranslations } from 'next-intl'; import { usePathname } from 'next/navigation'; import { Button } from './ui'; @@ -70,79 +71,169 @@ export default function Header() { return ( <> -
+
- - {t('home')} - + + + {t('home')} + + -
- + -
-
- - EN - -
- - DE - -
- - -
+ + + EN + + + + + + DE + + + + + + + + {/* Mobile Menu Button */} - -
+ + +
{/* Mobile Menu Overlay */} @@ -150,58 +241,157 @@ export default function Header() { "fixed inset-0 bg-primary z-40 lg:hidden transition-all duration-500 ease-in-out flex flex-col", isMobileMenuOpen ? "opacity-100 translate-y-0" : "opacity-0 -translate-y-full pointer-events-none" )}> -
+ {menuItems.map((item, idx) => ( - - {item.label} - + + {item.label} + + ))} -
-
- - EN - -
- - DE - -
- - -
-
+ + + EN + + + + + + DE + + + + + + + + {/* Bottom Branding */} -
- {t('home')} -
+ + + {t('home')} + + +
-
+ ); } + +const navVariants = { + hidden: { opacity: 0 }, + visible: { + opacity: 1, + transition: { + staggerChildren: 0.06, + delayChildren: 0.1 + } + } +} as const; + +const navLinkVariants = { + hidden: { opacity: 0, y: 20, scale: 0.9 }, + visible: (idx: number) => ({ + opacity: 1, + y: 0, + scale: 1, + transition: { + duration: 0.5, + ease: [0.25, 0.46, 0.45, 0.94], + delay: idx * 0.06 + } + }) +} as const; + +const headerRightVariants = { + hidden: { opacity: 0, x: 30 }, + visible: { + opacity: 1, + x: 0, + transition: { duration: 0.6, ease: "easeOut" } + } +} as const;