/* ===========================================
   be!aware – Distance Learning Stylesheet
   WCAG 2.1 AA orientiert
   =========================================== */

/* Skip-Link für Screenreader/Tastatur */
.skip-link {
  position: absolute;
  top: -50px;
  left: 1rem;
  background: #000;
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 0.5rem;
  outline: 3px solid #ffd700;
}

/* Basis */
* { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.65;
  font-size: 1.05rem;
}

/* Site-Header mit Logos (be!aware + Erasmus+ + fib*) */
.site-header {
  background: #fff;
  border-bottom: 4px solid #b8323e;
  padding: 1.5rem 1.5rem 1.3rem;
}
.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-header-beaware {
  display: flex;
  align-items: center;
  gap: 1.3rem;
}
.site-header-beaware .logo-beaware {
  max-height: 70px;
  width: auto;
  display: block;
}
.site-header-beaware .logo-erasmus {
  max-height: 60px;
  width: auto;
  display: block;
}
.site-header-fib {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  color: #666;
}
.site-header-fib-label {
  text-align: right;
  line-height: 1.3;
}
.site-header-fib img {
  height: 70px;
  width: auto;
  max-width: 100%;
  display: block;
}
.site-header a:focus-visible {
  outline: 3px solid #b8323e;
  outline-offset: 4px;
}
.site-header a {
  text-decoration: none;
  color: inherit;
}
@media (max-width: 760px) {
  .site-header { padding: 1rem; }
  .site-header-inner { gap: 1rem; }
  .site-header-beaware { gap: 0.8rem; }
  .site-header-beaware .logo-beaware { max-height: 42px; }
  .site-header-beaware .logo-erasmus { max-height: 38px; }
  .site-header-fib img { max-height: 35px; }
  .site-header-fib-label { font-size: 0.78rem; }
}
@media (max-width: 480px) {
  .site-header-fib-label { display: none; }
}

/* Hauptcontainer */
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}

/* Typografie */
h1, h2, h3, h4 {
  font-family: 'Montserrat', -apple-system, sans-serif;
  color: #1a1a1a;
  line-height: 1.25;
  margin-top: 2rem;
}
h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 1rem;
}
h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-weight: 700;
  margin-top: 2.5rem;
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #8c2530;
  margin-top: 1.8rem;
}
p { margin: 0 0 1rem; }
a {
  color: #8c2530;
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: #5e1820; }
a:focus-visible {
  outline: 3px solid #b8323e;
  outline-offset: 2px;
}
strong { color: #1a1a1a; }
ul, ol { padding-left: 1.4rem; }
ul li, ol li { margin-bottom: 0.4rem; }

/* Fortschrittsbalken */
.progress-wrap {
  background: #f7e8ea;
  padding: 0.6rem 1.5rem;
  border-bottom: 1px solid #e8d0d3;
}
.progress-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.progress-label {
  font-size: 0.88rem;
  color: #6e2025;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.progress-bar {
  flex: 1;
  min-width: 200px;
  background: #fff;
  border: 1px solid #d8a0a8;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: #b8323e;
  border-radius: 6px;
  transition: width 0.3s ease;
}
.progress-dots {
  display: flex;
  gap: 0.4rem;
}
.progress-dots span {
  width: 24px;
  height: 24px;
  border: 2px solid #b8323e;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #b8323e;
  font-family: 'Montserrat', sans-serif;
}
.progress-dots span.done { background: #b8323e; color: #fff; }
.progress-dots span.current { background: #ffd700; color: #1a1a1a; border-color: #b8323e; }
@media (max-width: 600px) { .progress-dots { display: none; } }

/* Breadcrumb */
.breadcrumb {
  max-width: 920px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.88rem;
  color: #666;
}
.breadcrumb a { color: #8c2530; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Hero (Indexseite) */
.hero {
  background: linear-gradient(135deg, #fdf3f3 0%, #f8e6e8 100%);
  border-bottom: 4px solid #b8323e;
  padding: 2.5rem 1.5rem;
}
.hero-inner {
  max-width: 920px;
  margin: 0 auto;
  position: relative;
}
.hero-content { max-width: 620px; }
.hero h1 { margin-top: 0; }
.hero-sub {
  font-size: 1.2rem;
  color: #2a2a2a;
  margin: 0.5rem 0 1.5rem;
}
.hero-fig {
  position: absolute;
  right: -10px;
  bottom: -30px;
  width: 35%;
  max-width: 300px;
  opacity: 0.9;
  pointer-events: none;
}
.hero-fig img { width: 100%; height: auto; display: block; }
@media (max-width: 740px) { .hero-fig { display: none; } }

/* Unit-Kachel-Grid (Indexseite) */
.unit-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
  list-style: none;
  padding: 0;
}
.unit-cards li { margin: 0; }
.unit-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8e0e1;
  padding: 1.5rem 1.5rem 1.3rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  height: 100%;
}
.unit-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #b8323e;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s;
}
.unit-card:hover,
.unit-card:focus-visible {
  border-color: #b8323e;
  box-shadow: 0 8px 20px rgba(184, 50, 62, 0.12);
  transform: translateY(-2px);
}
.unit-card:hover::before,
.unit-card:focus-visible::before { transform: scaleY(1); }
.unit-card:focus-visible {
  outline: 3px solid #b8323e;
  outline-offset: 2px;
}
.unit-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  color: #b8323e;
  font-weight: 800;
  letter-spacing: 0.15em;
}
.unit-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.4rem 0 0.6rem;
  color: #1a1a1a;
  line-height: 1.3;
}
.unit-meta {
  font-size: 0.9rem;
  color: #4a4a4a;
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid #f0e8e9;
}
.unit-meta-quiz { color: #8c2530; font-weight: 600; }

/* Lead-Text */
.lead {
  font-size: 1.18rem;
  line-height: 1.6;
  color: #1a1a1a;
  border-left: 4px solid #b8323e;
  padding-left: 1.2rem;
  margin: 1rem 0 2rem;
}

/* Callout */
.callout {
  background: #fdf3f3;
  border: 1px solid #f0d0d3;
  border-left: 5px solid #b8323e;
  padding: 1.3rem 1.5rem;
  margin: 1.8rem 0;
  border-radius: 2px;
}
.callout-label {
  display: inline-block;
  background: #8c2530;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.6rem;
}
.callout p:last-child { margin-bottom: 0; }

/* Meta-Bar (Unit-Header) */
.meta-bar {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  font-size: 0.92rem;
  max-width: 920px;
  margin: 0 auto;
}
.meta-bar > div { display: flex; flex-direction: column; }
.meta-bar strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8c2530;
  font-weight: 700;
  margin-bottom: 0.1rem;
}
.meta-bar span { color: #1a1a1a; font-weight: 600; }

/* Visual / Bilder */
.visual {
  margin: 1.8rem 0;
  text-align: center;
}
.visual img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.visual figcaption {
  font-size: 0.88rem;
  color: #555;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Tabelle */
.list-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.96rem;
}
.list-table caption {
  text-align: left;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}
.list-table th {
  background: #8c2530;
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.list-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f0e8e9;
  vertical-align: top;
}
.list-table tr:hover { background: #fdf3f3; }
.tag-ok {
  display: inline-block;
  background: #d4ebd9;
  color: #155724;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 700;
}
.tag-bad {
  display: inline-block;
  background: #f5d0d3;
  color: #6e2025;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Quiz */
.quiz {
  background: #fff;
  border: 1px solid #e8e0e1;
  margin: 2.5rem 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.quiz-header {
  background: #8c2530;
  color: #fff;
  padding: 1.2rem 1.6rem;
}
.quiz-header h2 {
  color: #fff;
  margin: 0;
  font-size: 1.3rem;
}
.quiz-header .quiz-sub {
  font-size: 0.95rem;
  margin-top: 0.3rem;
  display: block;
  color: #fff;
  opacity: 0.95;
}
.quiz-body { padding: 0.5rem 1.6rem 1.6rem; }

.question {
  padding: 1.4rem 0;
  border-bottom: 1px solid #f0e8e9;
}
.question:last-of-type { border-bottom: none; }
.q-row {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}
.q-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #8c2530;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50%;
}
.q-text {
  font-size: 1.05rem;
  line-height: 1.55;
  color: #1a1a1a;
  padding-top: 0.3rem;
}

.options {
  display: flex;
  gap: 0.7rem;
  margin: 1rem 0 0 calc(34px + 0.8rem);
  flex-wrap: wrap;
}
.options button {
  padding: 0.7rem 1.6rem;
  border: 2px solid #8c2530;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 3px;
  transition: all 0.15s;
  min-width: 110px;
  color: #1a1a1a;
}
.options button:hover:not(:disabled),
.options button:focus-visible:not(:disabled) {
  background: #fdf3f3;
  color: #8c2530;
  outline: 3px solid #b8323e;
  outline-offset: 2px;
}
.options button.selected-correct {
  background: #155d2e;
  border-color: #155d2e;
  color: #fff;
}
.options button.selected-wrong {
  background: #8c2530;
  border-color: #8c2530;
  color: #fff;
}
.options button.show-correct {
  background: #d4ebd9;
  border-color: #155d2e;
  color: #155d2e;
}
.options button:disabled { cursor: default; }

.feedback {
  margin: 1rem 0 0 calc(34px + 0.8rem);
  padding: 1rem 1.2rem;
  border-radius: 3px;
  font-size: 0.96rem;
  line-height: 1.55;
  display: none;
}
.feedback.shown { display: block; }
.feedback.correct {
  background: #d4ebd9;
  border-left: 4px solid #155d2e;
  color: #0f3d1f;
}
.feedback.wrong {
  background: #fdf3f3;
  border-left: 4px solid #8c2530;
  color: #5e1820;
}
.feedback strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quiz-result {
  margin: 1.5rem 0 0;
  padding: 1.8rem;
  background: linear-gradient(135deg, #8c2530 0%, #5e1820 100%);
  color: #fff;
  border-radius: 3px;
  text-align: center;
  display: none;
}
.quiz-result.shown { display: block; }
.quiz-result-label {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.95;
  margin-bottom: 0.5rem;
}
.quiz-result-score {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}
.quiz-result-msg {
  margin-top: 0.6rem;
  font-size: 1rem;
}

/* Skala-Quiz */
.question[data-scale] .options { gap: 0.4rem; }
.question[data-scale] .options button {
  min-width: 48px;
  padding: 0.6rem 0.8rem;
}
.scale-legend {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0 0 calc(34px + 0.8rem);
  font-size: 0.82rem;
  color: #555;
  max-width: 380px;
}

/* Quellen */
.source {
  font-size: 0.88rem;
  color: #555;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
  margin-top: 2.5rem;
  line-height: 1.55;
}
.source strong { color: #1a1a1a; }

/* Navigation Vor/Zurück */
.unit-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}
.unit-nav a {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.4rem;
  border: 2px solid #8c2530;
  border-radius: 4px;
  text-decoration: none;
  color: #8c2530;
  transition: all 0.15s;
  background: #fff;
  font-weight: 600;
}
.unit-nav a:hover,
.unit-nav a:focus-visible {
  background: #8c2530;
  color: #fff;
  outline: 3px solid #b8323e;
  outline-offset: 2px;
}
.unit-nav a.disabled {
  opacity: 0.4;
  pointer-events: none;
  border-color: #bbb;
  color: #888;
}
.unit-nav a.next { text-align: right; }
.unit-nav-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}
.unit-nav-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

/* Sprung zur Übersicht / Wiedereinstieg */
.quick-jump {
  background: #fafafa;
  border: 1px solid #eee;
  padding: 0.9rem 1.2rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.92rem;
  border-radius: 3px;
}
.quick-jump strong { color: #1a1a1a; }
.quick-jump a {
  color: #8c2530;
  font-weight: 600;
  text-decoration: underline;
  margin-left: 0.4rem;
}

/* Partner-Grid (Indexseite) */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.partner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #fafafa;
  padding: 1.2rem 1.2rem 1rem;
  border-radius: 3px;
  border: 1px solid #eee;
  font-size: 0.9rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
  min-height: 180px;
}
.partner:hover {
  border-color: #b8323e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(184, 50, 62, 0.1);
}
.partner:focus-visible {
  outline: 3px solid #b8323e;
  outline-offset: 2px;
}
.partner img {
  max-height: 60px;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0 0 0.8rem;
  object-fit: contain;
}
.partner strong {
  display: block;
  color: #1a1a1a;
  margin: 0.4rem 0 0.2rem;
  line-height: 1.3;
}
.country {
  display: inline-block;
  background: #8c2530;
  color: #fff;
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 2px;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.partner-url {
  color: #666;
  font-size: 0.85rem;
  margin-top: auto;
  padding-top: 0.3rem;
}

/* Footer Erasmus */
.site-footer {
  background: #1a1a1a;
  color: #d8d8d8;
  padding: 2rem 1.5rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.92rem;
  line-height: 1.6;
}
.site-footer-inner {
  max-width: 920px;
  margin: 0 auto;
}
.site-footer strong { color: #fff; }
.site-footer-disclaimer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #444;
  font-size: 0.84rem;
  color: #bbb;
  font-style: italic;
}
.site-footer-links {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #444;
  font-size: 0.85rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer-links a {
  color: #ddd;
  text-decoration: none;
}
.site-footer-links a:hover { color: #fff; text-decoration: underline; }

/* Sr-only (Screenreader Only) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile Anpassungen */
@media (max-width: 600px) {
  body { font-size: 1rem; }
  main { padding: 1.5rem 1rem 1rem; }
  .hero { padding: 2rem 1rem; }
  .options { margin-left: 0; }
  .options button { width: 100%; }
  .feedback { margin-left: 0; }
  .scale-legend { margin-left: 0; }
  .meta-bar { gap: 1rem; padding: 0.8rem 1rem; }
  .unit-nav { grid-template-columns: 1fr; }
  .unit-nav a.next { text-align: left; }
  .site-header { padding: 0.7rem 1rem; }
  .site-header-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .site-header img { max-height: 50px; }
  .quiz-body { padding: 0.5rem 1rem 1rem; }
}

/* Print */
@media print {
  .progress-wrap, .unit-nav, .quick-jump, .skip-link { display: none; }
  .quiz-header { background: #555 !important; -webkit-print-color-adjust: exact; }
  .options button { display: none; }
  .feedback { display: block !important; }
  a { color: #000; text-decoration: underline; }
  a::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
}
