/* ===========================
   JOBS ARCHIVE — HERO
   =========================== */

.jobs-archive-hero {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--navy);
  overflow: hidden;
  padding-top: 90px;
  padding-bottom: 64px;
  height: 30vh;
  text-align: center;
}

.jobs-archive-hero .section-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.jobs-archive-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

.jobs-archive-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 540px;
    margin: 0 auto;
}

/* ===========================
   JOBS SECTION WRAPPER
   =========================== */

.jobs-section {
    padding: 48px 0 80px;
    background: #f8f9fa;
}

/* ===========================
   FILTER TABS
   =========================== */

.jobs-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.jobs-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 24px;
    border: 1.5px solid #d0d7e2;
    background: #fff;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.jobs-filter-tab:hover {
    border-color: #1d3557;
    color: #1d3557;
}

.jobs-filter-tab.is-active {
    background: #1d3557;
    border-color: #1d3557;
    color: #fff;
}

.jobs-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.1);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.jobs-filter-tab.is-active .jobs-filter-count {
    background: rgba(255, 255, 255, 0.25);
}

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

.jobs-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
    background: #fff;
}

.jobs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.jobs-table thead tr {
    background: #f0f4f8;
    border-bottom: 2px solid #e2e8f0;
}

.jobs-table th {
    padding: 13px 18px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4a5568;
    white-space: nowrap;
}

[dir="rtl"] .jobs-table th,
[dir="rtl"] .jobs-table td {
    text-align: right;
}

.jobs-table tbody tr {
    border-bottom: 1px solid #edf2f7;
    transition: background 0.18s ease;
}

.jobs-table tbody tr:last-child {
    border-bottom: none;
}

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

.jobs-table td {
    padding: 16px 18px;
    color: #333;
    vertical-align: middle;
}

/* Column widths */
.jobs-table .col-title    { min-width: 200px; }
.jobs-table .col-location { width: 120px; }
.jobs-table .col-type     { width: 130px; }
.jobs-table .col-posted   { width: 110px; color: #777; font-size: 13px; }
.jobs-table .col-deadline { width: 120px; font-size: 13px; }
.jobs-table .col-status   { width: 90px; }
.jobs-table .col-apply    { width: 100px; text-align: center; }

[dir="rtl"] .jobs-table .col-apply { text-align: center; }

/* Expired deadline */
.jobs-table .col-deadline.is-expired {
    color: #c0392b;
    font-weight: 600;
}

/* Title link */
.job-row__title-link {
    color: #1d3557;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.job-row__title-link:hover {
    color: #e63946;
}

/* Closed row — dim slightly */
.job-row--closed .job-row__title-link {
    color: #6b7280;
}

/* Type badge */
.job-type-badge {
    display: inline-block;
    background: #e8f0fb;
    color: #1d3557;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ===========================
   STATUS BADGES
   =========================== */

.job-status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.job-status-badge--open {
    background: #d4edda;
    color: #155724;
}

.job-status-badge--closed {
    background: #f8d7da;
    color: #721c24;
}

/* Small button variant */
.btn--sm {
    padding: 7px 16px;
    font-size: 13px;
}

/* Empty state */
.jobs-empty {
    text-align: center;
    color: #888;
    font-size: 16px;
    padding: 56px 0;
}

/* ===========================
   RESPONSIVE — MOBILE CARD STACK
   =========================== */

@media (max-width: 720px) {
    .jobs-table-wrap {
        box-shadow: none;
        background: transparent;
    }

    .jobs-table,
    .jobs-table thead,
    .jobs-table tbody,
    .jobs-table th,
    .jobs-table td,
    .jobs-table tr {
        display: block;
    }

    .jobs-table thead {
        display: none; /* hide header row on mobile */
    }

    .jobs-table tbody tr {
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
        margin-bottom: 16px;
        padding: 16px;
        border: none;
    }

    .jobs-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
    }

    .jobs-table td:last-child {
        border-bottom: none;
        justify-content: flex-start;
        padding-top: 12px;
    }

    /* Show label prefix from data-label attribute */
    .jobs-table td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #9ca3af;
        flex-shrink: 0;
        margin-right: 12px;
    }

    [dir="rtl"] .jobs-table td::before {
        margin-right: 0;
        margin-left: 12px;
    }

    .jobs-table .col-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .jobs-table .col-apply {
        text-align: left;
    }

    [dir="rtl"] .jobs-table .col-apply {
        text-align: right;
    }
}

/* ===========================
   SINGLE JOB
   =========================== */

.job-hero {
    background: #1d3557;
    color: #fff;
    padding: 140px 0 60px;
}

.job-hero__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 760px;
}

.job-hero__back {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    width: fit-content;
}

.job-hero__back:hover {
    color: #fff;
}

.job-hero__title {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 800;
    margin: 0;
    color: #fff;
    line-height: 1.25;
}

/* Details strip */
.job-details-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
}

.job-detail-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.job-detail-item svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.job-detail-item--deadline {
    color: #ffd166;
}

/* Body */
.job-body {
    padding: 56px 0 80px;
    background: #fff;
}

.job-body__inner {
    max-width: 75%;
   text-align: justify;
}

.job-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.job-content h2,
.job-content h3 {
    color: #1d3557;
    margin-top: 1.5em;
}

.job-content ul,
.job-content ol {
    padding-left: 1.5em;
}

[dir="rtl"] .job-content ul,
[dir="rtl"] .job-content ol {
    padding-left: 0;
    padding-right: 1.5em;
}

.job-apply-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

/* ===========================
   SINGLE JOB — REDESIGN
   =========================== */

/* Hero enhancements */
.job-hero {
    background: var(--navy, #1d3557);
    color: #fff;
    padding: 140px 0 64px;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
}

.job-hero__org {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
}

.job-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    margin-top: 8px;
}

.job-hero__meta .sep {
    opacity: 0.4;
}

.job-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

/* Two-column layout */
.job-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
    padding-top: 56px;
    padding-bottom: 80px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.job-body .container {
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
}

.job-layout__sidebar {
    position: sticky;
    top: 100px;
}

/* Job sections (left column) */
.job-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #edf2f7;
}

.job-section:last-child {
    border-bottom: none;
}

.job-section__title {
    font-size: 18px;
    font-weight: 700;
    color: #1d3557;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e63946;
    display: inline-block;
}

.job-section__body {
    font-size: 15px;
    line-height: 1.85;
    color: #444;
    text-align: justify;
}

.job-section__body ul,
.job-section__body ol {
    padding-left: 1.5em;
    margin: 8px 0;
}

[dir="rtl"] .job-section__body ul,
[dir="rtl"] .job-section__body ol {
    padding-left: 0;
    padding-right: 1.5em;
}

.job-section__body li {
    margin-bottom: 6px;
}

/* Sidebar card */
.job-sidebar-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.job-sidebar-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #1d3557;
    line-height: 1.4;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf2f7;
}

.job-sidebar-info {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.job-sidebar-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #555;
}

.job-sidebar-info__label {
    font-weight: 600;
    color: #1d3557;
    min-width: 90px;
    flex-shrink: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 2px;
}

.job-sidebar-card__status {
    padding-top: 4px;
}

.job-sidebar-card .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.job-sidebar-back {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    margin-top: 4px;
    transition: color 0.2s;
}

.job-sidebar-back:hover {
    color: #1d3557;
}

/* Responsive */
@media (max-width: 960px) {
    .job-layout {
        grid-template-columns: 1fr;
    }

    .job-layout__sidebar {
        position: static;
        order: -1;
    }
}

/* ===========================
   SINGLE JOB — FIXES
   =========================== */

/* Fix 1: Hero height — match other pages */
.job-hero {
    padding: 100px 0 48px;
    min-height: unset;
}

/* Fix 2: Apply via SYCAC button style in hero */
.job-hero__actions .btn-outline-light {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    border: 2px solid rgba(255,255,255,0.7);
    color: #fff;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    background: transparent;
}

.job-hero__actions .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

/* Fix 3: Sidebar buttons full width and contained */
.job-sidebar-card .btn {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding: 12px 16px;
}

/* Fix: hero container above overlay */
.job-hero .container {
    position: relative;
    z-index: 2;
}

/* ===========================
   CATEGORY TABS
   =========================== */

.jobs-category-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid #E2EAF4;
    padding-bottom: 0;
}

.jobs-category-tab {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.jobs-category-tab:hover {
    color: #1D3557;
}

.jobs-category-tab.is-active {
    color: #3C78B4;
    border-bottom-color: #3C78B4;
}
