/* ============================================
   CAREERS PAGE — v5.7.30
   Uses site tokens (--sw-*) + existing .form-* styles
   ============================================ */

.cr-section { padding: 80px 0; background: var(--sw-white); }
.cr-section.alt { background: var(--sw-light-gray); }
.cr-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.cr-eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--sw-pink); margin-bottom: 10px;
}
.cr-head h2 { font-size: 2.1rem; font-weight: 800; color: var(--sw-dark); line-height: 1.2; margin-bottom: 12px; }
.cr-head p { color: var(--sw-gray); font-size: 1rem; }

/* ---------- Intro ---------- */
.cr-intro { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.cr-intro h2 { font-size: 2.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.cr-intro p { color: var(--sw-gray); margin-bottom: 14px; }
.cr-intro-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.cr-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; border-radius: 8px;
  font-weight: 700; font-size: .88rem; border: 2px solid transparent; cursor: pointer;
  font-family: var(--font); transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.cr-btn-primary { background: linear-gradient(135deg, var(--sw-pink), var(--sw-red)); color: #fff; box-shadow: 0 6px 20px rgba(227,30,36,.28); }
.cr-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(227,30,36,.38); }
.cr-btn-ghost { background: transparent; color: var(--sw-dark); border-color: var(--sw-border); }
.cr-btn-ghost:hover { border-color: var(--sw-pink); color: var(--sw-pink); transform: translateY(-2px); }
.cr-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cr-fact {
  background: #fff; border-radius: 14px; padding: 24px 20px; text-align: center;
  box-shadow: 0 10px 34px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04);
}
.cr-fact b { display: block; font-size: 2rem; font-weight: 800; color: var(--sw-pink); line-height: 1.1; }
.cr-fact span { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--sw-gray); }

/* ---------- Why join ---------- */
.cr-why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cr-why-card {
  background: #fff; border-radius: 14px; padding: 30px 24px; position: relative; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease;
}
.cr-why-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(227,30,36,.14), 0 0 0 1px rgba(227,30,36,.12); }
.cr-why-icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(227,30,36,.09); color: var(--sw-pink); font-size: 1.3rem;
}
.cr-why-card h4 { font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; }
.cr-why-card p { font-size: .9rem; color: var(--sw-gray); line-height: 1.6; }

/* ---------- Toolbar ---------- */
.cr-toolbar {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; margin-bottom: 18px;
  background: #fff; padding: 16px; border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
}
.cr-field { position: relative; }
.cr-field i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--sw-pink); font-size: .9rem; pointer-events: none; }
.cr-field input, .cr-field select {
  width: 100%; height: 48px; padding: 0 14px 0 40px; border: 2px solid var(--sw-border); border-radius: 8px;
  font-size: .92rem; font-family: var(--font); background: #fff; color: var(--sw-dark); outline: none;
  transition: border-color .25s ease, box-shadow .25s ease; appearance: none; -webkit-appearance: none;
}
.cr-field select { background-image: linear-gradient(45deg, transparent 50%, #999 50%), linear-gradient(135deg, #999 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.cr-field input:focus, .cr-field select:focus { border-color: var(--sw-pink); box-shadow: 0 0 0 4px rgba(227,30,36,.10); }
.cr-count { font-size: .85rem; color: var(--sw-gray); margin: 0 4px 20px; font-weight: 600; }
.cr-count b { color: var(--sw-dark); }

/* ---------- Job cards ---------- */
.cr-jobs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: start; }
.cr-job {
  background: #fff; border-radius: 14px; padding: 28px; position: relative; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.05);
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease;
  animation: crJobIn .55s cubic-bezier(.22,1,.36,1) both;
}
.cr-job::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--sw-pink), var(--sw-red)); transform: scaleY(.35); transform-origin: top; transition: transform .45s cubic-bezier(.22,1,.36,1); }
.cr-job:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(0,0,0,.10), 0 0 0 1px rgba(227,30,36,.14); }
.cr-job:hover::before, .cr-job.open::before { transform: scaleY(1); }
@keyframes crJobIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.cr-job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.cr-job h3 { font-size: 1.2rem; font-weight: 800; line-height: 1.3; color: var(--sw-dark); }
.cr-badge { flex-shrink: 0; font-size: .68rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 5px 10px; border-radius: 20px; background: rgba(227,30,36,.09); color: var(--sw-pink); }
.cr-badge.new { background: #e8f7ee; color: #1c8a4a; }
.cr-job-sum { color: var(--sw-gray); font-size: .92rem; margin: 6px 0 16px; line-height: 1.6; }
.cr-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 20px; }
.cr-meta span { font-size: .8rem; font-weight: 600; color: #555; display: inline-flex; align-items: center; gap: 7px; }
.cr-meta i { color: var(--sw-pink); font-size: .78rem; }
.cr-job-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cr-job-actions .cr-btn { padding: 11px 20px; font-size: .82rem; }
.cr-more-i { transition: transform .35s ease; }
.cr-job.open .cr-more-i { transform: rotate(180deg); }
.cr-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s cubic-bezier(.22,1,.36,1); }
.cr-job.open .cr-detail { grid-template-rows: 1fr; }
.cr-detail > div { overflow: hidden; }
.cr-detail-in { padding-top: 22px; margin-top: 22px; border-top: 1px dashed var(--sw-border); }
.cr-detail h5 { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--sw-dark); margin: 0 0 10px; }
.cr-detail ul { list-style: none; margin: 0 0 18px; padding: 0; }
.cr-detail li { position: relative; padding-left: 22px; font-size: .9rem; color: #555; margin-bottom: 8px; line-height: 1.55; }
.cr-detail li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: .65rem; color: var(--sw-pink); position: absolute; left: 0; top: 4px; }

.cr-empty { grid-column: 1 / -1; text-align: center; background: #fff; border-radius: 14px; padding: 56px 24px; box-shadow: 0 8px 30px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04); }
.cr-empty i { font-size: 2.2rem; color: var(--sw-pink); margin-bottom: 14px; }
.cr-empty h3 { font-size: 1.3rem; margin-bottom: 8px; }
.cr-empty p { color: var(--sw-gray); margin-bottom: 20px; }
.cr-general {
  margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--sw-dark) 0%, #2d0a10 100%); color: #fff; border-radius: 14px; padding: 26px 30px;
}
.cr-general h4 { font-size: 1.1rem; margin-bottom: 4px; }
.cr-general p { font-size: .9rem; color: rgba(255,255,255,.72); margin: 0; }

/* skeleton */
.cr-skel { height: 230px; border-radius: 14px; background: linear-gradient(100deg, #eee 30%, #f8f8f8 50%, #eee 70%); background-size: 200% 100%; animation: crSk 1.3s linear infinite; }
@keyframes crSk { to { background-position: -200% 0; } }

/* ---------- Application form ---------- */
.cr-form-wrap { max-width: 900px; margin: 0 auto; }
.cr-form-wrap .form-container { padding: 44px; }
.cr-apply-for {
  display: flex; align-items: center; gap: 14px; background: rgba(227,30,36,.06); border: 1px solid rgba(227,30,36,.18);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 26px;
}
.cr-apply-for i { color: var(--sw-pink); font-size: 1.2rem; }
.cr-apply-for small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--sw-gray); font-weight: 700; }
.cr-apply-for strong { font-size: 1rem; color: var(--sw-dark); }
.cr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.cr-grid .form-group.full-width { grid-column: 1 / -1; }
#careerForm .form-group select { appearance: none; -webkit-appearance: none; }
#careerForm .form-hint { font-size: .75rem; color: #999; margin-top: 6px; display: block; }
#careerForm .field-error { border-color: #dc3545 !important; box-shadow: 0 0 0 3px rgba(220,53,69,.10) !important; }
.cr-step-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.cr-step-sub { font-size: .85rem; color: var(--sw-gray); margin-bottom: 22px; }

.cr-drop {
  position: relative; border: 2px dashed #d0d0d0; border-radius: 14px; padding: 34px 20px; text-align: center; background: #fafafa;
  cursor: pointer; transition: border-color .3s ease, background .3s ease, transform .3s ease;
}
.cr-drop:hover, .cr-drop.drag { border-color: var(--sw-pink); background: rgba(227,30,36,.04); }
.cr-drop.drag { transform: scale(1.01); }
.cr-drop.error { border-color: #dc3545; background: rgba(220,53,69,.04); }
.cr-drop input[type=file] { position: absolute; inset: 0; width: 100% !important; height: 100%; opacity: 0; cursor: pointer; border: 0 !important; padding: 0 !important; }
.cr-drop-ico { font-size: 2.2rem; color: var(--sw-pink); margin-bottom: 10px; }
.cr-drop strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.cr-drop span { font-size: .82rem; color: var(--sw-gray); }
.cr-file {
  display: none; align-items: center; gap: 14px; margin-top: 14px; background: #fff; border-radius: 10px; padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.06);
}
.cr-file.show { display: flex; }
.cr-file i.fa-file-pdf, .cr-file i.fa-file-word, .cr-file i.fa-file { font-size: 1.6rem; color: var(--sw-pink); }
.cr-file-info { flex: 1; min-width: 0; }
.cr-file-info b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-file-info small { color: var(--sw-gray); font-size: .78rem; }
.cr-file-rm { border: 0; background: #f2f2f2; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: #666; transition: background .25s, color .25s; }
.cr-file-rm:hover { background: var(--sw-pink); color: #fff; }

.cr-progress { display: none; margin-top: 18px; }
.cr-progress.show { display: block; }
.cr-progress-bar { height: 8px; background: #eee; border-radius: 6px; overflow: hidden; }
.cr-progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sw-pink), var(--sw-red)); transition: width .2s linear; }
.cr-progress small { display: block; margin-top: 6px; font-size: .8rem; color: var(--sw-gray); text-align: center; }

.cr-success { display: none; text-align: center; padding: 30px 10px; }
.cr-success.show { display: block; animation: stepEnter .5s cubic-bezier(.22,1,.36,1); }
.cr-success-ico { width: 84px; height: 84px; border-radius: 50%; background: #e8f7ee; color: #1c8a4a; display: grid; place-items: center; font-size: 2.2rem; margin: 0 auto 20px; }
.cr-success h3 { font-size: 1.6rem; margin-bottom: 10px; }
.cr-success p { color: var(--sw-gray); max-width: 480px; margin: 0 auto 12px; }
.cr-ref { display: inline-block; background: var(--sw-light-gray); border-radius: 8px; padding: 10px 20px; font-weight: 800; letter-spacing: 1px; margin: 6px 0 22px; }

/* ---------- Process ---------- */
.cr-process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: crp; }
.cr-pstep { position: relative; text-align: center; padding: 8px 14px; }
.cr-pstep::before {
  counter-increment: crp; content: counter(crp); width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 1.2rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--sw-pink), var(--sw-red)); box-shadow: 0 8px 22px rgba(227,30,36,.3); position: relative; z-index: 1;
}
.cr-pstep:not(:last-child)::after { content: ''; position: absolute; top: 36px; left: calc(50% + 34px); width: calc(100% - 68px + 22px); border-top: 2px dashed #d8d8d8; }
.cr-pstep h4 { font-size: 1rem; font-weight: 800; margin-bottom: 6px; }
.cr-pstep p { font-size: .87rem; color: var(--sw-gray); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cr-why { grid-template-columns: repeat(2, 1fr); }
  .cr-intro { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 820px) {
  .cr-jobs { grid-template-columns: 1fr; }
  .cr-toolbar { grid-template-columns: 1fr; }
  .cr-process { grid-template-columns: 1fr 1fr; row-gap: 34px; }
  .cr-pstep:nth-child(2)::after { display: none; }
}
@media (max-width: 600px) {
  .cr-section { padding: 56px 0; }
  .cr-head h2, .cr-intro h2 { font-size: 1.6rem; }
  .cr-why { grid-template-columns: 1fr; }
  .cr-grid { grid-template-columns: 1fr; }
  .cr-form-wrap .form-container { padding: 26px 18px; }
  .cr-job { padding: 22px 18px; }
  .cr-job-actions .cr-btn { flex: 1; justify-content: center; }
  .cr-process { grid-template-columns: 1fr; }
  .cr-pstep::after { display: none !important; }
  .cr-general { padding: 22px 18px; }
  .cr-facts { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cr-job, .cr-success.show { animation: none; }
  .cr-detail, .cr-job, .cr-why-card { transition: none; }
}

/* progress bar: JS draws the fill, hide the static pseudo-bar */
#careerForm .form-progress-bar::after { display: none; }

/* ============================================
   APPLICATION POPUP
   ============================================ */
html.cr-lock, html.cr-lock body { overflow: hidden; }
html.cr-lock .ts-toast { z-index: 100002; }
.cr-modal { position: fixed; inset: 0; z-index: 100001; display: none; align-items: center; justify-content: center; padding: 24px; }
.cr-modal.show { display: flex; }
.cr-modal-backdrop {
  position: absolute; inset: 0; background: rgba(20, 6, 9, .64);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  opacity: 0; transition: opacity .45s ease;
}
.cr-modal.open .cr-modal-backdrop { opacity: 1; }
.cr-modal-panel {
  position: relative; width: min(900px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column; border-radius: 18px; background: #fff; outline: none;
  box-shadow: 0 40px 110px rgba(0, 0, 0, .4);
  opacity: 0; transform: translateY(70px) scale(.93);
  transition: transform .65s cubic-bezier(.22, 1, .36, 1), opacity .4s ease;
}
.cr-modal.open .cr-modal-panel { opacity: 1; transform: none; }
.cr-modal-panel .form-container {
  box-shadow: none; border-radius: 18px; padding: 44px; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; max-height: inherit; scrollbar-width: thin;
}
.cr-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 6; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: #f2f2f2; color: #444; cursor: pointer; font-size: 1rem;
  transition: background .25s ease, color .25s ease, transform .35s ease;
}
.cr-modal-close:hover { background: var(--sw-pink); color: #fff; transform: rotate(90deg); }

/* content rises in one after another when the popup opens */
@keyframes crRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.cr-modal.open .form-header { animation: crRise .6s cubic-bezier(.22,1,.36,1) .18s both; }
.cr-modal.open .cr-apply-for { animation: crRise .6s cubic-bezier(.22,1,.36,1) .30s both; }
.cr-modal.open .form-progress { animation: crRise .6s cubic-bezier(.22,1,.36,1) .42s both; }
.cr-modal.open .form-step.active { animation: crRise .6s cubic-bezier(.22,1,.36,1) .54s both; }

@media (max-width: 640px) {
  .cr-modal { padding: 0; align-items: flex-end; }
  .cr-modal-panel { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 22px 22px 0 0; transform: translateY(100%); }
  .cr-modal-panel .form-container { padding: 28px 18px 30px; border-radius: 22px 22px 0 0; }
  .cr-modal-close { top: 10px; right: 10px; }
}

/* ============================================
   "MAIL IS BEING SENT" ANIMATION
   ============================================ */
.cr-send { display: none; text-align: center; padding: 18px 0 10px; }
.cr-send.show { display: block; animation: stepEnter .5s cubic-bezier(.22,1,.36,1); }
.cr-send-stage { height: 210px; display: flex; align-items: center; justify-content: center; position: relative; }
.cr-env { overflow: visible; filter: drop-shadow(0 18px 24px rgba(227, 30, 36, .18)); }
.cr-env g, .cr-env path, .cr-env line { transform-box: view-box; }
.cr-send-text { font-size: 1.2rem; font-weight: 800; color: var(--sw-dark); margin: 4px 0 16px; min-height: 1.6em; }
.cr-send .cr-progress { max-width: 360px; margin: 0 auto; }

.e-paper { transform: translateY(-34px); opacity: 0; }
.e-flap-open { transform-origin: 110px 62px; }
.e-flap-closed { transform-origin: 110px 62px; transform: scaleY(0); }
.e-seal { transform-origin: 110px 104px; transform: scale(0); }
.cr-trail line { stroke: var(--sw-pink); stroke-width: 3; stroke-linecap: round; opacity: 0; }

.cr-env.pack .e-paper      { animation: crPaper 1.3s cubic-bezier(.5, 0, .2, 1) .15s forwards; }
.cr-env.pack .e-flap-open  { animation: crFlapOpen .4s ease-in 1.5s forwards; }
.cr-env.pack .e-flap-closed{ animation: crFlapClose .45s ease-out 1.55s forwards; }
.cr-env.pack .e-seal       { animation: crSeal .5s cubic-bezier(.34, 1.8, .5, 1) 2.0s forwards; }
.cr-env.pack .cr-env-body  { animation: crFloat 2.4s ease-in-out 2.5s infinite; }
@keyframes crPaper { 0% { transform: translateY(-34px); opacity: 0; } 22% { transform: translateY(-4px); opacity: 1; } 100% { transform: translateY(96px); opacity: 1; } }
@keyframes crFlapOpen { to { transform: scaleY(0); } }
@keyframes crFlapClose { to { transform: scaleY(1); } }
@keyframes crSeal { to { transform: scale(1); } }
@keyframes crFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.cr-env.fly { animation: crFly 1s cubic-bezier(.55, .05, .85, .45) forwards; }
.cr-env.fly .cr-trail line { animation: crTrail .8s ease-out .12s both; }
@keyframes crFly {
  0%   { transform: none; opacity: 1; }
  18%  { transform: translate(-12px, 9px) scale(.95); opacity: 1; }
  100% { transform: translate(420px, -250px) rotate(16deg) scale(.35); opacity: 0; }
}
@keyframes crTrail { 0% { opacity: 0; transform: translateX(34px); } 30% { opacity: .85; } 100% { opacity: 0; transform: translateX(-34px); } }

/* animated check on success */
.cr-success-ico svg .chk-c { stroke-dasharray: 146; stroke-dashoffset: 146; }
.cr-success-ico svg .chk-p { stroke-dasharray: 42; stroke-dashoffset: 42; }
.cr-success.show .chk-c { animation: crDraw .6s ease .1s forwards; }
.cr-success.show .chk-p { animation: crDraw .4s ease .6s forwards; }
.cr-success.show .cr-success-ico { animation: crPop .7s cubic-bezier(.34, 1.6, .5, 1) both; }
@keyframes crDraw { to { stroke-dashoffset: 0; } }
@keyframes crPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .cr-modal-panel, .cr-modal-backdrop { transition: opacity .2s ease; transform: none; }
  .cr-modal.open .form-header, .cr-modal.open .cr-apply-for, .cr-modal.open .form-progress, .cr-modal.open .form-step.active { animation: none; }
  .cr-env .e-paper { opacity: 0; animation: none !important; }
  .cr-env .e-flap-open { display: none; }
  .cr-env .e-flap-closed, .cr-env .e-seal { transform: none; animation: none !important; }
  .cr-env.fly { animation: none; opacity: 0; transition: opacity .4s; }
  .cr-success-ico svg .chk-c, .cr-success-ico svg .chk-p { stroke-dashoffset: 0; animation: none !important; }
}
