/* css/components/careers.css — website Careers page (careers.php). Listings come from the HRMS. */

.careers-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.careers-filters input,
.careers-filters select {
  width: 100%;
  font: inherit;
  color: var(--color-text-primary);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
}
.careers-filters input:focus,
.careers-filters select:focus { outline: 2px solid var(--color-sapphire-400); outline-offset: 1px; }
.careers-count { font-size: 0.78rem; color: var(--color-text-muted); margin: 0 0 var(--space-4); }

.careers-list { display: grid; border-bottom: 1px solid var(--color-border-subtle); }
.careers-job {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
  transition: background 200ms ease-out;
}
.careers-job::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--color-sapphire-400); transform: scaleY(0); transition: transform 220ms ease-out;
}
.careers-job:hover, .careers-job:focus-within { background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent 70%); }
.careers-job:hover::before, .careers-job:focus-within::before { transform: scaleY(1); }
.careers-job[hidden] { display: none; }
.careers-job__family { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-sapphire-400); margin: 0 0 var(--space-2); }
.careers-job .text-h3 { font-size: 1.15rem; margin: 0; }
.careers-job .text-h3 a { color: var(--color-text-primary); text-decoration: none; }
.careers-job .text-h3 a:hover { color: var(--color-sapphire-400); }
.careers-job__meta { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: 0.88rem; color: var(--color-slate-200); }
.careers-job__meta li + li::before { content: '·'; margin-right: var(--space-4); color: var(--color-text-muted); }
.careers-job__summary { margin: var(--space-3) 0 0; color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.6; max-width: 70ch; }
.careers-job__actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.careers-job__more { font-size: 0.85rem; font-weight: 600; color: var(--color-sapphire-400); text-decoration: none; }

.careers-none, .careers-portal-link { margin-top: var(--space-6); color: var(--color-text-muted); }
.svc .careers-portal-link { margin-top: var(--space-4); }
.svc .careers-more { margin-top: var(--space-8); text-align: center; }
.svc .careers-more:has(> [hidden]) { display: none; }
.careers-portal-link a, .careers-none a { color: var(--color-sapphire-400); }
.careers-empty {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-xl);
}
.careers-empty p { color: var(--color-text-muted); margin: var(--space-3) auto var(--space-6); max-width: 52ch; }

@media (max-width: 900px) {
  .careers-filters { grid-template-columns: 1fr 1fr; }
  .careers-filters input { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .careers-filters { grid-template-columns: 1fr; }
  .careers-job { grid-template-columns: 1fr; gap: var(--space-4); }
  .careers-job__actions { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Careers page sections (2026-10 redesign) ---------- */
.careers-status { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.careers-status .careers-count { margin: 0; }
.cr-area-pill {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font: 600 0.85rem var(--font-sans); color: var(--color-slate-50);
  background: rgba(37, 99, 235, 0.16); border: 1px solid rgba(59, 130, 246, 0.45);
  border-radius: var(--radius-full); padding: 0.35rem 0.85rem; cursor: pointer;
}
.cr-area-pill[hidden] { display: none; }
.cr-area-pill:hover { background: rgba(37, 99, 235, 0.28); }
.cr-area-pill:focus-visible { outline: 2px solid var(--color-sapphire-400); outline-offset: 2px; }

/* Why SoftSapien: sticky statement + editorial list */
.cr-why__inner { display: grid; gap: var(--space-10); }
@media (min-width: 960px) {
  .cr-why__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-16); align-items: start; }
  .cr-why__intro { position: sticky; top: 7rem; }
}
.cr-why__intro .text-h2 { text-wrap: balance; }
.cr-why__lede { margin-top: var(--space-4); color: var(--color-text-muted); font-size: 1.08rem; line-height: 1.7; max-width: 40ch; }
.cr-pillars { list-style: none; margin: 0; padding: 0; }
.cr-pillar { position: relative; padding: var(--space-6) 0 var(--space-6) var(--space-6); border-top: 1px solid var(--color-border-subtle); }
.cr-pillar:last-child { border-bottom: 1px solid var(--color-border-subtle); }
.cr-pillar::before {
  content: ''; position: absolute; left: 0; top: var(--space-6); bottom: var(--space-6); width: 2px;
  background: linear-gradient(180deg, var(--color-sapphire-400), var(--color-emerald-400));
  transform: scaleY(0.35); transform-origin: top; opacity: 0.55; transition: transform 300ms ease, opacity 300ms ease;
}
.cr-pillar:hover::before { transform: scaleY(1); opacity: 1; }
.cr-pillar__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 1vw + 0.8rem, 1.4rem); transition: color 200ms ease; }
.cr-pillar:hover .cr-pillar__title { color: var(--color-sapphire-400); }
.cr-pillar p { margin-top: var(--space-2); color: var(--color-text-muted); line-height: 1.7; max-width: 60ch; }

/* Career area explorer */
.cr-areas { position: relative; isolation: isolate; overflow: hidden; }
.cr-areas::before {
  content: ''; position: absolute; z-index: -1; inset: auto -15% -40% auto; width: min(48rem, 80vw); aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(37, 99, 235, 0.16), transparent 70%); pointer-events: none;
}
.cr-explorer { display: grid; gap: var(--space-10); }
.cr-explorer:not(.is-enhanced) .cr-explorer__tabs { display: none; }
.cr-explorer__tabs { display: flex; flex-direction: column; border-left: 1px solid var(--color-border-subtle); }
.cr-tab {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4);
  margin-left: -1px; padding: var(--space-4) var(--space-6); text-align: left; cursor: pointer;
  font: 600 1.02rem var(--font-display); color: var(--color-text-muted);
  background: none; border: 0; border-left: 2px solid transparent; transition: color 200ms ease, background 200ms ease, border-color 200ms ease;
}
.cr-tab:hover { color: var(--color-slate-50); }
.cr-tab[aria-selected="true"] { color: var(--color-slate-50); border-left-color: var(--color-sapphire-400); background: linear-gradient(90deg, rgba(37, 99, 235, 0.14), transparent 85%); }
.cr-tab:focus-visible { outline: 2px solid var(--color-sapphire-400); outline-offset: -2px; }
.cr-tab__count { flex: none; font-size: 0.72rem; color: var(--color-emerald-400); }
.cr-panel { outline: none; }
.cr-explorer:not(.is-enhanced) .cr-panel + .cr-panel { padding-top: var(--space-10); border-top: 1px solid var(--color-border-subtle); }
.cr-panel__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem); letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.cr-panel__desc { margin-top: var(--space-4); font-size: 1.12rem; line-height: 1.7; color: var(--color-slate-200); max-width: 52ch; }
.cr-panel__tags { list-style: none; margin: var(--space-6) 0 var(--space-8); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cr-panel__tags li {
  font: 500 0.82rem var(--font-mono); color: var(--color-slate-200);
  padding: 0.45rem 0.9rem; border: 1px solid rgba(59, 130, 246, 0.32); border-radius: var(--radius-full);
  transition: background 200ms ease, border-color 200ms ease;
}
.cr-panel__tags li:hover { background: rgba(37, 99, 235, 0.14); border-color: var(--color-sapphire-400); }
@media (prefers-reduced-motion: no-preference) {
  .cr-explorer.is-enhanced .cr-panel:not([hidden]) { animation: cr-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  @keyframes cr-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
}
@media (min-width: 900px) {
  .cr-explorer.is-enhanced { grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); gap: var(--space-16); align-items: start; }
  .cr-explorer.is-enhanced .cr-explorer__tabs { grid-row: 1; }
  .cr-explorer.is-enhanced .cr-panel { grid-column: 2; grid-row: 1; padding-top: var(--space-2); }
}
@media (max-width: 899px) {
  .cr-explorer.is-enhanced { gap: var(--space-8); }
  .cr-explorer.is-enhanced .cr-explorer__tabs { flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--color-border-subtle); scrollbar-width: none; }
  .cr-explorer.is-enhanced .cr-tab { flex: none; white-space: nowrap; margin: 0 0 -1px; padding: var(--space-3) var(--space-4); border-left: 0; border-bottom: 2px solid transparent; }
  .cr-explorer.is-enhanced .cr-tab[aria-selected="true"] { border-bottom-color: var(--color-sapphire-400); background: linear-gradient(0deg, rgba(37, 99, 235, 0.14), transparent 85%); }
}

/* Career stages: a progression line */
.cr-journey { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); }
.cr-journey::before {
  content: ''; position: absolute; left: 0.5rem; right: 0; top: calc(0.5rem - 1px); height: 2px;
  background: linear-gradient(90deg, var(--color-sapphire-500), var(--color-sapphire-400) 55%, var(--color-emerald-400));
}
.cr-step { position: relative; padding-top: var(--space-10); }
.cr-step__dot {
  position: absolute; top: 0; left: 0; width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--color-bg-primary); border: 2px solid var(--color-sapphire-400);
  transition: background 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.cr-step:last-child .cr-step__dot { border-color: var(--color-emerald-400); }
.cr-step:hover .cr-step__dot { background: var(--color-sapphire-400); box-shadow: 0 0 0 6px var(--color-sapphire-glow); transform: scale(1.15); }
.cr-step:last-child:hover .cr-step__dot { background: var(--color-emerald-400); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.3); }
.cr-step__title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.cr-step p { margin-top: var(--space-2); color: var(--color-text-muted); line-height: 1.65; font-size: 0.97rem; }
@media (max-width: 860px) {
  .cr-journey { grid-template-columns: 1fr; }
  .cr-journey::before { left: calc(0.5rem - 1px); right: auto; top: 0.5rem; bottom: 0.5rem; width: 2px; height: auto; background: linear-gradient(180deg, var(--color-sapphire-500), var(--color-emerald-400)); }
  .cr-step { padding: 0 0 0 var(--space-10); }
  .cr-step__dot { top: 0.2rem; }
}

/* FAQ: hairline rows beside a sticky heading */
.cr-faq__inner { display: grid; gap: var(--space-8); }
@media (min-width: 960px) {
  .cr-faq__inner { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-16); align-items: start; }
  .cr-faq__intro { position: sticky; top: 7rem; }
}
.cr-faq .faq-accordion { max-width: none; margin: 0; gap: 0; }
.cr-faq .faq-item { border: 0; border-top: 1px solid var(--color-border-subtle); border-radius: 0; background: none; padding: var(--space-1) 0; }
.cr-faq .faq-item:last-child { border-bottom: 1px solid var(--color-border-subtle); }
.cr-faq .faq-item summary { transition: color 200ms ease; }
.cr-faq .faq-item summary:hover, .cr-faq .faq-item[open] summary { color: var(--color-sapphire-400); }
.cr-faq .faq-item p { max-width: 64ch; line-height: 1.7; }
.cr-faq .faq-item p a { color: var(--color-sapphire-400); }
.svc .cr-policies { margin-top: var(--space-8); }
.svc .cr-policies__title { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--space-3); }
.cr-policies ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.cr-policies a { display: inline-block; padding: var(--space-1) 0 var(--space-1) var(--space-3); border-left: 2px solid var(--color-border-subtle); color: var(--color-text-primary); text-decoration: none; transition: color 200ms ease, border-color 200ms ease; }
.cr-policies a:hover, .cr-policies a:focus-visible { color: var(--color-sapphire-400); border-left-color: var(--color-sapphire-400); }
