import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; // Import screenutil

class IntroBody extends StatelessWidget {
  const IntroBody({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.fromLTRB(40.w, 0, 40.w, 0),
      margin: EdgeInsets.only(top: 156.h),
      child: LayoutBuilder(
        builder: (context, constraints) {
          return FittedBox(
            fit: BoxFit.scaleDown,
            child: Container(
              constraints: BoxConstraints(minWidth: constraints.maxWidth),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                crossAxisAlignment: CrossAxisAlignment.end,
                children: [
                  Column(
                    mainAxisSize: MainAxisSize.min,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: [
                      Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Text(
                            'Right',
                            style: TextStyle(
                              fontSize: 60.sp,
                              fontFamily: 'Ownglyph',
                              color: Colors.white,
                            ),
                          ),
                          Text(
                            'Use for',
                            style: TextStyle(
                              fontSize: 60.sp,
                              fontFamily: 'Ownglyph',
                              color: Colors.white,
                            ),
                          ),
                          Padding(
                            padding: EdgeInsets.only(bottom: 26.h),
                            child: Text(
                              'Pet',
                              style: TextStyle(
                                fontSize: 60.sp,
                                fontFamily: 'Ownglyph',
                                color: Colors.white,
                              ),
                            ),
                          ),
                        ],
                      ),
                      Image.asset(
                        'assets/img/mainball.png',
                        width: 100.w,
                      ), // Added explicit width control
                    ],
                  ),
                  Column(
                    mainAxisSize: MainAxisSize.min,
                    crossAxisAlignment: CrossAxisAlignment.end,
                    children: [
                      Image.asset(
                        'assets/img/maindog.png',
                        width: 150.w,
                      ), // Added explicit width control
                      Opacity(
                        opacity: 0.0,
                        child: Image.asset(
                          'assets/img/mainball.png',
                          width: 100.w,
                        ), // Added explicit width control
                      ),
                    ],
                  ),
                ],
              ),
            ),
          );
        },
      ),
    );
  }
}
