/* =====================================================
   JOB DETAIL PAGE  —  job-detail.css  v2
   Fixes: breadcrumb separators, table th layout,
          bullet visibility, FAQ, related jobs, mobile
   ===================================================== */

/* ─────────────────────────────────────────────────────
   PAGE LAYOUT
───────────────────────────────────────────────────── */
.jd-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  padding-top: 28px;
  padding-bottom: 72px;
  align-items: start;
}
.jd-main   { min-width: 0; }
.jd-sidebar { min-width: 0; }

/* ─────────────────────────────────────────────────────
   BREADCRUMB  — separators via CSS ::after, not as <li>
───────────────────────────────────────────────────── */
.jd-breadcrumb {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
}
.jd-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.jd-bc-item {
  display: inline-flex;
  align-items: center;
  font-size: .8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}
/* CSS-generated separator arrow after every non-last item */
.jd-bc-item:not(:last-child)::after {
  content: '›';
  margin: 0 8px;
  color: var(--border);
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
}
.jd-bc-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.jd-bc-item a:hover { color: var(--primary); }
.jd-bc-current {
  color: var(--primary-dark);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
  display: inline-block;
  vertical-align: middle;
}

/* ─────────────────────────────────────────────────────
   SECTION CARD
───────────────────────────────────────────────────── */
.jd-card {
  background: #fff;
  border: 1px solid var(--border);
  /*border-radius: var(--radius-lg);*/
  overflow: hidden;
  margin-bottom: 18px;
}
.jd-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  background: #fff;
}
.jd-section-header h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
  line-height: 1.3;
}
.jd-section-body {
  padding: 20px 24px 22px;
}
.jd-section-body > p {
  font-size: .9375rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 12px;
}
.jd-section-body > p:last-child { margin-bottom: 0; }
.jd-section--muted { background: var(--surface-alt); }

/* ─────────────────────────────────────────────────────
   SECTION ICON BADGES
───────────────────────────────────────────────────── */
.jd-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.jd-section-icon--primary { background: linear-gradient(135deg, #1a2e6b, #2a4090); }
.jd-section-icon--blue    { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.jd-section-icon--green   { background: linear-gradient(135deg, #22c55e, #16a34a); }
.jd-section-icon--yellow  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.jd-section-icon--orange  { background: linear-gradient(135deg, #f97316, #ea580c); }
.jd-section-icon--purple  { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

/* ─────────────────────────────────────────────────────
   HERO HEADER
───────────────────────────────────────────────────── */
.jd-hero {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.jd-hero-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
}
.jd-hero-logo img { width: 100%; height: 100%; object-fit: contain; }
.jd-hero-info { flex: 1; min-width: 180px; }
.jd-company-name {
  font-size: .8125rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}
.jd-title {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 14px;
  line-height: 1.25;
}
.jd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jd-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: var(--surface-alt);
  border-radius: 99px;
  font-size: .8125rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.jd-chip--exp    { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }
.jd-chip--loc    { background: #e3f2fd; color: #1565c0; border-color: #bbdefb; }
.jd-chip--salary { background: #fff8e1; color: #e65100; border-color: #ffe082; }

/* Mobile apply button inside hero */
.jd-hero-apply-mobile { display: none; width: 100%; margin-top: 8px; }
.jd-apply-btn-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .9375rem;
  padding: 13px;
  border-radius: var(--radius-md);
  transition: background .15s;
}
.jd-apply-btn-hero:hover { background: var(--primary-light); }

/* ─────────────────────────────────────────────────────
   AD SLOT
───────────────────────────────────────────────────── */
.jd-ad-wrap {
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────
   JOB DETAILS TABLE
   Key fix: th uses default display:table-cell
            icon+label wrapped in .jd-th-inner (flex span)
───────────────────────────────────────────────────── */
.jd-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}
.jd-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.jd-detail-table th,
.jd-detail-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  line-height: 1.5;
}
.jd-detail-table tr:last-child th,
.jd-detail-table tr:last-child td { border-bottom: none; }
.jd-detail-table th {
  background: var(--surface-alt);
  font-weight: 600;
  color: var(--text-muted);
  font-size: .875rem;
  width: 42%;
}
/* Flex lives on the inner SPAN, keeping th as table-cell */
.jd-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.jd-th-inner svg { flex-shrink: 0; color: var(--primary); opacity: .7; }
.jd-detail-table td {
  font-weight: 600;
  color: var(--primary-dark);
  word-break: break-word;
  width: 58%;
}
.jd-detail-table tr:hover th,
.jd-detail-table tr:hover td { background: #f4f6ff; }

/* ─────────────────────────────────────────────────────
   COMPANY LINK
───────────────────────────────────────────────────── */
.jd-company-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: .875rem;
  margin-top: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─────────────────────────────────────────────────────
   JOB DESCRIPTION
───────────────────────────────────────────────────── */
.jd-desc-content {
  font-size: .9375rem;
  line-height: 1.8;
  color: var(--text);
}
.jd-desc-content p  { margin-bottom: 12px; }
.jd-desc-content ul,
.jd-desc-content ol { padding-left: 24px; margin-bottom: 14px; }
.jd-desc-content li { margin-bottom: 6px; }

/* ─────────────────────────────────────────────────────
   BULLET LIST — Responsibilities & Qualifications
   Root cause of invisible dots: list-style:none from
   global reset + display:flex on li blocks ::before.
   Fix: use grid layout so ::before occupies column 1
        and text occupies column 2, both always visible.
───────────────────────────────────────────────────── */
.jd-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jd-bullet-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 4px;
  align-items: start;
  font-size: .9375rem;
  color: var(--text);
  line-height: 1.65;
}
.jd-bullet-list li::before {
  content: '';
  display: block;            /* block inside grid cell = always rendered */
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  margin-top: 7px;           /* optically center with cap-height */
  justify-self: center;
}

/* ─────────────────────────────────────────────────────
   NOTE / CALLOUT
───────────────────────────────────────────────────── */
.jd-note {
  background: #fff8e1;
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .875rem;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.65;
}

/* ─────────────────────────────────────────────────────
   SKILLS TAGS
───────────────────────────────────────────────────── */
.jd-skills-wrap { margin-top: 20px; }
.jd-skills-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-light);
  margin-bottom: 10px;
  display: block;
}
.jd-skills-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.jd-skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  background: rgba(26,46,107,.06);
  color: var(--primary);
  font-size: .8125rem;
  font-weight: 600;
  border-radius: 99px;
  border: 1px solid rgba(26,46,107,.15);
}

/* ─────────────────────────────────────────────────────
   HOW TO APPLY
───────────────────────────────────────────────────── */
.jd-apply-section { background: linear-gradient(160deg, #f0f4ff 0%, #fff 60%); }
.jd-apply-steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.jd-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: .9375rem;
  color: var(--text);
  line-height: 1.6;
}
.jd-step-num {
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: #fff;
  font-size: .8125rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.jd-apply-btn-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.0625rem;
  padding: 15px 24px;
  border-radius: var(--radius-md);
  margin-top: 20px;
  transition: background .15s, transform .15s, box-shadow .2s;
}
.jd-apply-btn-main:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,46,107,.25);
}

/* ─────────────────────────────────────────────────────
   FAQ ACCORDION
   Each item: <div class="jd-faq-item"> wraps <dt>+<dd>
   JS toggles .open on the div; CSS handles animation.
───────────────────────────────────────────────────── */
.jd-faq-list { display: flex; flex-direction: column; gap: 8px; }
.jd-faq-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  transition: border-color .2s;
}
.jd-faq-item.open { border-color: var(--primary); }

.jd-faq-item dt {
  padding: 15px 18px;
  font-weight: 600;
  font-size: .9375rem;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  line-height: 1.45;
  user-select: none;
  background: #fff;
  transition: background .15s;
  margin: 0;   /* dl/dt browsers add margin — reset */
}
.jd-faq-item dt:hover  { background: #f7f8fc; }
.jd-faq-item.open dt   { background: #f0f4ff; color: var(--primary); }

.jd-faq-chevron {
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform .25s ease;
  color: var(--text-muted);
}
.jd-faq-item.open .jd-faq-chevron { transform: rotate(180deg); color: var(--primary); }

.jd-faq-item dd {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .25s;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.75;
  padding: 0 18px;
  margin: 0;   /* reset browser dd margin */
  border-top: 0px solid var(--border-light);
}
.jd-faq-item.open dd {
  max-height: 400px;
  padding: 14px 18px 18px;
  border-top-width: 1px;
}

/* ─────────────────────────────────────────────────────
   RELATED JOBS GRID
───────────────────────────────────────────────────── */
.jd-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.jd-related-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, box-shadow .25s, transform .2s;
}
.jd-related-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 24px rgba(26,46,107,.14);
  transform: translateY(-3px);
}
.jd-related-logo {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.jd-related-logo img { width: 100%; height: 100%; object-fit: contain; }
.jd-related-info { min-width: 0; flex: 1; }
.jd-related-company {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jd-related-title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.jd-related-card:hover .jd-related-title { color: var(--primary); }
.jd-related-loc {
  font-size: .75rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─────────────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────────────── */
.jd-apply-box {
  margin-bottom: 18px;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}
.jd-apply-box-inner {
  background: var(--primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #fff;
}
.jd-apply-box-inner h3 { color: #fff; font-size: 1.0625rem; margin-bottom: 6px; }
.jd-apply-box-inner p  { color: rgba(255,255,255,.75); font-size: .875rem; margin-bottom: 20px; line-height: 1.6; }
.jd-apply-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 1rem;
  padding: 14px;
  border-radius: var(--radius-md);
  transition: background .2s, transform .15s;
}
.jd-apply-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }

.jd-meta-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
}
.jd-meta-box h3 {
  font-size: .6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-light);
  margin-bottom: 14px;
}
.jd-meta-list { display: flex; flex-direction: column; }
.jd-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .875rem;
}
.jd-meta-row:last-child { border-bottom: none; padding-bottom: 0; }
.jd-meta-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: .8125rem;
}
.jd-meta-label svg { opacity: .65; }
.jd-meta-value {
  font-weight: 700;
  color: var(--primary-dark);
  text-align: right;
  font-size: .875rem;
  word-break: break-word;
}

.jd-share-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
}
.jd-share-box h3 {
  font-size: .6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-light);
  margin-bottom: 12px;
}
.jd-share-btns { display: flex; gap: 10px; }
.jd-share-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: .8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
  text-decoration: none;
  white-space: nowrap;
}
.jd-share-btn:hover { transform: translateY(-1px); }
.jd-share-btn--copy {
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-muted);
}
.jd-share-btn--copy:hover { background: var(--surface-alt); color: var(--primary); }
.jd-share-btn--wa  { background: #25d366; color: #fff; border: none; }
.jd-share-btn--wa:hover { background: #1fb857; }

.jd-sidebar-ad { border-radius: var(--radius-md); overflow: hidden; }

/* ─────────────────────────────────────────────────────
   RESPONSIVE  ≤ 960px  (tablet / large mobile)
───────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .jd-wrap {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 16px;
    padding-bottom: 48px;
  }
  .jd-sidebar {
    order: -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
  }
  .jd-apply-box {
    position: static;
    grid-column: 1 / -1;
    margin-bottom: 0;
  }
  .jd-apply-box-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 18px 20px;
  }
  .jd-apply-box-inner h3 { margin-bottom: 0; flex-shrink: 0; }
  .jd-apply-box-inner p  { margin-bottom: 0; flex: 1; min-width: 160px; font-size: .8125rem; }
  .jd-apply-btn { flex-shrink: 0; width: auto; padding: 12px 22px; white-space: nowrap; }
  .jd-meta-box  { margin-bottom: 0; }
  .jd-share-box { margin-bottom: 0; }
  .jd-sidebar-ad { display: none; }
  .jd-hero-apply-mobile { display: block; }
}

/* ─────────────────────────────────────────────────────
   RESPONSIVE  ≤ 600px  (mobile)
───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .jd-sidebar { grid-template-columns: 1fr; }
  .jd-apply-box-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .jd-apply-btn { width: 100%; justify-content: center; }

  .jd-hero { padding: 16px; gap: 14px; }
  .jd-hero-logo { width: 60px; height: 60px; }
  .jd-title { font-size: 1.0625rem; }
  .jd-chips { gap: 5px; }
  .jd-chip  { font-size: .75rem; padding: 4px 9px; }

  .jd-section-header { padding: 14px 16px 12px; }
  .jd-section-body   { padding: 14px 16px 18px; }

  .jd-detail-table th { width: 44%; }
  .jd-detail-table td { width: 56%; }
  .jd-detail-table th,
  .jd-detail-table td { padding: 10px 12px; font-size: .8125rem; }

  .jd-bc-current { max-width: 180px; }

  .jd-related-grid { grid-template-columns: 1fr; }

  .jd-apply-btn-main { font-size: .9375rem; padding: 14px 18px; }

  .jd-faq-item dt { font-size: .875rem; padding: 13px 14px; }
  .jd-faq-item dd { padding: 0 14px; font-size: .875rem; }
  .jd-faq-item.open dd { padding: 12px 14px 16px; }
}

/* ─────────────────────────────────────────────────────
   RESPONSIVE  ≤ 380px  (small phones)
───────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .jd-hero { padding: 14px 12px; }
  .jd-section-header { padding: 12px 14px 10px; gap: 10px; }
  .jd-section-body   { padding: 12px 14px 16px; }
  .jd-section-icon   { width: 30px; height: 30px; border-radius: 8px; }
  .jd-section-header h2 { font-size: .9375rem; }
  .jd-apply-btn-main { font-size: .9rem; }
  .jd-bc-current { max-width: 140px; }
}
