/* === TRANSLATOR PAGE === */
.translator-page {
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Header */
.translator-header {
  background: var(--forest);
  color: white;
  padding: 64px 0 56px;
}
.translator-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}
.translator-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.translator-headline {
  font-family: 'Bitter', Georgia, serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  line-height: 1.15;
}
.translator-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  line-height: 1.7;
}
.header-badge {
  text-align: right;
  padding-top: 8px;
}
.badge-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.header-badge p {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

/* Search Section */
.search-section {
  background: var(--bg-alt);
  padding: 48px 0;
}
.search-wrapper {
  max-width: 720px;
}
.search-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 12px;
}
.search-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.search-box {
  flex: 1;
  position: relative;
}
.search-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--fg-muted);
  pointer-events: none;
}
.mos-input {
  width: 100%;
  padding: 18px 16px 18px 160px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: white;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
  letter-spacing: 0.05em;
}
.mos-input:focus {
  border-color: var(--forest);
}
.mos-input::placeholder {
  color: rgba(26, 26, 26, 0.3);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(26,26,26,0.12);
  z-index: 50;
  display: none;
  overflow: hidden;
}
.autocomplete-dropdown.active {
  display: block;
}
.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.1s;
}
.autocomplete-item:hover,
.autocomplete-item.selected {
  background: var(--bg-alt);
}
.ac-code {
  font-family: 'Bitter', serif;
  font-weight: 700;
  color: var(--forest);
  font-size: 15px;
  min-width: 72px;
}
.ac-title {
  flex: 1;
  font-size: 15px;
  color: var(--fg);
}
.ac-branch {
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Translate Button */
.translate-btn {
  padding: 18px 32px;
  background: var(--forest);
  color: white;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.translate-btn:hover {
  background: var(--forest-light);
}
.translate-btn:active {
  background: #1a3327;
}

.search-hint {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 10px;
}

/* Results Section */
.results-section {
  padding: 48px 0 80px;
  display: none;
}
.results-loading {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: var(--fg-muted);
  font-size: 15px;
  padding: 60px 0;
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* MOS Entry Card */
.mos-entry-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 40px;
}
.mos-code-display {
  font-family: 'Bitter', serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
  min-width: 100px;
}
.mos-details {
  flex: 1;
}
.mos-title {
  font-family: 'Bitter', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 4px;
}
.mos-branch {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 10px;
}
.mos-description {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.6;
}
.mos-top-skills {
  min-width: 220px;
}
.skills-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skill-tag {
  font-size: 12px;
  font-weight: 500;
  background: white;
  color: var(--fg);
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* Jobs Grid */
.jobs-header {
  margin-bottom: 32px;
}
.jobs-headline {
  font-family: 'Bitter', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 8px;
}
.jobs-sub {
  font-size: 15px;
  color: var(--fg-muted);
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Job Card */
.job-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: box-shadow 0.2s;
}
.job-card:hover {
  box-shadow: 0 8px 32px rgba(26,26,26,0.08);
}
.job-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.job-rank {
  font-family: 'Bitter', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-muted);
}
.match-score-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) calc((var(--match) - 60) * 2.5%), #e8e8e0);
  color: var(--forest);
}
.job-title {
  font-family: 'Bitter', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 6px;
}
.job-alts {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 14px;
  font-style: italic;
}
.job-summary {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg-alt);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.job-skills-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.job-skills-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}
.job-skills-list li {
  font-size: 14px;
  color: var(--fg);
  padding: 7px 0;
  border-bottom: 1px solid rgba(26,26,26,0.06);
  line-height: 1.5;
}
.job-skills-list li:last-child {
  border-bottom: none;
}
.job-skills-list li::before {
  content: "→ ";
  color: var(--forest);
  font-weight: 600;
}
.job-tags-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.job-salary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
}
.job-clearance {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  padding: 4px 10px;
  border-radius: 20px;
}
.clearance-icon {
  font-size: 12px;
}
.jobs-count {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 8px;
}

/* No Results */
.no-results,
.error-state {
  padding: 60px 0;
  display: none;
}
.no-results-inner,
.error-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.no-results-icon {
  font-size: 48px;
  margin-bottom: 20px;
}
.no-results-inner h2 {
  font-family: 'Bitter', serif;
  font-size: 24px;
  color: var(--forest);
  margin-bottom: 12px;
}
.no-results-inner p {
  font-size: 15px;
  color: var(--fg-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}
.no-results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-secondary {
  padding: 10px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: var(--forest);
}
.error-inner {
  padding: 20px 28px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 12px;
  color: #991b1b;
  font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .translator-header { padding: 48px 0 40px; }
  .translator-header-inner { flex-direction: column; gap: 24px; }
  .header-badge { text-align: left; }
  .search-section { padding: 36px 0; }
  .search-row { flex-direction: column; }
  .search-prefix { display: none; }
  .mos-input { padding: 16px; }
  .translate-btn { width: 100%; text-align: center; }
  .mos-entry-card { flex-direction: column; gap: 16px; padding: 20px; }
  .mos-code-display { font-size: 36px; }
  .mos-top-skills { width: 100%; }
  .jobs-grid { grid-template-columns: 1fr; }
  .no-results-actions { flex-direction: column; }
}