11import Link from "next/link" ;
2+ import Image from "next/image" ;
23import { type Post } from "@/interfaces/post" ;
34import { Card , CardContent , CardFooter } from "@/components/ui/card" ;
45import { Avatar , AvatarFallback , AvatarImage } from "@/components/ui/avatar" ;
@@ -16,67 +17,76 @@ export function BlogCard({ post, className }: Props) {
1617 return (
1718 < Card
1819 className = { cn (
19- "group flex flex-col h-full overflow-hidden border-border/50 bg-card transition-all hover:shadow-lg hover:border- border" ,
20- className
20+ "group flex flex-col h-full overflow-hidden border-primary/10 bg-muted/30 backdrop-blur-md transition-all duration-500 hover:shadow-2xl hover:shadow-primary/5 hover: border-primary/30 hover:-translate-y-1 py-0 gap-0 " ,
21+ className ,
2122 ) }
2223 >
23- { /* Image Container - Switched from CardHeader to plain div to guarantee 0 padding */ }
24- < div className = "w-full relative" >
24+ { /* Image Container */ }
25+ < div className = "w-full relative overflow-hidden " >
2526 < Link
2627 href = { `/notas/${ post . slug } ` }
27- className = "block overflow-hidden active:scale-95 transition-transform duration-200"
28+ className = "block active:scale-95 transition-transform duration-200"
2829 >
29- < div className = "relative aspect-video w-full overflow-hidden bg-muted" >
30- { /* bg-muted acts as placeholder if transparency exists */ }
31- < img
30+ < div className = "relative aspect-video w-full overflow-hidden bg-muted/20" >
31+ < Image
3232 src = { post . coverImage }
3333 alt = { `Cover for ${ post . title } ` }
34- className = "absolute inset-0 w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
34+ fill
35+ className = "object-cover transition-transform duration-700 ease-out group-hover:scale-110"
36+ sizes = "(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
3537 />
38+ < div className = "absolute inset-0 bg-linear-to-t from-background/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500" />
3639 </ div >
3740 </ Link >
3841 </ div >
3942
40- < CardContent className = "flex-1 p-6" >
41- < div className = "flex items-center gap-2 text-sm text-muted-foreground mb-3 " >
42- < Calendar className = "w-4 h-4 " />
43+ < CardContent className = "flex-1 p-6 space-y-3 " >
44+ < div className = "flex items-center gap-2 text-xs font-medium text-primary/80 uppercase tracking-wider " >
45+ < Calendar className = "w-3.5 h-3.5 " />
4346 < DateFormatter dateString = { post . date } />
4447 </ div >
4548 < Link
4649 href = { `/notas/${ post . slug } ` }
47- className = "block group-hover:text-primary transition-colors "
50+ className = "block group/title "
4851 >
49- < h3 className = "text-xl font-bold leading-tight mb-2 line-clamp-2" >
52+ < h3 className = "text-xl font-bold leading-tight group-hover/title:text-primary transition-colors duration-300 line-clamp-2" >
5053 { post . title }
5154 </ h3 >
5255 </ Link >
53- < p className = "text-muted-foreground text-sm line-clamp-3 leading-relaxed" >
56+ < p className = "text-muted-foreground text-sm line-clamp-3 leading-relaxed opacity-80 group-hover:opacity-100 transition-opacity duration-300 " >
5457 { post . excerpt }
5558 </ p >
5659 </ CardContent >
60+
5761 < CardFooter className = "p-6 pt-0 flex items-center justify-between mt-auto" >
58- < div className = "flex items-center gap-2 " >
59- < Avatar className = "w-8 h-8 border" >
62+ < div className = "flex items-center gap-3 " >
63+ < Avatar className = "w-9 h-9 border-2 border-primary/10 transition-transform duration-300 group-hover:scale-110 " >
6064 < AvatarImage
6165 src = { post . author . picture }
6266 alt = { post . author . name }
6367 />
64- < AvatarFallback > { post . author . name [ 0 ] } </ AvatarFallback >
68+ < AvatarFallback className = "bg-primary/5 text-primary" >
69+ { post . author . name [ 0 ] }
70+ </ AvatarFallback >
6571 </ Avatar >
66- < span className = "text-sm font-medium opacity-80" >
67- { post . author . name }
68- </ span >
72+ < div className = "flex flex-col" >
73+ < span className = "text-sm font-semibold leading-none mb-1" >
74+ { post . author . name }
75+ </ span >
76+ < span className = "text-[10px] text-muted-foreground uppercase tracking-tighter" >
77+ Autor
78+ </ span >
79+ </ div >
6980 </ div >
7081
7182 < Button
7283 variant = "ghost"
7384 size = "sm"
74- className = "gap-1 px-4 hover:bg-primary hover:text-white transition-all duration-300 group/btn"
85+ className = "h-9 w-9 p-0 rounded-full hover:bg-primary hover:text-white transition-all duration-300 group/btn"
7586 asChild
7687 >
77- < Link href = { `/notas/${ post . slug } ` } >
78- Leer más{ " " }
79- < ArrowRight className = "w-4 h-4 transition-transform duration-300 group-hover/btn:translate-x-1" />
88+ < Link href = { `/notas/${ post . slug } ` } aria-label = "Leer más" >
89+ < ArrowRight className = "w-5 h-5 transition-transform duration-300 group-hover/btn:translate-x-0.5" />
8090 </ Link >
8191 </ Button >
8292 </ CardFooter >
0 commit comments