<?php
include('include/header.php');
?>
    <style>
        /* Styling for h1 */
       h1 {
    text-align: center;
    padding: 23px 0;
    font-size: 2rem;
    color: #333;
    margin-top: 1px;
}

        /* Base styles for grid */
       .pdf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 30px;
    margin: -8px auto;
    max-width: 1200px;
}

        .pdf-container {
            background-color: #fff;
            padding: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            border-radius: 5px;
            position: relative;
            transition: transform 0.2s ease;
        }

        .pdf-container:hover {
            transform: scale(1.03);
        }

        .pdf-container embed {
            width: 100%;
            height: 200px;
            border-radius: 5px;
        }

        .pdf-title {
            text-align: center;
            margin-top: 10px;
            font-weight: bold;
            color: #333;
        }

        .pdf-title a {
            text-decoration: none;
            color: black;
            transition: color 0.2s ease;
        }

        .pdf-title a:hover {
            color: #0056b3;
        }

        /* Media queries for responsive design */

        /* Large tablets and small desktops */
        @media (max-width: 1024px) {
            .pdf-grid {
                grid-template-columns: repeat(3, 1fr);
            }

            .pdf-container embed {
                height: 180px;
            }
        }

        /* Tablets */
        @media (max-width: 768px) {
            .pdf-grid {
                grid-template-columns: repeat(2, 1fr);
                grid-gap: 20px;
            }

            .pdf-container embed {
                height: 150px;
            }
        }

        /* Small phones */
        @media (max-width: 576px) {
            .pdf-grid {
                grid-template-columns: 1fr;
                grid-gap: 15px;
            }

            .pdf-container {
                margin: 0 auto;
            }

            .pdf-container embed {
                height: 120px;
            }
        }

        /* Hide PDF navigation bar on small screens */
        @media (max-width: 768px) {
            .pdf-container embed {
                overflow: hidden;
            }
        }
    </style>
</head>
<body>

<h1>Certificates</h1>

<div class="pdf-grid">
<?php
// List of PDF URLs and names (can be retrieved from the database)
$pdfs = [
    ['url' => 'pdf/Certificate.pdf', 'name' => 'Certificate of Nonimation'],
    ['url' => 'pdf/Folex Cleaning Products Certificate.pdf', 'name' => 'Folex Cleaning Products Certificate'],
    ['url' => 'pdf/Cleen Tissue Paper Certificate .pdf', 'name' => 'Cleen Tissue Paper Certificate'],
    ['url' => 'pdf/ISO CERTIFICATE SOFT COPY 9001 ASHAPURA.pdf
', 'name' => 'pdf/ISO CERTIFICATE SOFT COPY 9001 ASHAPURA'],
    ['url' => 'pdf/Jb9 Dealer Certifocate.pdf
', 'name' => 'pdf/Jb9 Dealer Certifocate'],
    ['url' => 'pdf/JK Paper Ltd Certificate.pdf', 'name' => 'JK Paper Ltd Certificate'],
    ['url' => 'pdf/Kosher Tissue Benglore.pdf', 'name' => 'Kosher Tissue Benglore'],
    ['url' => 'pdf/Multiline Tissue Products Certificate.pdf', 'name' => 'Multiline Tissue Products Certificate.pdf'],
    ['url' => 'pdf/Music 555 Certificate.pdf
', 'name' => 'pdf/Music 555 Certificate'],
['url' => 'pdf/Mystair Tissue & Hygiene Products Distribitour Certificate.pdf
', 'name' => 'pdf/Mystair Tissue & Hygiene Products Distribitour Certificate'],
['url' => 'pdf/Northan Ped Certificate.pdf
', 'name' => 'pdf/Northan Ped Certificate'],
['url' => 'pdf/Paper Sales Corporation .pdf', 'name' => 'Paper Sales Corporation '],
['url' => 'pdf/Vedant Box File  Register & All Types Ped Dealer Certificate.pdf', 'name' => 'Vedant Box File Register & All Types Ped Dealer Certificate'],
['url' => 'pdf/Pidilite  Certificate Ashapura Agency.pdf', 'name' => 'Pidilite Certificate Ashapura Agency'],
['url' => 'pdf/Shevaran Cleaning Chemical  Distribitour Certificate.pdf', 'name' => 'Shevaran Cleaning Chemical Distribitour Certificate'],
['url' => 'pdf/Sps file & Folder Certificate .pdf', 'name' => 'Sps file & Folder Certificate'],
];
foreach ($pdfs as $pdf) {
    echo '
    <div class="pdf-container">
        <embed src="' . $pdf['url'] . '" type="application/pdf">
        <div class="pdf-title"><a href="' . $pdf['url'] . '" target="_blank">' . $pdf['name'] . '</a></div>
    </div>';
}
?>
</div>

<?php
include('include/footer.php');
?>
