"use client" import type React from "react" import { Button } from "@/components/ui/button" import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet" import { Menu } from "lucide-react" import Link from "next/link" import { usePathname } from "next/navigation" import ClinicSenseButton from "@/components/clinicsense-button" import Image from "next/image" export default function Navbar() { const pathname = usePathname() const handleSmoothScroll = (e: React.MouseEvent, href: string) => { // Only handle smooth scroll if we're on the homepage if (pathname === "/" && href.startsWith("/#")) { e.preventDefault() const targetId = href.substring(2) // Remove "/#" to get the ID const element = document.getElementById(targetId) if (element) { const headerOffset = 80 // Height of sticky header const elementPosition = element.getBoundingClientRect().top const offsetPosition = elementPosition + window.pageYOffset - headerOffset window.scrollTo({ top: offsetPosition, behavior: "smooth", }) } } } const navItems = [ { href: "/#services", label: "Services" }, { href: "/#prices", label: "Prices" }, { href: "/about", label: "About" }, { href: "/contact", label: "Contact" }, ] return (
{/* Logo - Left aligned */} Ebb'nFlow Therapeutics Logo
Ebb'nFlow Therapeutics
{/* Desktop Navigation - Centered */} {/* Desktop CTA - Right aligned */}
{/* Mobile Navigation Button */}
Ebb'nFlow Therapeutics {navItems.map((item) => ( handleSmoothScroll(e, item.href)} className={`text-lg font-medium transition-colors hover:text-nature-green ${ pathname === item.href ? "text-nature-green" : "text-gray-600" }`} > {item.label} ))}
) }