/* ==========================================================
   Career page
   ========================================================== */

/* ---------- Banner (reusable for other inner pages) ---------- */
.page-banner {
  position: relative; color: #fff;
  padding: 4.5rem 0 5.5rem;
  background: linear-gradient(90deg, rgba(1,66,141,.94) 0%, rgba(1,66,141,.78) 45%, rgba(1,66,141,.25) 100%),
              var(--banner-img, none) center / cover no-repeat, var(--nit-blue);
}
.career-banner { --banner-img: url(../img/career-banner.jpg); }
.page-banner .container-xl, .openings .container-xl, .how-apply .container-xl, .career-summary .container-xl { padding-left: 5.5rem; padding-right: 2rem; }
.page-banner h1 { font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); margin: .25rem 0 .4rem; letter-spacing: -.01em; }
.page-banner p { margin: 0; opacity: .9; font-size: 1.1rem; }
.page-banner .breadcrumb { margin: 0; font-size: .92rem; }
.page-banner .breadcrumb a { color: #fff; text-decoration: none; opacity: .85; }
.page-banner .breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.page-banner .breadcrumb-item.active { color: #fff; font-weight: 600; }
.page-banner .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.6); }

/* ---------- Summary cards (overlap banner) ---------- */
.career-summary { margin-top: -3rem; position: relative; z-index: 2; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.summary-card {
  display: flex; align-items: center; gap: .9rem;
  background: #fff; border-radius: var(--radius); padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-md); border-bottom: 3px solid var(--nit-blue);
}
.summary-card .ico {
  flex: 0 0 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
  background: var(--nit-blue-50); color: var(--nit-blue); font-size: 1.25rem;
}
.summary-card .ico.warn { background: #fdecee; color: var(--nit-red); }
.summary-card strong { display: block; font-size: 1.45rem; line-height: 1.15; color: var(--nit-blue); font-weight: 800; }
.summary-card strong.mail { font-size: 1rem; word-break: break-all; }
.summary-card strong.mail a { text-decoration: none; }
.summary-card span:not(.ico) { color: var(--nit-muted); font-size: .88rem; font-weight: 500; }

/* ---------- Section head + steps ---------- */
.how-apply { padding: 3rem 0 1rem; }
.section-head { text-align: center; margin-bottom: 1.8rem; }
.section-head h2 { color: var(--nit-blue); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .3rem; }
.section-head h2::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 2px; background: var(--nit-accent); margin: .6rem auto 0; }
.section-head p { color: var(--nit-muted); margin: 0; font-size: 1.05rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: s; }
.steps li { display: flex; gap: .8rem; align-items: flex-start; background: var(--nit-bg); border: 1px solid var(--nit-line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.steps li > span { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--nit-blue); color: #fff; display: grid; place-items: center; font-weight: 700; }
.steps b { display: block; color: var(--nit-ink); }
.steps small { color: var(--nit-muted); font-size: .88rem; }

/* ---------- Toolbar ---------- */
.openings { padding: 1.5rem 0 0; }
.toolbar {
  display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--nit-line); border-radius: var(--radius);
  padding: .75rem; box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 5;
}
.search { position: relative; flex: 1 1 320px; }
.search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--nit-muted); }
.search input {
  width: 100%; border: 1px solid var(--nit-line); border-radius: 8px; padding: .65rem .9rem .65rem 2.5rem;
  font-size: .98rem; background: var(--nit-bg);
}
.search input:focus { outline: none; border-color: var(--nit-blue-600); background: #fff; box-shadow: 0 0 0 3px rgba(1,66,141,.12); }
.filters { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--nit-bg); border: 1px solid var(--nit-line); border-radius: 8px; padding: 3px; }
.seg button { border: 0; background: none; padding: .45rem .9rem; border-radius: 6px; font-weight: 600; font-size: .92rem; color: var(--nit-muted); }
.seg button em { font-style: normal; font-size: .78rem; background: #e3e9f1; color: var(--nit-muted); border-radius: 10px; padding: .05rem .45rem; margin-left: .25rem; }
.seg button.active { background: var(--nit-blue); color: #fff; }
.seg button.active em { background: rgba(255,255,255,.2); color: #fff; }
.filters .form-select { width: auto; border-color: var(--nit-line); font-weight: 500; font-size: .92rem; }
.result-meta { color: var(--nit-muted); font-size: .9rem; margin: .9rem .2rem .6rem; }

/* ---------- Advertisement cards ---------- */
.vac-list { display: flex; flex-direction: column; gap: .9rem; }
.vac-card {
  background: #fff; border: 1px solid var(--nit-line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .15s, border-color .15s;
}
.vac-card:hover { box-shadow: var(--shadow-md); }
.vac-card.is-open-ad { border-left: 4px solid var(--nit-green); }
.vac-head {
  width: 100%; border: 0; background: none; text-align: left;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
}
.vac-card .vac-head[aria-expanded="true"] { background: linear-gradient(180deg, var(--nit-blue-50), #fff); border-bottom: 1px solid var(--nit-line); }
.vac-no { display: block; color: var(--nit-blue); font-weight: 700; font-size: 1.15rem; }
.vac-meta { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; margin-top: .3rem; color: var(--nit-muted); font-size: .88rem; }
.vac-meta i { color: var(--nit-blue-600); margin-right: .2rem; }
.vac-side { display: flex; align-items: center; gap: .9rem; flex-shrink: 0; }
.badge-status { font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 20px; white-space: nowrap; }
.badge-status.open { background: #e6f4ec; color: var(--nit-green); }
.badge-status.open i { font-size: .45rem; vertical-align: middle; margin-right: .3rem; animation: pulse 1.6s infinite; }
.badge-status.closed { background: #eef0f3; color: #6c757d; }
@keyframes pulse { 50% { opacity: .25; } }
.chev { color: var(--nit-blue); transition: transform .2s; }
.vac-head[aria-expanded="true"] .chev { transform: rotate(180deg); }

.vac-body { padding: 1.2rem 1.25rem 1.4rem; }
.vac-intro { font-weight: 600; color: var(--nit-blue-600); margin-bottom: 1rem; }
.vac-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.vac-info > div { background: var(--nit-bg); border: 1px solid var(--nit-line); border-radius: 10px; padding: .7rem .9rem; }
.vac-info small { display: block; color: var(--nit-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.vac-info b { font-weight: 700; color: var(--nit-ink); word-break: break-word; }
.vac-info .hl { background: #fdf1f2; border-color: #f5c6cb; }
.vac-info .hl b { color: var(--nit-red); }
.vac-notes { margin-bottom: 1.1rem; }
.vac-notes h4 { font-size: 1rem; font-weight: 700; color: var(--nit-blue); margin-bottom: .4rem; }
.vac-notes ul { margin: 0; padding-left: 1.2rem; }
.vac-notes li { margin-bottom: .35rem; font-size: .95rem; }

/* ---------- Job table ---------- */
.table-responsive-stack { border: 1px solid var(--nit-line); border-radius: 10px; overflow: hidden; }
.job-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.job-table thead th {
  background: var(--nit-blue); color: #fff; font-weight: 600; font-size: .86rem;
  padding: .75rem .9rem; text-align: left; vertical-align: middle;
}
.job-table td { padding: .7rem .9rem; border-top: 1px solid var(--nit-line); vertical-align: middle; }
.job-table tbody tr:nth-child(even) td { background: #fafbfd; }
.job-table tbody tr:hover td { background: var(--nit-blue-50); }
.job-table .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; color: var(--nit-muted); white-space: nowrap; }
.job-table .pos { font-weight: 600; }
.file-btn {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  color: var(--nit-red); font-weight: 600; text-decoration: none; font-size: .88rem;
  padding: .3rem .6rem; border: 1px solid #f3c2c7; border-radius: 6px; background: #fff;
}
.file-btn:hover { background: var(--nit-red); color: #fff; border-color: var(--nit-red); }
.file-btn.amend { color: #b26a00; border-color: #f1d3a1; }
.file-btn.amend:hover { background: #b26a00; color: #fff; }
.apply-btn {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  background: var(--nit-blue); color: #fff; font-weight: 600; font-size: .88rem;
  padding: .38rem .8rem; border-radius: 6px; text-decoration: none;
}
.apply-btn:hover { background: var(--nit-blue-dark); color: #fff; }
.muted { color: #9aa3ae; }
mark { background: #fff3a8; padding: 0 1px; border-radius: 2px; }

/* ---------- Empty + load more ---------- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--nit-muted); border: 2px dashed var(--nit-line); border-radius: var(--radius); }
.empty-state i { font-size: 2.4rem; color: var(--nit-blue-600); margin-bottom: .6rem; }
.empty-state h3 { font-size: 1.2rem; color: var(--nit-ink); font-weight: 700; }
.link-btn { border: 0; background: none; padding: 0; color: var(--nit-blue); font-weight: 600; text-decoration: underline; }
.btn-outline-nit { border: 2px solid var(--nit-blue); color: var(--nit-blue); font-weight: 600; padding: .55rem 1.4rem; border-radius: 8px; }
.btn-outline-nit:hover { background: var(--nit-blue); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991.98px) {
  .page-banner .container-xl, .openings .container-xl, .how-apply .container-xl, .career-summary .container-xl { padding-left: 1rem; padding-right: 1rem; }
  .steps { grid-template-columns: 1fr; }
  .toolbar { position: static; }
  /* Table becomes stacked cards */
  .table-responsive-stack { border: 0; border-radius: 0; overflow: visible; }
  .job-table thead { display: none; }
  .job-table, .job-table tbody, .job-table tr, .job-table td { display: block; width: 100%; }
  .job-table tr { border: 1px solid var(--nit-line); border-radius: 10px; margin-bottom: .7rem; overflow: hidden; }
  .job-table td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--nit-line); background: #fff !important; }
  .job-table td:first-child { border-top: 0; background: var(--nit-blue-50) !important; }
  .job-table td::before { content: attr(data-label); font-size: .78rem; font-weight: 600; color: var(--nit-muted); text-transform: uppercase; letter-spacing: .03em; }
  .job-table td.pos { text-align: right; }
}
@media (max-width: 575.98px) {
  .summary-grid { grid-template-columns: 1fr; }
  .vac-head { flex-direction: column; align-items: flex-start; }
  .vac-side { width: 100%; justify-content: space-between; }
  .filters, .seg { width: 100%; }
  .seg button { flex: 1; padding: .45rem .4rem; }
  .filters .form-select { width: 100%; }
}
