/* ============================================================
   HKOEA — Live vacancies (/ai-jobs-now)
   ------------------------------------------------------------
   沿用 sections.css 的語言：細框、金線、無陰影漸變濫用。
   職位卡刻意比職能卡「密」—— 這是名單，不是櫥窗。
   ============================================================ */

.section--tight {
  padding-block: clamp(28px, 4vw, 48px);
}

/* ---- 快讀數字 ---- */
.jobstats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line2);
  border: var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
}

.jobstats__item {
  background: var(--panel);
  padding: clamp(20px, 2.6vw, 30px) clamp(16px, 2vw, 24px);
}

.jobstats__item b {
  display: block;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 10px;
  /* 數字對齊：Inter 的可變字寬會令 1 與 8 寬度不同 */
  font-variant-numeric: tabular-nums;
}

.jobstats__item span {
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.jobs-note {
  margin-top: 18px;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 78ch;
}

/* ---- 篩選 ---- */
.jobfilter {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: clamp(20px, 3vw, 30px);
  margin-bottom: clamp(22px, 3vw, 34px);
  border-bottom: var(--hair);
}

.jobfilter .chips {
  margin-bottom: 0;
}

.chips--sm .chip--sm {
  padding: 6px 13px;
  font-size: 0.78rem;
}

.chip__n {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.6;
  margin-left: 4px;
}

.chip[aria-pressed="true"] .chip__n {
  opacity: 0.75;
}

.jobfilter__count {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 4px 0 0;
}

.jobfilter__count b {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* ---- 職位卡 ---- */
.job-grid__inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
}

.job {
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.2vw, 24px);
  border: var(--hair);
  border-radius: 12px;
  background: var(--panel);
  transition: border-color 0.28s var(--ease), background-color 0.28s var(--ease);
  position: relative;
  min-width: 0;
}

.job:hover {
  border-color: var(--line);
  background: var(--panel2);
}

/* 卡片左上的金色幼線，只在 hover 出現 */
.job::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: var(--gold);
  opacity: 0;
  border-radius: 2px;
  transition: opacity 0.3s var(--ease);
}

.job:hover::before {
  opacity: 1;
}

.job__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.job__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job__tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--gold);
  white-space: nowrap;
}

.job__tag--lvl,
.job__tag--type {
  border-color: var(--line2);
  color: var(--muted);
}

.job__age {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 3px;
}

.job__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.36;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 6px;
}

.job__company {
  font-size: 0.83rem;
  color: var(--ink2);
  margin: 0 0 12px;
}

.job__loc {
  color: var(--muted);
}

.job__note {
  font-size: 0.845rem;
  line-height: 1.6;
  color: var(--ink2);
  margin: 0 0 16px;
  flex: 1;
}

.job__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: var(--hair);
}

.job__salary {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.job__salary--none {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.76rem;
}

.job__apply {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--gold);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color 0.24s var(--ease);
}

.job__apply:hover {
  border-bottom-color: var(--gold);
}

/* ---- 交叉推薦 ---- */
.cross {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.cross__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.cross__list li + li {
  border-top: var(--hair);
}

.cross__list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--ink2);
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease);
}

.cross__list a:hover {
  background: var(--panel2);
  color: var(--ink);
}

.cross__list a > span:first-child {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--gold);
  flex-shrink: 0;
  width: 28px;
}

.cross__list a > b {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---- 響應式 ---- */
@media (max-width: 900px) {
  .job-grid__inner {
    grid-template-columns: 1fr;
  }

  .cross {
    grid-template-columns: 1fr;
  }

  .jobstats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .jobstats {
    grid-template-columns: 1fr;
  }

  .job__title {
    font-size: 0.95rem;
  }

  .job__foot {
    flex-wrap: wrap;
  }
}

/* ---- 職能目錄頁的「現正招聘」橫幅 ---- */
.livebanner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  padding: clamp(18px, 2.4vw, 26px) clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.28s var(--ease), transform 0.28s var(--ease);
}

.livebanner:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.livebanner__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
  flex-shrink: 0;
  box-shadow: 0 0 0 5px rgba(217, 180, 81, 0.14);
  animation: livepulse 2.4s var(--ease) infinite;
}

@keyframes livepulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(217, 180, 81, 0.16); }
  50% { box-shadow: 0 0 0 8px rgba(217, 180, 81, 0.04); }
}

@media (prefers-reduced-motion: reduce) {
  .livebanner__dot { animation: none; }
}

.livebanner__txt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.livebanner__txt b {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.livebanner__txt > span {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--muted);
}

.livebanner__cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .livebanner {
    flex-wrap: wrap;
  }

  .livebanner__cta {
    margin-left: 23px;
  }
}

/* ---- 職位卡標題縮小 ----
   原因：頁面 h1 為 54px，若職位卡沿用 h3 的 16px 以上預設，
   70 張卡的標題會與 h2（40px）爭奪視覺層級，令閱讀動線混亂。
   在列表頁，卡片標題是「資料」而非「章節」，所以壓到 1.02rem，
   保持 h3 的語意（SEO 正確）但降低視覺權重。 */
.job__title {
  font-size: 1.02rem;
}

@media (max-width: 620px) {
  .job__title {
    font-size: 0.97rem;
  }
}

/* ---- 直接答案區（GEO） ----
   放在列表之後、FAQ 之前：答案引擎抽取時，先看到「幾個職位、誰在請、
   薪酬如何披露」這幾個可被逐句引用的短答，再看細節。
   與 roles.html 的 .answer 同一視覺語言，不另創新樣式。 */
.answers {
  display: grid;
  gap: 1px;
  background: var(--line2);
  border: var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
}

.answers__item {
  background: var(--panel);
  padding: clamp(20px, 2.4vw, 28px);
}

.answers__item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

/* 答案本身要比一般內文更「直白」：一句話，可獨立引用。 */
.answers__item p {
  font-size: 0.9rem;
  line-height: 1.68;
  color: var(--ink2);
  margin: 0;
}

.answers__item b {
  color: var(--gold);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 760px) {
  .answers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- 方法與局限（四張卡） ----
   與 .answers 不同：這裡講的是「這份清單不是什麼」，語氣要更硬，
   所以用卡片而非條列，並在標題前加金色短線。 */
.answer__grid {
  display: grid;
  gap: 1px;
  background: var(--line2);
  border: var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(24px, 3vw, 38px);
}

.answer__card {
  background: var(--panel);
  padding: clamp(22px, 2.6vw, 32px);
}

.answer__card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
  padding-left: 14px;
  position: relative;
  line-height: 1.45;
}

.answer__card h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 7px;
  height: 1px;
  background: var(--gold);
}

.answer__card p {
  font-size: 0.9rem;
  line-height: 1.68;
  color: var(--ink2);
  margin: 0;
}

.answer__note {
  margin-top: clamp(20px, 2.4vw, 28px);
  padding-top: 18px;
  border-top: var(--hair);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--ink3, var(--ink2));
}

.answer__note strong {
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 760px) {
  .answer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- 標題層級收緊 ----
   職位名稱是 <h3>，但它是「卡片標題」而非章節標題，字級應貼近內文，
   否則 H1 (54px) 與 H3 (15px) 相差 3.5 倍，閱讀節奏會斷。
   這裡把 H3 統一抬到 1.05rem，並給 CTA 的 h2 明確層級。 */
.job__title,
.answers__item h3,
.answer__card h3 {
  font-size: 1.05rem;
  line-height: 1.45;
}

.cta-band h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
