/* study-*-Domains – ein Stylesheet für alle Fächer, hell und dunkel */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5b6676;
  --line: #e2e6eb;
  --accent: #0f4c5c;
  --accent-2: #e36414;
  --accent-soft: #e6f0f2;
  --hero-1: #0f4c5c;
  --hero-2: #145f73;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a;
    --surface: #171e26;
    --text: #e7ecf1;
    --muted: #9aa6b4;
    --line: #26303b;
    --accent: #5fb3c6;
    --accent-2: #ff8a3d;
    --accent-soft: #1b2d35;
    --hero-1: #0b2f3a;
    --hero-2: #0f3f4d;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Kopfzeile */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--accent-2); margin: 0 1px; }
.brand-field { color: var(--accent); }
.top-nav { display: flex; gap: 18px; font-size: .95rem; overflow-x: auto; }
.top-nav a { color: var(--muted); white-space: nowrap; }

/* Kopfbereich mit Suche */
.hero { background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: #fff; padding: 40px 0 28px; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.02em; }
.lead { max-width: 760px; font-size: 1.08rem; opacity: .92; margin: 0 0 16px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0 0 22px; opacity: .95; }
.stats strong { font-size: 1.25rem; }
.search {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  background: var(--surface); color: var(--text); padding: 14px; border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; flex: 1 1 180px; }
.field.grow { flex: 3 1 260px; }
.field span { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select {
  font: inherit; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent-2); color: #fff; padding: 11px 20px; display: inline-block; white-space: nowrap;
}
.search button { flex: 0 0 auto; }
.btn:hover, .search button:hover { filter: brightness(1.05); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }

/* Werbung: Platz reservieren, damit die Seite nicht springt */
.ad { margin: 20px 0; text-align: center; min-height: 120px; }
.ad-side { min-height: 600px; margin-top: 0; }
.ad-feed { margin: 0; min-height: 140px; }
.ad-label { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }

/* Inhalt */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; padding-top: 4px; padding-bottom: 24px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pills a {
  padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font-size: .93rem; font-weight: 600;
}
.pills a span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.pills a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pills a[aria-current] span { color: rgba(255, 255, 255, .8); }
.pills a:hover { text-decoration: none; border-color: var(--accent); }
.result-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: var(--muted); margin-bottom: 10px; }
.result-head p { margin: 0; }
.sort a { margin-left: 8px; color: var(--muted); }
.sort a[aria-current] { color: var(--text); font-weight: 700; }

.courses { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.course {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.course:hover { border-color: var(--accent); }
.course-main { min-width: 0; }
.course h2 { font-size: 1.08rem; margin: 6px 0 4px; overflow-wrap: anywhere; }
.course h2 a { color: var(--text); }
.inst { margin: 0; color: var(--muted); font-size: .95rem; }
.inst a { font-weight: 600; }
.loc { display: inline-block; margin-left: 6px; }
.course-actions { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.course-actions .btn { padding: 8px 14px; font-size: .9rem; text-align: center; }
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.badge.b1 { background: #e7f5ec; color: #1b7a43; }
.badge.b2 { background: #e8effc; color: #2456b5; }
.badge.b4 { background: #f5eafc; color: #7a2bb0; }
@media (prefers-color-scheme: dark) {
  .badge.b1 { background: #16301f; color: #7bd69d; }
  .badge.b2 { background: #172540; color: #8fb2f5; }
  .badge.b4 { background: #2b1838; color: #d4a3f2; }
}
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 22px 0 6px; }
.pager a, .pager span { padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.pager span[aria-current] { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.pager span:not([aria-current]) { border: 0; background: none; }

/* Seitenleiste */
.side { display: grid; gap: 18px; }
.sticky { position: sticky; top: 72px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.box h3 { font-size: 1rem; }
.box p { margin: 0 0 10px; color: var(--muted); }
.countries { list-style: none; padding: 0; margin: 0; }
.countries li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.countries li:last-child { border: 0; }
.countries span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Erklärteil und Fußzeile */
.about { padding-top: 12px; padding-bottom: 8px; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 14px 0; }
.levels div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.levels p, .note { color: var(--muted); margin: 0; }
.note { font-size: .92rem; }
.foot { background: var(--surface); border-top: 1px solid var(--line); margin-top: 20px; padding: 26px 0 30px; }
.foot h2 { font-size: 1.05rem; }
.fields { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.fields a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: .92rem; }
.fields a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.legal { color: var(--muted); font-size: .88rem; margin: 0; }
.notfound { padding: 60px 16px; text-align: center; }

/* Tablet und Telefon */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .ad-side { min-height: 280px; }
  .levels { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top-nav a:not(:first-child) { display: none; }
  .hero { padding: 26px 0 20px; }
  .lead { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .course { flex-direction: column; align-items: stretch; }
  .course-actions { flex-direction: row; }
  .course-actions .btn { flex: 1 1 0; }
  .search button { width: 100%; }
  .ad { min-height: 100px; }
}

/* --- Marke, Netzwerk-Hinweis, Fachsymbol (ab v3) --- */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand .mark { flex: 0 0 auto; border-radius: 8px; }
.hero-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-text { min-width: 0; flex: 1 1 auto; }
.hero-icon { flex: 0 0 auto; width: 170px; height: 170px; color: rgba(255, 255, 255, .9); margin-right: 8px; }
.network {
  display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600;
  color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  padding: 5px 12px 5px 8px; border-radius: 999px; margin-bottom: 14px;
}
.network:hover { background: rgba(255, 255, 255, .2); text-decoration: none; }
.network-lines {
  width: 22px; height: 14px; flex: 0 0 auto; position: relative;
  background:
    radial-gradient(circle at 62% 70%, #f5c400 0 3px, transparent 3.5px),
    linear-gradient(140deg, transparent 38%, #d42027 38% 50%, transparent 50% 58%, #29a8e0 58% 70%, transparent 70%);
}
.hero .search { margin-top: 18px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .9rem; color: var(--muted); padding-top: 14px; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }

/* --- Fakten, Länder, FAQ --- */
.about h2 { font-size: 1.3rem; margin-top: 26px; }
.facts { font-size: 1.05rem; max-width: 900px; margin: 0; }
.country-grid { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 18px; }
.country-grid li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.country-grid span { color: var(--muted); font-variant-numeric: tabular-nums; }
.levels h3 a { color: var(--text); }
.faq { display: grid; gap: 8px; margin: 10px 0 14px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 0; color: var(--muted); }
.countries a[aria-current] { font-weight: 700; color: var(--text); }

/* --- Fußzeile mit UD-Logo --- */
.foot-brand { display: flex; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.foot-logo { color: var(--text); flex: 0 0 auto; }
.foot-logo:hover { text-decoration: none; }

@media (max-width: 760px) {
  .hero-icon { display: none; }
  .foot-brand { flex-direction: column; align-items: flex-start; }
}

/* Impressum */
.legal-page { max-width: 760px; padding-top: 28px; padding-bottom: 40px; }
.legal-page h2 { font-size: 1.1rem; margin-top: 22px; }
.legal-page p { color: var(--muted); }
