<?php 
require_once 'includes/db.php';
require_once 'includes/header.php'; 

$type = isset($_GET['type']) ? $_GET['type'] : 'trust-deed';

$titles = [
    'trust-deed' => 'Trust Deed Registration',
    'niti-ayog' => 'Niti Aayog Darpan',
    '80g' => '80G Certification',
    '12a' => '12A Registration',
    'e-anudan' => 'E-Anudan (NGO Darpan)',
    'ayush-bharat' => 'Ayush Bharat',
    'skill-india' => 'Skill India'
];

$title = isset($titles[$type]) ? $titles[$type] : 'Registration Details';

// Dummy Reg number and descriptions based on type
$reg_number = "BST/" . strtoupper(substr(md5($type), 0, 6)) . "/2026";
$description = "Bhartiya Seva Educational Sangthan Trust is fully recognized and authenticated under the $title guidelines. This accreditation allows us to function efficiently and transparently, adhering to the standard norms established by the Government of India. We are committed to achieving our goals while fulfilling all compliance and reporting requirements under this certificate.";

?>

<div class="container my-5">
    <div class="row">
        <div class="col-12 text-center mb-5">
            <h2 class="section-title text-uppercase"><?php echo h($title); ?></h2>
        </div>
    </div>
    
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card shadow-lg border-0" style="border-radius: 15px;">
                <div class="card-header bg-success text-white text-center py-4" style="border-radius: 15px 15px 0 0;">
                    <i class="fas fa-certificate fa-4x mb-3 text-warning"></i>
                    <h3 class="mb-0">Official Certification</h3>
                </div>
                <div class="card-body p-5">
                    <div class="text-center mb-4">
                        <h5 class="text-muted text-uppercase fw-bold mb-2">Registration Number</h5>
                        <div class="d-inline-block bg-light px-4 py-2 border border-2 border-primary border-dashed rounded text-primary fs-4 fw-bold">
                            <?php echo $reg_number; ?>
                        </div>
                    </div>
                    
                    <hr class="my-4">
                    
                    <h5 class="fw-bold mb-3">About this Registration:</h5>
                    <p class="fs-5 text-secondary lh-lg mb-4">
                        <?php echo $description; ?>
                    </p>

                    <div class="alert alert-info border-info d-flex align-items-center" role="alert">
                        <i class="fas fa-info-circle fa-2x me-3"></i>
                        <div>
                            This document is securely stored in our registry. For verification purposes, authorities may contact our legal cell.
                        </div>
                    </div>
                    
                    <div class="text-center mt-5">
                        <a href="#" onclick="alert('Document download is securely protected. Please login to download.'); return false;" class="btn btn-primary btn-lg px-5 py-3 rounded-pill fw-bold shadow">
                            <i class="fas fa-download me-2"></i> Download Certificate
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<style>
.border-dashed {
    border-style: dashed !important;
}
</style>

<?php require_once 'includes/footer.php'; ?>
