<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Professional Image Assets Test</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
    <style>
        body { background: #f8f9fa; padding: 20px; font-family: Arial, sans-serif; }
        .test-container { max-width: 1200px; margin: 0 auto; }
        .image-card { 
            background: white; 
            border: 1px solid #ddd; 
            border-radius: 8px; 
            padding: 15px; 
            margin: 10px; 
            text-align: center;
            min-height: 200px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .image-card img { 
            max-width: 100%; 
            max-height: 150px; 
            object-fit: contain;
            margin-bottom: 10px;
        }
        .image-card h6 { font-weight: bold; color: #333; margin-bottom: 5px; }
        .image-card .path { font-size: 12px; color: #666; word-break: break-all; }
        .status-success { border-left: 4px solid #28a745; }
        .status-error { border-left: 4px solid #dc3545; }
    </style>
</head>
<body>
    <div class="test-container">
        <h2 class="mb-4 text-center">🖼️ Professional Image Assets Test</h2>
        <p class="text-center text-muted">Verifying that all professional images from certifiicate.in are properly copied</p>
        
        <div class="row">
            <?php
            $images = [
                'ashoka_emblem.png' => 'Ashoka Emblem',
                'mcd_logo.png' => 'MCD Logo', 
                'state1.png' => 'Delhi State Symbol',
                'mcd_watermark.png' => 'MCD Watermark',
                'header_text.png' => 'Professional Header Text',
                'header_band.png' => 'Header Band',
                'Form upar.png' => 'Form Header'
            ];
            
            foreach($images as $file => $name) {
                $path = 'assets/images/' . $file;
                $exists = file_exists($path);
                $statusClass = $exists ? 'status-success' : 'status-error';
                $statusIcon = $exists ? '✅' : '❌';
                $statusText = $exists ? 'Available' : 'Missing';
                
                echo '<div class="col-md-4 col-lg-3">';
                echo '<div class="image-card ' . $statusClass . '">';
                echo '<h6>' . $statusIcon . ' ' . $name . '</h6>';
                
                if($exists) {
                    echo '<img src="' . $path . '" alt="' . $name . '">';
                } else {
                    echo '<div style="height: 100px; background: #f0f0f0; border: 2px dashed #ccc; display: flex; align-items: center; justify-content: center; color: #999;">Image Missing</div>';
                }
                
                echo '<div class="path">' . $path . '</div>';
                echo '<small class="' . ($exists ? 'text-success' : 'text-danger') . '">' . $statusText . '</small>';
                echo '</div>';
                echo '</div>';
            }
            ?>
        </div>
        
        <h4 class="mt-5 mb-3">📝 Hindi Label Images</h4>
        <div class="row">
            <?php
            $hindiImages = [
                'form_no.png' => 'Form Number',
                'rashtiya.png' => 'Rashtiya Text', 
                'delhi_nagar.png' => 'Delhi Nagar Text',
                'birth_cert.png' => 'Birth Certificate',
                'label_name.png' => 'Name Label',
                'label_dob.png' => 'DOB Label',
                'label_father.png' => 'Father Label',
                'label_mother.png' => 'Mother Label',
                'footer_hindi.png' => 'Footer Hindi'
            ];
            
            foreach($hindiImages as $file => $name) {
                $path = 'assets/images/hindi/' . $file;
                $exists = file_exists($path);
                $statusClass = $exists ? 'status-success' : 'status-error';
                $statusIcon = $exists ? '✅' : '❌';
                $statusText = $exists ? 'Available' : 'Missing';
                
                echo '<div class="col-md-4 col-lg-3">';
                echo '<div class="image-card ' . $statusClass . '" style="min-height: 150px;">';
                echo '<h6 style="font-size: 14px;">' . $statusIcon . ' ' . $name . '</h6>';
                
                if($exists) {
                    echo '<img src="' . $path . '" alt="' . $name . '" style="max-height: 80px;">';
                } else {
                    echo '<div style="height: 60px; background: #f0f0f0; border: 2px dashed #ccc; display: flex; align-items: center; justify-content: center; color: #999; font-size: 12px;">Missing</div>';
                }
                
                echo '<div class="path" style="font-size: 10px;">' . $path . '</div>';
                echo '<small class="' . ($exists ? 'text-success' : 'text-danger') . '">' . $statusText . '</small>';
                echo '</div>';
                echo '</div>';
            }
            ?>
        </div>
        
        <div class="alert alert-info mt-4">
            <h5>📋 Next Steps:</h5>
            <ol>
                <li><strong>If images show Missing (❌):</strong> The assets weren't copied correctly</li>
                <li><strong>If images show Available (✅):</strong> Your PDF generation should now look professional</li>
                <li><strong>Test Certificate Generation:</strong> Generate a PDF from CRS or HHHHH system to see the improved layout</li>
                <li><strong>Compare with Reference:</strong> The generated PDF should now match the professional certificate image you showed</li>
            </ol>
        </div>
        
        <div class="text-center mt-4">
            <a href="test_verification.php" class="btn btn-primary mr-2">🔍 Test Verification System</a>
            <a href="crs/dehli_birth_list.php" class="btn btn-success mr-2">📋 CRS Certificate List</a>
            <a href="HHHHH/user_dashboard.php" class="btn btn-info">🏠 HHHHH Dashboard</a>
        </div>
    </div>
</body>
</html>