/* =====================================================
   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; }

/* Apply CTA strip — visible on all screen sizes */
.jd-hero-apply-mobile { display: block; 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;
}



/*&--Tags-----*/
    /* ── Related Job Tags ──────────────────────────────── */
.job-tags-section {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border: 0.5px solid #e5e7eb;
    border-radius: 12px;
}

.job-tags-section h2 {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.85rem 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* small tag icon before heading */
.job-tags-section h2::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z'/%3E%3Ccircle cx='7' cy='7' r='1.5' fill='%236b7280' stroke='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

.job-tags-card {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
    white-space: nowrap;
}

.tag-link:hover {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

.tag-link:active {
    transform: translateY(0);
}



/* ─────────────────────────────────────────────────────
   LATEST JOBS LIST
───────────────────────────────────────────────────── */
.jd-latest-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.jd-latest-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .875rem;
  line-height: 1.5;
}
.jd-latest-item:last-child { border-bottom: none; }
.jd-latest-item svg {
  flex-shrink: 0;
  color: var(--primary);
  opacity: .6;
  position: relative;
  top: 1px;
}
.jd-latest-item a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color .15s;
}
.jd-latest-item a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* ── Tag type color variants ───────────────────────── */

/* Company tags  → /company/ */
a.tag-link[href^="/company/"] {
    background: #faf5ff;
    color: #7c3aed;
    border-color: #ddd6fe;
}
a.tag-link[href^="/company/"]:hover {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}

/* Role tags     → /jobs/role/ */
a.tag-link[href^="/jobs/role/"] {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}
a.tag-link[href^="/jobs/role/"]:hover {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

/* Location tags → /jobs/location/ */
a.tag-link[href^="/jobs/location/"] {
    background: #fff7ed;
    color: #ea580c;
    border-color: #fed7aa;
}
a.tag-link[href^="/jobs/location/"]:hover {
    background: #ea580c;
    color: #fff;
    border-color: #ea580c;
}

/* Category tags → /category/ (experience type) */
a.tag-link[href^="/category/"] {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #bae6fd;
}
a.tag-link[href^="/category/"]:hover {
    background: #0284c7;
    color: #fff;
    border-color: #0284c7;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
    .job-tags-section {
        padding: 1rem;
    }
    .tag-link {
        font-size: 0.75rem;
        padding: 0.28rem 0.7rem;
    }
}



/* ─────────────────────────────────────────────────────
   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 AD (hidden on tablet/mobile via media query)
───────────────────────────────────────────────────── */
.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-ad { display: none; }
}

/* ─────────────────────────────────────────────────────
   RESPONSIVE  ≤ 600px  (mobile)
───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .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; }
}
