/* ─── Job Detail Page ───
   Figma: desktop 6003:4166 · tablet 6003:4845 · mobile 6003:5019.
   Single white page, one centred column, meta rail left of the description.
   Breakpoints match the frames: mobile → 768 (tablet) → 1024 (desktop). */
.job-detail {
  background-color: var(--color-white, #fff);
  padding: 4rem 2rem 8rem;
}

@media screen and (min-width: 768px) {
  .job-detail {
    padding: 6rem 4rem 12rem;
  }
}

@media screen and (min-width: 1024px) {
  .job-detail {
    padding: 6rem 8rem 12rem;
  }
}

.job-detail__container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  width: 100%;
}

/* Desktop pins the column at 794px and centres it; tablet and mobile are fluid. */
@media screen and (min-width: 1024px) {
  .job-detail__container {
    /* width: 79.4rem; */
    width: 144rem;
    max-width: 100%;
    margin-inline: auto;
  }
}

/* ─── Header (back link + logo) ─── */
/* Mobile stacks and centres both; from tablet the logo is optically centred in
   the row, which a 3-column grid does without a dummy spacer element. */
.job-detail__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
}

@media screen and (min-width: 768px) {
  .job-detail__header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.6rem;
  }

  .job-detail-back-link {
    justify-self: start;
  }
}

.job-detail__logo {
  width: 20.6rem;
  height: 2.6rem;
  object-fit: contain;
  flex-shrink: 0;
}

/* ─── Back Link ─── */
.job-detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-primary);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-blue-main, #005587);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.job-detail-back-link__icon {
  width: 1.8rem;
  height: 1.8rem;
  flex-shrink: 0;
}

.job-detail-back-link:hover,
.job-detail-back-link:focus-visible {
  color: var(--color-navy, #001551);
  text-decoration: underline;
}

.job-detail-back-link:focus-visible {
  outline: 0.2rem solid var(--color-blue, #0064c8);
  outline-offset: 0.4rem;
  border-radius: 0.4rem;
}

/* ─── Title ─── */
.job-detail__title {
  font-family: var(--font-primary);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05rem;
  color: var(--color-charcoal, #282828);
}

@media screen and (min-width: 768px) {
  .job-detail__title {
    font-size: 3.6rem;
  }
}

/* ─── Body: meta rail + description ─── */
.job-detail__body {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

@media screen and (min-width: 768px) {
  .job-detail__body {
    flex-direction: row;
    align-items: flex-start;
  }
}

.job-detail__aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

/* Fixed 225px rail from tablet up — the description takes the rest. */
@media screen and (min-width: 768px) {
  .job-detail__aside {
    width: 22.5rem;
    flex-shrink: 0;
  }
}

.job-detail__main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

@media screen and (min-width: 768px) {
  .job-detail__main {
    flex: 1 1 0;
  }
}

/* ─── Meta list ─── */
.job-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
}

.job-detail-meta__item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.job-detail-meta__label {
  font-family: var(--font-primary);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-charcoal, #282828);
}

.job-detail-meta__value {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-charcoal, #282828);
}

/* ─── Apply / Share controls ─── */
/* Design button: full-bleed navy, 24/16 padding, 10px radius, bold label.
   .btn-pill supplies the fill and hover; this only overrides the metrics. */
.job-detail__apply {
  width: 100%;
  gap: 1.6rem;
  padding: 1.6rem 2.4rem;
  font-size: 1.6rem;
  font-weight: 700;
}

/* The description-column button is a step smaller in every frame. */
.job-detail__apply--sm {
  font-size: 1.4rem;
}

.job-detail__share {
  position: relative;
}

.job-detail__share-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

/* ─── Description ─── */
.job-detail-content {
  font-family: var(--font-primary);
  font-size: 1.4rem;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--color-charcoal, #282828);

  /* allow break line */
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.job-detail-content a {
  color: var(--color-blue-main, #005587);
  text-decoration: underline;
  transition: color 0.2s ease-in-out;
}

.job-detail-content a:hover,
.job-detail-content a:focus-visible {
  color: var(--color-navy, #001551);
}

/* ─── Share Links ─── */
.job-detail-share-panel {
  border: 0.1rem solid var(--color-warm-gray, #ebebe6);
}

.job-detail-share-link {
  display: block;
  padding: 1rem 1.6rem;
  font-family: var(--font-primary);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-navy, #001551);
  text-decoration: none;
  transition: background-color 0.2s ease-in-out,
    color 0.2s ease-in-out;
}

.job-detail-share-link:hover,
.job-detail-share-link:focus-visible {
  background-color: var(--color-navy, #001551);
  color: var(--color-white, #fff);
}


.job-detail-content ul,
.job-detail-content ol {
  display: block;
  list-style-type: initial;
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  padding-inline-start: 20px;
  unicode-bidi: isolate;
}

.job-detail-content li {
  display: list-item;
  text-align: -webkit-match-parent;
  unicode-bidi: isolate;
}

.job-detail-content li:empty {
  display: none;
}

.job-detail-content br {
  display: none;
}

/* Remove default list styles */
.job-detail-content p {
  display: block;
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  unicode-bidi: isolate;
}

.job-detail-content a:not(.button) {
  text-decoration: underline;
}

.job-detail-content a:hover {
  cursor: pointer;
}