@@ -19,6 +19,7 @@ const Try: React.FC = () => {
1919 const [ isDragging , setIsDragging ] = useState ( false ) ;
2020 const [ currentActivity , setCurrentActivity ] = useState ( 0 ) ;
2121 const carouselRef = useRef < HTMLDivElement > ( null ) ;
22+ const activityCarouselRef = useRef < HTMLDivElement > ( null ) ;
2223
2324 const handleSwipe = (
2425 direction : 'next' | 'prev' ,
@@ -65,11 +66,14 @@ const Try: React.FC = () => {
6566 animate = "visible"
6667 variants = { fadeIn }
6768 >
68- < motion . main className = "flex-grow bg-[#F6DEC9] p-4 md:p-16" >
69- < div className = "max-w-6xl mx-auto space-y-8" >
70- < motion . header className = "space-y-6" variants = { staggerContainer } >
69+ < motion . main className = "flex-grow bg-[#F6DEC9] px-3 sm:px-4 md:px-8 lg:px-16 py-6 sm:py-8 md:py-12 lg:py-16" >
70+ < div className = "max-w-6xl mx-auto space-y-6 sm:space-y-8" >
71+ < motion . header
72+ className = "space-y-3 sm:space-y-4 md:space-y-6"
73+ variants = { staggerContainer }
74+ >
7175 < motion . h1
72- className = "text-5xl md :text-7xl font-bold flex flex-col sm:flex-row items-start sm:items-center"
76+ className = "text-3xl sm:text-4xl md:text-5xl lg :text-7xl font-bold flex flex-col sm:flex-row items-start sm:items-center"
7377 variants = { headerReveal }
7478 >
7579 < motion . span
@@ -79,21 +83,27 @@ const Try: React.FC = () => {
7983 EXPERIENCE
8084 </ motion . span >
8185 < motion . span
82- className = "text-black sm:ml-2 mt-2 sm:mt-0"
86+ className = "text-black sm:ml-2 mt-1 sm:mt-0"
8387 variants = { slideInRight }
8488 >
8589 SUGAR
8690 </ motion . span >
8791 </ motion . h1 >
88- < motion . div className = "space-y-4" variants = { subtleRise } >
92+ < motion . div
93+ className = "space-y-2 sm:space-y-3 md:space-y-4"
94+ variants = { subtleRise }
95+ >
8996 < motion . p
90- className = "text-[#975555] text-2xl md:text-4xl font-bold leading-tight"
97+ className = "text-[#975555] text-xl sm:text- 2xl md:text-3xl lg :text-4xl font-bold leading-tight"
9198 variants = { fadeIn }
9299 >
93100 "Our educational tools can be experienced in a number of ways.
94101 Try the ones that are best for you!"
95102 </ motion . p >
96- < motion . i className = "text-xs text-gray-700" variants = { fadeIn } >
103+ < motion . i
104+ className = "text-xs md:text-sm text-gray-700 block"
105+ variants = { fadeIn }
106+ >
97107 Whether you enjoy hands-on activities, visual learning, or
98108 interactive coding, there's something for everyone. Explore
99109 creative tools, enhance your problem-solving skills, and make
@@ -103,15 +113,15 @@ const Try: React.FC = () => {
103113 </ motion . header >
104114
105115 { /* Desktop Grid */ }
106- < div className = "hidden md:grid md:grid-cols-3 gap-8" >
116+ < div className = "hidden md:grid md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-6 lg: gap-8" >
107117 { TryCardData . map ( ( card , index ) => (
108118 < TryCard key = { index } { ...card } />
109119 ) ) }
110120 </ div >
111121
112122 { /* Mobile Carousel */ }
113- < div className = "md:hidden ml-[-1rem] mr-[-1rem] " >
114- < div className = "relative px-4" >
123+ < div className = "md:hidden -mx-3 sm:-mx-2 " >
124+ < div className = "relative px-3 sm:px- 4" >
115125 < div
116126 ref = { carouselRef }
117127 className = "overflow-hidden touch-pan-x"
@@ -147,17 +157,17 @@ const Try: React.FC = () => {
147157 </ div >
148158 </ div >
149159
150- { /* Navigation Buttons */ }
151- < div className = "absolute top-1/2 -translate-y-1/2 left-0 right-0 flex justify-between pointer-events-none" >
160+ { /* Navigation Buttons - Positioned to avoid overlap with content */ }
161+ < div className = "absolute top-1/2 -translate-y-1/2 left-1 right-1 flex justify-between pointer-events-none" >
152162 < button
153163 onClick = { ( ) =>
154164 handleSwipe ( 'prev' , setCurrentCard , TryCardData . length )
155165 }
156- className = "pointer-events-auto p-3 bg-white/80 text-[#975555] rounded-full shadow-lg hover:bg-white transition-all"
166+ className = "pointer-events-auto p-2 sm:p- 3 bg-white/80 text-[#975555] rounded-full shadow-lg hover:bg-white transition-all"
157167 aria-label = "Previous"
158168 >
159169 < svg
160- className = "w-6 h-6"
170+ className = "w-4 h-4 sm:w-5 sm:h-5 md:w-6 md: h-6"
161171 fill = "none"
162172 stroke = "currentColor"
163173 viewBox = "0 0 24 24"
@@ -174,11 +184,11 @@ const Try: React.FC = () => {
174184 onClick = { ( ) =>
175185 handleSwipe ( 'next' , setCurrentCard , TryCardData . length )
176186 }
177- className = "pointer-events-auto p-3 bg-white/80 text-[#975555] rounded-full shadow-lg hover:bg-white transition-all"
187+ className = "pointer-events-auto p-2 sm:p- 3 bg-white/80 text-[#975555] rounded-full shadow-lg hover:bg-white transition-all"
178188 aria-label = "Next"
179189 >
180190 < svg
181- className = "w-6 h-6"
191+ className = "w-4 h-4 sm:w-5 sm:h-5 md:w-6 md: h-6"
182192 fill = "none"
183193 stroke = "currentColor"
184194 viewBox = "0 0 24 24"
@@ -195,14 +205,14 @@ const Try: React.FC = () => {
195205 </ div >
196206
197207 { /* Dots Indicator */ }
198- < div className = "flex justify-center space-x-2 mt-6" >
208+ < div className = "flex justify-center space-x-1 sm:space-x-2 mt-4 sm: mt-6" >
199209 { TryCardData . map ( ( _ , index ) => (
200210 < button
201211 key = { index }
202212 onClick = { ( ) => setCurrentCard ( index ) }
203- className = { `w-2.5 h-2.5 rounded-full transition-all duration-300 ${
213+ className = { `w-2 h-2 sm:w-2 .5 sm: h-2.5 rounded-full transition-all duration-300 ${
204214 currentCard === index
205- ? 'bg-[#975555] w-6'
215+ ? 'bg-[#975555] w-4 sm:w- 6'
206216 : 'bg-[#975555]/30'
207217 } `}
208218 aria-label = { `Go to slide ${ index + 1 } ` }
@@ -213,15 +223,18 @@ const Try: React.FC = () => {
213223 </ div >
214224
215225 < motion . div
216- className = "max-w-6xl mx-auto space-y-8 mt-16"
226+ className = "max-w-6xl mx-auto space-y-6 sm:space-y-8 mt-12 sm:mt-14 md: mt-16"
217227 initial = "hidden"
218228 whileInView = "visible"
219229 viewport = { { once : true , amount : 0.1 } }
220230 variants = { slideInBottom }
221231 >
222- < motion . header className = "space-y-6" variants = { staggerContainer } >
232+ < motion . header
233+ className = "space-y-3 sm:space-y-4 md:space-y-6"
234+ variants = { staggerContainer }
235+ >
223236 < motion . h1
224- className = "text-5xl md :text-7xl font-bold flex flex-col sm:flex-row items-start sm:items-center"
237+ className = "text-3xl sm:text-4xl md:text-5xl lg :text-7xl font-bold flex flex-col sm:flex-row items-start sm:items-center"
225238 variants = { headerReveal }
226239 >
227240 < motion . span
@@ -231,20 +244,26 @@ const Try: React.FC = () => {
231244 ALREADY USING
232245 </ motion . span >
233246 < motion . span
234- className = "text-black sm:ml-2 mt-2 sm:mt-0"
247+ className = "text-black sm:ml-2 mt-1 sm:mt-0"
235248 variants = { slideInRight }
236249 >
237250 SUGAR?
238251 </ motion . span >
239252 </ motion . h1 >
240- < motion . div className = "space-y-4" variants = { subtleRise } >
253+ < motion . div
254+ className = "space-y-2 sm:space-y-3 md:space-y-4"
255+ variants = { subtleRise }
256+ >
241257 < motion . p
242- className = "text-[#975555] text-2xl md:text-4xl font-bold leading-tight"
258+ className = "text-[#975555] text-xl sm:text- 2xl md:text-3xl lg :text-4xl font-bold leading-tight"
243259 variants = { fadeIn }
244260 >
245261 "We have many activities for you!"
246262 </ motion . p >
247- < motion . i className = "text-xs text-gray-700" variants = { fadeIn } >
263+ < motion . i
264+ className = "text-xs md:text-sm text-gray-700 block"
265+ variants = { fadeIn }
266+ >
248267 The Sugar Learning platform is a complete environment for
249268 teaching and learning, which includes individual activities. If
250269 you're already using the Sugar Desktop Environment, then you can
@@ -255,17 +274,17 @@ const Try: React.FC = () => {
255274 </ motion . header >
256275
257276 { /* Desktop Grid */ }
258- < div className = "hidden md:grid md:grid-cols-3 gap-8" >
277+ < div className = "hidden md:grid md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-6 lg: gap-8" >
259278 { Activities . map ( ( activity , index ) => (
260279 < ActivityCard key = { index } { ...activity } />
261280 ) ) }
262281 </ div >
263282
264283 { /* Mobile Carousel */ }
265- < div className = "md:hidden ml-[-1rem] mr-[-1rem] " >
266- < div className = "relative px-4" >
284+ < div className = "md:hidden -mx-3 sm:-mx-2 " >
285+ < div className = "relative px-3 sm:px- 4" >
267286 < div
268- ref = { carouselRef }
287+ ref = { activityCarouselRef }
269288 className = "overflow-hidden touch-pan-x"
270289 onTouchStart = { handleTouchStart }
271290 onTouchMove = { handleTouchMove }
@@ -300,16 +319,16 @@ const Try: React.FC = () => {
300319 </ div >
301320
302321 { /* Navigation Buttons */ }
303- < div className = "absolute top-1/2 -translate-y-1/2 left-0 right-0 flex justify-between pointer-events-none" >
322+ < div className = "absolute top-1/2 -translate-y-1/2 left-1 right-1 flex justify-between pointer-events-none" >
304323 < button
305324 onClick = { ( ) =>
306325 handleSwipe ( 'prev' , setCurrentActivity , Activities . length )
307326 }
308- className = "pointer-events-auto p-3 bg-white/80 text-[#975555] rounded-full shadow-lg hover:bg-white transition-all"
327+ className = "pointer-events-auto p-2 sm:p- 3 bg-white/80 text-[#975555] rounded-full shadow-lg hover:bg-white transition-all"
309328 aria-label = "Previous"
310329 >
311330 < svg
312- className = "w-6 h-6"
331+ className = "w-4 h-4 sm:w-5 sm:h-5 md:w-6 md: h-6"
313332 fill = "none"
314333 stroke = "currentColor"
315334 viewBox = "0 0 24 24"
@@ -326,11 +345,11 @@ const Try: React.FC = () => {
326345 onClick = { ( ) =>
327346 handleSwipe ( 'next' , setCurrentActivity , Activities . length )
328347 }
329- className = "pointer-events-auto p-3 bg-white/80 text-[#975555] rounded-full shadow-lg hover:bg-white transition-all"
348+ className = "pointer-events-auto p-2 sm:p- 3 bg-white/80 text-[#975555] rounded-full shadow-lg hover:bg-white transition-all"
330349 aria-label = "Next"
331350 >
332351 < svg
333- className = "w-6 h-6"
352+ className = "w-4 h-4 sm:w-5 sm:h-5 md:w-6 md: h-6"
334353 fill = "none"
335354 stroke = "currentColor"
336355 viewBox = "0 0 24 24"
@@ -347,14 +366,14 @@ const Try: React.FC = () => {
347366 </ div >
348367
349368 { /* Dots Indicator */ }
350- < div className = "flex justify-center space-x-2 mt-6" >
369+ < div className = "flex justify-center space-x-1 sm:space-x-2 mt-4 sm: mt-6" >
351370 { Activities . map ( ( _ , index ) => (
352371 < button
353372 key = { index }
354373 onClick = { ( ) => setCurrentActivity ( index ) }
355- className = { `w-2.5 h-2.5 rounded-full transition-all duration-300 ${
374+ className = { `w-2 h-2 sm:w-2 .5 sm: h-2.5 rounded-full transition-all duration-300 ${
356375 currentActivity === index
357- ? 'bg-[#975555] w-6'
376+ ? 'bg-[#975555] w-4 sm:w- 6'
358377 : 'bg-[#975555]/30'
359378 } `}
360379 aria-label = { `Go to slide ${ index + 1 } ` }
0 commit comments