import React, { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; import { Menu, X, Brain, Heart, Activity } from 'lucide-react'; const Header = () => { const [isMenuOpen, setIsMenuOpen] = useState(false); const [isScrolled, setIsScrolled] = useState(false); useEffect(() => { const handleScroll = () => { setIsScrolled(window.scrollY > 50); }; window.addEventListener('scroll', handleScroll); return () => window.removeEventListener('scroll', handleScroll); }, []); const scrollToSection = (sectionId) => { const element = document.getElementById(sectionId); if (element) { element.scrollIntoView({ behavior: 'smooth' }); } setIsMenuOpen(false); }; const navItems = [ { id: 'hero', label: '首页' }, { id: 'company', label: '关于我们' }, { id: 'products', label: '产品矩阵' }, { id: 'scenarios', label: 'AI应用' }, { id: 'architecture', label: '系统架构' }, { id: 'vision', label: '未来愿景' }, { id: 'contact', label: '总结展望' } ]; return (
{/* Logo */}

数曜科技

AI赋能医疗与健康

{/* Desktop Navigation */} {/* Mobile Menu Button */} setIsMenuOpen(!isMenuOpen)} whileTap={{ scale: 0.95 }} > {isMenuOpen ? : }
{/* Mobile Navigation */} {isMenuOpen && (
{navItems.map((item, index) => ( scrollToSection(item.id)} className={`block w-full text-left py-2 px-4 rounded-lg transition-colors ${ isScrolled ? 'text-gray-700 hover:bg-gray-100' : 'text-white hover:bg-white/10' }`} initial={{ opacity: 0, x: -20 }} animate={{ opacity: 1, x: 0 }} transition={{ delay: index * 0.1 }} > {item.label} ))}
)}
); }; export default Header;