import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{l as t}from"./vendor-map-UawGledW.js";import{r as n,t as r}from"./vendor-react-Botiei7A.js";import{t as i}from"./useTranslation-8J697w9K.js";import{o as a}from"./apiFetch-C4rLkcBG.js";import{n as o}from"./AuthContext-CSiKDy0Y.js";import{D as s,l as c,r as l}from"./index-LrG6jnj0.js";import{a as u,i as d,n as f,t as p}from"./dateUtils-DhkUglab.js";import{n as m}from"./priceUtils-DE6mF0IE.js";import{t as h}from"./blogService-DZ-Hf5l1.js";import{t as g}from"./associationService-QFPRFqas.js";import{t as _}from"./SEOHead-BIfbaHwD.js";var v=e(t()),y=r(),b=1440,x=700,S=160,C=80,w=b/S,T=x/C;function E(e,t){let n=Math.sin(e*127.1+t*311.7)*43758.5453;return n-Math.floor(n)}function D(e){return e*e*(3-2*e)}function O(e,t){let n=Math.floor(e),r=Math.floor(t),i=D(e-n),a=D(t-r);return E(n,r)*(1-i)*(1-a)+E(n+1,r)*i*(1-a)+E(n,r+1)*(1-i)*a+E(n+1,r+1)*i*a}function k(e,t){let n=0,r=.5,i=1,a=0;for(let o=0;o<6;o++)n+=O(e*i,t*i)*r,a+=r,r*=.5,i*=2.07;return n/a}function A(e,t){return k(e/b*5,t/x*3.5)}function j(){let e=new Float32Array((C+1)*(S+1));for(let t=0;t<=C;t++)for(let n=0;n<=S;n++)e[t*(S+1)+n]=A(n*w,t*T);return e}var M=[[],[[3,0]],[[0,1]],[[3,1]],[[1,2]],[[3,0],[1,2]],[[0,2]],[[3,2]],[[2,3]],[[0,2]],[[0,1],[2,3]],[[1,2]],[[3,1]],[[0,1]],[[3,0]],[]];function N(e,t,n,r,i){let a=n*w,o=t*T,s=(e,t)=>r[e*(S+1)+t];switch(e){case 0:return[a+(i-s(t+1,n))/(s(t+1,n+1)-s(t+1,n))*w,o+T];case 1:{let e=(i-s(t+1,n+1))/(s(t,n+1)-s(t+1,n+1));return[a+w,o+T-e*T]}case 2:{let e=(i-s(t,n+1))/(s(t,n)-s(t,n+1));return[a+w-e*w,o]}case 3:return[a,o+(i-s(t,n))/(s(t+1,n)-s(t,n))*T]}return[0,0]}function P(e,t){let n=[],r=(t,n)=>e[t*(S+1)+n];for(let i=0;i<C;i++)for(let a=0;a<S;a++){let o=(r(i+1,a)>t?1:0)|(r(i+1,a+1)>t?2:0)|(r(i,a+1)>t?4:0)|(r(i,a)>t?8:0);for(let[r,s]of M[o])n.push([N(r,i,a,e,t),N(s,i,a,e,t)])}return n}function F(e){if(!e.length)return[];let t=1.5,n=e=>`${Math.round(e[0]/t)},${Math.round(e[1]/t)}`,r=new Map;e.forEach((e,t)=>{for(let i of[0,1]){let a=n(e[i]);r.has(a)||r.set(a,[]),r.get(a).push({seg:t,end:i})}});let i=new Uint8Array(e.length),a=[];for(let t=0;t<e.length;t++){if(i[t])continue;let o=[...e[t]];i[t]=1;for(let t=0;t<2;t++)for(;;){let a=t===0?o[o.length-1]:o[0],s=(r.get(n(a))??[]).find(e=>!i[e.seg]);if(!s)break;i[s.seg]=1;let c=e[s.seg][s.end===0?1:0];t===0?o.push(c):o.unshift(c)}o.length>=4&&a.push(o)}return a}function I(e){let t=e.length;if(t<2)return``;let n=`M${e[0][0].toFixed(1)} ${e[0][1].toFixed(1)}`;for(let r=0;r<t-1;r++){let i=e[Math.max(0,r-1)],a=e[r],o=e[r+1],s=e[Math.min(t-1,r+2)],c=a[0]+(o[0]-i[0])/6,l=a[1]+(o[1]-i[1])/6,u=o[0]-(s[0]-a[0])/6,d=o[1]-(s[1]-a[1])/6;n+=` C${c.toFixed(1)} ${l.toFixed(1)},${u.toFixed(1)} ${d.toFixed(1)},${o[0].toFixed(1)} ${o[1].toFixed(1)}`}return n}var L=20;function R(){let e=(0,v.useMemo)(()=>{let e=j(),t=e[0],n=e[0];for(let r=1;r<e.length;r++)e[r]<t&&(t=e[r]),e[r]>n&&(n=e[r]);let r=n-t;return Array.from({length:L},(e,n)=>t+r*(.04+n*.92/(L-1))).map((t,n)=>({paths:F(P(e,t)).map(I).filter(Boolean),li:n}))},[]);return(0,y.jsxs)(`svg`,{className:`absolute inset-0 w-full h-full`,viewBox:`0 0 ${b} ${x}`,preserveAspectRatio:`xMidYMid slice`,"aria-hidden":`true`,children:[(0,y.jsx)(`style`,{children:`
@keyframes topo-breathe {
0%,100% { opacity:.22; }
50% { opacity:.38; }
}
.tl { animation: topo-breathe 18s ease-in-out infinite; }
`}),(0,y.jsx)(`rect`,{width:b,height:x,fill:`#0a0a0a`}),e.map(({paths:e,li:t})=>(0,y.jsx)(`g`,{className:`tl`,style:{animationDelay:`${t*.4}s`},children:e.map((e,t)=>(0,y.jsx)(`path`,{d:e,fill:`none`,stroke:`white`,strokeWidth:`0.85`},t))},t))]})}var z=a.API_GATEWAY.URL;function B(e){if(!e)return``;if(e.startsWith(`http://`)||e.startsWith(`https://`))return e;let t=e.match(/https?:\/\/.*/);return t?t[0]:`${z}${e}`}var V=()=>{let{t:e}=i(),{isAuthenticated:t}=o(),{events:r,loading:a}=l(),[b,x]=(0,v.useState)([]),[S,C]=(0,v.useState)(!0),[w,T]=(0,v.useState)([]),[E,D]=(0,v.useState)(!0);(0,v.useEffect)(()=>{(async()=>{try{C(!0),x([...(await h.listBlogPosts({page:1,page_size:3,status:`published`})).posts].sort((e,t)=>{let n=e=>{if(!e)return 0;if(e.includes(`-`)&&e.length>10){let[t,n]=e.split(` `),[r,i,a]=t.split(`-`),[o=`0`,s=`0`]=(n||`0:0`).split(`:`);return new Date(`${a}-${i}-${r}T${o}:${s}:00`).getTime()}return new Date(e).getTime()};return n(t.created_at)-n(e.created_at)}))}catch{x([])}finally{C(!1)}})()},[]),(0,v.useEffect)(()=>{(async()=>{try{D(!0),T((await g.getAssociations({page:1,page_size:3})).associations||[])}catch{T([])}finally{D(!1)}})()},[]);let O=r.filter(e=>{let t=e.start_date||e.date;if(!t)return!1;let n=u(t);return n?n>=new Date(new Date().setDate(new Date().getDate()-7)):!1}).sort((e,t)=>(u(e.start_date||e.date)?.getTime()??0)-(u(t.start_date||t.date)?.getTime()??0)).slice(0,6),k=b.slice(0,3);return(0,y.jsxs)(`div`,{className:`min-h-screen bg-white`,children:[(0,y.jsx)(_,{...c()}),(0,y.jsxs)(`div`,{className:`relative bg-black text-white overflow-hidden`,children:[(0,y.jsx)(R,{}),(0,y.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-b from-black/40 via-transparent to-black/60`}),(0,y.jsxs)(`div`,{className:`relative z-10 max-w-4xl mx-auto text-center px-4 sm:px-6 py-28 sm:py-36`,children:[(0,y.jsxs)(`span`,{className:`inline-flex items-center gap-2 px-4 py-1.5 mb-8 text-xs font-bold uppercase tracking-widest bg-primary-600/90 text-white rounded-full font-Montserrat border border-primary-400/40 shadow-lg shadow-primary-900/30`,children:[(0,y.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-white animate-pulse`}),e(`home.hero.badge`)]}),(0,y.jsxs)(`h1`,{className:`font-Rajdhani font-bold text-5xl sm:text-6xl lg:text-7xl leading-[1.1] tracking-normal mb-5`,children:[e(`home.hero.title1`),` `,(0,y.jsx)(`span`,{className:`bg-gradient-to-r from-primary-400 to-blue-400 bg-clip-text text-transparent`,children:e(`home.hero.titleHighlight`)}),` `,e(`home.hero.title2`)]}),(0,y.jsxs)(`p`,{className:`text-gray-300 font-Montserrat text-lg sm:text-xl max-w-xl mx-auto leading-relaxed mb-10 font-light tracking-wide`,children:[e(`home.hero.subtitle1`),` `,(0,y.jsx)(`span`,{className:`text-white font-medium`,children:e(`home.hero.subtitle2`)})]}),(0,y.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-3 justify-center items-center`,children:[(0,y.jsxs)(n,{to:`/events`,className:`inline-flex items-center gap-2 px-7 py-3 text-sm font-bold text-white bg-primary-600 hover:bg-primary-700 rounded-xl shadow-lg transition-all duration-200`,children:[(0,y.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z`})}),e(`home.hero.seeGames`)]}),!t&&(0,y.jsxs)(n,{to:`/register`,className:`inline-flex items-center gap-2 px-7 py-3 text-sm font-bold text-white bg-white/15 hover:bg-white/25 border border-white/30 rounded-xl transition-all duration-200 backdrop-blur-sm`,children:[(0,y.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z`})}),e(`home.hero.registerFree`)]})]})]})]}),(0,y.jsx)(`section`,{className:`border-b border-gray-100 bg-gray-50`,children:(0,y.jsxs)(`div`,{className:`max-w-5xl mx-auto px-4 sm:px-6 py-12`,children:[(0,y.jsx)(`h2`,{className:`text-center text-xs font-semibold uppercase tracking-widest text-gray-400 font-Montserrat mb-8`,children:e(`home.howItWorks.title`)}),(0,y.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-6`,children:[{step:`01`,title:e(`home.howItWorks.step1Title`),desc:e(`home.howItWorks.step1Desc`),icon:(0,y.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`})},{step:`02`,title:e(`home.howItWorks.step2Title`),desc:e(`home.howItWorks.step2Desc`),icon:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4`})},{step:`03`,title:e(`home.howItWorks.step3Title`),desc:e(`home.howItWorks.step3Desc`),icon:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`})}].map(({step:e,title:t,desc:n,icon:r})=>(0,y.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 p-6`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-3 mb-3`,children:[(0,y.jsx)(`div`,{className:`w-9 h-9 rounded-lg bg-primary-50 flex items-center justify-center flex-shrink-0`,children:(0,y.jsx)(`svg`,{className:`w-5 h-5 text-primary-600`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:r})}),(0,y.jsx)(`span`,{className:`text-xs font-bold text-gray-300 font-Montserrat`,children:e})]}),(0,y.jsx)(`h3`,{className:`text-sm font-bold text-gray-900 font-Montserrat mb-1.5`,children:t}),(0,y.jsx)(`p`,{className:`text-xs text-gray-500 font-Montserrat leading-relaxed`,children:n})]},e))})]})}),(0,y.jsxs)(`section`,{className:`max-w-7xl mx-auto px-4 sm:px-6 py-14`,children:[(0,y.jsxs)(`div`,{className:`flex items-end justify-between mb-8`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-black text-gray-900 font-LeagueSpartan`,children:e(`home.upcomingGames.title`)}),(0,y.jsx)(`p`,{className:`text-sm text-gray-500 font-Montserrat mt-1`,children:e(`home.upcomingGames.subtitle`)})]}),(0,y.jsxs)(n,{to:`/events`,className:`hidden sm:inline-flex items-center gap-1.5 text-sm font-medium text-primary-600 hover:text-primary-700 transition-colors font-Montserrat`,children:[e(`home.seeAll`),(0,y.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9 5l7 7-7 7`})})]})]}),a?(0,y.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5`,children:[...[,,,]].map((e,t)=>(0,y.jsx)(`div`,{className:`bg-gray-100 rounded-xl h-64 animate-pulse`},t))}):O.length>0?(0,y.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5`,children:O.map(t=>{let r=t.startDate||t.start_date||t.date,i=p(r||``),a=d(r||``),o=t.image_urls||t.imageUrls||[],s=t.location||{address:e(`home.upcomingGames.locationUnknown`),city:``},c=t.price;return(0,y.jsxs)(n,{to:`/event/evenements/${t.id}`,className:`group relative rounded-xl overflow-hidden h-52 flex flex-col justify-end hover:shadow-xl hover:-translate-y-0.5 transition-all duration-200`,children:[(0,y.jsx)(`img`,{src:o.length>0?B(o[0]):`/images/shutterstock_761941054.webp`,alt:t.title,className:`absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-300`,onError:e=>{e.currentTarget.src=`/images/shutterstock_761941054.webp`}}),(0,y.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent`}),(0,y.jsx)(`div`,{className:`absolute top-2 left-2`,children:(0,y.jsx)(`span`,{className:`px-2 py-0.5 bg-green-500 text-white text-xs font-bold rounded-md font-Montserrat`,children:e(`home.upcomingGames.available`)})}),c!=null&&(0,y.jsx)(`div`,{className:`absolute top-2 right-2`,children:(0,y.jsx)(`span`,{className:`px-2 py-0.5 bg-black/60 text-white text-xs font-bold rounded-md backdrop-blur-sm font-Montserrat`,children:m(c)})}),(0,y.jsxs)(`div`,{className:`relative p-4`,children:[(0,y.jsx)(`h3`,{className:`text-sm font-bold text-white font-Montserrat mb-1 line-clamp-1`,children:t.title||e(`home.upcomingGames.titleUnknown`)}),(0,y.jsx)(`div`,{className:`flex items-center gap-3 text-xs text-white/70 font-Montserrat`,children:(0,y.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,y.jsx)(`svg`,{className:`w-3.5 h-3.5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z`})}),a,i?` · ${i}`:``]})}),(0,y.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-white/60 font-Montserrat mt-0.5`,children:[(0,y.jsxs)(`svg`,{className:`w-3.5 h-3.5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z`}),(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M15 11a3 3 0 11-6 0 3 3 0 016 0z`})]}),(0,y.jsx)(`span`,{className:`truncate`,children:s.city||s.address})]})]})]},t.id)})}):(0,y.jsxs)(`div`,{className:`text-center py-16 bg-gray-50 rounded-xl border border-gray-200`,children:[(0,y.jsx)(`svg`,{className:`w-10 h-10 text-gray-300 mx-auto mb-3`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z`})}),(0,y.jsx)(`p`,{className:`text-sm text-gray-500 font-Montserrat`,children:e(`home.upcomingGames.noGames`)})]}),(0,y.jsx)(`div`,{className:`text-center mt-8 sm:hidden`,children:(0,y.jsxs)(n,{to:`/events`,className:`inline-flex items-center gap-1.5 text-sm font-medium text-primary-600 hover:text-primary-700 transition-colors font-Montserrat`,children:[e(`home.upcomingGames.seeAllGames`),(0,y.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9 5l7 7-7 7`})})]})})]}),(E||w.length>0)&&(0,y.jsx)(`section`,{className:`bg-white border-t border-gray-100`,children:(0,y.jsxs)(`div`,{className:`max-w-7xl mx-auto px-4 sm:px-6 py-14`,children:[(0,y.jsxs)(`div`,{className:`flex items-end justify-between mb-8`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-black text-gray-900 font-LeagueSpartan`,children:e(`home.associations.title`)}),(0,y.jsx)(`p`,{className:`text-sm text-gray-500 font-Montserrat mt-1`,children:e(`home.associations.subtitle`)})]}),(0,y.jsxs)(n,{to:`/associations`,className:`hidden sm:inline-flex items-center gap-1.5 text-sm font-medium text-primary-600 hover:text-primary-700 transition-colors font-Montserrat`,children:[e(`home.seeAll`),(0,y.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9 5l7 7-7 7`})})]})]}),E?(0,y.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-5`,children:[...[,,,]].map((e,t)=>(0,y.jsx)(`div`,{className:`bg-gray-200 rounded-xl h-32 animate-pulse`},t))}):(0,y.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-5`,children:w.map(t=>(0,y.jsxs)(n,{to:`/associations/${t.id}`,className:`group flex items-center gap-4 rounded-xl border border-gray-200 bg-white p-5 hover:shadow-lg hover:-translate-y-0.5 transition-all duration-200`,children:[(0,y.jsx)(`div`,{className:`w-14 h-14 rounded-xl flex-shrink-0 overflow-hidden bg-gradient-to-br from-primary-500 to-primary-700 flex items-center justify-center`,children:t.logo_url?(0,y.jsx)(`img`,{src:s(t.logo_url),alt:t.name,className:`w-full h-full object-cover`,onError:e=>{e.currentTarget.style.display=`none`}}):(0,y.jsx)(`span`,{className:`text-lg font-black text-white font-LeagueSpartan`,children:t.name.charAt(0).toUpperCase()})}),(0,y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,y.jsx)(`h3`,{className:`text-sm font-bold text-gray-900 font-Montserrat line-clamp-1 group-hover:text-primary-700 transition-colors`,children:t.name}),t.city&&(0,y.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-gray-500 font-Montserrat mt-1`,children:[(0,y.jsxs)(`svg`,{className:`w-3.5 h-3.5 flex-shrink-0`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z`}),(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M15 11a3 3 0 11-6 0 3 3 0 016 0z`})]}),(0,y.jsx)(`span`,{className:`truncate`,children:t.city})]}),(0,y.jsx)(`p`,{className:`text-xs text-primary-600 font-semibold font-Montserrat mt-1`,children:e(`home.associations.members`,{count:t.member_count})})]})]},t.id))}),(0,y.jsx)(`div`,{className:`text-center mt-8 sm:hidden`,children:(0,y.jsxs)(n,{to:`/associations`,className:`inline-flex items-center gap-1.5 text-sm font-medium text-primary-600 hover:text-primary-700 transition-colors font-Montserrat`,children:[e(`home.seeAll`),(0,y.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9 5l7 7-7 7`})})]})})]})}),(S||k.length>0)&&(0,y.jsx)(`section`,{className:`bg-gray-50 border-t border-gray-100`,children:(0,y.jsxs)(`div`,{className:`max-w-7xl mx-auto px-4 sm:px-6 py-14`,children:[(0,y.jsxs)(`div`,{className:`flex items-end justify-between mb-8`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-black text-gray-900 font-LeagueSpartan`,children:e(`home.blog.title`)}),(0,y.jsx)(`p`,{className:`text-sm text-gray-500 font-Montserrat mt-1`,children:e(`home.blog.subtitle`)})]}),(0,y.jsxs)(n,{to:`/blog`,className:`hidden sm:inline-flex items-center gap-1.5 text-sm font-medium text-primary-600 hover:text-primary-700 transition-colors font-Montserrat`,children:[e(`home.seeAll`),(0,y.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9 5l7 7-7 7`})})]})]}),S?(0,y.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-5`,children:[...[,,,]].map((e,t)=>(0,y.jsx)(`div`,{className:`bg-gray-200 rounded-xl h-48 animate-pulse`},t))}):(0,y.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-5`,children:k.map(e=>(0,y.jsxs)(n,{to:`/blog/${e.slug||e.id}`,className:`group relative rounded-xl overflow-hidden h-52 flex flex-col justify-end hover:shadow-xl hover:-translate-y-0.5 transition-all duration-200 bg-gradient-to-br from-primary-700 to-primary-900`,children:[e.image_url?(0,y.jsx)(`img`,{src:s(e.image_url),alt:e.title,className:`absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-500`,onError:e=>{e.currentTarget.style.display=`none`}}):(0,y.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-br from-primary-700 to-primary-900`}),(0,y.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent`}),(0,y.jsxs)(`div`,{className:`relative p-4`,children:[e.category&&(0,y.jsx)(`span`,{className:`inline-block px-2 py-0.5 bg-white/20 backdrop-blur-sm text-white text-xs font-semibold rounded-md font-Montserrat mb-2 border border-white/20`,children:e.category}),(0,y.jsx)(`h3`,{className:`text-sm font-bold text-white font-Montserrat line-clamp-2 mb-2 leading-snug`,children:e.title}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-white/60 font-Montserrat`,children:[(0,y.jsx)(`span`,{children:f(e.published_at||e.created_at)}),(0,y.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,y.jsx)(`svg`,{className:`w-3.5 h-3.5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})}),e.read_time,` min`]})]})]})]},e.id))})]})}),!t&&(0,y.jsx)(`section`,{className:`bg-primary-600`,children:(0,y.jsxs)(`div`,{className:`max-w-4xl mx-auto px-4 sm:px-6 py-14 text-center`,children:[(0,y.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-black text-white font-LeagueSpartan mb-3`,children:e(`home.cta.title`)}),(0,y.jsx)(`p`,{className:`text-primary-100 font-Montserrat text-sm sm:text-base mb-8 max-w-xl mx-auto`,children:e(`home.cta.subtitle`)}),(0,y.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-3 justify-center`,children:[(0,y.jsx)(n,{to:`/register`,className:`inline-flex items-center justify-center gap-2 px-7 py-3 bg-white text-primary-700 font-bold text-sm rounded-xl hover:bg-gray-50 transition-colors font-Montserrat`,children:e(`home.cta.createAccount`)}),(0,y.jsx)(n,{to:`/events`,className:`inline-flex items-center justify-center gap-2 px-7 py-3 bg-primary-700 text-white font-bold text-sm rounded-xl hover:bg-primary-800 transition-colors font-Montserrat`,children:e(`home.cta.exploreGames`)})]})]})})]})};export{V as default};