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

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

  @override
  Widget build(BuildContext context) {
    return Theme(
      data: Theme.of(context).copyWith(
        textTheme: GoogleFonts.poppinsTextTheme(
          Theme.of(context).textTheme,
        ),
      ),
      child: Scaffold(
        backgroundColor: Colors.white,
        body: SafeArea(
          child: Padding(
            padding: const EdgeInsets.symmetric(horizontal: 24),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                const SizedBox(height: 32),

                // ===== JUDUL =====
                Center(
                  child: Text(
                    'M-Posyandu',
                    style: GoogleFonts.poppins(
                      fontSize: 22,
                      fontWeight: FontWeight.w700,
                      letterSpacing: 1,
                    ),
                  ),
                ),

                const SizedBox(height: 24),

                // ===== ILUSTRASI =====
                Center(
                  child: Image.asset(
                    'assets/images/logoo.webp',
                    height: 230,
                    fit: BoxFit.contain,
                  ),
                ),

                const SizedBox(height: 35),

                // ===== HEADER =====
                Row(
                  mainAxisSize: MainAxisSize.min,
                  children: [
                    Text(
                      'Selamat Datang di M-Posyandu',
                      style: GoogleFonts.poppins(
                        fontSize: 18,
                        fontWeight: FontWeight.w600,
                      ),
                    ),
                    const SizedBox(width: 6),
                    const Icon(
                      Icons.favorite,
                      color: Colors.blue,
                      size: 20,
                    ),
                  ],
                ),

                const SizedBox(height: 6),

                // ===== DESKRIPSI =====
                Text(
                  'Bersama M-Posyandu mari pantau kesehatan dan tumbuh kembang anak serta '
                  'kelola jadwal posyandu dalam satu genggaman',
                  style: GoogleFonts.nunito(
                    fontSize: 12,
                    color: const Color.fromARGB(255, 109, 108, 108),
                    height: 1.4,
                  ),
                ),

                const SizedBox(height: 60),

                // ===== BUTTON LANJUT =====
                SizedBox(
                  width: double.infinity,
                  height: 50,
                  child: ElevatedButton(
                    onPressed: () {
                      Navigator.pushNamed(context, '/login');
                    },
                    style: ElevatedButton.styleFrom(
                      elevation: 3,
                      backgroundColor: const Color.fromARGB(255, 19, 133, 226),
                      shape: RoundedRectangleBorder(
                        borderRadius: BorderRadius.circular(14),
                      ),
                    ),
                    child: Text(
                      'Lanjut',
                      style: GoogleFonts.poppins(
                        color: Colors.white,
                        fontSize: 16,
                        fontWeight: FontWeight.w700,
                      ),
                    ),
                  ),
                ),

                const SizedBox(height: 30),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
