.sjb-job-listings {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.sjb-filters {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    position: relative; /* For absolute positioning of clear filters */
}

.sjb-search-bar {
    margin-bottom: 20px;
}

.sjb-search-bar input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.sjb-filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #444;
}

.sjb-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.sjb-filter-actions .button-primary {
    padding: 12px 30px;
    font-size: 16px;
}

.sjb-filter-actions .clear-filters {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.sjb-filter-actions .clear-filters:hover {
    color: #333;
    text-decoration: underline;
}

/* Update button styles to ensure consistency */
.button-primary {
    background: var(--sjb-primary-color, #2557a7);
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.button-secondary {
    background: #f5f5f5;
    color: #444;
    border: 1px solid #e0e0e0; /* Lighter border color */
    cursor: pointer;
}

/* Optional: Add transition for smoother hover states */
.button-primary,
.button-secondary {
    transition: all 0.2s ease;
}

/* Grid View */
.grid-view .sjb-jobs-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    align-items: stretch; /* Ensure cards stretch to match tallest */
}

.grid-view .sjb-job-item {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
}

/* List View */
.list-view .sjb-job-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.sjb-job-image {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.sjb-job-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16/9; /* Maintain consistent aspect ratio */
}

/* Optional: Add hover effect on the image */
.sjb-job-image img:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.sjb-job-meta {
    margin: 10px 0;
    color: #666;
}

.sjb-job-meta span {
    margin-right: 15px;
}

.sjb-job-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.job-actions .button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    text-align: center;
    font-size: 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.job-actions .button-primary {
    background: var(--sjb-primary-color, #2557a7);
    color: #ffffff;
    border: none;
}

.job-actions .button-primary:hover {
    background: var(--sjb-primary-color-dark, #1e4687);
    color: #ffffff; /* Force white text on hover */
    text-decoration: none;
}

.job-actions .button-secondary {
    background: #f5f5f5;
    color: #444;
    border: 1px solid #e0e0e0;
}

.job-actions .button-secondary:hover {
    background: #e9e9e9;
    color: #444; /* Keep text dark on hover */
    text-decoration: none;
}

/* For larger screens, we can make the buttons side by side */
@media screen and (min-width: 768px) {
    .job-actions {
        flex-direction: row;
        gap: 15px;
    }

    .job-actions .button {
        flex: 1;
    }
}

.sjb-job-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make all cards same height */
    gap: 15px; /* Use gap for consistent spacing */
}

.sjb-job-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.job-title {
    margin: 0 0 12px 0;
    line-height: 1.3;
    min-height: 2.6em;
    display: flex;
    align-items: flex-start;
}

.job-title a {
    color: #2557a7;
    text-decoration: none;
    font-size: clamp(1rem, 1.2rem, 1.4rem); /* Scale font size between bounds */
}

/* Adjust font size for longer titles */
.job-title a[data-length="long"] {
    font-size: clamp(0.9rem, 1.1rem, 1.3rem);
}

.job-highlights {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #444;
    padding: 4px 0;
}

.highlight-item i {
    color: #666;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.highlight-item span {
    flex: 1;
    line-height: 1.4;
}

.job-excerpt {
    color: #666;
    margin: 15px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1; /* Allow excerpt to fill available space */
}

.sjb-job-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Make content area fill available space */
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .sjb-job-listings {
        padding: 10px;
    }

    /* Force grid view to single column */
    .grid-view .sjb-jobs-wrapper {
        grid-template-columns: 1fr;
    }

    /* Adjust job item padding */
    .sjb-job-item {
        padding: 15px;
    }

    /* Make highlight rows stack on small screens */
    .highlight-row {
        flex-direction: column;
        gap: 12px;
    }

    /* Adjust title size */
    .job-title {
        font-size: 1.2em;
    }

    /* Make buttons full width and stack */
    .job-actions {
        flex-direction: column;
        gap: 8px;
    }

    .job-actions .button {
        width: 100%;
        text-align: center;
    }

    /* Adjust filters for mobile */
    .sjb-filter-options {
        grid-template-columns: 1fr;
    }

    .sjb-filter-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .sjb-filter-actions .clear-filters {
        position: static;
        text-align: center;
        width: auto;
        margin-top: 10px;
    }
}

/* Medium screens */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .grid-view .sjb-jobs-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Ensure text doesn't overflow on any screen */
.highlight-item {
    word-break: break-word;
}

/* Remove the old highlight-row styles */
.highlight-row {
    display: none;
}

/* Ensure images scale properly */
.sjb-job-image {
    max-width: 100%;
    height: auto;
}

/* Better touch targets on mobile */
@media (hover: none) {
    .button {
        padding: 12px 16px; /* Larger touch target */
    }

    .sjb-search-bar input {
        height: 44px; /* Larger touch target for input */
    }
}

/* Single Job Styles */
.sjb-single-job {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.sjb-single-job .job-header {
    margin-bottom: 30px;
}

.sjb-single-job .job-title {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.sjb-single-job .job-meta {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.sjb-single-job .meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.sjb-single-job .meta-item:last-child {
    border-bottom: none;
}

.sjb-single-job .meta-item i {
    color: #666;
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sjb-single-job .job-content {
    line-height: 1.6;
    color: #444;
}

.sjb-single-job .job-actions {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.sjb-single-job .button {
    display: inline-block;
    padding: 12px 30px;
    font-size: 18px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sjb-single-job .sjb-job-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.sjb-single-job .sjb-job-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16/9;
}

/* Optional: Add a subtle shadow to the image */
.sjb-single-job .sjb-job-image {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
} 