/* ══════════════════════════════════════════════════
   kariera.rs — Stylesheet
   Farbwelt: Grün (Primär, Aktion) + Blau (Sekundär, Tiefe).
   Bewusst anders als jobcrawl.at, damit die Seiten nicht
   wie Klone wirken.
   ══════════════════════════════════════════════════ */

:root {
  /* Die Seite ist bewusst hell - auch auf Geraeten im Dunkelmodus.
     Ohne diese Zeile zeichnet der Browser Eingabefelder, Auswahllisten
     und Scrollbalken trotzdem dunkel, und die Seite wirkt zerrissen. */
  color-scheme: light;

  /* Grün */
  --green-900: #08453a;
  --green-700: #0d6e5e;
  --green-600: #12856f;
  --green-500: #14a085;
  --green-100: #e3f3ef;

  /* Blau */
  --blue-900: #0c3a5c;
  --blue-800: #12507d;
  --blue-600: #1d6fa5;
  --blue-100: #e5eff7;

  /* Neutral */
  --ink:       #1c2b33;
  --ink-soft:  #5a6b78;
  --ink-faint: #93a1ac;
  --line:      #dfe8e5;
  --bg:        #ffffff;
  --card:      #ffffff;
  /* Auf weissem Grund brauchen Karten einen eigenen, leicht getoenten
     Bereich, sonst verschwinden sie im Hintergrund. */
  --surface:   #f5faf8;

  /* Status */
  --warn:      #b45309;
  --warn-bg:   #fdf3e3;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow:    0 1px 2px rgba(12,58,92,.05), 0 6px 20px rgba(12,58,92,.06);
  --maxw:      1200px;
  /* Der Verlauf von Kopf- und Fusszeile - einmal definiert, damit beide
     garantiert identisch bleiben. */
  --brand-gradient: linear-gradient(135deg, var(--green-700) 0%, var(--blue-800) 100%);
}


/* ══════════════════════════════════════════════════
   Dunkelmodus — NUR ueber den Schalter, bewusst NICHT ueber
   prefers-color-scheme. Sonst ueberstimmt die Systemeinstellung
   des Besuchers die Wahl, die er hier getroffen hat.
   Das Attribut setzt PHP schon ins erste HTML (siehe header.php),
   deshalb blitzt beim Laden nichts hell auf.
   ══════════════════════════════════════════════════ */

:root[data-tema="dark"] {
  color-scheme: dark;

  --ink:       #e6eef2;
  --ink-soft:  #9fb2bd;
  --ink-faint: #6f8391;
  --line:      #21363c;
  --bg:        #0e1a1f;
  --card:      #142329;
  --surface:   #112026;
  --green-100: #12332c;
  --blue-100:  #12293a;
  --warn-bg:   #33260f;
  --warn:      #e0913f;
  --shadow:    0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
}

/* Auf dunklem Grund brauchen die Akzentfarben mehr Helligkeit,
   sonst fallen sie unter die Lesbarkeitsschwelle. */
:root[data-tema="dark"] a                        { color: var(--green-500); }
:root[data-tema="dark"] .counter strong          { color: var(--green-500); }
:root[data-tema="dark"] .job-link:hover .job-title { color: var(--green-500); }
:root[data-tema="dark"] .job-company,
:root[data-tema="dark"] .detail-company          { color: #7fc4ea; }
:root[data-tema="dark"] .badge-salary            { color: #6fd9bb; }

/* ─── Grundlagen ───────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-700); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.sep { color: var(--ink-faint); margin: 0 .45em; }

/* ─── Kopfzeile ────────────────────────────────── */

/* Kopf- und Fusszeile tragen die Markenfarbe und rahmen die Seite ein.
   Alles dazwischen bleibt weiss - dort arbeitet Farbe nur punktuell. */
.site-head {
  background: var(--brand-gradient);
  color: #fff;
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
/* Helle Kachel mit dem K aus dem Favicon. Umgekehrt zum Favicon
   (dort dunkle Kachel, helles K), weil die Kopfzeile selbst schon
   dunkel ist - eine dunkle Kachel darauf wuerde verschwimmen.
   Die Form bleibt identisch, damit Tab-Symbol und Logo zusammengehoeren. */
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #7ee3c6, #4fb8e8);
  display: block; flex: none;
}
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-mark .k-bar  { fill: var(--green-900); }
.logo-mark .k-diag { fill: var(--blue-900); }
.logo-text { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.logo-dot  { color: #7ee3c6; }

.head-nav { display: flex; align-items: center; gap: 18px; }
.head-nav a {
  color: rgba(255,255,255,.9); text-decoration: none;
  font-size: 14px; font-weight: 500;
}
.head-nav a:hover { color: #fff; }
.pismo-switch, .tema-switch {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 5px 13px;
  transition: border-color .15s ease, background .15s ease;
}
.pismo-switch:hover, .tema-switch:hover {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.1);
}
.tema-switch {
  padding: 5px 11px;
  font-size: 15px;
  line-height: 1.1;
}

/* ─── Hero + Suche ─────────────────────────────── */

/* Zentrierte Buehne mit einem zusammenhaengenden Suchfeld -
   Aufbau wie bei jobcrawl.at, in der eigenen Farbwelt. */
.hero {
  background: linear-gradient(180deg, var(--green-100) 0%, var(--bg) 62%);
  padding: 52px 0 44px;
}
.hero-inner { text-align: center; }

.hero-badge {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--green-700);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12.5px; font-weight: 600;
  letter-spacing: .01em;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -.03em;
  margin-bottom: 14px;
}
.hero h1 .accent { color: var(--green-700); }
.hero-sub { margin: 0 auto 26px; color: var(--ink-soft); font-size: 17px; max-width: 620px; }

/* ─── Suchleiste ───────────────────────────────── */

.searchbar {
  display: flex; align-items: stretch;
  max-width: 720px; margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.sb-field { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; gap: 8px; padding-left: 12px; }
.sb-field-city { flex: 0 1 240px; }
.sb-icon { color: var(--ink-faint); font-size: 17px; line-height: 1; }
.sb-divider { width: 1px; background: var(--line); margin: 8px 4px; flex: none; }

.searchbar input, .searchbar select {
  border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 15px;
  padding: 13px 6px 13px 0;
  width: 100%; min-width: 0;
  outline: none;
}
.searchbar select { cursor: pointer; }
.searchbar:focus-within { border-color: var(--green-500); }
.sb-submit { flex: none; border-radius: 10px; }

/* ─── Schnellfilter ────────────────────────────── */

.chips {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; margin: 18px 0 0;
}
.chips-label { color: var(--ink-soft); font-size: 13.5px; margin-right: 2px; }
.chip {
  display: inline-block; text-decoration: none;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); border-radius: 999px;
  padding: 6px 14px; font-size: 13.5px; font-weight: 500;
  transition: border-color .12s ease, color .12s ease;
}
.chip:hover { border-color: var(--green-500); color: var(--green-700); }
.chip-on { border-color: var(--green-500); color: var(--green-700); font-weight: 600; }

/* ─── Kennzahlen ───────────────────────────────── */

.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  text-align: center; padding: 22px 20px;
}
.stat strong {
  display: block;
  font-size: clamp(20px, 2.6vw, 27px); font-weight: 700;
  color: var(--green-700); letter-spacing: -.02em;
}
.stat span {
  display: block; margin-top: 4px;
  font-size: 11px; letter-spacing: .07em;
  color: var(--ink-faint); text-transform: uppercase;
}
@media (max-width: 640px) {
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 20px 0; }
  .searchbar { flex-wrap: wrap; }
  .sb-divider { display: none; }
  .sb-field, .sb-field-city { flex: 1 1 100%; }
  .sb-submit { flex: 1 1 100%; margin-top: 4px; }
}

.alert-form input, .alert-form select {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 15px;
  font-family: inherit;
}
.alert-form input:focus, .alert-form select:focus {
  outline: 2px solid var(--green-500); outline-offset: 1px; border-color: transparent;
}

.btn-primary {
  background: var(--green-700);
  color: #fff; border: 0; cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font: 600 15px/1 inherit;
  text-decoration: none; display: inline-block;
  transition: background .15s ease;
}
.btn-primary:hover { background: var(--green-600); }
.btn-lg { padding: 15px 28px; font-size: 16px; }


/* ─── Layout ───────────────────────────────────── */

.main-grid, .detail-grid {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 32px; padding-top: 32px; padding-bottom: 56px; align-items: start;
}
@media (max-width: 900px) {
  .main-grid, .detail-grid { grid-template-columns: 1fr; }
}

/* Startseite: volle Breite, keine Seitenspalte */
.main-full { padding-top: 32px; padding-bottom: 56px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.section-title { font-size: 20px; margin: 0; }
.section-title .muted { font-weight: 400; font-size: 16px; }
.section-more {
  font-size: 14.5px; font-weight: 600; text-decoration: none;
  white-space: nowrap;
}
.section-more:hover { text-decoration: underline; }

/* ─── Job-Liste ────────────────────────────────── */

.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

/* Zwei Spalten NUR auf der Startseite (.jobs-duo). Suchergebnisse und
   Stadtseiten bleiben eine Liste - dort scannt man von oben nach unten,
   und die Trefferzahl ist beliebig gross.
   Feste 2 statt auto-fill: Bei 1200px entstuenden sonst drei Spalten
   und die Karten wuerden zu schmal fuer Titel und Badges. */
@media (min-width: 761px) {
  .jobs-duo { grid-template-columns: repeat(2, 1fr); }
}

/* Kein Farbbalken mehr - die Karte bleibt weiss und zeigt Farbe erst
   bei Interaktion. Das ist der "dezente" Einsatz: Farbe als Reaktion,
   nicht als Dauerzustand. */
.job {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.job:hover {
  border-color: var(--green-500);
  box-shadow: var(--shadow);
}
.job-expired { opacity: .7; }
.job-expired:hover { border-color: var(--warn); }

.job-link { text-decoration: none; }
.job-title { font-size: 17px; margin: 0 0 4px; color: var(--ink); }
.job-link:hover .job-title { color: var(--green-700); }

.job-meta { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); }
.job-company { font-weight: 600; color: var(--blue-800); }
.is-remote { color: var(--green-600); font-weight: 600; }

.badges { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
/* Standard-Badges neutral. Farbe bekommen nur die zwei Angaben, auf die
   es beim Ueberfliegen wirklich ankommt: Gehalt und "abgelaufen". */
.badge {
  display: inline-block;
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 11px;
  font-size: 12.5px; font-weight: 500;
}
.badge-salary {
  background: var(--green-100); color: var(--green-700);
  border-color: transparent; font-weight: 600;
}
.badge-expired {
  background: var(--warn-bg); color: var(--warn);
  border-color: transparent; font-weight: 600;
}
.badge-time    { background: transparent; color: var(--ink-faint); font-weight: 500; padding-left: 2px; }

/* ─── Seitenspalte ─────────────────────────────── */

.side { display: grid; gap: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card-title { font-size: 16px; margin-bottom: 8px; }
.card-center { text-align: center; max-width: 520px; margin: 48px auto; }

.alert-form { display: grid; gap: 9px; margin-top: 14px; }

.city-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.city-list a {
  display: flex; justify-content: space-between;
  padding: 7px 9px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); font-size: 14.5px;
}
.city-list a:hover { background: var(--green-100); }

.mini-jobs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.mini-jobs a { display: block; font-size: 14.5px; font-weight: 600; text-decoration: none; }
.mini-jobs span { display: block; font-size: 13px; }

/* ─── Detailseite ──────────────────────────────── */

.detail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.back { display: inline-block; margin-bottom: 16px; font-size: 14px; text-decoration: none; }
.detail-title { font-size: clamp(22px, 3vw, 29px); letter-spacing: -.02em; }
.detail-meta { margin: 0 0 20px; font-size: 15px; color: var(--ink-soft); }
.detail-company { font-weight: 600; color: var(--blue-800); }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin: 0 0 24px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.facts dd { margin: 3px 0 0; font-weight: 600; font-size: 15px; }

.detail-body { font-size: 15.5px; }
.detail-body h3, .detail-body h4 { margin-top: 24px; font-size: 17px; }
.detail-body ul, .detail-body ol { padding-left: 22px; }
.detail-body li { margin: 5px 0; }
.detail-body a { word-break: break-word; }

.apply {
  margin-top: 30px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.apply .small { margin: 12px 0 0; }

/* ─── Statische Seiten ─────────────────────────── */

.page-main { padding: 32px 0 56px; }
.page {
  max-width: 780px;                    /* Lesebreite, nicht volle 1200px */
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 38px;
}
.page h1 { font-size: clamp(24px, 3.5vw, 32px); letter-spacing: -.02em; margin-bottom: 20px; }
.page-body { font-size: 16px; }
.page-body h2 { font-size: 20px; margin-top: 30px; }
.page-body h3 { font-size: 17px; margin-top: 24px; }
.page-body p, .page-body li { line-height: 1.7; }
.page-body ul, .page-body ol { padding-left: 22px; }
.page-body li { margin: 6px 0; }
.page-body table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.page-body th, .page-body td {
  border: 1px solid var(--line); padding: 8px 10px; text-align: left; font-size: 15px;
}
.page-body th { background: var(--surface); font-weight: 600; }
.page-updated { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .page { padding: 24px 20px; } }

/* ─── Hinweise ─────────────────────────────────── */

.notice {
  border-radius: var(--radius-sm);
  padding: 12px 15px; margin: 0 0 18px; font-size: 14.5px;
}
.notice-ok      { background: var(--green-100); color: var(--green-700); }
.notice-err     { background: var(--warn-bg);   color: var(--warn); }
.notice-expired { background: var(--warn-bg);   color: var(--warn); }

.empty {
  background: var(--card); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 40px 24px; text-align: center;
}

/* ─── Blättern ─────────────────────────────────── */

.pager {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; margin-top: 28px; font-size: 15px;
}
.pager a {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 16px; text-decoration: none;
}
.pager a:hover { border-color: var(--green-500); }

/* ─── Fußzeile ─────────────────────────────────── */

/* Abgerundeter Kasten innerhalb der 1200px, gleicher Verlauf wie die
   Kopfzeile - nicht randlos ueber die volle Breite. */
.site-foot { margin-top: 52px; padding-bottom: 36px; }

.foot-box {
  background: var(--brand-gradient);
  color: rgba(255,255,255,.85);
  border-radius: var(--radius-lg);
  padding: 34px 36px 20px;
}
.foot-inner {
  display: flex; justify-content: space-between;
  gap: 32px; flex-wrap: wrap; padding-bottom: 26px;
}
.foot-brand { max-width: 380px; }
.foot-brand .logo-text { color: #fff; }
.foot-brand p { font-size: 14px; margin: 8px 0 0; color: rgba(255,255,255,.7); }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.foot-links a { color: rgba(255,255,255,.85); text-decoration: none; font-size: 14px; }
.foot-links a:hover { color: #fff; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 16px;
  font-size: 13px; color: rgba(255,255,255,.6);
}

@media (max-width: 600px) {
  .foot-box { padding: 26px 22px 18px; border-radius: 16px; }
}
