/* General Styles */
body {
    font-family: 'Söhne', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Job Details Section */
#job-details {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 30px auto;
    max-width: 1000px;
}

#job-title {
    background: linear-gradient(90deg, #1f2937, #374151);
    color: #fff;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Job Details Layout */
.job-details-container {
    padding: 15px;
    margin: 10px 0;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-details-container:last-child {
    border-bottom: none;
}

.job-details-container p {
    margin: 0;
    font-size: 1.1em;
    color: #2c3e50;
}

/* Buttons */
#view-job-details-btn, #apply-job-btn {
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s;
    margin-top: 20px;
    font-size: 1.1em;
    border: none;
    width: 100%;
}

#view-job-details-btn:hover, #apply-job-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* Allow scrolling when content overflows */
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80%; /* Prevent excessive height */
    overflow-y: auto; /* Allow scrolling inside modal content */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: fadeIn 0.4s ease;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    transition: color 0.3s ease, transform 0.3s ease;
}

.close-btn:hover {
    color: #ff5a5a;
    transform: scale(1.1);
}

.close-btn-bottom {
    display: block;
    margin-top: 20px;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.close-btn-bottom:hover {
    background-color: #0056b3;
}

/* Job Description Text */
#job-details-text {
    color: #333;
    line-height: 1.7;
    font-size: 1.1em;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        padding: 15px;
        width: 95%;
    }

    #view-job-details-btn, #apply-job-btn {
        font-size: 1em;
    }

    .job-details-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .job-details-container p {
        font-size: 1em;
    }
}

@media (max-width: 576px) {
    .modal-content {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .close-btn {
        font-size: 26px;
    }

    #view-job-details-btn, #apply-job-btn {
        font-size: 0.9em;
        padding: 10px;
    }

    #job-title {
        font-size: 1.5em;
    }
}
