/* =====================================================
   JOB SEARCH PAGE
===================================================== */

:root {
    --jb-green: #03AE4E;
    --jb-green-dark: #028a3e;

    --jb-blue: #0E61AD;
    --jb-blue-dark: #0a4d8a;

    --jb-hero-from: #0c1f3a;
    --jb-hero-to: #0E61AD;

    --jb-bg: #f0f4f8;
    --jb-white: #ffffff;

    --jb-text: #1e2d3d;
    --jb-muted: #64748b;

    --jb-border: #dde5ee;

    --jb-radius: 8px;

    --jb-shadow:
        0 4px 20px rgba(14, 97, 173, 0.10);
}

/* =========================================
   RESET
========================================= */

.jobs-page-wrap *,
.jobs-page-wrap *::before,
.jobs-page-wrap *::after {
    box-sizing: border-box;
}

.jobs-page-wrap #main,
.jobs-page-wrap .site-main,
body.page .jobs-page-wrap {
    padding: 0 !important;
    margin: 0 !important;
}

/* =========================================
   FULL WIDTH SECTIONS
========================================= */

.jobs-hero,
.jobs-table-section {
    width: 100vw;

    position: relative;

    left: 50%;
    right: 50%;

    margin-left: -50vw;
    margin-right: -50vw;
}

/* =========================================
   HERO
========================================= */

.jobs-hero {
    background:
        linear-gradient(
            120deg,
            var(--jb-hero-from) 0%,
            var(--jb-hero-to) 100%
        );

    padding: 60px 24px 52px;

    overflow: hidden;
}

.jobs-hero::before,
.jobs-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.jobs-hero::before {
    width: 420px;
    height: 420px;

    background: rgba(3, 174, 78, 0.10);

    top: -120px;
    right: -60px;
}

.jobs-hero::after {
    width: 220px;
    height: 220px;

    background: rgba(255,255,255,0.05);

    bottom: -60px;
    left: 10%;
}

.jobs-hero-inner {
    max-width: 1200px;

    margin: 0 auto;

    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 48px;

    flex-wrap: wrap;
}

/* =========================================
   HERO TEXT
========================================= */

.jobs-hero-text {
    flex: 0 0 auto;
}

.jobs-hero-text h1 {
    font-size: clamp(1.9rem, 3.5vw, 2.75rem);

    font-weight: 800;

    color: var(--jb-white);

    margin: 0 0 8px;

    line-height: 1.15;

    letter-spacing: -0.5px;
}

.jobs-hero-text p {
    font-size: 1.05rem;

    color: rgba(255,255,255,0.72);

    margin: 0;
}

/* =========================================
   SEARCH BAR
========================================= */

.jobs-search-bar {
    flex: 1 1 650px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 10px 12px;

    align-items: center;

    background: var(--jb-white);

    border-radius: 10px;

    padding: 14px;

    box-shadow:
        0 8px 32px rgba(0,0,0,0.22);
}

.search-field {
    display: flex;
    align-items: center;

    gap: 8px;

    min-width: 0;

    padding: 10px 12px;

    border: 1px solid var(--jb-border);

    border-radius: var(--jb-radius);
}

.search-field i {
    color: var(--jb-muted);

    font-size: 0.85rem;

    flex-shrink: 0;
}

.search-field input,
.search-field select {
    width: 100%;

    border: none;
    outline: none;

    font-size: 0.92rem;

    color: var(--jb-text);

    background: transparent;

    font-family: inherit;
}

.search-field select {
    cursor: pointer;
}

.search-bar-actions {
    grid-column: 1 / -1;

    display: flex;

    gap: 10px;

    width: 100%;
}

.search-btn,
.resume-btn {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 12px 18px;

    border-radius: var(--jb-radius);

    font-size: 0.9rem;
    font-weight: 600;

    cursor: pointer;

    white-space: nowrap;

    transition: 0.2s ease;

    text-decoration: none !important;
}

/* SEARCH BUTTON */

.search-btn {
    background: var(--jb-blue);

    color: var(--jb-white);

    border: none;
}

.search-btn:hover {
    background: var(--jb-blue-dark);
}

/* RESUME BUTTON */

.resume-btn {
    background: var(--jb-white);

    color: var(--jb-blue);

    border: 2px solid var(--jb-blue);
}

.resume-btn:hover {
    background: var(--jb-blue);

    color: var(--jb-white);
}

/* =========================================
   TABLE SECTION
========================================= */

.jobs-table-section {
    background: var(--jb-bg);

    padding: 40px 24px 64px;
}

.jobs-table-section .ast-container {
    max-width: 1200px;

    width: 100%;

    margin: 0 auto;
}

/* =========================================
   TABLE WRAP
========================================= */

.jobs-table-wrap {
    background: var(--jb-white);

    border-radius: 10px;

    box-shadow: var(--jb-shadow);

    border: 1px solid var(--jb-border);

    overflow-x: auto;
}

/* =========================================
   TABLE
========================================= */

.jobs-table {
    width: 100%;

    border-collapse: collapse;

    table-layout: fixed;

    min-width: 850px;

    font-size: 0.9rem;
}

.jobs-table thead tr {
    background: #f7fafd;

    border-bottom: 2px solid var(--jb-border);
}

.jobs-table th {
    padding: 14px 20px;

    text-align: left;

    font-weight: 700;

    color: var(--jb-muted);

    white-space: nowrap;

    user-select: none;

    font-size: 0.78rem;

    text-transform: uppercase;

    letter-spacing: 0.06em;
}

.jobs-table th.sortable {
    cursor: pointer;
}

.jobs-table th.sortable:hover {
    color: var(--jb-blue);
}

.sort-icon {
    font-size: 0.75em;

    color: #b0bec5;

    margin-left: 3px;
}

.jobs-table tbody tr {
    border-bottom: 1px solid var(--jb-border);

    transition: background 0.15s;
}

.jobs-table tbody tr:hover {
    background: #f0f7ff;
}

.jobs-table td {
    padding: 18px 20px;

    color: var(--jb-text);

    vertical-align: middle;

    overflow-wrap: break-word;
}

/* =========================================
   TABLE COLUMNS
========================================= */

.col-id {
    width: 80px;
}

.col-title {
    width: 45%;
}

.col-location {
    width: 25%;
}

.col-action {
    width: 160px;

    text-align: center;
}

/* =========================================
   VIEW DETAILS LINK
========================================= */

.view-details-link {
    color: var(--jb-green);

    font-weight: 600;

    text-decoration: none !important;

    transition: 0.2s ease;
}

.view-details-link:hover {
    color: var(--jb-green-dark);
}

/* =========================================
   FOOTER
========================================= */

.table-footer {
    display: flex;

    flex-direction: column;

    gap: 14px;

    margin-top: 18px;

    padding: 0 4px;

    font-size: 0.875rem;

    color: var(--jb-muted);
}

.footer-meta {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    flex-wrap: wrap;
}

/* =========================================
   SHOW ENTRIES
========================================= */

.show-entries {
    display: flex;

    align-items: center;

    gap: 8px;

    color: var(--jb-text);
}

.show-entries select {
    border: 1px solid var(--jb-border);

    border-radius: 6px;

    padding: 4px 10px;

    background: var(--jb-white);

    color: var(--jb-text);

    font-family: inherit;

    cursor: pointer;
}

/* =========================================
   TABLE INFO
========================================= */

.table-info {
    white-space: nowrap;
}

/* =========================================
   PAGINATION
========================================= */

.table-pagination {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 6px;

    flex-wrap: wrap;
}

.page-btn {
    min-width: 38px;
    height: 38px;

    padding: 0 12px;

    border: 1px solid var(--jb-border);

    background: var(--jb-white);

    color: var(--jb-text);

    border-radius: 6px;

    cursor: pointer;

    transition: 0.2s ease;
}

.page-btn:hover:not([disabled]) {
    background: var(--jb-blue);

    color: var(--jb-white);

    border-color: var(--jb-blue);
}

.page-btn.active {
    background: var(--jb-blue);

    color: var(--jb-white);

    border-color: var(--jb-blue);
}

.page-btn[disabled] {
    opacity: 0.4;

    cursor: default;
}

.page-ellipsis {
    padding: 0 4px;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {

    .jobs-hero-inner {
        flex-direction: column;

        align-items: flex-start;
    }

    .jobs-search-bar {
        width: 100%;

        grid-template-columns: 1fr;
    }

    .search-bar-actions {
        flex-direction: column;
    }

    .search-btn,
    .resume-btn {
        width: 100%;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .jobs-hero {
        padding: 40px 16px 36px;
    }

    .jobs-table-section {
        padding: 28px 16px 48px;
    }

    .jobs-table {
        min-width: 700px;
    }

    .jobs-table th,
    .jobs-table td {
        padding: 14px;
    }

    .footer-meta {
        flex-direction: column;

        align-items: flex-start;
    }

    .table-info {
        white-space: normal;
    }

    .table-pagination {
        justify-content: flex-start;
    }
}

/* =========================================
   FINAL FIX
========================================= */

.jobs-table-section .ast-container {
    display: block !important;
}

.jobs-table-wrap {
    width: 100% !important;
    display: block !important;
}

.table-footer {
    width: 100% !important;

    display: flex !important;
    flex-direction: column !important;

    clear: both;

    margin-top: 18px;
}

.footer-meta {
    width: 100%;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;
}

.table-pagination {
    width: 100%;

    display: flex;

    justify-content: flex-end;
}