/*
 * JHB Jobs – Editorial responsive rules
 * Tablet, mobile slider, compact cards and reduced motion.
 */

/* Responsive */
@media (max-width: 1040px) {
  .je-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
    gap: 28px;
    padding: 28px;
  }

  .je-employer__grid,
  .je-contact__box {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
    gap: 36px;
  }

  .je-hero__title {
    font-size: clamp(37px, 4.8vw, 48px);
  }

  .jhb-job-single--editorial .je-hero__lead {
    max-width: 42ch;
    margin: 16px auto 0;
    justify-self: center;
    text-align: center;
  }

  .je-benefits__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .je-benefits__grid .je-benefit,
  .je-benefits__grid--count-1 .je-benefit,
  .je-benefits__grid--count-2 .je-benefit,
  .je-benefits__grid--count-4 .je-benefit,
  .je-benefits__grid--count-5 .je-benefit:nth-last-child(-n + 2) {
    grid-column: auto;
  }

  .je-benefits__grid--count-1 .je-benefit {
    grid-column: 1 / -1;
    width: min(100%, 620px);
    justify-self: center;
  }

  .je-network__jobs {
    gap: 12px;
  }
}

@media (max-width: 820px) {
  .jhb-job-single--editorial .jhb-job-shell {
    width: min(calc(100% - 32px), 720px);
  }

  .je-section-head {
    margin-bottom: 36px;
  }

  .je-section-head h2 {
    margin-top: 32px;
    font-size: clamp(29px, 8vw, 38px);
  }

  .je-section-head > p:last-child {
    margin-top: 18px;
    font-size: 14.5px;
  }

  .je-hero {
    min-height: auto;
    padding: 38px 0;
  }

  .je-hero__grid {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 26px;
  }

  .je-employer__grid,
  .je-contact__box {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .je-hero__copy {
    max-width: none;
    justify-self: stretch;
    padding: 4px;
    text-align: center;
  }

  .je-hero__eyebrow,
  .je-hero__headline,
  .je-hero__title,
  .je-hero__roleline,
  .je-hero__lead,
  .je-hero__actions,
  .je-hero__trust {
    margin-left: auto;
    margin-right: auto;
  }

  .je-hero__roleline,
  .je-hero__actions,
  .je-hero__trust {
    justify-content: center;
  }

  .je-hero__headline {
    margin-top: 17px;
  }

  .je-hero__title {
    display: grid;
    justify-items: center;
    width: 100%;
    max-width: 100%;
    font-size: clamp(34px, 6.8vw, 45px);
    line-height: 1.07;
    text-align: center;
  }

  .je-hero__title span {
    display: block;
    width: min(100%, 13.5ch);
    margin-inline: auto;
    text-align: center;
    text-wrap: balance;
  }

  .je-hero__title small {
    display: block;
    margin: 10px auto 0;
    font-size: .32em;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }

  .je-hero__roleline {
    margin-top: 11px;
  }

  .jhb-job-single--editorial .je-hero__lead {
    max-width: 38ch;
    font-size: 15px;
    line-height: 1.64;
  }

  .je-hero__actions {
    margin-top: 24px;
  }

  .je-hero__trust {
    margin-top: 18px;
  }

  .je-hero__aside {
    width: min(100%, 620px);
    max-width: 620px;
    justify-self: center;
    margin: 2px auto 0;
    padding: 28px;
    text-align: center;
  }

  .je-profile__box {
    grid-template-columns: 1fr;
  }

  .je-profile__column + .je-profile__column {
    border-top: 1px solid var(--je-line-soft);
    border-left: 0;
  }

  .je-inline-cta {
    width: calc(100% - 30px);
  }

  .je-employer__story,
  .je-employer__benefit,
  .je-contact__pitch {
    text-align: center;
  }

  .je-employer__story {
    display: block;
    padding: 0;
  }

  .je-employer__points {
    width: min(100%, 680px);
    margin-inline: auto;
  }

  .je-employer__story .je-eyebrow,
  .je-employer__benefit .je-eyebrow {
    margin-inline: auto;
  }

  .je-employer__story h2,
  .je-employer__lead,
  .je-contact__pitch h2,
  .je-contact__pitch > p {
    margin-inline: auto;
  }

  .je-employer__story h2,
  .je-employer__lead {
    text-align: center;
  }

  .je-employer__pills,
  .je-contact__trust,
  .je-contact__actions {
    justify-content: center;
  }

  .je-network__jobs {
    grid-template-columns: 1fr;
    width: min(620px, 100%);
    margin-inline: auto;
  }

  .je-job-card {
    min-height: 0;
  }

  .je-network__links {
    grid-template-columns: 1fr;
    width: min(620px, 100%);
    margin: 14px auto 0;
  }

  .je-job-card,
  .je-job-card > *,
  .je-job-card h3,
  .je-job-card__meta,
  .je-job-card__meta > *,
  .je-network__links > a,
  .je-network__links > a > span:first-child,
  .je-network__links strong,
  .je-network__links small {
    text-align: center;
  }

  .je-network__links > a {
    justify-content: center;
  }

  .je-contact__person {
    width: min(100%, 520px);
    margin-inline: auto;
  }

  .je-contact__footer {
    width: calc(100% - 30px);
  }
}

@media (max-width: 767px) {
  .je-network .jhb-mobile-card-slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    width: fit-content;
    margin: 0 auto 18px;
    padding: 6px;
    border: 1px solid var(--je-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 10px 26px rgba(28, 43, 54, .055);
  }

  .je-network__jobs.jhb-mobile-card-slider-track {
    display: flex;
    width: auto;
    margin-inline: -14px;
    padding: 2px 14px 16px;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-padding-inline: 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .je-network__jobs.jhb-mobile-card-slider-track::-webkit-scrollbar {
    display: none;
  }

  .je-network__jobs.jhb-mobile-card-slider-track .je-job-card {
    flex: 0 0 calc(100% - 34px);
    min-width: 0;
    min-height: 248px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
}

@media (max-width: 620px) {
  .jhb-job-single--editorial .jhb-job-shell {
    width: min(calc(100% - 28px), 560px);
  }

  .je-eyebrow {
    min-height: 32px;
    padding: 7px 13px;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: .085em;
  }

  .je-section-head {
    margin-bottom: 38px;
  }

  .je-section-head h2 {
    max-width: 14ch;
    margin: 32px auto 0;
    font-size: clamp(28px, 7.8vw, 35px);
    line-height: 1.12;
    overflow-wrap: break-word;
    text-align: center;
    text-wrap: balance;
  }

  .je-section-head > p:last-child {
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.65;
  }

  .je-hero {
    min-height: auto;
    padding: 26px 0 32px;
  }

  .je-hero__grid {
    gap: 22px;
    padding: 22px 18px 20px;
    border-radius: 27px;
  }

  .je-hero__copy {
    width: 100%;
    min-width: 0;
    padding: 2px;
    overflow: hidden;
  }

  .je-hero__headline {
    margin-top: 16px;
  }

  .je-hero__title {
    font-size: clamp(29px, 8.2vw, 36px);
    line-height: 1.1;
    letter-spacing: -.035em;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .je-hero__title span {
    width: min(100%, 14ch);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .je-hero__title small {
    margin-top: 9px;
    font-size: .36em;
  }

  .je-hero__roleline {
    width: 100%;
    font-size: clamp(17px, 4.9vw, 20px);
    line-height: 1.35;
    text-wrap: balance;
  }

  .jhb-job-single--editorial .je-hero__lead {
    width: 100%;
    max-width: 30ch;
    min-width: 0;
    font-size: clamp(14px, 3.7vw, 15px);
    font-weight: 620;
    line-height: 1.62;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .je-hero__actions {
    display: grid;
    width: 100%;
    gap: 10px;
    margin-top: 23px;
  }

  .je-hero__actions .jhb-job-button,
  .je-contact__actions .jhb-job-button {
    width: 100%;
    min-height: 50px;
  }

  .je-hero__trust {
    display: grid;
    justify-content: center;
    gap: 8px;
    margin-top: 17px;
  }

  .je-hero__aside {
    padding: 28px 20px;
    border-radius: 26px;
  }

  .je-hero__aside-head h2 {
    margin-top: 18px;
    font-size: 24px;
  }

  .je-facts {
    margin-top: 27px;
  }

  .je-fact {
    min-height: 108px;
    padding: 18px 10px;
  }

  .je-fact strong {
    width: 100%;
    max-width: 100%;
    margin: 9px auto 0;
    font-size: clamp(12.5px, 3.7vw, 15px);
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: center;
    text-wrap: balance;
  }

  .je-hero__contact {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 13px;
    margin-top: 26px;
    padding-top: 25px;
    text-align: center;
  }

  .je-hero__contact .je-photo-trigger,
  .je-hero__contact img {
    width: 70px;
    height: 70px;
  }

  .je-photo-trigger__icon {
    width: 25px;
    height: 25px;
  }

  .je-hero__contact span {
    font-size: 10.5px;
  }

  .je-hero__contact strong {
    margin-top: 6px;
    font-size: 18px;
  }

  .je-hero__contact small {
    max-width: 31ch;
    margin: 6px auto 0;
    font-size: 13px;
    line-height: 1.5;
  }

  .je-profile,
  .je-benefits,
  .je-employer,
  .je-network,
  .je-contact {
    padding-block: 54px;
  }

  .je-profile__box,
  .je-employer__grid,
  .je-contact__box {
    border-radius: 26px;
  }

  .je-profile__box {
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
  }

  .je-profile__column {
    padding: 30px 22px;
    text-align: center;
  }

  .je-profile__title {
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
    text-align: center;
  }

  .je-profile__title h3 {
    font-size: 26px;
  }

  .je-profile__column li {
    padding: 18px 0 18px 30px;
    font-size: 14.5px;
    line-height: 1.65;
    text-align: left;
  }

  .je-inline-cta {
    display: grid;
    width: 100%;
    margin: -1px auto 0;
    gap: 18px;
    padding: 24px 20px;
    border-radius: 0 0 26px 26px;
    text-align: center;
  }

  .je-inline-cta .jhb-job-button {
    width: 100%;
  }

  .je-benefits__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .je-benefits__grid .je-benefit,
  .je-benefits__grid--count-1 .je-benefit {
    grid-column: auto;
    width: 100%;
  }

  .je-benefit {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 0;
    gap: 13px;
    padding: 25px 21px;
    text-align: center;
  }

  .je-benefit > div {
    width: 100%;
    text-align: center;
  }

  .je-benefit h3,
  .je-benefit p {
    margin-inline: auto;
    text-align: center;
  }

  .je-benefit h3 {
    margin-top: 0;
    font-size: 19px;
  }

  .je-benefit p {
    margin-top: 9px;
    font-size: 14.5px;
    line-height: 1.62;
  }

  .je-employer__grid,
  .je-contact__box {
    gap: 36px;
    padding: 30px 22px;
    text-align: center;
  }

  .je-employer__story h2 {
    margin-top: 20px;
    font-size: clamp(31px, 9.5vw, 41px);
    line-height: 1.08;
  }

  .je-contact__pitch h2 {
    margin-top: 13px;
    font-size: clamp(31px, 9.5vw, 41px);
    line-height: 1.08;
  }

  .je-employer__lead,
  .je-contact__pitch > p {
    margin-top: 19px;
    font-size: 15px;
    line-height: 1.72;
  }

  .je-employer__points {
    margin-top: 25px;
  }

  .je-employer__points li {
    padding: 19px 0 19px 31px;
    font-size: 14.5px;
    line-height: 1.7;
    text-align: left;
  }

  .je-employer__points li::before {
    top: 21px;
  }

  .je-employer__benefit {
    padding: 27px 22px;
    text-align: center;
  }

  .je-employer__benefit h3 {
    margin: 27px auto 0;
    font-size: clamp(28px, 8.8vw, 36px);
  }

  .je-employer__benefit-copy {
    margin: 22px auto 0;
    font-size: 15px;
    line-height: 1.7;
  }

  .je-employer__pills {
    justify-content: center;
    gap: 9px;
    margin-top: 22px;
  }

  .je-employer__pills span,
  .je-contact__trust span {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 11px;
  }

  .je-employer__benefit-list {
    margin-top: 23px;
  }

  .je-employer__benefit-list > div {
    gap: 5px;
    padding: 17px 4px;
    text-align: left;
  }

  .je-employer__benefit-list strong {
    font-size: 14px;
  }

  .je-employer__benefit-list span {
    font-size: 13px;
    line-height: 1.55;
  }

  .je-job-card {
    align-items: center;
    min-height: 240px;
    padding: 25px 21px;
  }

  .je-job-card > * {
    margin-inline: auto;
  }

  .je-job-card h3 {
    width: 100%;
    max-width: 16ch;
    font-size: 20px;
    line-height: 1.24;
    overflow-wrap: break-word;
    word-break: break-word;
    text-wrap: balance;
  }

  .je-job-card__meta {
    justify-items: center;
    width: 100%;
  }

  .je-job-card__meta > *,
  .je-job-card__meta span,
  .je-job-card__meta strong,
  .je-job-card__meta small {
    width: 100%;
  }

  .je-network__links > a {
    display: grid;
    justify-items: center;
    align-content: center;
    justify-content: center;
    min-height: 132px;
    gap: 12px;
    padding: 22px 18px;
  }

  .je-network__links > a > span:first-child {
    display: grid;
    justify-items: center;
    justify-content: center;
    width: 100%;
  }

  .je-network__links strong,
  .je-network__links small {
    display: block;
    width: 100%;
    margin-inline: auto;
    text-wrap: balance;
  }

  .je-network__links > a > span:last-child {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--je-line);
    border-radius: 50%;
    background: var(--je-apricot);
    font-size: 16px;
    line-height: 1;
  }

  .je-contact__pitch,
  .je-contact__person {
    text-align: center;
  }

  .je-contact__person {
    padding-inline: 18px;
  }

  .je-contact__details {
    gap: 8px;
  }

  .je-contact__line {
    min-height: 104px;
    padding-inline: 7px;
  }

  .je-contact__detail-copy strong {
    font-size: 10.5px;
  }

  .je-contact__trust {
    justify-content: center;
    gap: 10px;
    margin-top: 23px;
  }

  .je-contact__actions {
    display: grid;
    gap: 12px;
    margin-top: 29px;
  }

  .je-contact__footer {
    display: grid;
    width: calc(100% - 20px);
    gap: 12px;
    padding: 18px;
    text-align: center;
  }

  .je-contact__footer > div {
    justify-content: center;
  }

  .je-contact__footer p {
    margin-inline: auto;
  }

  .jhb-job-photo-lightbox {
    padding: 10px;
  }

  .jhb-job-photo-lightbox__panel {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 12px;
    border-radius: 22px;
  }

  .jhb-job-photo-lightbox__image {
    max-height: calc(100vh - 104px);
    border-radius: 16px;
  }

  .jhb-job-photo-lightbox__caption {
    margin: 10px 46px 0;
    font-size: 13px;
  }

  .jhb-job-photo-lightbox__close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }

  .jhb-job-phone-dialog {
    padding: 12px;
  }

  .jhb-job-phone-dialog__panel {
    padding: 26px 18px 20px;
    border-radius: 22px;
  }

  .jhb-job-phone-dialog__panel::before {
    width: 50px;
    height: 50px;
    margin-bottom: 14px;
    border-radius: 16px;
  }

  .jhb-job-phone-dialog__actions {
    grid-template-columns: 1fr;
  }
}



@supports (height: 100dvh) {
  @media (max-width: 620px) {
    .jhb-job-photo-lightbox__panel {
      max-height: calc(100dvh - 20px);
    }

    .jhb-job-photo-lightbox__image {
      max-height: calc(100dvh - 104px);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .je-benefit,
  .je-job-card,
  .je-contact__line,
  .je-network__links > a {
    transition: none;
  }
}
