@@ -5,6 +5,7 @@ import { BlurImage } from "@/components/ui/blur-image";
55import { MapPin , Coffee , Utensils , Wifi , Bus , Bike , Shield } from "lucide-react" ;
66import { GradientBlob } from "@/components/ui/GradientBlob" ;
77import { PageSegue } from "@/components/ui/PageSegue" ;
8+ import Carousel from "@/components/ui/Carousel" ;
89
910import dormImg1 from "@/public/images/uni/IMG_20251103_130246 (1).webp" ;
1011import dormImg2 from "@/public/images/uni/IMG_20251109_094544.webp" ;
@@ -147,8 +148,10 @@ export default function CampusLifePage() {
147148 < div className = "space-y-16" >
148149 { /* New Building */ }
149150 < div >
150- < h3 className = "text-2xl font-display font-bold mb-8 text-primary" > New Building (Bohou)</ h3 >
151- < div className = "grid md:grid-cols-3 gap-8" >
151+ < h3 className = "text-xl md:text-2xl font-display font-bold mb-4 md:mb-8 text-primary" > New Building (Bohou)</ h3 >
152+
153+ { /* Desktop Grid */ }
154+ < div className = "hidden md:grid md:grid-cols-3 gap-8" >
152155 { newDorms . map ( ( dorm , idx ) => (
153156 < motion . div
154157 key = { idx }
@@ -169,7 +172,39 @@ export default function CampusLifePage() {
169172 < ul className = "space-y-2" >
170173 { dorm . features . map ( ( feature , i ) => (
171174 < li key = { i } className = "flex items-center gap-2 text-sm text-muted-foreground" >
172- < div className = "w-1.5 h-1.5 rounded-full bg-primary" />
175+ < div className = "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0" />
176+ { feature }
177+ </ li >
178+ ) ) }
179+ </ ul >
180+ </ div >
181+ </ motion . div >
182+ ) ) }
183+ </ div >
184+
185+ { /* Mobile - centered card matching carousel width */ }
186+ < div className = "md:hidden flex justify-center" >
187+ { newDorms . map ( ( dorm , idx ) => (
188+ < motion . div
189+ key = { idx }
190+ initial = { { opacity : 0 , y : 20 } }
191+ whileInView = { { opacity : 1 , y : 0 } }
192+ viewport = { { once : true , margin : "-100px" } }
193+ transition = { { delay : idx * 0.1 } }
194+ className = "bg-white rounded-2xl overflow-hidden shadow-sm border border-border w-[288px]"
195+ >
196+ < div className = "h-44 overflow-hidden relative" >
197+ < BlurImage src = { dorm . image } alt = { dorm . title } placeholder = "blur" className = "w-full h-full object-cover" />
198+ < div className = "absolute bottom-3 right-3 bg-black/70 backdrop-blur-md text-white px-2.5 py-0.5 rounded-full text-xs font-medium z-10" >
199+ { dorm . price }
200+ </ div >
201+ </ div >
202+ < div className = "p-4" >
203+ < h3 className = "text-base font-bold mb-3" > { dorm . title } </ h3 >
204+ < ul className = "space-y-1.5" >
205+ { dorm . features . map ( ( feature , i ) => (
206+ < li key = { i } className = "flex items-center gap-2 text-xs text-muted-foreground" >
207+ < div className = "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0" />
173208 { feature }
174209 </ li >
175210 ) ) }
@@ -182,8 +217,10 @@ export default function CampusLifePage() {
182217
183218 { /* Old Building */ }
184219 < div >
185- < h3 className = "text-2xl font-display font-bold mb-8 text-primary" > Old Building (International Students Dorm)</ h3 >
186- < div className = "grid md:grid-cols-3 gap-8" >
220+ < h3 className = "text-xl md:text-2xl font-display font-bold mb-4 md:mb-8 text-primary" > Old Building (International Students Dorm)</ h3 >
221+
222+ { /* Desktop Grid */ }
223+ < div className = "hidden md:grid md:grid-cols-3 gap-8" >
187224 { oldDorms . map ( ( dorm , idx ) => (
188225 < motion . div
189226 key = { idx }
@@ -204,7 +241,7 @@ export default function CampusLifePage() {
204241 < ul className = "space-y-2" >
205242 { dorm . features . map ( ( feature , i ) => (
206243 < li key = { i } className = "flex items-center gap-2 text-sm text-muted-foreground" >
207- < div className = "w-1.5 h-1.5 rounded-full bg-primary" />
244+ < div className = "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0 " />
208245 { feature }
209246 </ li >
210247 ) ) }
@@ -213,6 +250,33 @@ export default function CampusLifePage() {
213250 </ motion . div >
214251 ) ) }
215252 </ div >
253+
254+ { /* Mobile Carousel */ }
255+ < div className = "md:hidden flex justify-center" >
256+ < Carousel baseWidth = { 320 } loop >
257+ { oldDorms . map ( ( dorm , idx ) => (
258+ < div key = { idx } className = "bg-white rounded-2xl overflow-hidden shadow-sm border border-border h-full" >
259+ < div className = "h-44 overflow-hidden relative" >
260+ < BlurImage src = { dorm . image } alt = { dorm . title } placeholder = "blur" className = "w-full h-full object-cover" />
261+ < div className = "absolute bottom-3 right-3 bg-black/70 backdrop-blur-md text-white px-2.5 py-0.5 rounded-full text-xs font-medium z-10" >
262+ { dorm . price }
263+ </ div >
264+ </ div >
265+ < div className = "p-4" >
266+ < h3 className = "text-base font-bold mb-3" > { dorm . title } </ h3 >
267+ < ul className = "space-y-1.5" >
268+ { dorm . features . map ( ( feature , i ) => (
269+ < li key = { i } className = "flex items-center gap-2 text-xs text-muted-foreground" >
270+ < div className = "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0" />
271+ { feature }
272+ </ li >
273+ ) ) }
274+ </ ul >
275+ </ div >
276+ </ div >
277+ ) ) }
278+ </ Carousel >
279+ </ div >
216280 </ div >
217281 </ div >
218282 </ div >
0 commit comments