/*
 * JHB Jobs – Editorial Single Job Layout
 * Agency module: core, tokens, hero and shared primitives
 *
 * Scope:
 * - premium job-detail presentation
 * - compact conversion flow
 * - shared design for every job from jhb-jobs-master.php
 * - application drawer remains in job-base.css
 */

.jhb-job-single--editorial,
body.jhb-job-page,
.jhb-job-photo-lightbox,
.jhb-job-phone-dialog {
  --je-navy: var(--jhb-ink, #143044);
  --je-ink: var(--jhb-ink, #1f2933);
  --je-copy: var(--jhbjm-auto-copy, var(--jhb-copy, #536b7a));
  --je-line: var(--jhbjm-auto-line, rgba(233, 98, 11, .16));
  --je-line-soft: var(--jhbjm-auto-divider, var(--jhbjm-auto-line-soft, rgba(20, 48, 68, .09)));
  --je-line-strong: var(--jhbjm-auto-line-strong, rgba(233, 98, 11, .30));
  --je-theme-glow: var(--jhbjm-auto-glow, rgba(233, 98, 11, .10));
  --je-page-start: var(--jhbjm-auto-page-start, #fffaf6);
  --je-page-end: var(--jhbjm-auto-page-end, #fff4ea);
  --je-page-soft: var(--jhbjm-auto-page-soft, #fffaf6);
  --je-surface-card: var(--jhbjm-auto-card, #ffffff);
  --je-surface-card-alt: var(--jhbjm-auto-card-alt, #fffaf6);
  --je-surface-card-strong: var(--jhbjm-auto-card-strong, #fff4ea);
  --je-apricot: var(--jhbjm-auto-marker, #fff4ea);
  --je-apricot-strong: var(--jhbjm-auto-marker-soft, #ffe7d4);
  --je-badge-text: var(--jhbjm-auto-badge-text, var(--jhb-badge-text, var(--jhb-accent, #E9620B)));
  --je-number-bg: var(--jhbjm-auto-number-bg, var(--jhb-number-bg, var(--je-apricot)));
  --je-number-text: var(--jhbjm-auto-number-text, var(--jhb-number-text, var(--je-accent)));
  --je-button-text: var(--jhbjm-auto-button-text, var(--jhb-button-text, #ffffff));
  --je-icon-bg: var(--jhbjm-auto-icon-bg, var(--je-number-bg));
  --je-icon-bg-hover: var(--jhbjm-auto-icon-bg-hover, var(--je-surface-card));
  --je-icon-fg: var(--jhbjm-auto-icon-text, var(--je-number-text));
  --je-icon-fg-hover: var(--jhbjm-auto-icon-text-hover, var(--je-accent));
  --je-icon-border: var(--jhbjm-auto-icon-border, var(--je-line));
  --je-cream: var(--je-surface-card-alt);
  --je-white: var(--je-surface-card);
  --je-shadow: 0 24px 60px rgba(28, 43, 54, .09);
  --je-shadow-soft: 0 14px 34px rgba(28, 43, 54, .065);
  --je-column-gap: clamp(24px, 2.7vw, 34px);
  --je-section-space: clamp(54px, 5vw, 72px);
  --je-section-space-compact: clamp(48px, 4.6vw, 64px);
  --je-accent: var(--jhb-accent, #E9620B);
  --je-accent-strong: var(--jhb-accent-strong, var(--je-accent));
  --je-bonnie-green-soft: #eef5e9;
  --je-bonnie-green: #579343;
  --je-bonnie-green-strong: #3F7630;
  --je-ease: var(--jhb-ease, cubic-bezier(.22, .61, .36, 1));
  --je-tag-ambulant-bg: var(--jhb-tag-ambulant-bg, #E4F0FF);
  --je-tag-ambulant-border: var(--jhb-tag-ambulant-border, #C6DBFF);
  --je-tag-ambulant-text: var(--jhb-tag-ambulant-text, #0F4FA8);
  --je-tag-stationaer-bg: var(--jhb-tag-stationaer-bg, #D6F2E0);
  --je-tag-stationaer-border: var(--jhb-tag-stationaer-border, #AEE4C4);
  --je-tag-stationaer-text: var(--jhb-tag-stationaer-text, #0D5D3A);
  --je-tag-schul-bg: var(--jhb-tag-schul-bg, #FFF3BF);
  --je-tag-schul-border: var(--jhb-tag-schul-border, #FFE08A);
  --je-tag-schul-text: var(--jhb-tag-schul-text, #8A5A00);
  --je-tag-kita-bg: var(--jhb-tag-kita-bg, #FFE8D6);
  --je-tag-kita-border: var(--jhb-tag-kita-border, #FFD0A8);
  --je-tag-kita-text: var(--jhb-tag-kita-text, #9A4E1F);
  --je-tag-team-bg: var(--jhb-tag-team-bg, #EEE8FF);
  --je-tag-team-border: var(--jhb-tag-team-border, #D4C7FF);
  --je-tag-team-text: var(--jhb-tag-team-text, #4C2DBF);
  --je-focus-accent: var(--je-line-strong);
  --je-focus-green: var(--je-line-strong);
  --je-z-guide: 20;
  --je-z-modal: 10100;
}

.jhb-job-single--editorial {
  color: var(--je-ink);
}

.jhb-job-single--editorial .jhb-job-shell {
  width: min(1100px, calc(100% - 40px));
  max-width: none;
  padding-inline: 0;
}

.jhb-job-single--editorial h1,
.jhb-job-single--editorial h2,
.jhb-job-single--editorial h3 {
  color: var(--je-navy);
}

.je-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--je-line);
  border-radius: 999px;
  background: var(--je-apricot);
  color: var(--je-badge-text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .09em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(36, 51, 61, .035);
}

.je-section-head {
  width: min(760px, 100%);
  margin: 0 auto 40px;
  text-align: center;
}

.je-section-head .je-eyebrow {
  margin-inline: auto;
}

.je-section-head h2 {
  margin-top: 30px;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.je-section-head > p:last-child {
  max-width: 680px;
  margin: 17px auto 0;
  color: var(--je-copy);
  font-size: 16px;
  line-height: 1.65;
  text-wrap: pretty;
}


/* Text-wrap is progressive enhancement; these fallbacks keep long content safe. */
.je-section-head h2,
.je-section-head > p:last-child,
.je-hero__title,
.je-hero__lead,
.je-hero__aside-head h2,
.je-profile__title h3,
.je-benefit h3,
.je-benefit p,
.je-employer__story h2,
.je-employer__lead,
.je-job-card h3,
.je-network__links strong,
.je-network__links small,
.je-contact__pitch h2,
.je-contact__pitch > p {
  overflow-wrap: break-word;
}

/* Hero */
.je-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: auto;
  padding: clamp(38px, 3.5vw, 48px) 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 228, 207, .48), transparent 38%),
    radial-gradient(circle at 88% 24%, rgba(238, 245, 233, .52), transparent 34%),
    linear-gradient(180deg, var(--je-hero-bg-start, #fffaf6) 0%, var(--je-hero-bg-end, #ffffff) 100%);
}

.je-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.je-hero__background-pattern,
.je-hero__background-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.je-hero__background-pattern {
  background-image: none;
  background-position: 0 0;
  background-repeat: repeat;
  background-size: 28px 28px;
  mix-blend-mode: multiply;
}

.jhb-job-hero-pattern--school-grid .je-hero__background-pattern,
body.jhbjm-hero-bg-school-grid .je-hero__background-pattern {
  background-image:
    linear-gradient(var(--je-hero-pattern-color, rgba(196, 123, 0, .16)) 1px, transparent 1px),
    linear-gradient(90deg, var(--je-hero-pattern-color, rgba(196, 123, 0, .16)) 1px, transparent 1px);
  background-size: 28px 28px;
}

.jhb-job-hero-pattern--soft-circles .je-hero__background-pattern,
body.jhbjm-hero-bg-soft-circles .je-hero__background-pattern {
  background-image: radial-gradient(circle, var(--je-hero-pattern-color, rgba(233, 98, 11, .12)) 0 2px, transparent 2.5px);
  background-size: 30px 30px;
}

.jhb-job-hero-pattern--leaf-lines .je-hero__background-pattern,
body.jhbjm-hero-bg-leaf-lines .je-hero__background-pattern {
  background-image: repeating-linear-gradient(118deg, transparent 0 34px, var(--je-hero-pattern-color, rgba(87, 147, 67, .10)) 35px 36px, transparent 37px 68px);
}

.jhb-job-hero-pattern--calm-dots .je-hero__background-pattern,
body.jhbjm-hero-bg-calm-dots .je-hero__background-pattern {
  background-image: radial-gradient(circle, var(--je-hero-pattern-color, rgba(20, 48, 68, .10)) 0 1.5px, transparent 2px);
  background-size: 24px 24px;
}

@supports ((mask-image: linear-gradient(#000, #000)) or (-webkit-mask-image: linear-gradient(#000, #000))) {
  .jhb-job-hero-pattern--school-grid .je-hero__background-pattern,
  body.jhbjm-hero-bg-school-grid .je-hero__background-pattern {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .36) 52%, rgba(0, 0, 0, .64));
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .36) 52%, rgba(0, 0, 0, .64));
  }

  .jhb-job-hero-pattern--soft-circles .je-hero__background-pattern,
  body.jhbjm-hero-bg-soft-circles .je-hero__background-pattern {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .68), rgba(0, 0, 0, .2) 55%, rgba(0, 0, 0, .52));
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, .68), rgba(0, 0, 0, .2) 55%, rgba(0, 0, 0, .52));
  }

  .jhb-job-hero-pattern--leaf-lines .je-hero__background-pattern,
  body.jhbjm-hero-bg-leaf-lines .je-hero__background-pattern {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .18) 56%, rgba(0, 0, 0, .48));
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .18) 56%, rgba(0, 0, 0, .48));
  }

  .jhb-job-hero-pattern--calm-dots .je-hero__background-pattern,
  body.jhbjm-hero-bg-calm-dots .je-hero__background-pattern {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, .16) 54%, rgba(0, 0, 0, .46));
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, .16) 54%, rgba(0, 0, 0, .46));
  }
}

.je-hero__background-image {
  background-image: var(--je-hero-image, none);
  background-position: var(--je-hero-image-position, center center);
  background-size: var(--je-hero-image-size, cover);
  background-repeat: no-repeat;
  opacity: var(--je-hero-image-opacity, .10);
  pointer-events: none;
}

.je-hero::after {
  content: "";
  position: absolute;
  inset: auto 8% -120px;
  z-index: 0;
  height: 220px;
  border-radius: 50%;
  background: var(--je-theme-glow);
  filter: blur(52px);
  pointer-events: none;
}

.je-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .74fr);
  gap: var(--je-column-gap);
  align-items: stretch;
  width: min(1000px, 100%);
  margin-inline: auto;
  padding: clamp(24px, 2.6vw, 32px);
  border: 1px solid var(--je-line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 5% 8%, var(--je-theme-glow), transparent 34%),
    linear-gradient(135deg, var(--je-surface-card), var(--je-surface-card-alt));
  box-shadow: var(--je-shadow);
}

.je-hero__copy {
  position: relative;
  align-self: center;
  max-width: 560px;
  justify-self: stretch;
  padding: 6px clamp(8px, 1.5vw, 18px) 6px 2px;
  text-align: left;
}

.je-hero__eyebrow {
  margin: 0;
}

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

.je-hero__title {
  display: block;
  margin: 0;
  font-size: clamp(36px, 3.15vw, 47px);
  font-weight: 900;
  line-height: 1.045;
  letter-spacing: -.045em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

.je-hero__title span {
  display: inline;
}

.je-hero__title small {
  display: inline-block;
  margin: 0 0 .12em .38em;
  color: var(--je-accent-strong);
  font-size: .34em;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.01em;
  vertical-align: baseline;
}

.je-hero__roleline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 8px;
  color: var(--je-ink);
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 850;
  line-height: 1.25;
}

.je-hero__roleline em {
  font-style: normal;
}

.je-hero__lead {
  width: 100%;
  min-width: 0;
  max-width: 55ch;
  margin: 13px 0 0;
  color: var(--je-copy);
  font-size: clamp(15px, 1.05vw, 16px);
  font-weight: 650;
  line-height: 1.62;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: pretty;
}

.je-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 18px;
}

.je-hero__actions .jhb-job-button {
  min-height: 45px;
  padding-inline: 18px;
}

.je-hero__actions .jhb-job-button--secondary {
  border-color: var(--je-line);
  background: var(--je-surface-card);
  color: var(--je-accent-strong);
  box-shadow: 0 10px 24px var(--je-theme-glow);
}

.je-hero__actions .jhb-job-button--secondary:hover,
.je-hero__actions .jhb-job-button--secondary:focus-visible {
  border-color: var(--je-line-strong);
  background: var(--je-surface-card-strong);
  color: var(--je-accent-strong);
  box-shadow: 0 12px 28px var(--je-theme-glow);
}

.je-hero__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px 16px;
  margin-top: 13px;
  color: var(--je-copy);
  font-size: 12px;
  font-weight: 800;
}

.je-hero__trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.je-hero__trust span::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--je-number-bg);
  color: var(--je-number-text);
  font-size: 10px;
  font-weight: 900;
}

.je-hero__aside {
  position: relative;
  width: 100%;
  max-width: none;
  align-self: stretch;
  justify-self: stretch;
  padding: 27px;
  border: 1px solid var(--je-line);
  border-radius: 24px;
  background: linear-gradient(160deg, var(--je-surface-card-alt), var(--je-surface-card));
  box-shadow: var(--je-shadow-soft);
}

.je-hero__aside::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, var(--je-apricot-strong), transparent 42%, var(--je-page-soft));
  pointer-events: none;
}

.je-hero__aside > * {
  position: relative;
  z-index: 1;
}

.je-hero__aside-head {
  text-align: center;
}

.je-hero__aside-head .je-eyebrow {
  margin-inline: auto;
}

.je-hero__aside-head h2 {
  max-width: 15ch;
  margin: 16px auto 0;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.14;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.je-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
  border: 1px solid var(--je-line-soft);
  border-radius: 20px;
  overflow: hidden;
  background: var(--je-surface-card);
}

.je-fact {
  display: grid;
  place-content: center;
  min-width: 0;
  min-height: 90px;
  padding: 15px;
  text-align: center;
}

.je-fact:nth-child(odd) {
  border-right: 1px solid var(--je-line-soft);
}

.je-fact:nth-child(n + 3) {
  border-top: 1px solid var(--je-line-soft);
}

.je-fact span,
.je-fact strong,
.je-fact small {
  display: block;
}

.je-fact span {
  color: #758178;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.je-fact strong {
  width: 100%;
  min-width: 0;
  margin: 7px auto 0;
  color: var(--je-navy);
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 850;
  line-height: 1.28;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  text-align: center;
  text-wrap: balance;
}

.je-fact small {
  margin-top: 3px;
  color: #8a958f;
  font-size: 11px;
  font-weight: 800;
}

.je-hero__contact {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--je-line-soft);
}

.je-photo-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  line-height: 0;
  text-decoration: none;
  cursor: zoom-in;
}

.je-photo-trigger:focus-visible {
  outline: 3px solid var(--je-line-strong);
  outline-offset: 4px;
}

.je-photo-trigger__icon {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  background-color: var(--je-icon-bg);
  color: var(--je-icon-fg);
  box-shadow: 0 5px 14px rgba(25, 40, 50, .16);
  transition: transform 180ms var(--je-ease), background-color 180ms var(--je-ease), color 180ms var(--je-ease);
}

.je-photo-trigger__icon::before,
.je-photo-trigger__icon::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.je-photo-trigger__icon::before {
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: translate(-62%, -62%);
}

.je-photo-trigger__icon::after {
  left: 50%;
  top: 50%;
  width: 6px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(1px, 3px) rotate(45deg);
  transform-origin: left center;
}

.je-photo-trigger:hover .je-photo-trigger__icon,
.je-photo-trigger:focus-visible .je-photo-trigger__icon {
  background: var(--je-icon-bg-hover);
  color: var(--je-icon-fg-hover);
  transform: scale(1.08);
}

.je-hero__contact .je-photo-trigger {
  width: 52px;
  height: 52px;
}

.je-hero__contact img {
  width: 52px;
  height: 52px;
  border: 3px solid var(--je-surface-card);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(25, 40, 50, .12);
}

.je-hero__contact span,
.je-hero__contact strong,
.je-hero__contact small {
  display: block;
}

.je-hero__contact span {
  color: #7c8780;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.je-hero__contact strong {
  margin-top: 3px;
  color: var(--je-navy);
  font-size: 15px;
  font-weight: 850;
}

.je-hero__contact small {
  margin-top: 2px;
  color: var(--je-copy);
  font-size: 12px;
  line-height: 1.4;
}

/* Guide */
.jhb-job-guide-slot--editorial {
  position: relative;
  z-index: var(--je-z-guide);
  min-height: 0;
  margin: 0;
}

.jhb-job-guide-slot--editorial .jhb-guide-system.jhb-guide {
  margin-block: 0;
}

@media (min-width: 821px) {
  .jhb-job-guide-slot--editorial.jhb-job-guide-slot--plugin {
    height: 0;
    overflow: visible;
  }

  .jhb-job-guide-slot--editorial.jhb-job-guide-slot--plugin .jhb-guide--desktop-inline-hidden {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    max-width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateX(-50%);
  }
}

/* Optional brand block */
.jhb-job-single--editorial .jhb-job-brand {
  padding: 22px 0 0;
}

.jhb-job-single--editorial .jhb-job-brand__box {
  max-width: 760px;
  margin-inline: auto;
  padding: 22px 28px;
  border-radius: 22px;
  box-shadow: var(--je-shadow-soft);
}
