/* Flip cards for the job lists on the Ausbildung and Career pages —
   same behaviour as the university cards on the Study page:
   front = job at a glance, back (dark) = requirements.
   Hover or keyboard focus flips on laptops; a tap flips on phones/tablets. */
.jflip {
  perspective: 1600px; height: 290px; outline: none; cursor: pointer;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.jflip:hover { transform: translateY(-3px); }
.jflip-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}
.jflip:hover .jflip-inner,
.jflip:focus-within .jflip-inner { transform: rotateY(180deg); }
.jflip:focus-visible .jflip-inner { box-shadow: 0 0 0 3px #ffce00; border-radius: 28px; }
.jface {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-sizing: border-box; border-radius: 28px; padding: 28px;
  display: flex; flex-direction: column; gap: 16px; overflow: hidden;
}
/* Content sits above the glass sheen */
.jface > * { position: relative; z-index: 1; }
.jface::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(118deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.1) 28%, rgba(255,255,255,0) 46%);
}

/* Front: light, see-through frosted glass — same recipe as the site's other glass cards,
   with a thin glass edge */
.jfront {
  background: linear-gradient(135deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.26) 100%);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.95),
    inset 0 -1px 1px rgba(255,255,255,.35),
    inset 1px 0 0 rgba(255,255,255,.4),
    0 3px 0 -1px rgba(205,208,220,.55),        /* thin glass edge */
    0 12px 40px rgba(40,30,20,.12);
}

/* Back: translucent smoked glass */
.jback {
  transform: rotateY(180deg); color: #f5f5f7; gap: 14px; overflow-y: auto;
  background: linear-gradient(135deg, rgba(44,44,50,.84) 0%, rgba(22,22,26,.9) 100%);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.22),
    inset 1px 0 0 rgba(255,255,255,.08),
    0 3px 0 -1px rgba(0,0,0,.5),
    0 12px 40px rgba(0,0,0,.28);
}
.jback::before {
  background: linear-gradient(118deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 30%, rgba(255,255,255,0) 46%);
}
@media (prefers-reduced-motion: reduce) { .jflip, .jflip:hover { transition: none; transform: none; } }
.jback-title { font-size: 15px; font-weight: 600; color: #ffffff; letter-spacing: -0.2px; }
.jk { font-size: 12px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: #ffce00; }
.jv { font-size: 14px; line-height: 1.45; color: #d2d2d7; margin-top: 4px; }
.jhint { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: #c40000; }
.jhint svg { transition: transform .5s cubic-bezier(.2, .8, .2, 1); flex-shrink: 0; }
.jflip:hover .jhint svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .jflip-inner { transition: none; } }

/* Phones & tablets: narrower cards, so a little taller for long job titles */
html.mzw-fluid .jflip { height: 360px !important; }
html.mzw-fluid .jface { padding: 22px !important; }
html.mzw-fluid .jfront { gap: 12px !important; }
html.mzw-fluid .jfront [style*="font-size: 22px"] { font-size: 19px !important; }

/* Soft black · red · gold glows drifting behind the job list, so the
   see-through glass cards have colour to show through (repeats down the list). */
:is(#jobs, #berufe) { position: relative; isolation: isolate; }
:is(#jobs, #berufe)::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: -140px; right: -140px; top: 260px; bottom: 0; will-change: transform;
  background:
    radial-gradient(22% 13% at 12% 16%, rgba(255,206,0,.6), rgba(255,206,0,0) 72%),
    radial-gradient(20% 12% at 88% 34%, rgba(221,0,0,.38), rgba(221,0,0,0) 72%),
    radial-gradient(20% 12% at 46% 60%, rgba(0,0,0,.22), rgba(0,0,0,0) 72%),
    radial-gradient(22% 13% at 82% 86%, rgba(255,206,0,.5), rgba(255,206,0,0) 72%),
    radial-gradient(18% 11% at 20% 92%, rgba(221,0,0,.3), rgba(221,0,0,0) 72%),
    radial-gradient(20% 12% at 58% 22%, rgba(255,206,0,.42), rgba(255,206,0,0) 72%),
    radial-gradient(18% 11% at 28% 44%, rgba(221,0,0,.26), rgba(221,0,0,0) 72%),
    radial-gradient(18% 11% at 70% 70%, rgba(0,0,0,.18), rgba(0,0,0,0) 72%);
  background-size: 100% 1500px;
  background-repeat: repeat-y;
  filter: blur(10px);
  animation: jobs-glow-drift 8s ease-in-out infinite alternate;
}
@keyframes jobs-glow-drift {
  from { transform: translate3d(-120px, 0, 0); }
  to   { transform: translate3d(120px, 40px, 0); }
}
@media (prefers-reduced-motion: reduce) { :is(#jobs, #berufe)::before { animation: none; } }

/* ==========================================================================
   Study page: the university / Studienkolleg flip cards get the same
   see-through glass look (their colours are inline, hence !important).
   ========================================================================== */
.flip .face > * { position: relative; z-index: 1; }
.flip .face::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(118deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.1) 28%, rgba(255,255,255,0) 46%);
}
.flip .face:not(.back) {
  background: linear-gradient(135deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.26) 100%) !important;
  border: 1px solid rgba(255,255,255,.75);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.95),
    inset 0 -1px 1px rgba(255,255,255,.35),
    inset 1px 0 0 rgba(255,255,255,.4),
    0 3px 0 -1px rgba(205,208,220,.55),
    0 12px 40px rgba(40,30,20,.12);
}
.flip .face.back {
  background: linear-gradient(135deg, rgba(44,44,50,.84) 0%, rgba(22,22,26,.9) 100%) !important;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.22),
    inset 1px 0 0 rgba(255,255,255,.08),
    0 3px 0 -1px rgba(0,0,0,.5),
    0 12px 40px rgba(0,0,0,.28);
}
.flip .face.back::before {
  background: linear-gradient(118deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 30%, rgba(255,255,255,0) 46%);
}
.flip { transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.flip:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .flip, .flip:hover { transition: none; transform: none; } }

/* Same drifting black · red · gold glows behind the university list */
:is(#universities, #hochschulen) { position: relative; isolation: isolate; }
:is(#universities, #hochschulen)::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: -140px; right: -140px; top: 420px; bottom: 0; will-change: transform;
  background:
    radial-gradient(22% 13% at 12% 16%, rgba(255,206,0,.6), rgba(255,206,0,0) 72%),
    radial-gradient(20% 12% at 88% 34%, rgba(221,0,0,.38), rgba(221,0,0,0) 72%),
    radial-gradient(20% 12% at 46% 60%, rgba(0,0,0,.22), rgba(0,0,0,0) 72%),
    radial-gradient(22% 13% at 82% 86%, rgba(255,206,0,.5), rgba(255,206,0,0) 72%),
    radial-gradient(18% 11% at 20% 92%, rgba(221,0,0,.3), rgba(221,0,0,0) 72%),
    radial-gradient(20% 12% at 58% 22%, rgba(255,206,0,.42), rgba(255,206,0,0) 72%),
    radial-gradient(18% 11% at 28% 44%, rgba(221,0,0,.26), rgba(221,0,0,0) 72%),
    radial-gradient(18% 11% at 70% 70%, rgba(0,0,0,.18), rgba(0,0,0,0) 72%);
  background-size: 100% 1500px;
  background-repeat: repeat-y;
  filter: blur(10px);
  animation: jobs-glow-drift 8s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) { :is(#universities, #hochschulen)::before { animation: none; } }
