/**
 * Jobs listing page — University of Sierra Leone
 */

.usl-jobs-page {
    --job-navy: var(--usl-primary-dark, #0f172a);
    --job-blue: var(--usl-primary, #1e3a8a);
    --job-gold: var(--usl-accent, #fbbf24);
    --job-surface: #f8fafc;
    --job-card: #ffffff;
    --job-muted: #64748b;
    --job-border: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

/* Hero — compact */
.job-hero {
    position: relative;
    overflow: hidden;
    padding: 2rem 0 1.65rem;
    background:
        radial-gradient(ellipse 70% 80% at 0% 0%, rgba(251, 191, 36, 0.14), transparent 50%),
        radial-gradient(ellipse 60% 70% at 100% 100%, rgba(96, 165, 250, 0.15), transparent 45%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #172554 100%);
    color: #fff;
}

.job-hero__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0v40M0 20h40' stroke='%23ffffff' stroke-width='0.5' fill='none'/%3E%3C/svg%3E");
    pointer-events: none;
}

.job-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.job-hero__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 900px) {
    .job-hero__top {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        gap: 2rem;
    }
}

.job-hero__copy {
    flex: 1;
    min-width: 0;
}

.job-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.7rem;
    margin: 0 0 0.55rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fde68a;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.job-hero__title {
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    font-weight: 800;
    line-height: 1.12;
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
}

.job-hero__lead {
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
    max-width: 34rem;
    margin: 0;
}

@media (min-width: 900px) {
    .job-hero__lead {
        margin: 0;
    }
}

.job-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 900px) {
    .job-hero__actions {
        justify-content: flex-end;
    }
}

.job-btn--sm {
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
}

.job-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.72rem 1.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 0.65rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.job-btn:hover {
    transform: translateY(-2px);
}

.job-btn--primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a;
    box-shadow: 0 8px 22px rgba(251, 191, 36, 0.32);
}

.job-btn--ghost {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.job-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.job-btn--solid {
    background: var(--job-blue);
    color: #fff;
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.28);
}

.job-btn--solid:hover {
    color: #fff;
}

.job-btn--apply {
    background: #059669;
    color: #fff;
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.28);
}

.job-btn--apply:hover {
    color: #fff;
}

.job-hero__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 900px) {
    .job-hero__stats {
        justify-content: flex-start;
    }
}

.job-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.job-hero-chip strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: #fff;
}

/* Layout */
.job-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.job-section {
    padding: 4rem 0;
}

.job-section--alt {
    background: var(--job-surface);
}

.job-section__head {
    text-align: center;
    max-width: 38rem;
    margin: 0 auto 2.5rem;
}

.job-section__eyebrow {
    display: inline-block;
    margin-bottom: 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--job-blue);
}

.job-section__title {
    font-size: clamp(1.65rem, 3.2vw, 2.2rem);
    font-weight: 800;
    margin: 0 0 0.65rem;
    letter-spacing: -0.02em;
}

.job-section__lead {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--job-muted);
}

/* Filters */
.job-filters {
    background: var(--job-card);
    border: 1px solid var(--job-border);
    border-radius: 1.2rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.job-filters__title {
    margin: 0 0 1.15rem;
    font-size: 1.1rem;
    font-weight: 800;
}

.job-filters__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .job-filters__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: end;
    }
}

.job-filters label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
}

.job-filters select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    background: #fff;
    color: #0f172a;
}

.job-filters select:focus {
    outline: none;
    border-color: var(--job-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.job-type-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
}

.job-type-pill {
    padding: 0.38rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    background: var(--job-surface);
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.job-type-pill:hover,
.job-type-pill.is-active {
    background: var(--job-blue);
    border-color: var(--job-blue);
    color: #fff;
}

/* Featured grid */
.job-featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .job-featured-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.job-featured-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.35rem;
    background: linear-gradient(160deg, rgba(30, 58, 138, 0.07), rgba(30, 58, 138, 0.02));
    border: 1px solid rgba(30, 58, 138, 0.14);
    border-top: 3px solid var(--job-gold);
    border-radius: 1.1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.job-featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

.job-featured-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: flex-start;
    margin-bottom: 0.85rem;
    padding: 0.28rem 0.65rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #92400e;
    background: #fef3c7;
    border-radius: 999px;
}

.job-featured-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
}

.job-featured-card__company {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--job-blue);
}

.job-featured-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    margin-bottom: 0.75rem;
    font-size: 0.78rem;
    color: var(--job-muted);
}

.job-featured-card__salary {
    margin-bottom: 0.65rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #059669;
}

.job-featured-card__desc {
    margin: 0 0 1rem;
    font-size: 0.84rem;
    line-height: 1.55;
    color: #475569;
    flex: 1;
}

.job-featured-card__cta {
    margin-top: auto;
}

/* Job listing cards */
.job-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.job-card {
    background: var(--job-card);
    border: 1px solid var(--job-border);
    border-radius: 1.1rem;
    padding: 1.35rem 1.4rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.job-card:hover {
    transform: translateY(-3px);
    border-color: rgba(30, 58, 138, 0.18);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
}

.job-card__layout {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

@media (min-width: 900px) {
    .job-card__layout {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}

.job-card__main {
    flex: 1;
    min-width: 0;
}

.job-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.job-card__title {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.35;
    color: #0f172a;
}

.job-card__company {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--job-blue);
}

.job-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.job-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 999px;
    color: var(--tag-color, var(--job-blue));
    background: var(--tag-bg, rgba(30, 58, 138, 0.08));
}

.job-card__desc {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #475569;
}

.job-card__aside {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

@media (min-width: 900px) {
    .job-card__aside {
        align-items: flex-end;
        text-align: right;
        min-width: 11rem;
    }
}

.job-card__salary {
    font-size: 1rem;
    font-weight: 800;
    color: #059669;
}

.job-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.job-badge-featured {
    padding: 0.22rem 0.55rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #92400e;
    background: #fef3c7;
    border-radius: 999px;
}

/* Category tiles */
.job-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .job-cat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.job-cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.35rem 1rem;
    background: #fff;
    border: 1px solid var(--job-border);
    border-radius: 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.job-cat-tile:hover {
    transform: translateY(-4px);
    border-color: var(--cat-ring, rgba(30, 58, 138, 0.2));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.job-cat-tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.75rem;
    border-radius: 0.85rem;
    font-size: 1.1rem;
    background: var(--cat-bg, rgba(30, 58, 138, 0.1));
    color: var(--cat-color, var(--job-blue));
}

.job-cat-tile h3 {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    font-weight: 800;
}

.job-cat-tile p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--job-muted);
}

/* Empty & error */
.job-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    border-radius: 0.85rem;
    font-size: 0.9rem;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.job-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 1.15rem;
}

.job-empty i {
    font-size: 2.75rem;
    color: #cbd5e1;
    margin-bottom: 0.85rem;
}

.job-empty h3 {
    margin: 0 0 0.45rem;
    font-size: 1.15rem;
    font-weight: 800;
}

.job-empty p {
    margin: 0 0 1rem;
    color: var(--job-muted);
}

/* CTA band */
.job-cta {
    padding: 4rem 0;
    background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 100%);
    color: #fff;
    text-align: center;
}

.job-cta h2 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 800;
}

.job-cta p {
    margin: 0 auto 1.35rem;
    max-width: 32rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
}

.job-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}
