/* ===================================================================================

* Theme Name: Lexend Child
* Theme URI: https://lexend.themegenix.com/
* Author: ThemeGenix
* Author URI: https://themeforest.net/user/themegenix/
* Description: Lexend - Software, SaaS & Startup WordPress Theme
* Version: 1.3
* Template: lexend
* License: GNU General Public License version 3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Tags: one-column, right-sidebar, left-sidebar, custom-menu, featured-images, post-formats, sticky-post, translation-ready

* We encourage you to create Child theme for any modifications you will want to do.

* Why use Child theme?

* Because of future updates we may provide for this theme that will overwrite your
* modifications and all your custom work.

* If you are not familiar with Child Themes, you can read about it here:
* http://codex.wordpress.org/Child_Themes
* http://wp.tutsplus.com/tutorials/theme-development/child-themes-basics-and-creating-child-themes-in-wordpress/

====================================================================================== */

/* ===================================================================================
* Custom Styles for Job Listings Page
* These styles include the new layout for the sticky sidebar and filter bar.
====================================================================================== */

/* Basic Job Listings Page Styling */
.job-listings-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.job-filters {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

/* Your original .job-filters styles */
.job-filters label {
    font-weight: bold;
    margin-right: 5px;
}

.job-filters select,
.job-filters button {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

.job-filters button {
    background-color: #0073aa; /* Your brand primary color */
    color: white;
    border: none;
}

.job-filters button:hover {
    background-color: #005f8c;
}

.job-filters .clear-filters-button {
    background-color: #ccc;
    color: #333;
}

.job-filters .clear-filters-button:hover {
    background-color: #bbb;
}

/* ===================================
* New styles for the sticky sidebar layout
* and the filter bar.
=================================== */

/* Main layout for sidebar and content */
.job-listings-main-content {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column for mobile */
    gap: 30px;
    margin-top: 30px;
}

@media (min-width: 768px) { /* Adjust breakpoint as needed */
    .job-listings-main-content {
        grid-template-columns: 280px 1fr; /* Sidebar width and content area */
        align-items: start; /* Aligns content at the top */
    }
}

/* Sticky Filter Sidebar */
.job-filters-sidebar {
    position: sticky;
    top: 80px; /* Adjust based on your fixed header height or desired offset */
    align-self: start; /* Helps with sticky behavior in grid */
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
}

.job-filters-sidebar h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.job-filters-sidebar form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.job-filters-sidebar label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.job-filters-sidebar select,
.job-filters-sidebar input[type="number"],
.job-filters-sidebar button {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

/* Filter Bar above listings */
.filter-bar {
    background-color: #e6f0ff; /* Light blue background */
    border: 1px solid #cce0ff;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.filter-bar h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    flex-shrink: 0; /* Prevent from shrinking */
}

.active-filter-tag {
    background-color: #0073aa; /* Your brand primary color for active tags */
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap; /* Keep tag on one line */
}

.active-filter-tag .clear-filter-x {
    color: white;
    font-weight: bold;
    text-decoration: none;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: background 0.2s ease;
}

.active-filter-tag .clear-filter-x:hover {
    background: rgba(255,255,255,0.4);
}

/* Your existing .job-cards-grid and .job-card styles will go here or below */
/* Ensure the .job-cards-grid is inside .job-listings-content */

/* ===================================
* Your original styles (adjusted for clarity)
=================================== */

.job-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 30px;
}

.job-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

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

.job-card .job-title {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.job-card .job-title a {
    text-decoration: none;
    color: #333; /* Your brand text color */
}

.job-card .job-title a:hover {
    color: #0073aa; /* Your brand primary color */
}

.job-card .job-meta {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}

.job-card .job-meta span {
    display: block; /* Each meta item on its own line */
    margin-bottom: 5px;
}

.job-card .job-card-actions {
    display: flex;
    gap: 15px;
    margin-top: auto; /* Pushes buttons to the bottom */
}

.button { /* Generic button styling - adapt to your theme's buttons */
    display: inline-block;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.details-button {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.details-button:hover {
    background-color: #e0e0e0;
}

.apply-button {
    background-color: #28a745; /* Green for apply */
    color: white;
    border: 1px solid #28a745;
}

.apply-button:hover {
    background-color: #218838;
}

/* Pagination Styling */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* ===================================================================================
* Custom Styles for Single Job Postings
====================================================================================== */

/* Main layout for two columns */
.job-listing-content-wrap {
    display: grid;
    grid-template-columns: 1fr; /* Default single column for mobile */
    gap: 40px;
    margin-top: 40px;
}

@media (min-width: 992px) { /* Adjust breakpoint for desktop layout */
    .job-listing-content-wrap {
        grid-template-columns: 350px 1fr; /* Job Box width and details column */
        align-items: start;
    }
}

/* Header styling */
.job-listing-header {
    margin-bottom: 20px;
}

.job-listing-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.job-location {
    font-size: 1.1rem;
    color: #666;
}

/* Sticky Job Box (Left Column) */
.job-listing-sidebar {
    position: sticky;
    top: 80px; /* Adjust based on your header height */
    align-self: start; /* Keeps the sidebar sticky within the grid */
}

.job-box {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.job-box-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
}

.job-box-divider {
    border: 0;
    height: 1px;
    background-color: #ddd;
    margin-bottom: 20px;
}

.job-box-section {
    margin-bottom: 20px;
}

.job-box-section .section-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.job-box-section .section-value {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: #333;
}

.job-box-apply {
    margin-top: 30px;
}

.job-box-apply .apply-button {
    width: 100%;
    text-align: center;
}

/* Position Details (Right Column) */
.job-listing-details {
    /* Styles for the right content area */
}

.job-listing-details section {
    margin-bottom: 40px;
}

.job-listing-details h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Two-column layout for skills/requirements */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .two-column-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

.two-column-layout h3 {
    font-size: 1.5rem;
    margin-top: 0;
}

.two-column-layout h4 {
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

.two-column-layout ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

/* Related jobs section, using the existing job-cards-grid style */
.related-jobs .job-cards-grid {
    margin-top: 20px;
}