body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff; /* White background */
    color: #333;
}

.container {
    width: 90%;
    margin: auto;
    max-width: 1000px;
    padding: 50px 0;
}

.search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.search-bar input {
    width: 50%;
    padding: 10px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin-right: 10px;
}

.search-bar select {
    padding: 10px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.job-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.job-item {
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    height: auto; /* Allow height to expand with content */
}

.job-item:hover {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.job-title {
    font-size: 1.3em;
    color: #222;
    margin-bottom: 10px;
    cursor: pointer;
    white-space: nowrap; /* Prevent line break in the job title */
    overflow: hidden;
    text-overflow: ellipsis; /* Truncate the title with ellipsis if too long */
}

.job-details {
    color: #333;
    font-size: 1em;
    margin-bottom: 5px; /* Reduced margin to minimize space */
}

.date-posted {
    color: #333;
    font-size: 0.9em;
    margin-top: 5px; /* Reduced margin to minimize space */
}

.no-results {
    text-align: center;
    font-size: 1.2em;
    color: #e74c3c;
    margin-top: 20px;
}

/* Modal Styling */
.modal {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0s 0.5s, transform 0.5s ease;
    transform: scale(0.8);
}

.modal.show {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.5s ease, visibility 0s 0s, transform 0.5s ease;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 60%;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    font-size: 1.2em;
    color: #34495e;
    margin-bottom: 15px;
    text-align: center;
}

.modal-body {
    margin-top: 15px;
    font-size: 1em;
    color: #333;
}

.modal-body ul {
    margin-top: 10px;
    margin-left: 20px;
}

.modal-body a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.close-btn {
    background-color: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: #c0392b;
}

.job-description, .modal-body p {
    font-size: 1em;
    color: #333;
    margin-bottom: 15px;
    text-align: left;
}

.modal-body ul {
    list-style-type: disc;
    padding-left: 20px;
}

.modal-body strong {
    font-weight: bold;
    color: #34495e;
}

/* Responsive Layout */
@media (max-width: 1200px) {
    .job-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .job-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .job-list {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 85%;
        max-width: 500px;
    }
}
