import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gap/gap.dart';
import 'package:tanami_app/core/styles/app_color.dart';
import 'package:tanami_app/core/styles/app_images.dart';
import 'package:tanami_app/core/styles/app_text.dart';
import 'package:tanami_app/shared/components/text_widget.dart';

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

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: AppColor.plainWhite,
        borderRadius: const BorderRadius.all(Radius.circular(20.0)),
        boxShadow: [
          BoxShadow(
            color: Colors.black.withOpacity(0.15),
            spreadRadius: 2,
            blurRadius: 10,
            offset: const Offset(0, 3), // changes position of shadow
          ),
        ],
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Stack(
            children: [
              ClipRRect(
                borderRadius: const BorderRadius.only(
                  topLeft: Radius.circular(20.0),
                  topRight: Radius.circular(20.0),
                ),
                child: Image.asset(
                  'assets/images/academy_screen/bg2.jpg',
                  fit: BoxFit.cover,
                  width: double.infinity,
                  height: 190.h,
                  alignment: Alignment.center,
                ),
              ),
              Positioned(
                bottom: 0.0,
                child: Image.asset(
                  AppImages.academyCardOverlay,
                ),
              ),
              Positioned(
                bottom: 8.0,
                left: 12.0,
                child: Row(
                  children: [
                    Image.asset(
                      AppImages.videoIcon,
                      height: 15.sp,
                    ),
                    Gap(5.w),
                    TextWidget().text12W700(
                      '3 ${AppText.videosTitle}',
                      clr: AppColor.academyCardTextColor,
                    ),
                  ],
                ),
              ),
            ],
          ),
          Padding(
            padding:
                const EdgeInsets.symmetric(horizontal: 16.0, vertical: 20.0),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                TextWidget()
                    .text11W500('Jul / 10 / 2025', clr: AppColor.hintTextColor),
                Gap(12.h),
                TextWidget().text14W400(
                  'Forem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur tempus urna at turpis condimentum lobortis.',
                  clr: Colors.grey,
                  txtAlign: TextAlign.start,
                )
              ],
            ),
          ),
        ],
      ),
    );
  }
}
