| 1 | import { Button } from "@/components/ui/button"; |
| 2 | import { Menu, X } from "lucide-react"; |
| 3 | import { useState } from "react"; |
| 4 | import { ThemeToggle } from "@/components/ThemeToggle"; |
| 5 | const Header = () => { |
| 6 | const [isMenuOpen, setIsMenuOpen] = useState(false); |
| 7 | return <header className="fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-md border-b border-border"> |
| 8 | <div className="container flex items-center justify-between h-16 md:h-20"> |
| 9 | {/* Logo */} |
| 10 | <a href="/" className="flex items-center gap-2"> |
| 11 | <div className="w-8 h-8 rounded-full flex items-center justify-center bg-lime-400"> |
| 12 | <span className="text-primary-foreground font-bold text-lg"> |
| 13 | </span> |
| 14 | </div> |
| 15 | <span className="text-xl font-bold text-foreground">Snac</span> |
| 16 | </a> |
| 17 | |
| 18 | {/* Desktop Navigation */} |
| 19 | <nav className="hidden md:flex items-center gap-8"> |
| 20 | <a href="#features" className="text-sm font-medium text-muted-foreground hover:text-foreground transition-colors">Company Purchases</a> |
| 21 | <a href="#how-it-works" className="text-sm font-medium text-muted-foreground hover:text-foreground transition-colors">Cross-Border </a> |
| 22 | <a href="#" className="text-sm font-medium text-muted-foreground hover:text-foreground transition-colors">Spend Overview</a> |
| 23 | </nav> |
| 24 | |
| 25 | {/* Desktop CTA */} |
| 26 | <div className="hidden md:flex items-center gap-3"> |
| 27 | <ThemeToggle /> |
| 28 | <Button variant="ghost" size="sm"> |
| 29 | Log in |
| 30 | </Button> |
| 31 | <Button variant="default" size="sm"> |
| 32 | Register |
| 33 | </Button> |
| 34 | </div> |
| 35 | |
| 36 | {/* Mobile Menu Button */} |
| 37 | <button className="md:hidden p-2" onClick={() => setIsMenuOpen(!isMenuOpen)} aria-label="Toggle menu"> |
| 38 | {isMenuOpen ? <X className="w-6 h-6" /> : <Menu className="w-6 h-6" />} |
| 39 | </button> |
| 40 | </div> |
| 41 | |
| 42 | {/* Mobile Menu */} |
| 43 | {isMenuOpen && <div className="md:hidden bg-background border-b border-border animate-fade-in"> |
| 44 | <nav className="container py-4 flex flex-col gap-4"> |
| 45 | <a href="#features" className="text-sm font-medium text-muted-foreground hover:text-foreground transition-colors py-2"> |
| 46 | Personal |
| 47 | </a> |
| 48 | <a href="#how-it-works" className="text-sm font-medium text-muted-foreground hover:text-foreground transition-colors py-2"> |
| 49 | Business |
| 50 | </a> |
| 51 | <a href="#" className="text-sm font-medium text-muted-foreground hover:text-foreground transition-colors py-2"> |
| 52 | Help |
| 53 | </a> |
| 54 | <div className="flex flex-col gap-2 pt-4 border-t border-border"> |
| 55 | <div className="flex items-center justify-center pb-2"> |
| 56 | <ThemeToggle /> |
| 57 | </div> |
| 58 | <Button variant="outline" className="w-full"> |
| 59 | Log in |
| 60 | </Button> |
| 61 | <Button variant="default" className="w-full"> |
| 62 | Register |
| 63 | </Button> |
| 64 | </div> |
| 65 | </nav> |
| 66 | </div>} |
| 67 | </header>; |
| 68 | }; |
| 69 | export default Header; |