/**
 * jobsListing.css
 * Master Executive Theme - Version 4.0
 * Merged Font-Weights, Cross-Browser Fixes & Full Layout Logic
 */

/* --- 0. CROSS-BROWSER RESET & FONT DECLARATION --- */
.jobsListing-wrapper, 
.jobsListing-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* LIGHT */
@font-face {
    font-family: 'Greycliff CF';
    src: url('https://skillsforchicago.org/wp-content/uploads/2025/05/Greycliff-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* MEDIUM */
@font-face {
    font-family: 'Greycliff CF';
    src: url('https://skillsforchicago.org/wp-content/uploads/2025/05/Greycliff-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* BOLD */
@font-face {
    font-family: 'Greycliff CF';
    src: url('https://skillsforchicago.org/wp-content/uploads/2025/05/Greycliff-Bold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand-green: #96C460;
    --dark-green: #003300;
    --pale-green: #E6F0DC;
    --white: #FFFFFF;
    --black: #000000;
    --slate: #334155;
    --muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-md: 0 12px 30px -10px rgba(0,0,0,0.15);
}

/* --- 1. GLOBAL & TITLES --- */
.jobsListing-wrapper {
    max-width: 90%;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Greycliff CF', 'Segoe UI', Roboto, sans-serif;
    color: var(--slate);
    line-height: 1.6;
    font-weight: 500; /* Medium Default */
}

.page-title-container { text-align: center; margin-bottom: 40px; }
.page-title { 
    font-size: 3.5rem; 
    font-weight: 800; 
    color: var(--dark-green); 
    margin: 0; 
    letter-spacing: -1px; 
}

/* --- 2. FILTER BAR --- */
.jobsListing-filter-bar {
    background: var(--pale-green); 
    padding: 35px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 50px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.filter-group { flex: 1; min-width: 220px; max-width: 300px; }

.filter-group label {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 800; 
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    color: var(--black);
    text-transform: uppercase;
}

.filter-group select {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    padding: 0 15px;
    background: var(--white);
    font-family: 'Greycliff CF', sans-serif;
    font-weight: 500;
    cursor: pointer;
    text-align-last: center; 
    transition: 0.3s ease;
    appearance: none; /* Cross-browser cleanup */
    -webkit-appearance: none;
}

.clear-all-container {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.clear-filters-btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--white);
    color: var(--slate);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

/* --- 3. JOB CARDS --- */
.jobsListing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;    
}

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

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

.job-card {
    background: var(--white);
    border: 1px solid var(--pale-green);
    border-radius: 20px; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column; 
    height: 100%;
    overflow: hidden;
}

.job-card-link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 30px 20px;
    text-decoration: none !important;
    text-align: center;
    color: inherit;
}

.job-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-green);
}

.card-logo-wrap {
    height: 60px; 
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.company-logo { 
    max-height: 100%; 
    max-width: 130px; 
    object-fit: contain; 
}

.job-title { 
    font-size: 1.15rem; 
    font-weight: 800; 
    color: var(--black); 
    margin-bottom: 8px; 
    line-height: 1.2;
}

.company-name { 
    font-size: 0.95rem; 
    color: var(--black); 
    font-weight: 300; /* Light variant */
    margin-bottom: 12px; 
}

.job-meta { 
    margin-bottom: 25px; 
    width: 100%; 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.job-meta p { 
    font-size: 13px; 
    color: var(--muted); 
    margin: 4px 0; 
    font-weight: 500;
}

.view-job-btn {
    display: inline-block;
    width: 100%; 
    background: var(--pale-green);
    color: var(--black) !important;
    padding: 14px 10px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: 0.3s ease;
    margin-top: auto;
    text-align: center;
}

.job-card:hover .view-job-btn {
    background: var(--brand-green);
    color: var(--white) !important;
}

/* --- 4. DETAIL VIEW HERO --- */
.job-header-hero-banner {
    display: flex;
    flex-direction: row;
    background: var(--dark-green);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 50px;
    min-height: 380px;
    box-shadow: var(--shadow-md);
}

.hero-image-side {
    width: 40% !important;
    flex-shrink: 0;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

.hero-image-side img { width: 100%; height: 100%; object-fit: cover; }

.hero-content-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 60px;
    margin-left: -40px;
}

.hero-job-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem); 
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--white);
    font-weight: 800;
}

.hero-apply-btn {
    display: inline-block;
    background: var(--brand-green);
    color: var(--dark-green) !important;
    padding: 18px 50px;
    border-radius: 60px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    border: 2px solid var(--brand-green);
    transition: 0.3s ease;
    text-align: center;
}

/* --- 5. DETAIL LAYOUT GRID --- */
.detail-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px; 
    gap: 40px;
    align-items: start;
}

.detail-main-content {
    background: var(--white);
    border-radius: 24px;
    padding: 50px;
    border: 1px solid var(--border-color);
}

.section-title {
    font-weight: 800;
    color: var(--dark-green);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.detail-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.sidebar-info-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 22px;
}

.sidebar-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.sidebar-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-green);
}

/* --- 6. MOBILE STICKY BAR --- */
.mobile-sticky-apply-bar {
    display: none;
}

/* --- 7. RESPONSIVE OVERRIDES --- */
@media (max-width: 992px) {
    .desktop-only-apply { display: none !important; }

    .mobile-sticky-apply-bar {
        display: block;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: var(--white);
        padding: 15px 20px;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
        z-index: 9999;
    }

    .mobile-sticky-apply-bar .hero-apply-btn { width: 100%; display: block; }

    .job-header-hero-banner { flex-direction: column; min-height: auto; border-radius: 16px; }
    .hero-image-side { width: 100% !important; height: 220px; clip-path: none !important; }
    
    .hero-content-side { 
        padding: 30px 20px !important; 
        margin-left: 0 !important; 
        text-align: center; 
        align-items: center;
    }

    .hero-job-title {
        font-size: 1.75rem !important; 
        text-align: center;
        width: 100%;
    }
    
    .detail-layout-grid { 
        display: flex; 
        flex-direction: column; 
    }

    .detail-sidebar { 
        position: static; 
        width: 100%; 
        order: 2; 
    }

    .detail-main-content { 
        order: 1; 
        padding: 30px 20px; 
    }

    .job-detail-modern { padding-bottom: 100px; }
}

/* --- 8. PAGINATION & BACK LINK --- */
.jobsListing-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
}

.pag-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--slate);
    font-weight: 800;
    text-decoration: none;
}

.pag-num.active {
    background: var(--brand-green);
    color: var(--white);
    border-color: var(--brand-green);
}

.back-link {
    display: inline-flex;
    align-items: center;
    background-color: var(--pale-green);
    color: var(--dark-green) !important;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-decoration: none !important;
}

/* --- 9. CONDITIONAL SPLIT HEADER LAYOUT --- */
.page-title-container.split-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left; 
    background-color: var(--pale-green);
    padding: 50px;
    gap: 40px;
    border-radius: 24px;
    margin-bottom: 50px;
}

.split-header .title-content { 
    flex: 1.2; 
    
}
.split-header .title-content h1 { font-size: 3rem; font-weight: 800; color: var(--dark-green); margin-top: 0; margin-bottom: 15px; }
.split-header .title-content h3 { font-size: 1.4rem; font-weight: 800; color: var(--slate); margin-bottom: 20px; }
.split-header .title-content h4 { font-size: 1.1rem; font-weight: 500; line-height: 1.7; color: var(--slate); margin: 0; }
.split-header .title-image { flex: 0.8; display: flex; justify-content: center; align-items: center; }
.split-header .title-image img { max-width: 100%; height: auto; border-radius: 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.08); }

/* --- 10. NATIONAL EXPANSION BUTTON --- */
.jobsListing-wrapper .action-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background-color: var(--brand-green) !important;
    color: var(--black) !important;
    padding: 8px 8px 8px 20px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    min-width: 280px;
    width: auto;
    border: 1px solid #707070 !important;
    margin-top: 15px;
    cursor: pointer;
}

.jobsListing-wrapper .action-button:hover {
    background-color: var(--dark-green) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.jobsListing-wrapper .action-button span {
    margin-right: 15px !important;
}

.jobsListing-wrapper .circle-icon {
    background: var(--white) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.jobsListing-wrapper .circle-icon i {
    color: var(--black) !important;
    font-size: 14px !important;
}

/* Hover effect for the icon too */
.jobsListing-wrapper .action-button:hover .circle-icon i {
    color: var(--dark-green) !important;
}