/*------------------- SISSA -------------------*/
.card.card-job-opportunity {
  border-top: 5px solid var(--card-accent, var(--math));
  margin-bottom: 2rem;

  .container-info {
    margin-top: 1rem;
    border-top: 1px solid #000;
    padding-top: 1rem;

    > div {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      margin-bottom: 0.8rem;
    }

    .value {
      font-size: 14px;
      font-weight: 500;
      color: #000;
      text-align: right;
      max-width: 50%;
      line-height: 1.25rem;
      display: flex;
      align-items: center;
    }
  }

  .card-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 1rem;
    border-top: 1px solid #c5c7c9;
    padding-top: 1rem;

    /* Same lockup as card-event: two square badges stacked on one vertical
       axis, centred in the column. Width (not height:100%) is set on the img
       because the PhD course comes through Drupal media markup — a percentage
       height would resolve against the field wrapper and the 300×300 SVG
       badges would paint at intrinsic size. */
    .area-reference-container {
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      justify-content: center;
      align-items: center;
      gap: 10px;
      margin-top: 0;
    }

    .logo-container {
      display: flex;
      align-items: center;
      flex-shrink: 0;
      min-width: 60px;
    }

    .logo-container img,
    .phd-course-logo img {
      width: 60px;
      height: auto;
      max-width: none;
      object-fit: contain;
      position: relative;
    }
  }
}

@media (min-width: 992px) {
  .view-job-opportunity-public-blocks-db {
    margin-bottom: 4rem;
    li:last-child:first-child,
    li:last-child {
      border-bottom: 1px solid #000;
    }
  }

  .card.card-job-opportunity {
    border-top: 1px solid #000;
    border-left: 5px solid var(--card-accent, var(--math));
    margin-bottom: 0rem;
    border-bottom: 0px;

     .card-bottom  .area-reference-container {
      flex-direction: column;
    }


    .card-body {
      h3 {
        width: 60%;
        flex: 1;
      }

      .container-info {
        width: calc(40% - 2rem);
        border-top: 0px;
        border-left: 1px solid #000;
        border-right: 1px solid #000;
        margin: 0rem 2rem;
        padding: 0rem 2rem;
      }

      .card-bottom {
        min-width: 100px;
        padding: 0;
        margin: 0;
        border: 0px;
        display: flex;
        align-items: stretch;

        .logo-container {
          min-width: 100px;
        }

        .logo-container img,
        .phd-course-logo img {
          width: 60px;
          height: auto;
        }
      }
    }
  }
}

@media (min-width: 1200px) {
  .card.card-job-opportunity .card-bottom {
    .logo-container img,
    .phd-course-logo img {
      width: 70px;
    }
  }
}

@media (min-width: 1400px) {
  .card.card-job-opportunity {
    .container-info {
      line-height: 26px;
    }
  }
}

/* Per-area accent colour (from the `area` prop -> .card-job-opportunity--area-<slug>).
   The custom property inherits down to the card accent border (top on mobile,
   left on desktop). Mirrors card-news: token names in global-sissa.css differ
   from the slugs, so map them explicitly; "sissa"/"ilas" have no token and fall
   back to --math. */
.card-job-opportunity--area-mathematics {
  --card-accent: var(--math);
}
.card-job-opportunity--area-physics {
  --card-accent: var(--phisycs);
}
.card-job-opportunity--area-neuroscience,
.card-job-opportunity--area-neurobiology {
  --card-accent: var(--neuroscience);
}
