<?php
error_reporting(0);
include("admin/common/app_function.php");
include("admin/config.php");
include("header.php");
//index_header($title); 
?>

	<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Job Vacancies</title>
    <style>
       
        .row {
            display: flex;
            flex-wrap: wrap;
            gap: 20px; /* Space between boxes */
        }
        .job-box {
            flex: 1 1 calc(33.33% - 20px); /* 3 boxes per row */
            background-color: #ffffff;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
        }

        .job-box:hover {
            transform: translateY(-5px);
        }

        .job-box h4 {
            color: #333;
            font-size: 18px;
            margin-bottom: 10px;
        }

        .job-box p {
            color: #555;
            margin: 5px 0;
        }

        .salary {
            background-color: #fffae6;
            padding: 10px;
            font-weight: bold;
            font-size: 16px;
            border-radius: 5px;
            color: #d49600;
            display: inline-block;
            margin: 10px 0;
        }

        .apply-btn {
            display: inline-block;
            padding: 10px 20px;
            font-size: 16px;
            color: #ffffff;
            background-color: #28a745;
            border-radius: 5px;
            text-decoration: none;
            text-align: center;
            margin-top: 10px;
            transition: background-color 0.3s ease, transform 0.3s ease;
        }

        .apply-btn:hover {
            background-color: #218838;
            transform: translateY(-2px);
        }

		.read-btn {
            display: inline-block;
            padding: 10px 20px;
            font-size: 16px;
            color: #28a745;
            background-color: #ddd;
            border-radius: 5px;
            text-decoration: none;
            text-align: center;
            margin-top: 10px;
            transition: background-color 0.3s ease, transform 0.3s ease;
        }

        .read-btn:hover {
            background-color: yellow;
            transform: translateY(-2px);
        }
        @media (max-width: 768px) {
            .job-box {
                flex: 1 1 calc(50% - 20px); /* 2 boxes per row for smaller screens */
            }
        }

        @media (max-width: 480px) {
            .job-box {
                flex: 1 1 100%; /* 1 box per row for very small screens */
            }
        }
    </style>
</head>	

		
		<br>	
		<div>
			<div class="container">
			    <h2>JOB VACANCY
				<span style="float:right;font-size:20px;"><a href="apply_job_form.php"><u> APPLY FOR JOB </u></a></span>
				</h2>
				
				<div class="row">
				    
					
					<div class="container">
        <div class="row">
		<div class="job-box" style="padding: 20px; border: 2px solid #007bff; border-radius: 10px; text-align: center; background-color: #f8f9fa; margin-bottom: 20px;">
    <h4 style="margin: 0;">
        <a href="apply_job_form.php" style="
            font-size: 22px;
            color: #007bff;
            font-weight: bold;
            text-decoration: underline;
            animation: blink 1.2s linear infinite;
        ">
            APPLY FOR JOB
        </a>
    </h4>
</div>

<!-- Blinking animation -->
<style>
@keyframes blink {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}
</style>

		<?php
	$query="select * from vacancy order by id desc";
    $result = $conn->query($query);
    while($data=mysqli_fetch_assoc($result)){
		
	?>
            <div class="job-box">
                <h4>Urgent Need <?php echo ucwords($data[job_post]);?></h4>
                <p>Hindustan Security & Intelligence Service<br> <?php echo ucwords($data[job_location]);?></p>
                <p class="salary">₹<?php echo ucwords($data[salary]);?> a <?php echo ucwords($data[salary_typ]);?></p>
                <p> <?php echo stripslashes (substr($data["job_des"],0,100));?>..</p>
                  <a href="apply_now.php?id=<?php echo $data[id];?>&job_name=<?php echo ucwords($data[job_post]);?>" class="apply-btn">Apply Now</a>
				 <a href="more_info.php?id=<?php echo $data[id];?>" class="read-btn">Read more</a>
            </div>
	<?php } ?>		
            
            
        </div>
    </div>
				</div>
				    	
						
				
			</div>
		</div>
		<BR/>
		

		
<?php include("footer.php");?>