/* ── Career Page ──────────────────────────────────────────────────────── */

.career-section {
  padding: 72px 0 96px;
  font-family: 'DM Sans', sans-serif;
}

.career-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.career-intro { margin-bottom: 48px; }

.career-kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #F7B605;
  margin-bottom: 10px;
}

.career-heading {
  font-family: 'Google Sans', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 500;
  line-height: 1.18;
  color: #50585c;
  margin-bottom: 14px;
}

.career-heading em { font-style: normal; color: #50585c; }

.career-lead {
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
  max-width: 580px;
}

/* ── Job list ─────────────────────────────────────────────────────────── */

.career-jobs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Make groups transparent so all cards flow into the parent grid */
.job-type-group {
  display: contents;
}

/* ── Job item card ────────────────────────────────────────────────────── */

.job-item {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  transition: transform .2s;
}

.job-item:hover {
  transform: translateY(-2px);
}

/* ── Trigger: two-column (image | yellow info box) ────────────────────── */

.job-item-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: stretch;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  min-height: 200px;
}

.job-item-trigger:focus-visible {
  outline: 3px solid #F7B605;
  outline-offset: -3px;
}

/* Image side */
.job-item-img-wrap {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0;
  background: #f8f9fa;
}

.job-item-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
  padding: 6px;
}

/* Yellow info side */
.job-item-info {
  background: transparent;
  padding: 32px 36px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  position: relative;
  transition: background .25s;
}

.job-item:hover .job-item-info,
.job-item[data-open="true"] .job-item-info { background: #F7B605; }

.job-item-info-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.job-item-title {
  display: block;
  font-family: 'Google Sans', sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 500;
  color: #50585c;
  line-height: 1.25;
}

.job-item-type {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #50585c;
}

/* ── All job items share the same default + hover style ──────────────── */
.job-item--featured,
.job-item--plain {
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
}

/* Featured card: adjust icon colours on yellow bg */
.job-item--featured .job-item-icon { border-color: rgba(80,88,92,.35); }

/* Plus / minus toggle icon */
.job-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(80,88,92,.25);
  background: transparent;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 16px;
  transition: background .2s, border-color .2s;
}

.job-item-icon::before,
.job-item-icon::after {
  content: '';
  position: absolute;
  background: #50585c;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

.job-item-icon::before { width: 16px; height: 2px; }
.job-item-icon::after  { width: 2px; height: 16px; }

/* When open: hide the vertical bar (turns + into −) */
.job-item[data-open="true"] .job-item-icon::after { opacity: 0; transform: rotate(90deg); }
.job-item[data-open="true"] .job-item-icon { border-color: #50585c; background: rgba(80,88,92,.08); }


/* ── Inline body hidden (used only as data source) ────────────────────── */

.job-item-body { display: none; }

/* ── Full-width detail row inserted by JS ─────────────────────────────── */

.career-row-detail {
  grid-column: 1 / -1;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  padding: 32px 36px 36px;
  border-top: 3px solid #F7B605;
  animation: detailIn .3s cubic-bezier(.4,0,.2,1) both;
}

@keyframes detailIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.job-item-content {
  padding: 0;
  min-width: 0;
}

/* ── Sections ─────────────────────────────────────────────────────────── */

.job-section-block { margin-bottom: 24px; }
.job-section-block:last-of-type { margin-bottom: 0; }

.job-section-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.job-section-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #6b7a94;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.job-section-body ul,
.job-section-body ol {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.job-section-body li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 3px;
  color: #6b7a94;
}

.job-section-body li::before {
  content: '•';
  color: #6b7a94;
  font-size: .7em;
  flex-shrink: 0;
  line-height: 1.85;
}

.job-section-body p { margin: 0; color: #6b7a94; }

.job-section-body span { border: none !important; outline: none !important; }

/* ── Apply row ────────────────────────────────────────────────────────── */

.job-apply-row { margin-top: 28px; }

.job-apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: #1a1a2e;
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, transform .15s;
}

.job-apply-btn:hover { background: #2d2d4e; transform: translateY(-1px); }
.job-apply-btn:hover .job-apply-arrow { transform: translateX(3px); }
.job-apply-arrow { font-size: 1.1em; transition: transform .2s; }

/* ── Reveal on scroll (per job item) ─────────────────────────────────── */
/* Hidden state applied by JS only — items visible if JS fails */

.job-item.will-reveal {
  opacity: 0;
  transform: translateY(56px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--reveal-delay, 0s);
}

.job-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.career-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}

.career-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ── Empty state ──────────────────────────────────────────────────────── */

.career-section--empty { padding: 40px 0 96px; }

.career-empty-state {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.career-empty-state .career-lead {
  max-width: 100%;
  text-align: center;
}

.ces-illustration {
  margin: 0 auto 40px;
  width: 380px;
  max-width: 100%;
}

.ces-lottie {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
}

/* Fade-in on load */
.ces-illustration {
  animation: cesFadeIn .8s ease both;
}
@keyframes cesFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal ────────────────────────────────────────────────────────────── */

.career-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.career-modal[hidden] { display: none; }

.career-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.career-modal-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  animation: modalIn .28s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.career-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f3f3f3;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background .15s;
}

.career-modal-close:hover { background: #e8e8e8; }
.career-modal-inner { padding: 44px 48px 40px; }

.career-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.career-modal-job {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #1a1a1a;
  background: #F7B605;
  padding: 5px 14px;
  border-radius: 999px;
  margin-top: 10px;
  margin-bottom: 24px;
}

/* ── Apply form ───────────────────────────────────────────────────────── */

.career-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.career-field { display: flex; flex-direction: column; gap: 10px; }
.career-field--full { grid-column: 1 / -1; }
.career-label { font-size: .82rem; font-weight: 600; color: #333; }
.career-label span { color: #e74c3c; }

.career-input,
.career-textarea {
  padding: 0 0 10px;
  border: none;
  border-bottom: 1.5px solid #ddd;
  border-radius: 0;
  font-size: .95rem;
  font-family: inherit;
  color: #1a1a1a;
  background: transparent;
  transition: border-color .2s;
}

.career-input::placeholder,
.career-textarea::placeholder { color: #999; }

.career-input:focus,
.career-textarea:focus { outline: none; border-bottom-color: #F7B605; }
.career-textarea { resize: vertical; min-height: 100px; border: 1.5px solid #ddd; border-radius: 8px; padding: 10px 14px; background: #fff; }
.career-textarea:focus { border-color: #F7B605; }
.career-char-meta { display: flex; justify-content: flex-end; }
.career-char-count { font-size: .78rem; color: #7a7a7a; }
.field-error { font-size: .78rem; color: #e74c3c; min-height: 1em; }

.career-file-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.career-file-input { position: absolute; opacity: 0; width: 0; height: 0; }

.career-file-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: #f3f3f3;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}

.career-file-label:hover { background: #eaeaea; }
.career-file-name { font-size: .82rem; color: #888; }
.career-file-help { font-size: .78rem; color: #7a7a7a; }

.career-form-status { margin-top: 14px; padding: 10px 14px; border-radius: 8px; font-size: .9rem; }
.career-form-status.is-success { background: #e6f9ef; color: #1a7a45; }
.career-form-status.is-error   { background: #fdecea; color: #c0392b; }

.career-form-footer { margin-top: 20px; display: flex; justify-content: flex-end; }

.career-submit-btn {
  padding: 13px 32px;
  background: #1a1a1a;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, opacity .2s;
}

.career-submit-btn:hover    { background: #333; }
.career-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.career-toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.career-toast {
  min-width: 280px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0,0,0,.18);
  font-size: .95rem;
  line-height: 1.45;
  color: #fff;
  transform: translateY(12px);
  opacity: 0;
  animation: careerToastIn .25s ease forwards;
}

.career-toast--success {
  background: linear-gradient(135deg, #1f9d55, #178f63);
}

@keyframes careerToastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes careerToastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(12px); }
}

/* ── Responsive ───────────────────────────────────────────────────────── */

/* Tablet (681px – 900px) */
@media (max-width: 900px) and (min-width: 681px) {
  .career-shell { padding: 0 20px; }
  .career-jobs  { gap: 14px; }

  .job-item-trigger {
    grid-template-columns: 120px 1fr;
    min-height: 160px;
  }
  .job-item-img-wrap { width: 120px; height: 160px; }
  .job-item-img      { width: 120px; height: 160px; }
  .job-item-info     { padding: 16px 12px 16px 16px; }
  .job-item-icon     { width: 32px; height: 32px; margin-right: 8px; }
}

/* Mobile (≤ 680px) */
@media (max-width: 680px) {
  .career-jobs { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .job-item-trigger {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .job-item-img-wrap { width: 100%; height: 200px; }
  .job-item-img { width: 100%; height: 200px; }
  .job-item-info     { padding: 20px 20px 40px; }
  .job-item-content  { padding: 20px; }
  .career-modal-inner { padding: 28px 20px 24px; }
  .career-form-grid   { grid-template-columns: 1fr; }
  .career-toast-stack {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  .career-toast {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 375px) {
  .career-shell { padding: 0 16px; }
  .job-item,
  .job-item-trigger,
  .job-item-info,
  .career-row-detail,
  .job-item-content { min-width: 0; }
  .career-row-detail {
    padding: 20px 16px 24px;
    overflow-x: hidden;
  }
  .job-item-info { padding: 18px 16px 28px; }
  .job-section-body,
  .job-section-body * {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
