import{ad as o,K as d,V as e,k as a}from"./index-DxAX-4zq.js";import{C as i}from"./calendar-v5zuR2oL.js";import{C as c}from"./clock-ClKe-o1r.js";import{A as x}from"./arrow-right-1vxd_A9O.js";function p(){const{data:r=[],isLoading:l}=o({queryKey:["blog_posts_public"],queryFn:d});if(l)return e.jsx("div",{className:"container mx-auto px-4 py-20 text-center text-sm text-muted-foreground",children:"Loading articles…"});if(r.length===0)return e.jsxs("section",{className:"container mx-auto px-4 py-20 text-center md:px-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"No articles yet"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"Check back soon for buying guides and clinical tips."})]});const[t,...n]=r;return e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"border-b border-border bg-surface",children:e.jsxs("div",{className:"container mx-auto px-4 py-12 md:px-6 md:py-16",children:[e.jsx("h1",{className:"text-3xl font-bold text-foreground md:text-4xl",children:"Insights for Kenyan dental practitioners"}),e.jsx("p",{className:"mt-2 max-w-2xl text-muted-foreground",children:"Buying guides, clinical protocols and practical tips from the Aquadent team."})]})}),e.jsxs("section",{className:"container mx-auto px-4 py-12 md:px-6",children:[e.jsxs(a,{to:"/blog/$slug",params:{slug:t.slug},className:"group grid overflow-hidden rounded border border-border bg-card shadow-[var(--shadow-card)] transition hover:shadow-[var(--shadow-elevated)] md:grid-cols-2",children:[e.jsx("div",{className:"aspect-[4/3] overflow-hidden md:aspect-auto",children:e.jsx("img",{src:t.cover,alt:t.title,loading:"lazy",width:1280,height:768,className:"h-full w-full object-cover transition duration-500 group-hover:scale-105"})}),e.jsxs("div",{className:"flex flex-col justify-center p-8 md:p-10",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-brand-bright",children:"Featured article"}),e.jsx("h2",{className:"mt-3 text-2xl font-bold text-foreground md:text-3xl",children:t.title}),e.jsx("p",{className:"mt-3 text-foreground/80",children:t.excerpt}),e.jsxs("div",{className:"mt-5 flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(i,{className:"h-3.5 w-3.5"})," ",new Date(t.date).toLocaleDateString()]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(c,{className:"h-3.5 w-3.5"})," ",t.readMin," min read"]})]}),e.jsxs("span",{className:"mt-6 inline-flex items-center gap-1.5 text-sm font-semibold text-brand-bright",children:["Read article ",e.jsx(x,{className:"h-4 w-4 transition group-hover:translate-x-1"})]})]})]}),e.jsx("div",{className:"mt-12 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:n.map(s=>e.jsxs(a,{to:"/blog/$slug",params:{slug:s.slug},className:"group overflow-hidden rounded border border-border bg-card shadow-[var(--shadow-card)] transition hover:-translate-y-0.5 hover:shadow-[var(--shadow-elevated)]",children:[e.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:e.jsx("img",{src:s.cover,alt:s.title,loading:"lazy",width:1024,height:768,className:"h-full w-full object-cover transition duration-500 group-hover:scale-105"})}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[e.jsx("span",{children:new Date(s.date).toLocaleDateString()}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.readMin," min"]})]}),e.jsx("h3",{className:"mt-2 line-clamp-2 text-lg font-bold text-foreground transition group-hover:text-brand-bright",children:s.title}),e.jsx("p",{className:"mt-2 line-clamp-3 text-sm text-muted-foreground",children:s.excerpt})]})]},s.slug))})]})]})}export{p as component};
