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

$lang = isset($_GET['lang']) ? $_GET['lang'] : 'hindi';
$pdf_file = '';
$title = '';

if ($lang == 'english') {
    $pdf_file = 'assets/RTI Act -2005(English).pdf';
    $title = 'RTI Act - 2005 (English)';
} else {
    $pdf_file = 'assets/RTI Act-2005 (Hindi) (1).pdf';
    $title = 'RTI Act - 2005 (Hindi)';
}
?>

<div class="position-relative" style="background: linear-gradient(135deg, #A20E37 0%, #7b0a28 60%, #FBBC09 100%); padding: 50px 0;">
    <div class="container text-white text-center">
        <h1 class="fw-bold mb-2">Right to Information (RTI)</h1>
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb justify-content-center mb-0">
                <li class="breadcrumb-item"><a href="index.php" class="text-warning">Home</a></li>
                <li class="breadcrumb-item active text-white">RTI</li>
            </ol>
        </nav>
    </div>
</div>

<div class="container my-5">
    <div class="row">
        <div class="col-12 text-center mb-4">
            <div class="d-inline-flex p-1 bg-light rounded-pill shadow-sm mb-4">
                <a href="rti.php?lang=hindi" class="btn rounded-pill px-4 <?php echo $lang == 'hindi' ? 'btn-danger shadow' : 'text-dark'; ?>">Hindi Version</a>
                <a href="rti.php?lang=english" class="btn rounded-pill px-4 <?php echo $lang == 'english' ? 'btn-danger shadow' : 'text-dark'; ?>">English Version</a>
            </div>
            <h3 class="fw-bold" style="color: #A20E37;"><?php echo $title; ?></h3>
        </div>
    </div>
    
    <div class="row">
        <div class="col-md-11 mx-auto">
            <div class="card shadow-lg border-0 overflow-hidden" style="border-radius: 20px; height: 850px; background: #f8fafc; border: 10px solid #fff !important;">
                <iframe src="<?php echo $pdf_file; ?>#toolbar=0" width="100%" height="100%" style="border: none;"></iframe>
            </div>
            <div class="text-center mt-4">
                <a href="<?php echo $pdf_file; ?>" target="_blank" class="btn btn-lg btn-danger px-5 rounded-pill shadow">
                    <i class="fas fa-file-pdf me-2"></i> Open / Download Full PDF
                </a>
            </div>
        </div>
    </div>
</div>

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