1import{r as u,O as _,j as e,y as C,t,ao as p,aw as S,ax as K,aB as A,s as g,aC as b,K as I}from"./react-vendor-BkChfqEJ.js";import{s as L}from"./index-Ahd0YMvp.js";import{C as x,a as d}from"./card-7BWcDNuw.js";import{B as r}from"./badge-DN2YZlMr.js";import{B as m}from"./button-C5OpcqhK.js";import{I as z}from"./input-Douzf6CG.js";import{S as c}from"./skeleton-G8ISX4de.js";import{D as f}from"./date-utils-CUsfE3va.js";import"./ui-BQCqNqg0.js";import"./query-vendor-C7_lE9wR.js";import"./i18n-vendor-CZb6-6VF.js";import"./supabase-vendor-CQeXRQU-.js";import"./charts-B1GiDnUo.js";const H=()=>{const[i,j]=u.useState(""),[l,h]=u.useState(null),{data:N,isLoading:w}=_({queryKey:["kenya-articles"],queryFn:async()=>{const{data:s,error:n}=await L.from("generated_articles").select("id, title, slug, excerpt, meta_description, featured_image_url, author_name, created_at, reading_time_minutes, content_type, funnel_stage, language").eq("status","published").in("language",["sw","ks","en"]).order("published_at",{ascending:!1}).limit(50);if(n)throw n;return s||[]}}),y=["guide","comparison","faq","decision","how_to","listicle"],o=N?.filter(s=>{const n=!i||s.title.toLowerCase().includes(i.toLowerCase())||s.excerpt?.toLowerCase().includes(i.toLowerCase()),k=!l||s.content_type===l;return n&&k}),a=o?.[0],v=o?.slice(1);return e.jsxs(e.Fragment,{children:[e.jsxs(C,{children:[e.jsx("title",{children:"AI Learning Blog | KPT Social Kenya"}),e.jsx("meta",{name:"description",content:"AI insights and business automation guides for Kenyan entrepreneurs. Learn in English, Swahili, and Kswahili (Sheng)."}),e.jsx("link",{rel:"canonical",href:"https://kenya.kptsocial.ai/blog"}),e.jsx("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),e.jsx("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:""}),e.jsx("link",{href:"https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Inter:wght@300;400;500;600;700&display=swap",rel:"stylesheet"})]}),e.jsx("style",{children:` 2 body { font-family: 'Inter', sans-serif; } 3 h1, h2, h3, .font-serif { font-family: 'Playfair Display', serif; } 4 `}),e.jsxs("div",{className:"min-h-screen bg-neutral-950 text-white font-sans",children:[e.jsx("nav",{className:"fixed top-0 w-full z-50 bg-neutral-900/95 backdrop-blur-md border-b border-white/5",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-4 flex justify-between items-center",children:[e.jsxs(t,{to:"/kenya",className:"flex items-center gap-3",children:[e.jsx(p,{className:"w-9 h-9 text-amber-500"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-2xl font-serif font-black leading-tight",children:"KPT SOCIAL"}),e.jsx("span",{className:"text-[8px] font-black uppercase tracking-[0.5em] text-amber-500",children:"Safari Intelligence"})]})]}),e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsx(t,{to:"/kenya",className:"text-xs font-black uppercase tracking-widest text-white/70 hover:text-white transition-colors",children:"Home"}),e.jsx(t,{to:"/kenya/education",className:"text-xs font-black uppercase tracking-widest text-white/70 hover:text-white transition-colors",children:"Education"}),e.jsx(t,{to:"/kenya/glossary",className:"text-xs font-black uppercase tracking-widest text-white/70 hover:text-white transition-colors",children:"Glossary"})]})]})}),e.jsxs("section",{className:"relative pt-32 pb-24 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 z-0",children:e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-amber-600/10 via-trans
4parent to-neutral-900"})}),e.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto px-6 text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-3 bg-neutral-800/50 border border-amber-500/20 rounded-full px-6 py-3 mb-8",children:[e.jsx(S,{className:"h-5 w-5 text-amber-500"}),e.jsx("span",{className:"text-sm font-bold uppercase tracking-widest text-amber-500",children:"AI Insights"})]}),e.jsxs("h1",{className:"text-6xl md:text-8xl font-serif font-bold mb-6",children:[e.jsx("span",{className:"text-white",children:"Learn."})," ",e.jsx("span",{className:"text-amber-500 italic",children:"Grow."})," ",e.jsx("span",{className:"text-white",children:"Transform."})]}),e.jsx("p",{className:"text-xl text-neutral-400 mb-4 max-w-2xl mx-auto leading-relaxed",children:"AI and automation insights for Kenyan entrepreneurs"}),e.jsx("p",{className:"text-sm text-neutral-500 mb-10",children:"Available in English, Kiswahili, and Kswahili (Sheng) ð°ðª"}),e.jsxs("div",{className:"relative max-w-2xl mx-auto",children:[e.jsx(K,{className:"absolute left-6 top-1/2 -translate-y-1/2 h-6 w-6 text-neutral-500"}),e.jsx(z,{type:"text",placeholder:"Search articles...",value:i,onChange:s=>j(s.target.value),className:"pl-16 h-16 text-lg bg-neutral-900 border-neutral-700 focus:border-amber-500 rounded-3xl text-white placeholder:text-neutral-600"})]})]})]}),e.jsx("section",{className:"border-y border-white/5 bg-neutral-900/50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-6 py-6",children:e.jsxs("div",{className:"flex flex-wrap gap-3 justify-center",children:[e.jsx(m,{variant:l===null?"default":"outline",size:"sm",onClick:()=>h(null),className:l===null?"bg-amber-600 hover:bg-amber-700 text-white rounded-2xl font-bold uppercase text-[10px] tracking-widest":"rounded-2xl font-bold uppercase text-[10px] tracking-widest border-neutral-700 text-neutral-400",children:"All Topics"}),y.map(s=>e.jsx(m,{variant:l===s?"default":"outline",size:"sm",onClick:()=>h(s),className:`capitalize ${l===s?"bg-amber-600 hover:bg-amber-700 text-white rounded-2xl font-bold uppercase text-[10px] tracking-widest":"rounded-2xl font-bold uppercase text-[10px] tracking-widest border-neutral-700 text-neutral-400"}`,children:s.replace("_"," ")},s))]})})}),e.jsx("section",{className:"py-16",children:e.jsx("div",{className:"max-w-7xl mx-auto px-6",children:w?e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[...Array(6)].map((s,n)=>e.jsxs(x,{className:"overflow-hidden bg-neutral-900 border-neutral-800 rounded-[32px]",children:[e.jsx(c,{className:"h-48 w-full bg-neutral-800"}),e.jsxs(d,{className:"p-6",children:[e.jsx(c,{className:"h-6 w-3/4 mb-4 bg-neutral-800"}),e.jsx(c,{className:"h-4 w-full mb-2 bg-neutral-800"}),e.jsx(c,{className:"h-4 w-2/3 bg-neutral-800"})]})]},n))}):o?.length===0?e.jsx("div",{className:"text-center py-16",children:e.jsx("p",{className:"text-neutral-400 text-lg",children:"No articles found matching your criteria."})}):e.jsxs(e.Fragment,{children:[a&&e.jsx(t,{to:`/blog/${a.slug}`,className:"block mb-12",children:e.jsx(x,{className:"overflow-hidden hover:border-amber-500/50 transition-colors group bg-neutral-900 border-neutral-800 rounded-[48px]",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-0",children:[e.jsx("div",{className:"relative h-64 md:h-auto bg-neutral-800",children:a.featured_image_url?e.jsx("img",{src:a.featured_image_url,alt:a.title,className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-amber-600/20 to-amber-800/20"})}),e.jsxs(d,{className:"p-10 flex flex-col justify-center",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4 flex-wrap",children:[e.jsx(r,{className:"bg-amber-600 text-white text-xs font-bold uppercase tracking-wider",children:"Featured"}),e.jsx(r,{variant:"outline",className:"capitalize text-xs border-neutral-700 text-neutral-400",children:a.content_type?.replace("_"," ")}),a.language==="sw"&&e.jsx(r,{variant:"secondary",className:"text-xs bg-green-900/30 text-green-400 border border-green-800",children:"ð°ðª Kiswahil
4i"}),a.language==="ks"&&e.jsx(r,{variant:"secondary",className:"text-xs bg-purple-900/30 text-purple-400 border border-purple-800",children:"ð¥ Kswahili"})]}),e.jsx("h2",{className:"text-3xl md:text-4xl font-serif font-bold mb-4 group-hover:text-amber-500 transition-colors text-white",children:a.title}),e.jsx("p",{className:"text-neutral-400 mb-6 line-clamp-3 leading-relaxed",children:a.excerpt||a.meta_description}),e.jsxs("div",{className:"flex items-center gap-6 text-sm text-neutral-500",children:[a.author_name&&e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(A,{className:"h-4 w-4"}),a.author_name]}),e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(g,{className:"h-4 w-4"}),f(new Date(a.created_at),"MMM d, yyyy")]}),a.reading_time_minutes&&e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(b,{className:"h-4 w-4"}),a.reading_time_minutes," min read"]})]})]})]})})}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:v?.map(s=>e.jsx(t,{to:`/blog/${s.slug}`,children:e.jsxs(x,{className:"overflow-hidden h-full hover:border-amber-500/50 transition-all hover:-translate-y-1 group bg-neutral-900 border-neutral-800 rounded-[32px]",children:[e.jsx("div",{className:"relative h-48 bg-neutral-800",children:s.featured_image_url?e.jsx("img",{src:s.featured_image_url,alt:s.title,className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-amber-600/20 to-amber-800/20"})}),e.jsxs(d,{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[e.jsx(r,{variant:"outline",className:"text-xs capitalize border-neutral-700 text-neutral-400",children:s.content_type?.replace("_"," ")}),s.language==="sw"&&e.jsx(r,{variant:"secondary",className:"text-xs bg-green-900/30 text-green-400 border border-green-800",children:"ð°ðª Kiswahili"}),s.language==="ks"&&e.jsx(r,{variant:"secondary",className:"text-xs bg-purple-900/30 text-purple-400 border border-purple-800",children:"ð¥ Sheng"})]}),e.jsx("h3",{className:"text-xl font-serif font-bold mb-2 group-hover:text-amber-500 transition-colors line-clamp-2 text-white",children:s.title}),e.jsx("p",{className:"text-neutral-400 text-sm mb-4 line-clamp-2 leading-relaxed",children:s.excerpt||s.meta_description}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-neutral-500",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(g,{className:"h-3 w-3"}),f(new Date(s.created_at),"MMM d, yyyy")]}),s.reading_time_minutes&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(b,{className:"h-3 w-3"}),s.reading_time_minutes," min"]})]})]})]})},s.id))})]})})}),e.jsx("section",{className:"py-24 border-t border-white/5",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center",children:[e.jsxs("h2",{className:"text-5xl font-serif font-bold mb-6",children:[e.jsx("span",{className:"text-white",children:"Ready to"})," ",e.jsx("span",{className:"text-amber-500 italic",children:"Start Learning?"})]}),e.jsx("p",{className:"text-neutral-400 text-xl mb-10 max-w-2xl mx-auto leading-relaxed",children:"Join our AI education programs and transform your business with practical automation skills."}),e.jsx(m,{size:"lg",className:"bg-amber-600 hover:bg-amber-700 text-white rounded-3xl px-12 py-7 text-xs font-black uppercase tracking-widest",asChild:!0,children:e.jsxs(t,{to:"/kenya/education",children:["Explore Programs",e.jsx(I,{className:"ml-3 h-5 w-5"})]})})]})}),e.jsx("footer",{className:"py-16 bg-neutral-900 border-t border-white/5",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 text-center",children:[e.jsxs(t,{to:"/kenya",className:"inline-flex items-center gap-3 mb-6",children:[e.jsx(p,{className:"w-8 h-8 text-amber-500"}),e.jsx("span",{className:"text-xl font-serif font-black text-white",children:"KPT SOCIAL"})]}),e.jsx("p",{className:"text-neutral-500 text-sm",children:"© 2025 KPT Social - Your Safari Intelligence Partner."})]})})]})]})};export{H as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.