/* Ledige stillinger: seksjonen på forsiden og kommunesidene (JobsFeature). Lista på /jobb/ og kommunenes stillingssider bruker jobb-listeside.css. */

:root {
  /* Jobbseksjonenes egne roller (--rl-*). Laa i job-card.css sammen med
     stillingskortet, som forsvant med kommunenes gamle stillingsliste. */
  --rl-accent: var(--color-pine);
  --rl-muted: var(--tekst-dempet);
  --rl-border: var(--color-sand);
}

/* =========================================================================
   LEDIGE STILLINGER I LISTER - kommune-filtrert seksjon (JobsFeature.astro)
   Designpakke Retning C. Scoped under .rl-jobfeat med egne --jf-* tokens.
   ========================================================================= */
.rl-jobfeat {
  /* Varm hvit – samme flate som ellers brukes på siden (--l-warm-white). */
  --jf-bg: var(--surface-explore);
  --jf-paper: var(--surface-story);
  --jf-ink: var(--color-text-primary);
  --jf-gold: var(--color-gold);
  --jf-aurora: var(--color-aurora);
  --jf-midnight: var(--surface-strong);
  --jf-sec-off: #6f93a3;
  --jf-sec-priv: var(--color-gold);
  --jf-ease: cubic-bezier(.22, 1, .36, 1);
  background: var(--jf-bg);
  padding: clamp(60px, 9vh, 120px) clamp(20px, 4vw, 56px);
  font-family: var(--font-body);
  color: var(--jf-ink);
}
.rl-jobfeat__inner { max-width: 1220px; margin: 0 auto; }

/* Embedded: ligger inne i den større «Jobb»-seksjonen (l-jobb). Arver dens
   bakgrunn, dropper egen flate/padding, og bruker en underoverskrift. */
.rl-jobfeat--embedded { background: transparent; padding: 0; }
.rl-jobfeat--embedded .rl-jobfeat__inner { max-width: none; }
.rl-jobfeat__subtitle,
.l-jobb__subtitle {
  font-family: var(--font-display);
  font-weight: 400;
  /* Var clamp(1.6rem, 1rem + 2vw, 2.4rem) = 26/31/38px. Kommunesidene
   * overstyrte den med !important for aa faa 37 — ett piksel. Naa én
   * definisjon paa skalaen, uten overstyring. */
  font-size: var(--text-2xl);
  line-height: var(--linje-display);
  letter-spacing: var(--sperring-tett);
  margin: 0;
  color: var(--color-text-primary);
}

/* Avstand mellom hovedoverskrift, utlyste stillinger og partnerbedrifter
   når begge underseksjonene ligger i samme l-jobb-seksjon. */
.l-jobb .rl-jobfeat--embedded { margin-bottom: clamp(56px, 8vh, 96px); }
.l-jobb__partners { margin-bottom: clamp(28px, 4vh, 44px); }

/* ---- header ---- */
.rl-jobfeat__head { display: flex; flex-wrap: wrap; gap: 1.2rem 2.5rem; align-items: flex-end; justify-content: space-between; }
.rl-jobfeat__headmain { flex: 1 1 auto; min-width: 0; max-width: 42ch; }
.rl-jobfeat__eyebrow { display: block; font-size: var(--text-xs); letter-spacing: var(--sperring-lg); text-transform: uppercase; color: var(--jf-gold); font-weight: 700; margin-bottom: .9rem; }
.rl-jobfeat__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.4rem, 1.8366rem + 2.4038vw, 4rem); line-height: var(--linje-hero); letter-spacing: var(--sperring-tett); margin: 0; color: var(--color-text-primary); }
.rl-jobfeat__title em { font-style: italic; font-weight: 400; color: var(--jf-gold); }
.rl-jobfeat__intro { margin: 1rem 0 0; line-height: var(--linje-brod-tett); color: var(--rl-muted); font-size: var(--text-base); }
.rl-jobfeat__seeall { font-weight: 700; color: var(--rl-accent); text-decoration: none; white-space: nowrap; font-size: var(--text-sm); display: inline-flex; align-items: center; gap: .4rem; transition: gap .25s var(--jf-ease); padding-bottom: .4rem; }
.rl-jobfeat__seeall:hover { gap: .72rem; }

/* ---- filter chips ---- */
.rl-jobfeat__filterbar { margin-top: clamp(1.8rem, 3vw, 2.6rem); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; justify-content: space-between; }
.rl-jobfeat__chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.rl-jobfeat__chip { font-family: inherit; font-size: var(--text-xs); font-weight: 700; padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--rl-border); background: transparent; color: var(--rl-muted); cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.rl-jobfeat__chip:hover { border-color: var(--rl-accent); color: var(--rl-accent); }
.rl-jobfeat__chip:focus-visible { outline: 2px solid var(--rl-accent); outline-offset: 2px; }
.rl-jobfeat__chip.is-active { background: var(--rl-accent); border-color: var(--rl-accent); color: var(--color-text-inverse); }
.rl-jobfeat__chip .n { color: inherit; opacity: 1; margin-left: .4rem; font-weight: 400; }
.rl-jobfeat__chip.is-active .n { opacity: .8; }
.rl-jobfeat__count { font-size: var(--text-xs); color: var(--tekst-dempet); white-space: nowrap; margin: 0; }
.rl-jobfeat__count b { color: var(--jf-ink); font-weight: 700; }

/* ---- stage (feature + rail) ---- */
.rl-jobfeat__stage { margin-top: 1.6rem; display: grid; grid-template-columns: 1.34fr 1fr; gap: 1.3rem; align-items: stretch; transition: opacity .32s ease, transform .32s ease; }
.rl-jobfeat__stage.is-swapping { opacity: 0; transform: translateY(8px); }

/* ---- feature card ---- */
.rl-jobfeat__feature { position: relative; overflow: hidden; border-radius: 18px; isolation: isolate; min-width: 0; width: 100%; min-height: clamp(380px, 46vw, 480px); display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(1.8rem, 2.6vw, 2.7rem); text-decoration: none; color: var(--color-text-inverse); background: var(--jf-midnight); box-shadow: 0 1px 2px rgba(10,22,40,.1), 0 36px 60px -44px rgba(10,22,40,.7); transition: transform .4s var(--jf-ease), box-shadow .4s ease; }
.rl-jobfeat__feature:hover { transform: translateY(-4px); box-shadow: 0 44px 72px -40px rgba(10,22,40,.78); }
.rl-jobfeat__media { position: absolute; inset: 0; z-index: -2; }
.rl-jobfeat__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1) contrast(1.02) brightness(1.06); transition: transform 1.4s var(--jf-ease); }
.rl-jobfeat__feature:hover .rl-jobfeat__media img { transform: scale(1.05); }
/* Svakt moerkt baand oeverst: kommuneetiketten og «Nyeste» sto over himmel og ga 1,8–2,5 (pikselmaaling 29. sep 2026). */
.rl-jobfeat__veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(8,18,32,.78) 0%, rgba(8,18,32,.42) 15%, rgba(8,18,32,0) 30%), linear-gradient(2deg, rgba(8,18,32,.88) 0%, rgba(8,18,32,.62) 32%, rgba(8,18,32,.18) 64%, rgba(8,18,32,.04) 100%), radial-gradient(120% 70% at 85% 0%, rgba(10,22,40,0) 55%, rgba(10,22,40,.22) 100%); }
.rl-jobfeat__kommune { position: absolute; top: clamp(1.5rem, 2.4vw, 2.3rem); left: clamp(1.8rem, 2.6vw, 2.7rem); right: clamp(1.8rem, 2.6vw, 2.7rem); display: flex; align-items: center; gap: .7rem; font-size: var(--etikett-liten); letter-spacing: var(--sperring-lg); text-transform: uppercase; font-weight: 700; color: var(--color-warm-white); }
.rl-jobfeat__kommune::after { content: ""; flex: 1 1 auto; height: 1px; background: rgba(250,248,245,.32); }
.rl-jobfeat__pin { width: 7px; height: 7px; border-radius: 50%; background: var(--jf-aurora); box-shadow: 0 0 0 4px rgba(125,211,192,.22); flex: 0 0 auto; }
.rl-jobfeat__ftag { display: inline-flex; align-items: center; gap: .55rem; align-self: flex-start; margin-bottom: .5rem; font-size: var(--etikett-liten); letter-spacing: var(--sperring-lg); text-transform: uppercase; font-weight: 700; color: color-mix(in srgb, var(--jf-aurora), var(--color-warm-white) 50%); }
.rl-jobfeat__ftag .ut { background: rgba(8,18,32,.72); color: color-mix(in srgb, var(--jf-aurora), var(--color-warm-white) 50%); padding: .28rem .6rem; border-radius: 999px; }
.rl-jobfeat__ftitle { font-family: var(--font-display); font-weight: 400; font-size: var(--text-3xl); line-height: var(--linje-hero); letter-spacing: var(--sperring-tett); margin: 0 0 .55rem; color: var(--surface-card-light); max-width: 18ch; text-wrap: balance; overflow-wrap: break-word; text-shadow: 0 1px 16px rgba(8,18,32,.45); }
.rl-jobfeat__femployer { font-size: var(--text-base); color: rgba(250,248,245,.9); margin: 0 0 1.4rem; text-shadow: 0 1px 10px rgba(8,18,32,.4); }
.rl-jobfeat__fmeta { display: flex; flex-wrap: wrap; gap: .45rem .9rem; margin: 0 0 1.6rem; font-size: var(--text-sm); color: rgba(250,248,245,.82); align-items: center; text-shadow: 0 1px 10px rgba(8,18,32,.4); }
.rl-jobfeat__fmeta strong, .rl-jobfeat__fmeta > span { white-space: nowrap; }
.rl-jobfeat__fmeta strong { color: var(--surface-card-light); font-weight: 700; }
.rl-jobfeat__fmeta .soon { color: var(--jf-aurora); font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; }
.rl-jobfeat__fmeta .soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--jf-aurora); }
.rl-jobfeat__cta { align-self: flex-start; display: inline-flex; align-items: center; gap: .55rem; font-size: var(--text-xs); font-weight: 700; color: var(--jf-midnight); background: var(--jf-aurora); padding: .82rem 1.55rem; border-radius: 999px; transition: gap .25s ease, background .25s ease; }
.rl-jobfeat__feature:hover .rl-jobfeat__cta { gap: .85rem; background: #92dccb; }
.rl-jobfeat__feature--noimg { background: radial-gradient(135% 110% at 82% 0%, var(--color-marine-lys) 0%, var(--color-midnight) 58%); }
.rl-jobfeat__bgname { position: absolute; right: -.04em; bottom: -.26em; z-index: -1; pointer-events: none; user-select: none; font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: var(--sperring-tett); font-size: clamp(6rem, 4.2394rem + 7.5117vw, 11rem); line-height: .8; color: rgba(125,211,192,.10); }

/* ---- rail ----
   Titler og undertekster kuttes ikke med line-clamp: med okt tekstavstand
   (WCAG 1.4.12) ble de avkuttet, og tittelen er innholdet i lista. */
.rl-jobfeat__rail { display: flex; flex-direction: column; min-width: 0; }
.rl-jobfeat__rail-inner { display: flex; flex-direction: column; flex: 1 1 auto; }
.rl-jobfeat__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; align-items: start; min-width: 0; padding: 1.05rem .5rem; border-bottom: 1px solid var(--rl-border); text-decoration: none; color: inherit; position: relative; opacity: 0; transform: translateY(14px); transition: opacity .6s var(--jf-ease), transform .6s var(--jf-ease), padding-left .25s var(--jf-ease), background .2s ease; }
.rl-jobfeat__item.is-in { opacity: 1; transform: translateY(0); }
.rl-jobfeat__item:first-child { border-top: 1px solid var(--rl-border); }
.rl-jobfeat__item:hover { background: var(--jf-paper); padding-left: 1.05rem; }
.rl-jobfeat__item::before { content: ""; position: absolute; left: .1rem; top: 50%; transform: translateY(-50%) scale(0); width: 5px; height: 5px; border-radius: 50%; background: var(--rl-accent); transition: transform .25s var(--jf-ease); }
.rl-jobfeat__item:hover::before { transform: translateY(-50%) scale(1); }
.rl-jobfeat__cat { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--etikett-liten); letter-spacing: var(--sperring-lg); text-transform: uppercase; font-weight: 700; color: var(--rl-accent); margin-bottom: .15rem; }
/* Kategorien ligger i egen span (lang="nb" paa engelske sider): avkortingen maa ligge der. */
.rl-jobfeat__cat > span:not(.rl-jobfeat__dot) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rl-jobfeat__dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.rl-jobfeat__dot.dot--off { background: var(--jf-sec-off); }
.rl-jobfeat__dot.dot--priv { background: var(--jf-sec-priv); }
.rl-jobfeat__itemtitle { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); line-height: var(--linje-tittel); color: var(--jf-ink); margin: 0; text-wrap: pretty; overflow-wrap: break-word; }
.rl-jobfeat__item:hover .rl-jobfeat__itemtitle { color: var(--rl-accent); }
.rl-jobfeat__itemsub { font-size: var(--etikett-stor); color: var(--rl-muted); margin: .18rem 0 0; display: flex; flex-wrap: wrap; column-gap: var(--space-md); }
.rl-jobfeat__due { font-size: var(--text-xs); color: var(--rl-muted); text-align: right; white-space: nowrap; min-width: 0; padding-top: .05rem; }
.rl-jobfeat__due .soon { color: var(--aksent-tekst); font-weight: 700; }
.rl-jobfeat__note { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: .8rem; padding: 1.6rem .5rem; color: var(--rl-muted); font-size: var(--text-sm); line-height: var(--linje-brod-tett); }
.rl-jobfeat__note a { color: var(--rl-accent); font-weight: 700; text-decoration: none; }
.rl-jobfeat__note a:hover { text-decoration: underline; }

/* ---- footer ---- */
.rl-jobfeat__foot { margin-top: 2.2rem; padding-top: 1.5rem; border-top: 1px solid var(--rl-border); display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; }
.rl-jobfeat__foot .rl-jobfeat__seeall { font-size: var(--text-base); padding-bottom: 0; }
.rl-jobfeat__source { margin: 0; font-size: var(--etikett-stor); color: var(--tekst-dempet); }
.rl-jobfeat__source a { color: inherit; }

/* ---- responsivt (mitt ansvar per handoff) ---- */
@media (max-width: 940px) {
  .rl-jobfeat__stage { grid-template-columns: 1fr; }
  /* Fra 940 px er kortet én kolonne, bredt og lavt, og innholdet fyller det
     opp. Da (1) kolliderte den absolutte kommune-etiketten med
     «NEWEST · …»-linja, og (2) tittelen havnet der sloeret er nesten borte
     (0,04–0,2) — hvit tekst paa lys himmel, godt under 4,5:1 (13. sep 2026).
     Etiketten legges i flyten med fast avstand, og sloeret er jevnt og aldri
     under 0,62, som gir ~5,8:1 selv over helt hvit himmel. Sto foer bare i
     640-blokka, og 641–940 px (nettbrett) fikk skrivebordssloeret. */
  .rl-jobfeat__kommune { position: static; margin-bottom: auto; padding-bottom: 1.1rem; }
  .rl-jobfeat__veil { background: linear-gradient(to top, rgba(8,18,32,.92) 0%, rgba(8,18,32,.84) 45%, rgba(8,18,32,.76) 80%, rgba(8,18,32,.74) 100%); }
}
@media (max-width: 640px) {
  .rl-jobfeat__head { align-items: flex-start; }
  .rl-jobfeat__filterbar { align-items: stretch; flex-direction: column; gap: .8rem; }
  .rl-jobfeat__chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: .25rem; }
  .rl-jobfeat__chips::-webkit-scrollbar { display: none; }
  .rl-jobfeat__chip { flex: 0 0 auto; min-height: 44px; }
  .rl-jobfeat__count { white-space: normal; }
  .rl-jobfeat__feature { min-height: clamp(300px, 80vw, 340px); }
  .rl-jobfeat__ftitle { font-size: clamp(1.3562rem, 1.2351rem + 0.5165vw, 1.7rem); }
  .rl-jobfeat__fmeta { font-size: var(--text-sm); }
  .rl-jobfeat__fmeta strong, .rl-jobfeat__fmeta > span { white-space: normal; }
  .rl-jobfeat__item { min-height: 44px; }
}

/* ---- redusert bevegelse ---- */
@media (prefers-reduced-motion: reduce) {
  .rl-jobfeat__stage,
  .rl-jobfeat__item,
  .rl-jobfeat__media img,
  .rl-jobfeat__feature,
  .rl-jobfeat__cta,
  .rl-jobfeat__seeall { transition: none !important; }
  .rl-jobfeat__item { opacity: 1; transform: none; }
  .rl-jobfeat__stage.is-swapping { opacity: 1; transform: none; }
}

/* ---- forsiden paa mobil: én flis per kommune (mobilgjennomgang, okt 2026) ----
   Bare under 768 px. Over det beholder forsiden plakaten med nyeste
   stilling, lista og kommunebrikkene (Tom: endringen gjaldt mobil). Under
   768 px skjules de, og flisene, ingressen og knappen tar over. */
.rl-jobfeat__ingress,
.rl-jobfeat__fliser,
.rl-jobfeat__foot--kommuner { display: none; }
@media (max-width: 767px) {
  .rl-jobfeat--regional .rl-jobfeat__head > .rl-jobfeat__seeall,
  .rl-jobfeat--regional .rl-jobfeat__filterbar,
  .rl-jobfeat--regional .rl-jobfeat__stage,
  .rl-jobfeat--regional .rl-jobfeat__foot:not(.rl-jobfeat__foot--kommuner) { display: none; }
  .rl-jobfeat--regional .rl-jobfeat__ingress { display: block; flex-basis: 100%; }
  .rl-jobfeat--regional .rl-jobfeat__fliser { display: grid; }
  .rl-jobfeat--regional .rl-jobfeat__foot--kommuner { display: flex; }
}

/* Flisene (mobil) */
   Varmhvit flate med haarstrek paa krem, saa flisene leser som egne flater.
   Tallet baerer flisa; navnet staar som etikett, yrket i den nyeste
   annonsen som en dempet linje under. */
.rl-jobfeat__ingress { margin: .6rem 0 0; max-width: 46ch; font-size: var(--brod-kort); line-height: var(--linje-brod-tett); color: var(--tekst-dempet); }
.rl-jobfeat__ingress b { color: var(--jf-ink); }
.rl-jobfeat__fliser { list-style: none; margin: clamp(1.2rem, 2.4vw, 1.8rem) 0 0; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rl-jobfeat__flis { display: grid; align-content: start; gap: 2px; height: 100%; box-sizing: border-box; padding: 16px 16px 18px; border-radius: var(--radius-md); background: var(--color-warm-white); border: 1px solid var(--color-sand); color: inherit; text-decoration: none; transition: border-color .2s ease, transform .3s var(--jf-ease); }
.rl-jobfeat__flis:focus-visible { outline: 2px solid var(--rl-accent); outline-offset: 2px; }
@media (hover: hover) {
  .rl-jobfeat__flis:hover { border-color: var(--rl-accent); transform: translateY(-2px); }
}
.rl-jobfeat__flisnavn { font-size: var(--etikett); letter-spacing: var(--sperring-lg); text-transform: uppercase; font-weight: 700; color: var(--aksent-tekst); }
.rl-jobfeat__flistall { margin: 6px 0 8px; font-family: var(--font-display); font-size: var(--text-5xl); line-height: var(--linje-tett); color: var(--jf-ink); font-variant-numeric: lining-nums; }
.rl-jobfeat__flisord { font-size: var(--etikett-stor); line-height: var(--linje-etikett); color: var(--tekst-dempet); }
.rl-jobfeat__flisny { margin-top: 10px; font-size: var(--etikett); line-height: var(--linje-etikett); color: var(--tekst-dempet); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rl-jobfeat__foot--kommuner { margin-top: clamp(1.4rem, 2.6vw, 2rem); padding-top: 0; border-top: 0; }
.rl-jobfeat__knapp { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: 0 1.5rem; border: 1px solid var(--rl-accent); border-radius: var(--radius-full); font-weight: 700; font-size: var(--etikett-stor); color: var(--rl-accent); text-decoration: none; transition: background .2s ease, color .2s ease; }
.rl-jobfeat__knapp:hover { background: var(--rl-accent); color: var(--color-warm-white); }
.rl-jobfeat__knapp:focus-visible { outline: 2px solid var(--rl-accent); outline-offset: 3px; }
@media (max-width: 640px) { .rl-jobfeat__knapp { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .rl-jobfeat__flis { transition: none; } .rl-jobfeat__flis:hover { transform: none; } }
html.bevegelse-av .rl-jobfeat__flis { transition: none; }
