/* ── Job Details Page ── */

.job-details {
  background: var(--bg-light);
  padding: 48px 0 80px;
}

/* ── Page title banner ── */
.page-title {
  background: var(--bg-dark);
  padding: 80px 20px 40px;
  text-align: center;
}

.page-title h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  color: var(--text-on-dark);
  line-height: 1.3;
  margin-bottom: 20px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  word-break: break-word;
}

/* ── Top navigation buttons ── */
.top-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.top-buttons .home-btn,
.top-buttons .theme-btn.btn-one {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all var(--transition-base);
  min-height: 44px;
}

.top-buttons .home-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark-2) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.top-buttons .home-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-on-dark) !important;
}

.top-buttons .theme-btn.btn-one {
  background: var(--accent);
  color: var(--text-accent-dark) !important;
  border: 1px solid var(--accent);
}

.top-buttons .theme-btn.btn-one:hover {
  background: var(--accent-hover);
}

/* ── Layout — override Bootstrap columns ── */
.job-details .auto-container {
  max-width: var(--container-max);
  padding: 0 var(--container-pad);
}

.job-details .row.clearfix {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0;
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
}

.job-details .row.clearfix > [class*="col-"] {
  float: none;
  padding: 0;
  width: auto;
  max-width: none;
}

.job-details .row.clearfix > .sidebar-side {
  flex: 0 0 300px;
  max-width: 300px;
  order: 2;
}

.job-details .row.clearfix > .content-side {
  flex: 1 1 0%;
  min-width: 0;
  order: 1;
}

/* ── Sidebar card ── */
.job-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  position: sticky;
  top: 24px;
}

.jd-sidebar-header {
  background: var(--bg-dark);
  padding: 24px 20px 20px;
  text-align: center;
}

.jd-sidebar-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 20px;
  color: var(--text-accent-dark);
}

.jd-sidebar-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-on-dark-3);
  margin: 0;
}

/* Info list */
.jd-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jd-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.jd-info-item:last-child { border-bottom: none; }

.jd-info-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-tint-12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--accent-dim);
  flex-shrink: 0;
}

.jd-info-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.jd-info-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.jd-info-value {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.4;
}

.jd-info-value a {
  color: var(--accent-dim);
  text-decoration: none;
}
.jd-info-value a:hover { text-decoration: underline; }

/* Sidebar share URL */
.jd-share-url-box {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-light);
}

.jd-share-url-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 10px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.jd-copy-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--text-accent-dark);
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: background var(--transition-base);
}

.jd-copy-btn:hover {
  background: var(--accent-hover);
}

.jd-copy-btn.copied {
  background: #22c55e;
  color: #fff;
}

.jd-share-item .jd-info-body {
  flex: 1;
  min-width: 0;
}

/* Sidebar skills */
.jd-sidebar-skills {
  padding: 16px 20px;
  background: var(--bg-light);
  border-top: 1px solid var(--border-subtle);
}

.jd-sidebar-skills-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.jd-sidebar-skills-title i { color: var(--accent-dim); }

.jd-sidebar-skills-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jd-skill-pill {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-accent-dark);
  background: var(--accent-tint-12);
  border: 1px solid var(--accent-tint-25);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  white-space: nowrap;
}

/* Sidebar CTA */
.jd-sidebar-cta {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
}

.jd-sidebar-apply-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent);
  color: var(--text-accent-dark) !important;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
  min-height: 44px;
}

.jd-sidebar-apply-btn:hover {
  background: var(--accent-hover);
  color: var(--text-accent-dark) !important;
}

.jd-sidebar-browse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  color: var(--text-primary) !important;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1.5px solid var(--border-subtle);
  transition: all var(--transition-base);
  min-height: 44px;
}

.jd-sidebar-browse-btn:hover {
  background: var(--bg-dark);
  color: var(--text-on-dark) !important;
  border-color: var(--bg-dark);
}

/* ── Main content card ── */
.job-details-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.jd-header-card {
  background: var(--bg-dark);
  padding: 32px;
}

.jd-header-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.jd-job-id {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(120, 235, 84, 0.1);
  border: 1px solid rgba(120, 235, 84, 0.2);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}

.job-engagement-badge {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.badge-permanent { background: var(--badge-perm-bg); color: var(--badge-perm-text); }
.badge-contract  { background: var(--badge-contract-bg); color: var(--badge-contract-text); }
.badge-cth       { background: var(--badge-cth-bg); color: var(--badge-cth-text); }
.badge-default   { background: rgba(255,255,255,0.1); color: var(--text-on-dark-2); }

.jd-job-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--text-on-dark);
  line-height: 1.35;
  margin: 0 0 16px;
}

.jd-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.jd-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-on-dark-2);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
}

.jd-meta-chip i {
  color: var(--accent);
  font-size: 11px;
}

.jd-skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jd-skills-row .jd-skill-pill {
  background: rgba(120, 235, 84, 0.12);
  border-color: rgba(120, 235, 84, 0.2);
  color: var(--text-on-dark);
}

/* Content sections */
.jd-section {
  padding: 28px 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.jd-section:last-child { border-bottom: none; }

.jd-section-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.jd-section-title i {
  width: 32px;
  height: 32px;
  background: var(--accent-tint-12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent-dim);
  flex-shrink: 0;
}

.jd-description {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* Action buttons */
.jd-actions {
  padding: 24px 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--bg-light);
  border-top: 1px solid var(--border-subtle);
}

.jd-btn-apply {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--text-accent-dark) !important;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
  min-height: 44px;
}

.jd-btn-apply:hover {
  background: var(--accent-hover);
  color: var(--text-accent-dark) !important;
}

.jd-btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-primary) !important;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1.5px solid var(--border-subtle);
  transition: all var(--transition-base);
  min-height: 44px;
}

.jd-btn-share:hover {
  background: var(--bg-dark);
  color: var(--text-on-dark) !important;
  border-color: var(--bg-dark);
}

/* ── No data fallback ── */
.no-data-message {
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 0 auto;
  max-width: 600px;
  border: 1px solid var(--border-subtle);
}

.no-data-message p {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Notification toast ── */
.jd-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  animation: slideUp 300ms ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .job-details .row.clearfix > .sidebar-side {
    flex: 0 0 100%;
    max-width: 100%;
    order: 2;
  }
  .job-details .row.clearfix > .content-side {
    flex: 0 0 100%;
    max-width: 100%;
    order: 1;
  }
  .job-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .page-title { padding: 60px 16px 32px; }
  .page-title h1 { font-size: 22px; }
  .job-details { padding: 24px 0 48px; }
  .jd-header-card { padding: 24px 20px; }
  .jd-job-title { font-size: 20px; }
  .jd-section { padding: 20px; }
  .jd-actions {
    padding: 18px 20px;
    flex-direction: column;
  }
  .jd-btn-apply,
  .jd-btn-share {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .top-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .top-buttons .home-btn,
  .top-buttons .theme-btn.btn-one {
    width: 100%;
  }
}
