body {
    font-family: Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: auto;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
}

#filterControls {
    display: flex;
    gap: 15px;
    align-items: flex-end; /* Align items to bottom for better layout with labels */
    margin-bottom: 25px;
    padding: 20px;
    background-color: #eef1f0;
    border-radius: 6px;
    flex-wrap: wrap; /* Allow filters to wrap on smaller screens */
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: #555;
}

#filterControls input[type="number"],
#filterControls select {
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1em;
    min-width: 150px; /* Ensure decent width */
}

/* ADD styles for new range slider */
.range-slider-group {
    flex-grow: 1; /* Allow it to take more space if needed */
    min-width: 250px; /* Minimum width for the slider group */
}

.salary-range-slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 5px 0;
    position: relative; /* For absolute positioning of track highlight */
}

.salary-value-label {
    font-weight: bold;
    color: #333;
    min-width: 25px; /* Fixed width to prevent layout shifts */
    text-align: right;
}
.unit-label {
    font-size: 0.9em;
    color: #555;
}

.sliders-wrapper {
    position: relative;
    flex-grow: 1;
    height: 20px; /* Height for the sliders */
    margin: 0 5px; /* Small margin around the sliders themselves */
}

.salary-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: transparent; /* Transparent track, actual track styled by .slider-track-highlight or another bg div */
    outline: none;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    pointer-events: none; /* Make individual sliders non-interactive initially */
    margin: 0; /* Remove default margins */
    z-index: 1; /* Default z-index */
}

.salary-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #007bff;
    cursor: pointer;
    border-radius: 50%;
    pointer-events: auto; /* Thumb is interactive */
    border: 2px solid white;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.salary-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #007bff;
    cursor: pointer;
    border-radius: 50%;
    pointer-events: auto;
    border: 2px solid white;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

/* This will be the visible track underneath the transparent native sliders */
.slider-track-bg { /* Renamed in HTML to sliders-wrapper, but can keep for actual track background if needed */
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    transform: translateY(-50%);
    z-index: -1; /* Behind thumbs */
}

.sliders-wrapper .slider-track-highlight {
    position: absolute;
    top: 50%;
    height: 6px;
    background: #007bff;
    border-radius: 3px;
    transform: translateY(-50%);
    z-index: 0; /* Above background, below thumbs */
}

#jobListings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* Changed for 2 columns */
    gap: 25px;
}

.job-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.job-title {
    font-size: 1.3em; /* Larger title */
    font-weight: bold;
    color: #0056b3; /* Primary color for title */
    margin-bottom: 10px;
}

.salary {
    color: #d35400; /* Distinctive salary color */
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.location,
.company,
.experience,
.education {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 6px;
}

.company {
    font-style: italic;
    color: #2980b9;
}

.estimated-salary {
    font-size: 1em;
    color: #e67e22; /* A distinct color for estimated salary */
    font-weight: bold;
    margin-bottom: 10px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.benefits-title,
.description-title {
    font-weight: bold;
    margin-top: 12px;
    margin-bottom: 6px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}

.job-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.benefit-tag {
    background-color: #e0f7fa;
    color: #00796b;
    padding: 4px 10px;
    border-radius: 12px; /* Pill shape */
    font-size: 0.8em;
}

.job-description {
    font-size: 0.9em;
    color: #444;
    white-space: pre-wrap;
    margin-bottom: 15px;
    /* max-height: 200px; Removed */
    /* overflow-y: auto; Removed */
    border: 1px solid #f0f0f0;
    padding: 10px;
    border-radius: 4px;
    background-color: #fdfdfd;
}

/* Custom scrollbar for description - REMOVED
.job-description::-webkit-scrollbar {
    width: 6px;
}
.job-description::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.job-description::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 3px;
}
.job-description::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}
*/

.source-link {
    display: inline-block;
    margin-top: auto; /* Push to the bottom */
    padding: 8px 12px;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #007bff;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

.source-link:hover {
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
}

.placeholder-text {
    text-align: center;
    font-size: 1.1em;
    color: #777;
    padding: 30px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #filterControls {
        flex-direction: column;
        align-items: stretch;
    }
    #filterControls input[type="number"],
    #filterControls select,
    #filterButton {
        width: 100%;
        box-sizing: border-box; /* Include padding and border in element's total width and height */
    }
    #jobListings {
        grid-template-columns: 1fr; /* Single column on smaller screens */
    }
}

/* ADD THESE STYLES for .job-description p */
.job-description p {
    margin-top: 0.2em;
    margin-bottom: 0.2em;
    line-height: 1.4;
}

.job-description p:first-child {
    margin-top: 0;
}

.job-description p:last-child {
    margin-bottom: 0;
}

/* ADD THESE STYLES for .job-count-display */
.job-count-display {
    margin-bottom: 20px; 
    padding: 10px;
    background-color: #f8f9fa; 
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    color: #333;
    border: 1px solid #dee2e6;
} 