1import{r,h as o,j as e,ca as h,L as d,q as b,au as u,o as f}from"./index-CCMymUwH.js";const n={beginner:{bg:"bg-green-500/10",text:"text-green-400",border:"border-green-500/20"},intermediate:{bg:"bg-amber-500/10",text:"text-amber-400",border:"border-amber-500/20"},advanced:{bg:"bg-red-500/10",text:"text-red-400",border:"border-red-500/20"}};function g(){const[l,i]=r.useState([]),[m,c]=r.useState(!0);r.useEffect(()=>{x()},[]);const x=async()=>{try{const t=await o.entities.Guide.filter({published:!0,show_on_homepage:!0},"-published_date",4);if(t.length===0){const s=await o.entities.Guide.filter({published:!0},"-published_date",4);i(s)}else i(t)}catch(t){console.error("Failed to load homepage guides:",t)}finally{c(!1)}};return m||l.length===0?null:e.jsx("section",{className:"py-16 sm:py-24 bg-gradient-to-b from-[#050711] to-[#0a0f1a]",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-10 sm:mb-12",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-amber-500/10 border border-amber-500/20 mb-4",children:[e.jsx(h,{className:"w-4 h-4 text-amber-400"}),e.jsx("span",{className:"text-amber-400 text-sm font-medium",children:"Trading Academy"})]}),e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Most-Read Setup Guides (Read These First)"}),e.jsx("p",{className:"text-slate-400 max-w-2xl mx-auto",children:"Step-by-step tutorials to master the GOAT Toolkit â from first install to advanced strategies"})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-6",children:l.map(t=>{const s=t.slug||t.id,a=n[t.difficulty]||n.beginner;return e.jsx(d,{to:`/guide/${s}`,className:"group","data-track":"homepage_guide_click",children:e.jsxs("article",{className:"h-full bg-[#111827] rounded-xl border border-white/5 overflow-hidden hover:border-amber-500/30 transition-all duration-300 hover:shadow-lg hover:shadow-amber-500/5 flex flex-col",children:[t.featured_image&&e.jsx("div",{className:"aspect-video overflow-hidden",children:e.jsx("img",{src:t.featured_image,alt:t.title,width:400,height:225,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),e.jsxs("div",{className:"p-4 sm:p-5 flex flex-col flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[t.difficulty&&e.jsx("span",{className:`px-2 py-0.5 text-xs font-medium rounded-full ${a.bg} ${a.text} ${a.border} border`,children:t.difficulty}),t.reading_time&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-slate-500",children:[e.jsx(b,{className:"w-3 h-3"}),t.reading_time," min"]})]}),e.jsx("h3",{className:"text-base sm:text-lg font-bold text-white mb-2 group-hover:text-amber-400 transition-colors line-clamp-2 flex-1",children:t.title}),t.excerpt&&e.jsx("p",{className:"text-slate-400 text-sm line-clamp-2 mb-3",children:t.excerpt}),e.jsxs("div",{className:"flex items-center text-amber-400 text-sm font-medium mt-auto",children:["Read Guide",e.jsx(u,{className:"w-4 h-4 ml-1 group-hover:translate-x-1 transition-transform"})]})]})]})},t.id)})}),e.jsx("div",{className:"text-center mt-10",children:e.jsxs(d,{to:"/Guides","data-track":"homepage_guides_view_all",className:"inline-flex items-center gap-2 px-6 py-3 bg-amber-500/10 hover:bg-amber-500/20 border border-amber-500/30 rounded-full text-amber-400 font-medium transition-all",children:["Browse All Guides",e.jsx(f,{className:"w-4 h-4"})]})})]})})}export{g 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.