/* ==========================================================================
   W3Staffing - Find Jobs page (Views/W3S/JobOpening.cshtml only).
   Self-contained (scoped to .w3j) so it looks the same in the public W3S layout and inside
   the candidate ERP layout.
   ========================================================================== */

.w3j {
    --j-bg: #f5f8fe;
    --j-bg-2: #eef4ff;
    --j-card: #ffffff;
    --j-card-2: #f7faff;
    --j-line: #e3eaf5;
    --j-line-2: #d3deef;
    --j-text: #0b1b3a;
    --j-muted: #5e6d86;
    --j-accent: #0b5ad6;
    --j-accent-2: #0b5ad6;
    --j-grad: linear-gradient(120deg, #0b4fc4 0%, #1a8ff0 55%, #1aa3f5 100%);
    background: var(--j-bg);
    color: var(--j-muted);
    font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
    min-height: 60vh;
}
.w3j h1, .w3j h2, .w3j h3, .w3j h4 { color: var(--j-text); font-family: "Sora", "Segoe UI", system-ui, sans-serif; }
.w3j a { text-decoration: none; }
.w3j .j-container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---------- hero with search */
.j-hero { position: relative; overflow: hidden; padding: 56px 0 44px; border-bottom: 1px solid var(--j-line);
    background: radial-gradient(760px 360px at 90% 0%, #e3f3ff, transparent 62%),
                radial-gradient(640px 360px at 0% 40%, #eef2ff, transparent 62%), #fff; }
.j-hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: end; }
.j-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--j-accent); }
.j-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; margin: .5rem 0 .6rem; }
.j-hero p { margin: 0 0 1.5rem; max-width: 600px; }
.j-search { display: flex; gap: .5rem; background: var(--j-card); border: 1px solid var(--j-line-2); border-radius: 999px; padding: .4rem .4rem .4rem 1.1rem; max-width: 620px; }
.j-search:focus-within { border-color: var(--j-accent); box-shadow: 0 0 0 4px rgba(26, 163, 245, .15); }
.j-search i { color: var(--j-muted); align-self: center; }
.j-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--j-text); font-size: .98rem; padding: .45rem .25rem; }
.j-search input::placeholder { color: #93a1b8; }
.j-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 999px; font-weight: 600; font-size: .92rem; padding: .65rem 1.35rem;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
.j-btn-primary { background: var(--j-grad); color: #fff !important; box-shadow: 0 10px 22px -10px rgba(26, 163, 245, .75); }
.j-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(26, 163, 245, .9); }
.j-btn-ghost { background: transparent; color: var(--j-text) !important; border-color: var(--j-line-2); }
.j-btn-ghost:hover { border-color: var(--j-accent); color: var(--j-accent) !important; }
.j-popular { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; font-size: .85rem; }
.j-popular button { background: #fff; border: 1px solid #d6e5ff; color: #0b5ad6; border-radius: 999px; padding: .2rem .7rem; font-size: .8rem; cursor: pointer; }
.j-popular button:hover { background: #eef4ff; }
.j-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.j-hstat { background: #fff; box-shadow: 0 10px 30px -18px rgba(11, 27, 58, .3); border: 1px solid var(--j-line); border-radius: 14px; padding: 1rem; text-align: center; }
.j-hstat b { display: block; color: var(--j-text); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.j-hstat span { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.j-hstat i { color: var(--j-accent); font-size: 1.35rem; display: block; margin-bottom: .2rem; }

/* ---------- layout */
.j-body { padding: 36px 0 72px; }
.j-layout { display: grid; grid-template-columns: 270px 1fr; gap: 1.75rem; align-items: start; }
.j-side { position: sticky; top: calc(var(--header-h, 112px) + 16px); display: grid; gap: 1rem; }
.j-panel { background: var(--j-card); border: 1px solid var(--j-line); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(11, 27, 58, .05); }
.j-panel-head { padding: .9rem 1.1rem; border-bottom: 1px solid var(--j-line); color: var(--j-text); font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: .55rem; }
.j-panel-head i { color: var(--j-accent); }
.j-filters { padding: .5rem; display: grid; gap: .2rem; }
.j-filter { display: flex; align-items: center; justify-content: space-between; width: 100%; background: transparent; border: 1px solid transparent; color: #2c3d5a;
    padding: .6rem .7rem; border-radius: 10px; font-size: .92rem; cursor: pointer; text-align: left; transition: background-color .15s ease, border-color .15s ease; }
.j-filter span:first-child { display: inline-flex; align-items: center; gap: .6rem; }
.j-filter i { color: var(--j-muted); width: 18px; text-align: center; }
.j-filter:hover { background: #f5f8fe; }
.j-filter.active { background: #eef4ff; border-color: #bcd3f8; color: #0b5ad6; }
.j-filter.active i { color: var(--j-accent); }
.j-count { min-width: 28px; text-align: center; font-size: .75rem; font-weight: 700; padding: .12rem .45rem; border-radius: 999px; background: #eef2f8; color: #2c3d5a; }
.j-filter.active .j-count { background: var(--j-grad); color: #fff; }
.j-promo { padding: 1.2rem 1.1rem; }
.j-promo h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .35rem; }
.j-promo p { font-size: .86rem; margin: 0 0 .9rem; }
.j-promo .j-btn { width: 100%; padding: .55rem 1rem; font-size: .88rem; }

/* ---------- toolbar */
.j-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem calc(270px + 1.75rem); min-height: 34px; }
.j-result { font-size: .92rem; }
.j-result b { color: var(--j-text); }
.j-active-q { display: inline-flex; align-items: center; gap: .4rem; margin-left: .5rem; background: #eef4ff; border: 1px solid #d6e5ff;
    color: #0b5ad6; border-radius: 999px; padding: .1rem .3rem .1rem .7rem; font-size: .8rem; }
.j-active-q button { background: transparent; border: 0; color: #0b5ad6; cursor: pointer; padding: 0 .25rem; }
.j-size { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.j-size select { background: var(--j-card); color: var(--j-text); border: 1px solid var(--j-line-2); border-radius: 8px; padding: .3rem .5rem; }

/* ---------- job cards */
.j-list { display: grid; gap: .9rem; }
.j-card { background: var(--j-card); border: 1px solid var(--j-line); border-radius: 16px; padding: 1.25rem 1.35rem; display: grid; grid-template-columns: 52px 1fr auto; gap: 1.1rem;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.j-card:hover { border-color: #cfe0fb; box-shadow: 0 18px 36px -22px rgba(11, 43, 107, .35); transform: translateY(-2px); }
.j-ico { width: 52px; height: 52px; border-radius: 14px; background: #eef4ff; color: var(--j-accent); display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.35rem; font-weight: 800; }
.j-title { color: var(--j-text); font-size: 1.08rem; font-weight: 700; margin: 0 0 .35rem; line-height: 1.35; }
.j-meta { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; font-size: .86rem; margin-bottom: .65rem; }
.j-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.j-meta i { color: var(--j-accent); }
.j-mode { font-size: .74rem; font-weight: 700; letter-spacing: .03em; padding: .15rem .6rem; border-radius: 999px; background: #ebf8e4; color: #2f7d14; border: 1px solid #c9eab6; }
.j-mode.m-contract { background: #eef4ff; color: #0b5ad6; border-color: #d6e5ff; }
.j-mode.m-remote { background: #f2eeff; color: #5b3fd6; border-color: #ddd3ff; }
.j-mode.m-part-time, .j-mode.m-internship { background: #fff2e5; color: #c45f00; border-color: #ffdcb8; }
.j-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.j-tag { font-size: .76rem; padding: .18rem .6rem; border-radius: 999px; background: #f2f5fa; color: #2c3d5a; border: 1px solid var(--j-line); }
.j-side-col { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.j-openings { font-size: .8rem; color: var(--j-text); background: #f2f5fa; border-radius: 999px; padding: .2rem .7rem; white-space: nowrap; }
.j-openings b { color: var(--j-accent); }
.j-actions { display: flex; gap: .5rem; }
.j-actions .j-btn { padding: .5rem 1.05rem; font-size: .86rem; }
.j-desc { grid-column: 2 / -1; border-top: 1px dashed var(--j-line-2); padding-top: .9rem; font-size: .92rem; color: #2c3d5a; line-height: 1.65; }
.j-desc[hidden] { display: none; }
.j-desc .j-desc-text { max-height: 220px; overflow: hidden; position: relative; }
.j-desc .j-desc-text.clipped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--j-card)); }
.j-desc .j-desc-text * { color: inherit !important; background: transparent !important; font-size: inherit !important; }
.j-desc .j-desc-text ul, .j-desc .j-desc-text ol { padding-left: 1.2rem; }
.j-desc-foot { margin-top: .75rem; display: flex; gap: .75rem; align-items: center; }
.j-desc-foot a { color: var(--j-accent); font-weight: 600; font-size: .88rem; }

/* skeleton / empty */
.j-sk { background: var(--j-card); border: 1px solid var(--j-line); border-radius: 16px; padding: 1.25rem; display: grid; grid-template-columns: 52px 1fr 110px; gap: 1.1rem; }
.j-sk div { border-radius: 8px; background: linear-gradient(90deg, #eef2f8 25%, #f7f9fc 50%, #eef2f8 75%); background-size: 200% 100%; animation: j-shimmer 1.3s infinite; }
.j-sk .a { height: 52px; } .j-sk .b { height: 14px; margin-bottom: .6rem; } .j-sk .c { height: 36px; border-radius: 999px; }
@keyframes j-shimmer { to { background-position: -200% 0; } }
.j-empty { text-align: center; background: var(--j-card); border: 1px dashed var(--j-line-2); border-radius: 16px; padding: 3rem 1.5rem; }
.j-empty i { font-size: 2.2rem; color: var(--j-accent); }
.j-empty h3 { font-size: 1.15rem; margin: .8rem 0 .4rem; }
.j-empty p { margin: 0 0 1.2rem; }

/* pagination */
.j-pager { display: flex; justify-content: center; gap: .35rem; margin-top: 1.75rem; flex-wrap: wrap; }
.j-pager button { min-width: 40px; height: 40px; border-radius: 10px; background: var(--j-card); border: 1px solid var(--j-line); color: #2c3d5a; font-weight: 600; cursor: pointer; padding: 0 .6rem; }
.j-pager button:hover:not(:disabled) { border-color: var(--j-accent); color: var(--j-accent); }
.j-pager button.active { background: var(--j-grad); border-color: transparent; color: #fff; }
.j-pager button:disabled { opacity: .4; cursor: default; }
.j-pager .gap { align-self: center; padding: 0 .25rem; }

.w3j .alert { border-radius: 12px; }

/* ---------- responsive */
@media (max-width: 991.98px) {
    .j-hero-grid { grid-template-columns: 1fr; }
    .j-layout { grid-template-columns: 1fr; }
    .j-toolbar { margin-left: 0; }
    .j-side { position: static; }
    .j-filters { display: flex; overflow-x: auto; gap: .4rem; padding: .6rem; scrollbar-width: none; }
    .j-filters::-webkit-scrollbar { display: none; }
    .j-filter { width: auto; flex: 0 0 auto; gap: .6rem; border-color: var(--j-line); }
    .j-promo-wrap { display: none; }
}
@media (max-width: 575.98px) {
    .j-hero { padding: 40px 0 32px; }
    .j-hero-stats { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
    .j-hstat { padding: .7rem .4rem; }
    .j-hstat b { font-size: 1.25rem; }
    .j-card { grid-template-columns: 1fr; }
    .j-ico { display: none; }
    .j-side-col { flex-direction: row; align-items: center; }
    .j-desc { grid-column: 1; }
    .j-search .j-btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .j-sk div { animation: none; } }
