1import{r as e,j as t,p as s,a as l,c as a,t as r,b as i,d as n,e as o,f as c,g as d,h as x}from"./index-Btz_IaPm.js";import{H as m}from"./publicAssets-8pWQjtP4.js";import{m as p,a as g,b as h,c as u,d as b,e as f}from"./publicCmsAdapters-CwwZaVO0.js";import"./vendor-DIqbiC5Q.js";import"./search-DQyM0wFE.js";const j=(e,t,s)=>{const l=String(e||s).trim();if(l.length<=t)return l;return`${l.slice(0,t).trimEnd().replace(/[.,;:!?-]+$/,"")}...`},v=({project:e,onClose:s})=>{if(!e)return null;const l=e.category||e.type||"Flagship";return t.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center p-4 sm:p-6 bg-black/70 backdrop-blur-md animate-in fade-in duration-300",children:t.jsxs("div",{className:"bg-white w-full max-w-4xl rounded-sm shadow-2xl relative max-h-[90vh] overflow-y-auto",children:[t.jsx("button",{onClick:s,className:"absolute top-6 right-6 z-10 p-2 bg-white/80 backdrop-blur-sm rounded-full text-gray-900 hover:bg-[#1478d4] hover:text-white transition-all shadow-lg","aria-label":"Close Modal",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",d:"M6 18L18 6M6 6l12 12"})})}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12",children:[t.jsxs("div",{className:"lg:col-span-7 h-[300px] lg:h-auto relative overflow-hidden",children:[t.jsx("img",{src:e.image||"/HERO/hero1.jpg",alt:e.title||"Project image",className:"w-full h-full object-cover"}),t.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 to-transparent"}),t.jsx("div",{className:"absolute bottom-6 left-6",children:t.jsx("span",{className:"bg-[#65be14] text-white px-4 py-2 text-[10px] font-black uppercase tracking-widest rounded-full shadow-lg",children:l})})]}),t.jsxs("div",{className:"lg:col-span-5 p-8 lg:p-12 flex flex-col justify-center",children:[t.jsx("span",{className:"text-[#1478d4] text-[10px] font-black uppercase tracking-[0.4em] mb-4 block",children:"Project Brief"}),t.jsx("h2",{className:"text-3xl sm:text-4xl font-black text-gray-900 uppercase tracking-tighter mb-4 leading-tight",children:e.title||"Untitled Project"}),t.jsxs("div",{className:"flex flex-col gap-4 mb-8",children:[e.location&&t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"text-gray-400 text-sm",children:"ð"}),t.jsx("span",{className:"text-[10px] font-black text-gray-500 uppercase tracking-widest",children:e.location})]}),e.status&&t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"w-2 h-2 rounded-full bg-[#65be14] animate-pulse"}),t.jsx("span",{className:"text-[10px] font-black text-[#65be14] uppercase tracking-widest",children:e.status})]})]}),t.jsxs("div",{className:"space-y-6 mb-10",children:[t.jsx("p",{className:"text-gray-600 text-sm leading-relaxed font-light",children:e.desc||"Project details will be available soon."}),t.jsxs("p",{className:"text-gray-500 text-xs font-light leading-relaxed",children:["This flagship initiative represents Kilifi County's commitment to sustainable development and infrastructure excellence. By focusing on ",String(l).toLowerCase(),", we aim to create long-term value for our residents and investors."]})]}),t.jsx("div",{className:"mt-12 flex flex-col gap-3",children:t.jsx("button",{onClick:s,className:"w-full border border-gray-100 py-4 text-[10px] font-black uppercase tracking-[0.3em] rounded-sm hover:bg-gray-50 transition-all text-gray-400",children:"Close Detail View"})})]})]})]})})},N=({onNavigate:a})=>{const r=m,[i,n]=e.useState(0),[o,c]=e.useState([]),[d,x]=e.useState([]),[N,w]=e.useState([]),[y,k]=e.useState([]),[C,S]=e.useState([]),[E,L]=e.useState([]),[P,B]=e.useState(null),[z,A]=e.useState(!0),M=N.slice(0,3);e.useEffect(()=>{const e=setInterval(()=>{n(e=>(e+1)%r.length)},8e3);return()=>clearInterval(e)},[]),e.useEffect(()=>{(async()=>{try{const[e,t,a,r,i,n]=await Promise.all([s.listServices(),s.listProjects(),s.listNews(),s.listEvents(),s.listSectors(),s.listAnnouncements({per_page:5})]),o=l(e).map(p),d=l(t).filter(e=>!(e=>{const t=`${e.category||""}
1 ${e.title||""} ${e.desc||""}`.toLowerCase();return t.includes("partner")||t.includes("partnership")||t.includes("donor")})(e)).map((e,t)=>g(e,t)),m=l(a).map(e=>{const t=h(e);return{...t,id:"string"==typeof t.id?parseInt(t.id,10)||0:t.id}}),j=l(r).map(u),v=l(i).map(b),N=l(n).map(f);console.info("[DataSource][Home] API connected.",{rawServices:l(e).length,rawProjects:l(t).length,rawNews:l(a).length,rawEvents:l(r).length,rawSectors:l(i).length,announcements:N.length}),c(o),x(d),w(m),k(j),S(v),L(N)}catch(e){console.error("[DataSource][Home] Failed to load content.",e)}finally{A(!1)}})()},[]);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"relative group/hero",children:[t.jsxs("section",{className:"relative w-full h-screen overflow-hidden bg-gray-900 flex flex-col justify-center","aria-labelledby":"hero-title",children:[t.jsx("div",{className:"absolute inset-0 z-0",children:r.map((e,s)=>t.jsx("div",{className:"absolute inset-0 transition-opacity duration-1000 ease-in-out "+(s===i?"opacity-100":"opacity-0"),children:t.jsx("img",{src:e,className:"w-full h-full object-cover object-center",alt:"",role:"presentation",sizes:"100vw",decoding:"async",fetchPriority:0===s?"high":"low",loading:0===s?"eager":"lazy"})},s))}),t.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center z-30 opacity-100 sm:opacity-0 sm:group-hover/hero:opacity-100 transition-opacity",children:t.jsx("button",{type:"button","aria-label":"Previous slide",onClick:()=>n(e=>(e-1+r.length)%r.length),className:"ml-3 sm:ml-6 p-3 sm:p-4 rounded-full bg-white/10 backdrop-blur-md text-white hover:bg-[#65be14] transition-all touch-manipulation",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",d:"M15 19l-7-7 7-7"})})})}),t.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center z-30 opacity-100 sm:opacity-0 sm:group-hover/hero:opacity-100 transition-opacity",children:t.jsx("button",{type:"button","aria-label":"Next slide",onClick:()=>n(e=>(e+1)%r.length),className:"mr-3 sm:mr-6 p-3 sm:p-4 rounded-full bg-white/10 backdrop-blur-md text-white hover:bg-[#65be14] transition-all touch-manipulation",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",d:"M9 5l7 7-7 7"})})})}),t.jsx("div",{className:"absolute bottom-4 sm:bottom-[5.5rem] left-0 right-0 z-30 px-3 sm:px-6",children:t.jsx("div",{className:"max-w-5xl mx-auto flex justify-start",children:t.jsx("div",{className:"bg-black/30 backdrop-blur-xl border border-white/10 overflow-hidden shadow-2xl",children:t.jsx("div",{className:"grid grid-cols-4 divide-x divide-white/10",children:[{label:"POPULATION",value:"1.5M+"},{label:"SUB-COUNTIES",value:"7"},{label:"MUNICIPALITIES",value:"5"},{label:"WARDS",value:"35"}].map((e,s)=>t.jsxs("div",{className:"px-1.5 sm:px-3 md:px-4 py-1.5 sm:py-2 md:py-2.5 text-center transition-all hover:bg-white/5 group",children:[t.jsx("span",{className:"text-xs sm:text-base md:text-xl font-bold text-white block mb-0.5 group-hover:text-[#65be14] transition-colors",children:e.value}),t.jsx("span",{className:"text-[7px] sm:text-[9px] md:text-[10px] font-semibold text-white/50 uppercase tracking-tight sm:tracking-wide whitespace-nowrap",children:e.label})]},s))})})})}),t.jsx("div",{className:"absolute z-50 bottom-[4rem] sm:bottom-[10rem] lg:bottom-[11.5rem] left-0 right-0 px-3 sm:px-6",children:t.jsx("div",{className:"max-w-5xl mx-auto flex justify-start",children:t.jsxs("button",{onClick:()=>a("contact"),className:"inline-flex items-center gap-2 bg-[#FF8F00] hover:brightness-105 text-white px-5 sm:px-6 py-2.5 sm:py-3 text-[11px] sm:text-sm font-bold uppercase tracking-wide transition-all shadow-2xl active:scale-95 text-left rounded-none whitespace-nowrap",children:[t.jsx("span",{children:"Connect With Us"}),t.jsx("span",{"aria-hidden":"true",className:"text-base sm:text-lg leading-none",children:"â"})]})})}
1),t.jsx("div",{className:"absolute z-40 bottom-[11rem] sm:bottom-[18rem] lg:bottom-[20rem] left-0 right-0 px-3 sm:px-6",children:t.jsx("div",{className:"max-w-5xl mx-auto flex items-center justify-start",children:t.jsxs("div",{className:"max-w-3xl animate-in fade-in slide-in-from-left-8 duration-1000 text-left",children:[t.jsxs("h1",{id:"hero-title",className:"font-['Playfair_Display',serif] text-5xl sm:text-6xl md:text-7xl lg:text-8xl font-black text-white leading-none mb-4 sm:mb-6",children:["KARIBU ",t.jsx("span",{className:"text-[#65be14]",children:"KILIFI!"})]}),t.jsx("p",{className:"underline decoration-2 underline-offset-4 text-white text-xl sm:text-2xl md:text-3xl lg:text-4xl font-semibold leading-tight max-w-3xl mb-6 sm:mb-8 opacity-90",children:"Explore, Invest and Grow with us"})]})})})]}),t.jsx("div",{className:"relative z-40 -mt-8 sm:-mt-10 lg:-mt-12 mb-8 sm:mb-10 lg:mb-12",children:t.jsx("div",{className:"max-w-7xl mx-auto px-2 sm:px-4",children:t.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-2 sm:gap-4 lg:gap-6",children:[{title:"Emergency Toll Free Number - Dial 1535",target:"services",desc:"Emergency response",action:()=>window.location.href="tel:1535"},{title:"Grievance Redress Mechanism",target:"contact",desc:"Register complaints"},{title:"E-services",target:"services",desc:"Pay land rates & permits",action:()=>window.open("https://eservices.kilifi.go.ke/","_blank")}].map((e,s)=>t.jsx("div",{onClick:()=>e.action?e.action():a(e.target),className:"group relative bg-white p-3 sm:p-6 lg:px-6 lg:py-6 shadow-xl hover:-translate-y-1 sm:hover:-translate-y-2 transition-all duration-500 cursor-pointer overflow-hidden border-t-2 border-transparent hover:border-[#65be14] flex flex-col justify-center h-full min-h-[100px] sm:min-h-0",children:t.jsxs("div",{className:"relative z-10 w-full text-center sm:text-left",children:[t.jsx("h3",{className:"text-[11px] sm:text-base lg:text-lg font-bold text-[#003d3d] mb-1 sm:mb-2 leading-tight group-hover:text-[#65be14] transition-colors line-clamp-2",children:e.title}),t.jsx("p",{className:"text-gray-500 text-[9px] sm:text-sm font-medium leading-tight line-clamp-1 sm:line-clamp-2",children:e.desc})]})},s))})})})]}),t.jsx("section",{className:"py-12 sm:py-16 lg:py-20 bg-[#F8FAFC]","aria-labelledby":"projects-title",children:t.jsxs("div",{className:"max-w-7xl mx-auto px-3 sm:px-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-start lg:items-end mb-10 sm:mb-16 gap-6 sm:gap-8",children:[t.jsx("div",{className:"max-w-2xl w-fit",children:t.jsx("h2",{id:"projects-title",className:"text-2xl sm:text-3xl md:text-4xl font-bold text-gray-900 leading-tight",children:"Featured Projects"})}),t.jsx("div",{className:"flex flex-col items-start lg:items-end gap-4 sm:gap-6 w-fit shrink-0",children:t.jsxs("button",{onClick:()=>a("projects"),className:"bg-[#003d3d] hover:bg-[#1478d4] text-white px-6 sm:px-8 py-3 sm:py-4 text-sm font-bold uppercase tracking-wide transition-all flex items-center justify-center gap-2 sm:gap-3 shadow-lg active:scale-95 w-full sm:w-auto",children:["View All Projects ",t.jsx("span",{children:"â"})]})})]}),t.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 sm:gap-8 lg:gap-12",children:0===d.length?t.jsx("div",{className:"col-span-full py-12 text-center text-gray-500",children:"No featured projects"}):d.slice(0,4).map((e,s)=>t.jsxs("div",{onClick:()=>a("projects"),className:"group bg-white border border-gray-100 rounded-lg sm:rounded-2xl overflow-hidden shadow-sm hover:shadow-2xl transition-all duration-500 flex flex-col md:flex-row cursor-pointer h-full md:h-[360px] lg:h-[380px]",children:[t.jsx("div",{className:"md:w-2/5 aspect-video md:aspect-auto relative overflow-hidden shrink-0",children:t.jsx("img",{src:e.image||"/HERO/hero1.jpg",alt:e.title,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-110 transition-transform duration-1000",loading:"lazy"})}),t.jsxs("div",{className:"md:w-3/5 min-w-0 p-5 sm:p-8 flex flex-col",children:[t.jsx("h3",{className:"text-base sm:text-lg font-bold text-gray-900 leading-snug mb-3 sm:mb-4 min-h-[4.75rem] group-hover:text-[#1478d4] transition-colors",title:e.title||"",children:j(e.title,62,"(No Title)")}),t.jsx("p",{className:"text-gray-600 text-sm leading-relaxed mb-5 min-h-[9rem]",title:e.desc||"",children:j(e.desc,235,"(No Description)")}),t.jsxs("button",{type:"button",onClick:t=>{t.stopPropagation(),B(e)},className:"mt-auto pt-4 border-t border-gray-50 flex justify-between items-center text-left",children:[t.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest text-[#1478d4] group-hover:text-gray-900 transition-colors",children:"Read more"}),t.jsx("span",{className:"w-8 h-8 bg-gray-50 flex items-center justify-center text-gray-400 group-hover:bg-[#1478d4] group-hover:text-white transition-all","aria-hidden":"true",children:"â"})]})]})]},s))})]})}),t.jsx("section",{className:"py-14 sm:py-16 lg:py-20 bg-[#f6f7fb]","aria-labelledby":"events-updates-title",children:t.jsxs("div",{className:"max-w-7xl mx-auto px-3 sm:px-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row items-start lg:items-center justify-between gap-4 sm:gap-6 mb-10 sm:mb-14",children:[t.jsxs("div",{children:[t.jsx("span",{className:"text-[#1478d4] text-xs sm:text-sm font-bold uppercase tracking-wide mb-3 block",children:"Engage & Stay Informed"}),t.jsx("h2",{id:"events-updates-title",className:"text-2xl sm:text-3xl md:text-4xl font-bold text-gray-900 leading-tight",children:"Upcoming Events & Latest Updates"})]}),t.jsxs("div",{className:"flex flex-wrap gap-3 sm:gap-4",children:[t.jsx("button",{onClick:()=>a("events"),className:"text-sm font-semibold text-[#1478d4] border border-[#1478d4]/30 px-4 py-2 rounded-full hover:bg-[#1478d4] hover:text-white transition-all",children:"View All Events"}),t.jsx("button",{onClick:()=>a("media-centre"),className:"text-sm font-semibold text-gray-900 border border-gray-200 px-4 py-2 rounded-full hover:border-[#fd8e01] hover:text-[#fd8e01] transition-all",children:"All News & Bulletins"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6 lg:gap-8 items-start",children:[t.jsxs("div",{className:"lg:col-span-4 flex flex-col",children:[t.jsx("div",{className:"px-5 sm:px-6 pt-5 pb-3 border-b border-gray-100",children:t.jsx("p",{className:"text-xs sm:text-sm font-semibold text-[#007bff] uppercase tracking-wide",children:"Upcoming Events"})}),t.jsx("div",{className:"flex flex-col gap-3 p-4 sm:p-5",children:0===y.length?t.jsx("div",{className:"p-6 text-center text-gray-500",children:"No upcoming events"}):y.slice(0,3).map(e=>t.jsxs("button",{onClick:()=>
1a(e.page,e.id),className:"w-full text-left flex items-center gap-3 sm:gap-4 p-3 sm:p-4 bg-white border border-gray-100 shadow-sm rounded-xl transition-all hover:shadow-md hover:-translate-y-0.5 cursor-pointer group",children:[t.jsxs("div",{className:"w-14 h-14 sm:w-16 sm:h-16 bg-[#007bff] text-white flex flex-col items-center justify-center rounded-lg flex-shrink-0",children:[t.jsx("span",{className:"text-lg sm:text-xl font-extrabold leading-none",children:e.day||"--"}),t.jsx("span",{className:"text-[10px] sm:text-xs font-semibold uppercase tracking-wide",children:e.month||"TBA"})]}),t.jsxs("div",{className:"flex-1 flex flex-col gap-1 min-w-0",children:[t.jsx("span",{className:"text-[10px] sm:text-xs font-semibold text-[#007bff] uppercase tracking-wide truncate",children:e.location||"TBA"}),t.jsx("h4",{className:"text-sm sm:text-base font-bold leading-tight line-clamp-2 group-hover:text-[#1478d4] transition-colors",children:e.title||"(No Title)"})]}),t.jsx("div",{className:"flex items-center text-black/40 group-hover:text-[#1478d4] text-lg transition-colors flex-shrink-0",children:"â"})]},e.id))}),t.jsx("div",{className:"px-5 sm:px-6 pb-4",children:t.jsxs("button",{onClick:()=>a("events"),className:"text-sm font-semibold text-[#1478d4] flex items-center gap-2 border-b-2 border-transparent hover:border-[#1478d4] transition-all",children:["View All Events",t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})})]})})]}),t.jsxs("div",{className:"lg:col-span-8 flex flex-col",children:[t.jsxs("div",{className:"flex items-center gap-3 mb-5 px-1",children:[t.jsx("span",{className:"text-sm font-semibold text-[#fd8e01] uppercase tracking-wide",children:"Latest News & Articles"}),t.jsx("div",{className:"h-px flex-1 bg-gray-200"})]}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-5 lg:gap-6",children:0===M.length?t.jsx("div",{className:"col-span-full py-12 text-center text-gray-500",children:"No news available"}):M.map((e,s)=>t.jsxs("div",{className:"group bg-white border border-gray-100 shadow-sm rounded-xl overflow-hidden flex flex-col hover:shadow-md transition-shadow",children:[t.jsxs("div",{className:"relative aspect-[16/10] overflow-hidden",children:[t.jsx("img",{src:e.image||"/HERO/hero1.jpg",alt:e.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105",loading:"lazy"}),t.jsx("span",{className:"absolute top-3 left-3 bg-white text-[#1478d4] text-xs font-bold px-2.5 py-1 rounded-full shadow-sm",children:"Update"})]}),t.jsxs("div",{className:"flex-1 flex flex-col p-4 sm:p-5",children:[t.jsxs("div",{className:"text-xs font-semibold text-gray-500 mb-2 flex items-center gap-2",children:[t.jsx("span",{className:"text-[#1478d4]",children:"Kilifi Bulletin"}),t.jsx("span",{className:"text-gray-300",children:"â¢"}),t.jsx("span",{children:e.date||"TBA"})]}),t.jsx("h3",{className:"text-sm sm:text-base font-bold text-gray-900 leading-tight mb-2 group-hover:text-[#1478d4] transition-colors line-clamp-2",children:e.title||"(No Title)"}),t.jsx("p",{className:"text-xs sm:text-sm text-gray-600 leading-relaxed mb-3 line-clamp-3 flex-1",children:e.excerpt||"(No Excerpt)"}),t.jsxs("button",{onClick:()=>a("media-centre"),className:"text-sm font-semibold text-[#1478d4] inline-flex items-center gap-1.5 hover:gap-2.5 transition-all mt-auto",children:["Read more",t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})})]})]})]},`${e.id}-${s}`))})]})]})]})}),t.jsx(v,{project:P,onClose:()=>B(null)})]})},w=({query:m="",onNavigate:p})=>{const[g,h]=e.useState(m),[u,b]=e.useState("all"),[f,j]=e.useState([]),[v,N]=e.useState(!0);e.useEffect(()=>{(async()=>{try{const[e,t,a,m,p,g]=await Promise.all([s.listDepartments({per_page:100}),s.listServices({per_page:100}),s.listNews({per_page:50}),s.listEvents({per_page:50}),s.listBlogPosts({per_page:50}),s.listDocuments({per_page:400})]),h=l(e).map(r).flat(),u=l(t).map(i).flat(),b=l(a).map(n).flat(),f=l(m).map(o).flat(),v=l(p).map(c).flat(),N=l(g).map(d).flat(),w=x({departments:h,services:u,news:b,events:f,blogs:v,publicRecords:N,projects:[],jobs:[]});j(w),console.info("[DataSource][Search] Index built.",{departments:h.length,services:u.length,news:b.length,events:f.length,blogs:v.length,magazines:N.length,total:w.length})}catch(e){console.error("[DataSource][Search] Failed to load search data.",e),j(x())}finally{N(!1)}})()},[]);const w=e.useMemo(()=>a(f),[f]),y=e.useMemo(()=>
1{if(!g.trim())return[];try{const e=w.search(g,{limit:50}).map(e=>e.item);return"all"===u?e:e.filter(e=>e.category===u)}catch(e){return[]}},[g,u,w]),k=e.useMemo(()=>{const e=new Set(f.map(e=>e.category));return Array.from(e).sort()},[f]);return e.useEffect(()=>{h(m)},[m]),v?t.jsx("div",{className:"min-h-screen bg-white pt-12 lg:pt-16 pb-20 flex items-center justify-center",children:t.jsx("div",{className:"text-gray-400 text-sm font-bold uppercase tracking-widest animate-pulse",children:"Building search index..."})}):t.jsx("div",{className:"min-h-screen bg-white pt-12 lg:pt-16 pb-20",children:t.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6",children:[t.jsxs("div",{className:"mb-12",children:[t.jsx("h1",{className:"text-5xl font-black text-[#003d3d] uppercase tracking-tighter mb-4",children:"Search Results"}),t.jsx("p",{className:"text-lg text-gray-600",children:y.length>0?`Found ${y.length} result${1!==y.length?"s":""} for "${g}"`:g?`No results found for "${g}"`:"Enter a search term to get started"})]}),t.jsx("div",{className:"mb-12",children:t.jsxs("div",{className:"relative",children:[t.jsx("input",{type:"text",value:g,onChange:e=>h(e.target.value),placeholder:"Search resources, departments, services...",className:"w-full bg-gray-50 border-2 border-gray-100 p-6 text-lg font-medium focus:ring-2 focus:ring-[#1478d4] focus:border-transparent rounded-xl transition-all",autoFocus:!0}),t.jsx("svg",{className:"absolute right-6 top-6 w-6 h-6 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]})}),k.length>0&&t.jsxs("div",{className:"mb-12 flex flex-wrap gap-3",children:[t.jsx("button",{onClick:()=>b("all"),className:"px-6 py-2 rounded-full text-sm font-bold uppercase tracking-wider transition-all "+("all"===u?"bg-[#1478d4] text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:"All"}),k.map(e=>t.jsx("button",{onClick:()=>b(e),className:"px-6 py-2 rounded-full text-sm font-bold uppercase tracking-wider transition-all "+(u===e?"bg-[#1478d4] text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:e},e))]}),y.length>0?t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:y.map((e,s)=>{return t.jsxs("button",{onClick:()=>p(e.target,e.id),className:"text-left p-6 bg-white border-2 border-gray-100 hover:border-[#1478d4] hover:shadow-xl rounded-xl transition-all group",children:[t.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.icon&&t.jsx("div",{className:"w-12 h-12 bg-gray-50 flex items-center justify-center rounded-lg text-2xl group-hover:bg-[#1478d4] group-hover:text-white transition-all",children:e.icon}),t.jsx("span",{className:`text-xs font-bold uppercase tracking-wider px-3 py-1 rounded-full ml-auto ${l=e.category,{departments:"bg-blue-100 text-blue-800",services:"bg-green-100 text-green-800",projects:"bg-purple-100 text-purple-800",events:"bg-red-100 text-red-800",news:"bg-yellow-100 text-yellow-800",jobs:"bg-indigo-100 text-indigo-800",tenders:"bg-orange-100 text-orange-800",destinations:"bg-teal-100 text-teal-800",staff:"bg-cyan-100 text-cyan-800",blogs:"bg-pink-100 text-pink-800",magazine:"bg-fuchsia-100 text-fuchsia-800"}[l]||"bg-gray-100 text-gray-800"}`,children:e.category})]}),t.jsx("h3",{className:"text-lg font-black text-[#003d3d] uppercase leading-tight mb-2 group-hover:text-[#1478d4] transition-colors line-clamp-2",children:e.title}),e.excerpt&&t.jsx("p",{className:"text-sm text-gray-600 line-clamp-2",children:e.excerpt})]},`${e.id}-${s}`);var l})}):g?t.jsxs("div",{className:"text-center py-20",children:[t.jsx("div",{className:"w-24 h-24 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-6",children:t.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),t.jsx("h2",{className:"text-2xl font-black text-[#003d3d] uppercase mb-2",children:"No Results Found"}),t.jsx("p",{className:"text-gray-600 mb-8",children:"Try adjusting your search terms or browse by category."}),t.jsx("button",{onClick:()=>h(""),className:"bg-[#1478d4] text-white px-8 py-3 rounded-lg font-bold uppercase tracking-wider hover:brightness-110 transition-all",children:"Clear Search"})]}):t.jsxs("div",{className:"text-center py-20",children:[t.jsx("div",{className:"w-24 h-24 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-6",children:t.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("h2",{className:"text-2xl font-black text-[#003d3d] uppercase mb-2",children:"Search Kilifi County Resources"}),t.jsx("p",{className:"text-gray-600",children:"Find departments, services, projects, events, jobs, tenders and more."})]})]})})},y=({onNavigate:e})=>t.jsx("div",{className:"min-h-[80vh] flex items-center justify-center pt-10 lg:pt-12 pb-12 bg-gray-50",children:t.jsxs("div",{className:"text-center px-6",children:[t.jsx("div",{className:"mb-8",children:t.jsx("span",{className:"text-[120px] md:text-[180px] font-black text-[#1478d4] opacity-20 leading-none select-none",children:"404"})}),t.jsx("h1",{className:"text-4xl md:text-6xl font-black text-gray-900 uppercase tracking-tighter mb-4",children:"Page Not Found"}),t.jsx("p",{className:"text-lg text-gray-600 max-w-md mx-auto mb-8",children:"The page you're looking for doesn't exist or has been moved."}),t.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[t.jsx("button",{onClick:()=>e("home"),className:"bg-[#1478d4] text-white px-8 py-4 rounded-lg font-bold uppercase tracking-wider hover:brightness-110 transition-all",children:"Go Home"}),t.jsx("button",{onClick:()=>window.history.back(),className:"bg-white border-2 border-gray-200 text-gray-700 px-8 py-4 rounded-lg font-bold uppercase tracking-wider hover:border-[#1478d4] hover:text-[#1478d4] transition-all",children:"Go Back"})]}),t.jsx("div",{className:"mt-16 grid grid-cols-2 md:grid-cols-4 gap-4 max-w-2xl mx-auto",children:[{label:"Departments",page:"departments"},{label:"Services",page:"services"},{label:"Events",page:"events"},{label:"Contact",page:"contact"}].map(s=>t.jsx("button",{onClick:()=>e(s.page),className:"p-4 bg-white rounded-lg shadow-sm border border-gray-100 hover:border-[#1478d4] hover:shadow-md transition-all",children:t.jsx("span",{className:"text-sm font-bold text-gray-700 uppercase tracking-wide",children:s.label})},s.page))})]})});export{N as Home,y as NotFound,w as Search};
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.