/* =============================================
   JOB DETAIL PAGE — job-detail.css
   ============================================= */

/* ---- BREADCRUMB ---- */
.breadcrumb-bar {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  margin-top: 68px;
  font-size: 0.83rem;
  color: var(--gray);
}
.breadcrumb-bar a { color: var(--gray); transition: color var(--transition); }
.breadcrumb-bar a:hover { color: var(--gold); }
.breadcrumb-bar span { color: var(--navy); font-weight: 600; }

/* ---- LAYOUT ---- */
.job-detail-section { padding: 40px 0 80px; }
.job-detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

/* ---- MAIN CONTENT ---- */
.job-detail-main {}
.jd-loading { color: var(--gray); padding: 40px; text-align: center; }

/* Job Header */
.jd-header {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 20px;
  animation: fadeUp 0.5s ease both;
}
.jd-header-top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.jd-company-logo {
  width: 64px; height: 64px;
  background: var(--gray-lt);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
  color: var(--navy);
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}
.jd-title-wrap {}
.jd-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 6px;
}
.jd-company {
  font-size: 1rem;
  color: var(--gray);
  font-weight: 500;
}
.jd-company strong { color: var(--navy); }

.jd-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.jd-badge {
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--navy);
  background: var(--gray-lt);
}
.jd-badge.remote   { background: rgba(16,185,129,0.1);  color: #059669; border-color: rgba(16,185,129,0.3); }
.jd-badge.featured { background: rgba(201,168,76,0.12); color: var(--gold); border-color: rgba(201,168,76,0.3); }
.jd-badge.type     { background: var(--navy); color: var(--gold); border-color: var(--navy); }

.jd-meta-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.87rem;
  color: var(--gray);
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.jd-meta-item { display: flex; align-items: center; gap: 6px; }
.jd-meta-item strong { color: var(--navy); }

/* Job Body */
.jd-body {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  animation: fadeUp 0.5s 0.1s ease both;
}
.jd-section { margin-bottom: 32px; }
.jd-section:last-child { margin-bottom: 0; }
.jd-section h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.jd-section p {
  color: var(--gray);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 10px;
}
.jd-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.jd-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.6;
}
.jd-list li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.jd-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.jd-skill-tag {
  padding: 5px 14px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
}

/* ---- SIDEBAR ---- */
.job-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 88px;
}

/* Apply Card */
.apply-card {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 28px;
  animation: fadeUp 0.5s 0.2s ease both;
}
.apply-salary {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}
.apply-meta {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.apply-meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.apply-meta-item strong { color: rgba(255,255,255,0.85); }
.apply-card .btn-ghost {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
}
.apply-card .btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }

/* Overview Card */
.overview-card h4, .map-card h4, .share-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}
.overview-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.overview-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.overview-list li:last-child { border-bottom: none; padding-bottom: 0; }
.overview-list li span { color: var(--gray); }
.overview-list li strong { color: var(--navy); text-align: right; max-width: 55%; }

/* Share Card */
.share-btns { display: flex; flex-direction: column; gap: 8px; }
.share-btn {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--navy);
  transition: var(--transition);
  text-align: left;
}
.share-btn:hover { border-color: var(--navy); background: var(--gray-lt); }
.share-btn.linkedin:hover { background: #0a66c2; color: var(--white); border-color: #0a66c2; }
.share-btn.twitter:hover  { background: #000; color: var(--white); border-color: #000; }
.share-btn.copy:hover     { background: var(--gold); border-color: var(--gold); }

/* ---- APPLY MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.open { display: flex; }
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes slideUp { from { transform:translateY(30px);opacity:0 } to { transform:translateY(0);opacity:1 } }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy); }
.modal-close {
  background: var(--gray-lt);
  border: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--gray);
  transition: var(--transition);
}
.modal-close:hover { background: var(--navy); color: var(--white); }

.modal-box textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--navy);
  outline: none;
  resize: vertical;
  transition: border-color var(--transition);
}
.modal-box textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.12); }

/* CV Upload */
.cv-upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  transition: border-color var(--transition);
  overflow: hidden;
  background: var(--gray-lt);
}
.cv-upload-area:hover { border-color: var(--gold); background: rgba(201,168,76,0.04); }
.cv-upload-area input[type="file"] { display: none !important; }
.cv-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  cursor: pointer;
  text-align: center;
  user-select: none;
}
.cv-upload-icon { font-size: 2.4rem; line-height: 1; }
.cv-upload-placeholder strong {
  font-size: 0.92rem;
  color: var(--navy);
  font-weight: 700;
}
.cv-upload-placeholder span {
  font-size: 0.78rem;
  color: var(--gray);
}
.cv-upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(201,168,76,0.1);
  border-top: 1px solid rgba(201,168,76,0.2);
}
.cv-file-icon { font-size: 1.5rem; flex-shrink: 0; }
.cv-upload-preview span {
  flex: 1;
  font-size: 0.88rem;
  color: var(--navy);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-remove {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  color: #dc2626;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 6px;
  transition: var(--transition);
  flex-shrink: 0;
}
.cv-remove:hover { background: #ef4444; color: white; border-color: #ef4444; }

/* ---- SIMILAR JOBS ---- */
.similar-section { background: var(--cream); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .job-detail-layout { grid-template-columns: 1fr; }
  .job-detail-sidebar { position: static; }
}
@media (max-width: 600px) {
  .jd-header { padding: 20px; }
  .jd-body   { padding: 20px; }
  .modal-box { padding: 24px 18px; }
  .jd-meta-row { gap: 14px; }
}
