/* FusionIRX Careers — public page styles */
:root {
  --red:        #DF2126;
  --red-dark:   #B31A1E;
  --red-light:  #FFF1F2;
  --text:       #333D47;
  --muted:      #64748B;
  --bg:         #F0F4F8;
  --card:       #FFFFFF;
  --border:     #E2E8F0;
  --border-md:  #CBD5E1;
  --green:      #15803D;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ──────────────────────────────────────────────────────────────────── */

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── Header ──────────────────────────────────────────────────────────────────── */

header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 960px;
  margin: 0 auto;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.header-logo {
  height: 36px;
  width: auto;
}
.brand-sub {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.header-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.header-link:hover { color: var(--red); text-decoration: none; }

/* ── Main ─────────────────────────────────────────────────────────────────────  */

main { padding: 44px 0 72px; }

/* ── Hero ─────────────────────────────────────────────────────────────────────  */

.hero { margin-bottom: 36px; }
.hero h1 {
  font-size: 30px;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.hero p {
  font-size: 16px;
  color: var(--muted);
  max-width: 580px;
  margin: 0;
}

/* ── Job grid (careers index) ─────────────────────────────────────────────────  */

.job-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .job-grid { grid-template-columns: 1fr 1fr; }
}

.job-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.job-card:hover {
  border-color: var(--red);
  box-shadow: 0 4px 14px rgba(223,33,38,0.11);
  text-decoration: none;
}
.job-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.job-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}
.job-card:hover .job-card-title { color: var(--red); }
.job-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.job-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pay-tag {
  font-size: 13px;
  font-weight: 800;
  color: var(--green);
}
.job-card-excerpt {
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}
.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.posted-label { font-size: 12px; color: var(--muted); }
.view-link { font-size: 13px; font-weight: 700; color: var(--red); }

/* ── Badges ──────────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-electrical  { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge-mechanical  { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.badge-ic          { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.badge-process     { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.badge-fire        { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.badge-quality     { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.badge-general     { background: #f8fafc; color: #475569; border-color: var(--border); }

/* ── Job detail ──────────────────────────────────────────────────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 20px;
}
.back-link:hover { text-decoration: none; opacity: 0.8; }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) {
  .detail-layout { grid-template-columns: 1fr 300px; align-items: start; }
}

.detail-main {}

.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 30px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  margin-bottom: 16px;
}
.detail-card h1 {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.2;
  letter-spacing: -0.3px;
}
.detail-company {
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 18px;
}
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.detail-fact strong { color: var(--text); font-weight: 700; }
.detail-pay {
  font-size: 18px;
  font-weight: 900;
  color: var(--green);
}

.section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin: 0 0 14px;
}
.prose {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 5px; }
.prose h2 { font-size: 16px; font-weight: 800; color: var(--text); margin: 20px 0 10px; }
.prose h3 { font-size: 14px; font-weight: 700; color: var(--text); margin: 16px 0 8px; }

/* ── Sidebar ──────────────────────────────────────────────────────────────────── */

.detail-sidebar {}
.cta-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 84px;
  text-align: center;
}
.cta-card .job-title-sm {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.cta-card .job-location-sm {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.cta-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}
.cta-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}

/* ── Buttons ──────────────────────────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: white;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  width: 100%;
}
.btn-primary:hover { background: var(--red-dark); text-decoration: none; color: white; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: white;
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid var(--red);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  width: 100%;
  margin-top: 10px;
}
.btn-secondary:hover { background: var(--red); color: white; text-decoration: none; }

/* ── Apply form ───────────────────────────────────────────────────────────────── */

.apply-wrap { max-width: 640px; }

.apply-header {
  background: var(--red);
  padding: 24px 28px;
  border-radius: 18px 18px 0 0;
}
.apply-header h1 {
  font-size: 20px;
  font-weight: 900;
  color: white;
  margin: 0 0 4px;
}
.apply-header p { font-size: 13px; color: rgba(255,255,255,0.85); margin: 0; font-weight: 500; }

.apply-body {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  padding: 28px;
}

.form-group { margin-bottom: 18px; }
label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.req { color: var(--red); }
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  background: white;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(223,33,38,0.1);
}
textarea { resize: vertical; min-height: 100px; }

.file-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 2px dashed var(--border-md);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s;
}
.file-area:hover { border-color: var(--red); color: var(--red); }
input[type="file"] { display: none; }
.file-note { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 400; }

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--red);
  color: white;
  font-weight: 800;
  font-size: 16px;
  padding: 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  margin-top: 6px;
}
.btn-submit:hover { background: var(--red-dark); }

.privacy-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; }

.alert-error {
  background: var(--red-light);
  border: 1px solid #fecdd3;
  color: #9f1239;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}
.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}

/* ── Position filled ──────────────────────────────────────────────────────────── */

.filled-wrap {
  max-width: 480px;
  margin: 72px auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.filled-icon { font-size: 52px; margin-bottom: 18px; }
.filled-wrap h1 { font-size: 22px; font-weight: 900; color: var(--text); margin: 0 0 10px; }
.filled-wrap p { font-size: 15px; color: var(--muted); margin: 0 0 24px; }

/* ── Empty state ──────────────────────────────────────────────────────────────── */

.empty-state {
  padding: 72px 0;
  text-align: center;
  color: var(--muted);
}
.empty-icon { font-size: 44px; opacity: 0.35; margin-bottom: 14px; }
.empty-state p { font-size: 15px; font-weight: 500; margin: 0; }

/* ── Footer ───────────────────────────────────────────────────────────────────── */

footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ── Responsive ───────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  main { padding: 28px 0 48px; }
  .detail-card { padding: 20px; }
  .apply-body { padding: 20px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 15px; }
}
