import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';

class HomeCard extends StatelessWidget {
  final String title;
  final VoidCallback onTap;

  const HomeCard({
    super.key,
    required this.title,
    required this.onTap,
  });

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        margin: const EdgeInsets.fromLTRB(0, 0, 20, 0),
        child: ClipRect(
          child: BackdropFilter(
            filter: ImageFilter.blur(
              sigmaX: 7,
              sigmaY: 7,
            ),
            child: Container(
              decoration: BoxDecoration(
                border: Border.all(color: const Color(0xFFFDFDFD)),
                borderRadius: BorderRadius.circular(10),
                color: const Color(0xFF004791),
              ),
              child: Container(
                width: Get.width * 0.4,
                height: Get.height * 0.15,
                padding: const EdgeInsets.fromLTRB(15, 23, 15, 26),
                child: Center(
                  child: Text(
                    title,
                    style: GoogleFonts.getFont(
                      'Roboto',
                      fontWeight: FontWeight.w500,
                      fontSize: 18,
                      height: 1.4,
                      color: const Color(0xFFFFFFFF),
                    ),
                  ),
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
