<?= $this->extend('layout/default') ?>

<?= $this->section('content') ?>
<div class="container-fluid px-4">
    <h1 class="mt-4"><?= $title ?></h1>
    <ol class="breadcrumb mb-4">
        <li class="breadcrumb-item"><a href="<?= base_url('admin/slider') ?>">Slider</a></li>
        <li class="breadcrumb-item active">Tambah Baru</li>
    </ol>

    <div class="card mb-4 col-lg-8 shadow border-0">
        <div class="card-body">
            <form action="<?= base_url('admin/slider/simpan') ?>" method="post" enctype="multipart/form-data">
                <?= csrf_field() ?>

                <div class="mb-3">
                    <label class="form-label fw-bold">Judul Slider (Muncul Besar)</label>
                    <input type="text" name="judul" class="form-control" placeholder="Contoh: Selamat Datang di SMKN 1 Sukalarang" required>
                </div>

                <div class="mb-3">
                    <label class="form-label fw-bold">Deskripsi / Slogan (Muncul Kecil)</label>
                    <textarea name="deskripsi" class="form-control" rows="2" placeholder="Contoh: Mewujudkan generasi yang Cageur, Bageur..."></textarea>
                </div>

                <div class="mb-4">
                    <label class="form-label fw-bold">Pilih Foto Slider</label>
                    <input type="file" name="foto" class="form-control" accept="image/*" required>
                    <div class="mt-2 small text-muted">
                        * Disarankan ukuran landscape (misal: 1920x800 px) agar tidak terpotong.
                    </div>
                </div>

                <div class="d-flex justify-content-end">
                    <a href="<?= base_url('admin/slider') ?>" class="btn btn-secondary me-2">Batal</a>
                    <button type="submit" class="btn btn-success px-4">Simpan Slider</button>
                </div>
            </form>
        </div>
    </div>
</div>
<?= $this->endSection() ?>