/* ------------------- Job Opportunity detail ------------------- */

article.pt-page--job-opportunity {
  padding: 0;
}

/* The page <h1> is rendered inside this article now (→ the .twig), so the top
   spacing that used to come from the title region (`.it-page-title__wrapper`,
   6 / 2 / 4rem) has to come from here. `padding: 0` above zeroes the container's
   own side padding, so only the top is put back. */
article.pt-page--job-opportunity {
  padding-top: 6rem;
}

@media (min-width: 992px) {
  article.pt-page--job-opportunity {
    padding-top: 2rem;
  }
}

@media (min-width: 1200px) {
  article.pt-page--job-opportunity {
    padding-top: 4rem;
  }
}

/* Per-area accent colour (from the sissa_area prop -> .jopp--area-<slug>). The
   custom property inherits down to the metadata card top border + status badge.
   Token names in global-sissa.css differ from the slugs, so map them; sissa/ilas
   have no token and fall back to --math. */
.pt-page--job-opportunity {
  --card-accent: var(--math);
}
.pt-page--job-opportunity.jopp--area-mathematics {
  --card-accent: var(--math);
}
.pt-page--job-opportunity.jopp--area-physics {
  --card-accent: var(--phisycs);
}
.pt-page--job-opportunity.jopp--area-neuroscience {
  --card-accent: var(--neuroscience);
}

/* Project intro block */
.pt-page--job-opportunity .job-opportunity-project .project-code {
  color: #737373;
  font-size: 14px;
  font-weight: 500;
}

/* Metadata card as a sticky sidebar (desktop). On mobile it is a normal stacked
   block, and it comes first in source order so the key facts + Apply CTA show
   early. */
@media (min-width: 992px) {
  .pt-page--job-opportunity .jopp-sticky-sidebar {
    position: sticky;
    top: 1.5rem;
  }
}

/* --- Metadata card content (sissa design) --- */
.pt-page--job-opportunity {
  .container-card-metadata .card {
    background-color: transparent;

    .status .value {
      font-size: 14px;
      font-weight: 500;
      color: #fff;
    }
  }
  .card-description {
    border: 1px solid var(--accent);
    /* border-top: 5px solid var(--card-accent, var(--math)); */
  }
}

@media (max-width: 992px) {
  .pt-page--job-opportunity .pt-detail-split__aside {
    background-image: url(/themes/custom/pt_base/images/bg-dark-noise.png);
    background-size: 400px;
    background-repeat: repeat;
  }
}

/* Status highlight — signature top block of the card, coloured by area accent. */
.pt-page--job-opportunity .status-container {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: var(--bs-border-width, 1px) solid
    var(--bs-border-color, rgba(0, 0, 0, 0.1));
}

.pt-page--job-opportunity .status-badge {
  display: inline-block;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--card-accent, var(--math));
}

/* Closed calls read as muted rather than accent-coloured. */
.pt-page--job-opportunity .status--closed .status-badge {
  color: #737373;
}

.pt-page--job-opportunity .card-description .data-group {
  margin-bottom: 0;
}

.pt-page--job-opportunity .card-description .data-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: var(--bs-border-width, 1px) solid
    var(--bs-border-color, rgba(0, 0, 0, 0.1));
}

.pt-page--job-opportunity .card-description .data-row:last-child {
  margin-bottom: 0;
}

.pt-page--job-opportunity .card-description .data-row .label {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0;
  color: #737373;
}

.pt-page--job-opportunity .card-description .data-row .label img {
  width: 23px;
  height: 26px;
  flex-shrink: 0;
}

.pt-page--job-opportunity .card-description .data-row .value {
  max-width: 55%;
  text-align: right;
  font-weight: 500;
  display: flex;
  align-items: center;
}

/* Research-area + PhD-course logos */
.pt-page--job-opportunity .area-reference-container {
  display: flex;
  align-items: self-start;
  gap: 16px;
  margin-top: 1.5rem;
}

.pt-page--job-opportunity .area-reference-container img {
  height: 40px;
  width: auto;
}

@media (min-width: 992px) {
  .pt-page--job-opportunity .area-reference-container {
    gap: 20px;
    margin-top: 2rem;
  }
  .pt-page--job-opportunity .area-reference-container img {
    height: 60px;
  }
  .pt-page--job-opportunity .area-reference-container .phd-course-logo img {
    height: 80px;
  }
}

/* Detail rules that used to apply on the area microsites only. This site is
   one of them, so they are unconditional now. */
.pt-page--job-opportunity .card-description .data-row {
  border-bottom: 1px solid #5d5d5d;
  .label {
    color: #000000;
  }
}

.status {
  border-bottom: 1px solid #000000;
}


/* colors phd */
.pt-page--job-opportunity .card-description .data-row {
  color: #fff;
}

.pt-page--job-opportunity .card-description .data-row {
    .label {
        color: #d3d3d3;
    }
}

.page-node-type--job-opportunity {
  .card {
    .value,
    .label {
      color: #fff;
    }
  }
}

@media (max-width: 992px) {

  .page-node-type--job-opportunity {
  .pt-detail-split__header {
    position: relative;

    /* How far the band has to rise to cover everything above the title: the
       article's 6rem top padding, the back-link row (49px + its 1rem bottom
       margin) and the `mt-4` on this column. All three are fixed by the layout,
       which is the point — the band used to rise `39%` OF THE TITLE, so a short
       title left the back-link, white ink, on white ground (WCAG 1.4.3). A
       back-link label that wraps only makes the band start higher. */
    --jopp-band-rise: calc(6rem + 65px + 1.5rem);

    * {
      color: #fff;
    }
    &:after {
      background-image: url(/themes/custom/pt_base/images/bg-dark-noise.png);
      position: absolute;
      content: "";
      background-size: 400px;
      background-repeat: repeat;
      width: 100vw;
      /* Down to 2rem below the title: enough to cross the card's own top
         margin, so the band meets the noise the aside paints for itself. */
      height: calc(100% + var(--jopp-band-rise) + 2rem);
      z-index: -1;
      left: 50%;
      top: calc(-1 * var(--jopp-band-rise));
      transform: translateX(-50%);
    }
  }
}
}


