/* --- Reset & Basis --- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --farbe-text: #1a1a1a;
  --farbe-text-leise: #555;
  --farbe-hintergrund: #ffffff;
  --farbe-akzent: #1f3a5f;
  --farbe-akzent-hell: #2d5589;
  --farbe-akzent-text: #ffffff;
  --farbe-rahmen: #e2e2e2;
  --farbe-flaeche-leise: #f7f7f5;

  --schrift-basis: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                   "Helvetica Neue", Arial, sans-serif;
  --schrift-serif: Georgia, "Times New Roman", serif;

  --breite-max: 960px;
  --radius: 6px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--schrift-basis);
  font-size: 17px;
  line-height: 1.6;
  color: var(--farbe-text);
  background: var(--farbe-hintergrund);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

p, li {
  text-align: justify;
  hyphens: auto;
}

/* In umrandeten Containern wirkt Blocksatz unruhig (kurze Zeilen + Rahmen
   führen zu großen Wortabständen) — daher dort linksbündig ohne Trennung. */
.klausur-card p,
.klausur-card li,
.hinweis p,
.hinweis li {
  text-align: left;
  hyphens: manual;
}

a {
  color: var(--farbe-akzent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--farbe-akzent-hell); }

h1, h2, h3 {
  font-family: var(--schrift-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--farbe-text);
}

h1 { font-size: 2.2rem; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 .5rem; }

.container {
  max-width: var(--breite-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Header --- */
.site-header {
  border-bottom: 1px solid var(--farbe-rahmen);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo {
  font-family: var(--schrift-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--farbe-text);
  text-decoration: none;
}
.site-header nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.site-header nav a {
  color: var(--farbe-text-leise);
  text-decoration: none;
  font-weight: 500;
}
.site-header nav a:hover,
.site-header nav a.active {
  color: var(--farbe-akzent);
}

/* --- Hero --- */
.hero {
  background: var(--farbe-flaeche-leise);
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--farbe-rahmen);
}
.hero h1 { margin-bottom: 1rem; }
.lead {
  font-size: 1.15rem;
  color: var(--farbe-text-leise);
}

/* --- Filterbalken in Hero --- */
.filter-bar {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.filter-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
}
.filter-zeile[hidden] { display: none; }
.filter-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--farbe-text-leise);
  text-transform: uppercase;
  letter-spacing: .05em;
  min-width: 6.5rem;
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.filter-pill {
  font: inherit;
  font-size: .9rem;
  padding: .35rem .85rem;
  border: 1px solid var(--farbe-rahmen);
  border-radius: 999px;
  background: #fff;
  color: var(--farbe-text);
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.filter-pill:hover {
  border-color: var(--farbe-akzent);
  color: var(--farbe-akzent);
}
.filter-pill.is-aktiv {
  background: var(--farbe-akzent);
  border-color: var(--farbe-akzent);
  color: var(--farbe-akzent-text);
}
.filter-pill.is-aktiv:hover {
  background: var(--farbe-akzent-hell);
  border-color: var(--farbe-akzent-hell);
  color: var(--farbe-akzent-text);
}
@media (max-width: 540px) {
  .filter-label { min-width: 0; flex-basis: 100%; }
}

/* --- Sektionen --- */
.klausuren-section,
.ablauf-section,
.mein-konzept,
.rechtstext,
.danke {
  padding: 3rem 1.25rem;
}
.section-intro {
  color: var(--farbe-text-leise);
  margin-bottom: 2rem;
  max-width: 720px;
}

/* --- Klausur-Karten --- */
.klausuren-liste {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .klausuren-liste { grid-template-columns: 1fr 1fr; }
}

.klausur-card {
  border: 1px solid var(--farbe-rahmen);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.klausur-bereich {
  display: inline-block;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--farbe-akzent);
  font-weight: 600;
  margin-bottom: .5rem;
}
.klausur-titel { margin-bottom: .75rem; }
.klausur-beschreibung {
  color: var(--farbe-text-leise);
  margin: 0 0 1.25rem;
}
.klausur-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .75rem;
  margin-top: auto;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: .65rem 1.1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  border: 1px solid transparent;
  text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary {
  background: var(--farbe-akzent);
  color: var(--farbe-akzent-text);
}
.btn-primary:hover {
  background: var(--farbe-akzent-hell);
  color: var(--farbe-akzent-text);
}
.btn-secondary {
  background: #fff;
  color: var(--farbe-akzent);
  border-color: var(--farbe-akzent);
}
.btn-secondary:hover {
  background: var(--farbe-flaeche-leise);
  color: var(--farbe-akzent-hell);
  border-color: var(--farbe-akzent-hell);
}

/* Externe Link-Buttons: typografisches Pfeil-Icon nach dem Text als Affordanz
   (übliche Webkonvention für "öffnet externe Seite") */
.btn-extern::after {
  content: " \2197"; /* ↗ */
  display: inline-block;
  margin-left: .35em;
  font-size: .85em;
  line-height: 1;
  transition: transform .15s ease-out;
}
.btn-extern:hover::after {
  transform: translate(.15em, -.15em);
}

/* Button, dessen Linktext die volle CC-BY-SA-Attribution trägt */
.btn-attribution {
  font-size: .8rem;
  line-height: 1.5;
  text-align: left;
  padding: .75rem 1rem;
  hyphens: none;
  font-weight: 400;
}

/* Sachverhalt-Wrapper-Seite (PDF-Anzeige) */
.sachverhalt-seite {
  padding: 2.5rem 1.25rem 3rem;
}
.sv-attribution {
  font-size: .85rem;
  color: var(--farbe-text-leise);
  margin: 0 0 1.5rem;
  text-align: left;
  hyphens: none;
}
.sv-embed {
  width: 100%;
  height: 80vh;
  border: 1px solid var(--farbe-rahmen);
  border-radius: var(--radius);
  overflow: hidden;
}
.sv-embed object {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Ablauf-Liste --- */
.ablauf {
  padding-left: 1.25rem;
  max-width: 700px;
}
.ablauf li { margin-bottom: .75rem; }

/* --- Mein Konzept & Rechtstexte --- */
.mein-konzept,
.rechtstext,
.danke {
  max-width: 720px;
  margin: 0 auto;
}
.qualifikation { padding-left: 1.25rem; }
.qualifikation li { margin-bottom: .35rem; }

/* --- Mein Konzept: redaktioneller Feinschliff --- */
.mein-konzept {
  max-width: 720px;
  padding: 5rem 1.25rem 4rem;
}

.konzept-portrait {
  float: right;
  width: 240px;
  height: 300px;
  border-radius: 6px;
  object-fit: cover;
  margin: .35rem 0 1rem 2rem;
}

.konzept-clear { clear: both; }

.mein-konzept h1 {
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
  text-wrap: balance;
}

.mein-konzept p {
  line-height: 1.7;
  margin: 0 0 1.5rem;
  text-wrap: pretty;
}
.mein-konzept p:last-child { margin-bottom: 0; }
.mein-konzept a { text-decoration-thickness: 1px; }

@media (max-width: 720px) {
  .konzept-portrait {
    float: none;
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 4 / 5;
    margin: 0 0 2rem;
  }
  .mein-konzept h1 { font-size: 2.3rem; margin-bottom: 1.5rem; }
}

.rechtstext h2 { font-size: 1.25rem; }
.rechtstext ul { padding-left: 1.25rem; }
.rechtstext li { margin-bottom: .25rem; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--farbe-rahmen);
  margin-top: 4rem;
  padding: 2rem 0;
  background: var(--farbe-flaeche-leise);
  font-size: .9rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer nav {
  display: flex;
  gap: 1.5rem;
}
.site-footer nav a {
  color: var(--farbe-text-leise);
  text-decoration: none;
}
.site-footer nav a:hover { color: var(--farbe-akzent); }
.copyright { margin: 0; color: var(--farbe-text-leise); }

/* --- Hinweis-Block (Fallback bei leerer Liste) --- */
.hinweis {
  padding: 1.5rem;
  border: 1px dashed var(--farbe-rahmen);
  border-radius: var(--radius);
  color: var(--farbe-text-leise);
  background: var(--farbe-flaeche-leise);
}
