:root {
  --activity: #B8A07A;
  --private-life: #3AAA6D;
  --resources: #4F5DA6;
  --identity: #F6C731;
  --style: #F5B4C4;
  --health: #E8705A;
  --text: #1A1A1A;
  --text-soft: #6B7280;
  --text-muted: #9CA3AF;
  --bg: #FAFAFA;
  --white: #FFFFFF;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 14px;
  --radius-sm: 8px;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ══════════ HERO ══════════ */
.hero {
  background: linear-gradient(145deg, #1A1A1A 0%, #2D2D3D 60%, var(--resources) 150%);
  color: white;
  padding: 56px 40px 48px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(79,93,166,0.3) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: 30%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(232,112,90,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
}

.hero-badge .dot {
  width: 7px; height: 7px;
  background: var(--private-life);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.hero h1 em {
  font-style: italic;
  color: var(--identity);
}

.hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  max-width: 580px;
  line-height: 1.7;
}

.hero-circles {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.hero-circles span {
  border-radius: 50%;
  display: block;
  opacity: 0.7;
}

/* ══════════ NAV TABS ══════════ */
.nav-bar {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 10;
}

.nav-tabs {
  display: flex;
  gap: 2px;
  margin-top: -24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.nav-tab {
  flex: 1;
  padding: 16px 8px 14px;
  text-align: center;
  cursor: pointer;
  border: none;
  background: var(--white);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.nav-tab .tab-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  transition: transform 0.25s;
}

.nav-tab:hover { background: var(--bg); }
.nav-tab:hover .tab-num { transform: scale(1.1); }

.nav-tab.active {
  color: var(--text);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 60%;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.nav-tab:nth-child(1) .tab-num { background: var(--identity); }
.nav-tab:nth-child(2) .tab-num { background: var(--resources); }
.nav-tab:nth-child(3) .tab-num { background: var(--private-life); }
.nav-tab:nth-child(4) .tab-num { background: var(--health); }
.nav-tab:nth-child(5) .tab-num { background: var(--activity); }
.nav-tab:nth-child(6) .tab-num { background: var(--style); }
.nav-tab:nth-child(7) .tab-num { background: var(--resources); }
.nav-tab:nth-child(8) .tab-num { background: var(--private-life); }
.nav-tab:nth-child(9) .tab-num { background: var(--identity); }

.nav-tab:nth-child(1).active::after { background: var(--identity); }
.nav-tab:nth-child(2).active::after { background: var(--resources); }
.nav-tab:nth-child(3).active::after { background: var(--private-life); }
.nav-tab:nth-child(4).active::after { background: var(--health); }
.nav-tab:nth-child(5).active::after { background: var(--activity); }
.nav-tab:nth-child(6).active::after { background: var(--style); }
.nav-tab:nth-child(7).active::after { background: var(--resources); }
.nav-tab:nth-child(8).active::after { background: var(--private-life); }
.nav-tab:nth-child(9).active::after { background: var(--identity); }

/* ══════════ CONTENT AREA ══════════ */
.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 40px 60px;
}

.module-panel { display: none; }
.module-panel.active { display: block; animation: fadeUp 0.35s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Module header */
.mod-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}

.mod-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.mod-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 6px;
}

.mod-header .mod-sub {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
}

/* Learning Objectives */
.lernziele {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.lernziele h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lernziele h3 .icon { font-size: 16px; }

.lz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lz-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

.lz-item .check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: white;
}

.lz-item .check.done {
  border-color: var(--private-life);
  background: var(--private-life);
}

/* Expandable Sections */
.section-block {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
}

.section-toggle {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s;
}

.section-toggle:hover { background: var(--bg); }

.section-toggle .s-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  flex-shrink: 0;
}

.s-badge.wissen { background: var(--resources); }
.s-badge.praxis { background: var(--health); }
.s-badge.check { background: var(--private-life); }
.s-badge.material { background: var(--identity); }
.s-badge.fall { background: var(--activity); }

.section-toggle .s-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.section-toggle .s-time {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.section-toggle .s-arrow {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.section-block.open .s-arrow { transform: rotate(180deg); }

.section-body {
  display: none;
  padding: 0 24px 24px;
}

.section-block.open .section-body { display: block; }

.section-body p, .section-body li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.section-body ul {
  padding-left: 18px;
  margin: 10px 0;
}

.section-body li { margin-bottom: 6px; }

.section-body h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--text);
}

/* Info callouts */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.65;
}

.callout.tip {
  background: #E8F8EE;
  border-left: 3px solid var(--private-life);
}

.callout.warn {
  background: #FDECE9;
  border-left: 3px solid var(--health);
}

.callout.info {
  background: #ECEEF8;
  border-left: 3px solid var(--resources);
}

.callout.case {
  background: #FEF9E7;
  border-left: 3px solid var(--identity);
}

.callout strong { font-weight: 700; }

/* Quiz / Self-Check */
.quiz-block {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 14px 0;
}

.quiz-block .q-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.quiz-block .q-question {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.5;
}

.quiz-options { display: flex; flex-direction: column; gap: 6px; }

.q-opt {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.q-opt:hover { border-color: var(--resources); background: #F5F6FF; }

.q-opt .q-letter {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  flex-shrink: 0;
}

.q-opt.correct {
  border-color: var(--private-life);
  background: #E8F8EE;
}

.q-opt.correct .q-letter {
  background: var(--private-life);
  color: white;
}

.q-opt.wrong {
  border-color: var(--health);
  background: #FDECE9;
}

.q-opt.wrong .q-letter {
  background: var(--health);
  color: white;
}

.q-feedback {
  display: none;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
}

.q-feedback.show { display: block; }
.q-feedback.correct { background: #E8F8EE; color: #166534; }
.q-feedback.wrong { background: #FDECE9; color: #991B1B; }

/* Case Study Card */
.case-card {
  background: linear-gradient(135deg, #FEF9E7 0%, #FFF8E1 100%);
  border: 1px solid rgba(246,199,49,0.3);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 20px 0;
}

.case-card .case-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--activity);
  margin-bottom: 10px;
}

.case-card h4 {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  margin-bottom: 10px;
}

.case-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.case-card .case-data {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.case-card .cd-item {
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.case-card .cd-item .cd-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.case-card .cd-item .cd-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

/* Checkliste / Material */
.material-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.mat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: background 0.15s;
}

.mat-item:hover { background: #ECEEF8; }

.mat-item .mat-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.mat-item .mat-icon.pdf { background: #FDECE9; }
.mat-item .mat-icon.template { background: #E8F8EE; }
.mat-item .mat-icon.tool { background: #ECEEF8; }
.mat-item .mat-icon.video { background: #FEF9E7; }

.mat-item .mat-info { flex: 1; }
.mat-item .mat-title { font-weight: 600; color: var(--text); }
.mat-item .mat-desc { font-size: 12px; color: var(--text-soft); margin-top: 1px; }

.mat-item .mat-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.mat-tag.pdf { background: #FDECE9; color: var(--health); }
.mat-tag.xlsx { background: #E8F8EE; color: #166534; }
.mat-tag.tool { background: #ECEEF8; color: var(--resources); }
.mat-item.downloadable { cursor: pointer; }
.mat-item.downloadable:hover { background: #DFE3F5; }
.mat-item .mat-dl { font-size: 11px; font-weight: 600; color: #4F5DA6; white-space: nowrap; margin-left: 8px; }
.mat-item.downloadable .mat-dl::after { content: ' \2193'; }

/* ══════════ OVERVIEW TAB ══════════ */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.ov-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.ov-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
}

.ov-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ov-card:nth-child(1)::before { background: var(--identity); }
.ov-card:nth-child(2)::before { background: var(--resources); }
.ov-card:nth-child(3)::before { background: var(--private-life); }
.ov-card:nth-child(4)::before { background: var(--health); }
.ov-card:nth-child(5)::before { background: var(--activity); }
.ov-card:nth-child(6)::before { background: var(--style); }

.ov-card .ov-num {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.ov-card:nth-child(1) .ov-num { color: var(--identity); }
.ov-card:nth-child(2) .ov-num { color: var(--resources); }
.ov-card:nth-child(3) .ov-num { color: var(--private-life); }
.ov-card:nth-child(4) .ov-num { color: var(--health); }
.ov-card:nth-child(5) .ov-num { color: var(--activity); }
.ov-card:nth-child(6) .ov-num { color: var(--style); }

.ov-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 19px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.ov-card p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
}

.ov-card .ov-meta {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Case Study Overview */
.case-overview {
  background: linear-gradient(135deg, #1A1A1A 0%, #2D2D3D 100%);
  color: white;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 28px;
}

.case-overview h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  margin-bottom: 10px;
}

.case-overview p {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 700px;
}

.case-overview .case-persons {
  display: flex;
  gap: 20px;
  margin-top: 18px;
}

.case-person {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
}

.case-person .cp-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.case-person .cp-name { font-weight: 600; font-size: 14px; }
.case-person .cp-desc { font-size: 12px; color: rgba(255,255,255,0.5); }

/* Progress Bar */
.progress-bar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}

.progress-bar h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.prog-track {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.prog-seg {
  height: 100%;
  transition: width 0.5s ease;
}

.prog-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 768px) {
  .hero { padding: 36px 20px 32px; }
  .hero h1 { font-size: 28px; }
  .hero-circles { display: none; }
  .nav-bar { padding: 0 16px; }
  .nav-tabs { flex-wrap: wrap; }
  .nav-tab { flex-basis: calc(25% - 2px); }
  .content { padding: 20px 16px 40px; }
  .overview-grid { grid-template-columns: 1fr; }
  .lz-grid { grid-template-columns: 1fr; }
  .case-card .case-data { grid-template-columns: 1fr; }
  .case-overview .case-persons { flex-direction: column; }
}

/* ═══ Fortschrittssystem ═══ */
.progress-bar { height: 6px; background: #E2E4F0; border-radius: 3px; margin-top: 10px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--identity); transition: width .4s ease; }
.ov-card .progress-bar { margin-top: auto; }
.ov-card .progress-label { font-size: 11px; color: var(--text-light); margin-top: 4px; text-align: right; }
.section-block.completed .section-toggle { border-left: 3px solid #1F6B42; }
.section-block.completed .s-title::after { content: ' ✓'; color: #1F6B42; font-weight: 700; }
.nav-tab .tab-progress { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 4px; vertical-align: middle; }
.nav-tab .tab-progress.done { background: #1F6B42; }
.nav-tab .tab-progress.partial { background: #C98A2B; }
.nav-tab .tab-progress.none { background: transparent; }
.module-panel .mod-progress-summary { display: flex; gap: 8px; align-items: center; margin: 10px 0 0 0; font-size: 13px; color: var(--text-light); }
.module-panel .mod-progress-summary .progress-bar { flex: 1; max-width: 200px; }
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.04)}}

/* ═══ Peer-Review-Tool ═══ */
.pr-row {
  background: white;
  border: 1px solid #E2E4F0;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.pr-row.rated { border-color: #4F5DA6; }
.pr-row .pr-title {
  font-size: 14px;
  color: #2D2D3D;
  margin-bottom: 8px;
  line-height: 1.45;
}
.pr-row .pr-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pr-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #C8CCE0;
  background: white;
  color: #5A5A68;
  cursor: pointer;
  transition: all 0.15s;
}
.pr-btn:hover { background: #F5F6FB; border-color: #4F5DA6; }
.pr-btn.active { color: white; border-color: transparent; font-weight: 600; }
.pr-btn[data-v="1"].active { background: #B1472E; }
.pr-btn[data-v="2"].active { background: #C98A2B; }
.pr-btn[data-v="3"].active { background: #4F5DA6; }
.pr-btn[data-v="4"].active { background: #1F6B42; }

#pr-result .pr-ampel {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}
#pr-flags .pr-flag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  margin: 2px 4px 2px 0;
  background: #FFF1E8;
  color: #B1472E;
  border: 1px solid #F2D4C3;
}
#pr-flags .pr-flag.yellow {
  background: #FFF8E1;
  color: #8E6412;
  border-color: #F0DAA5;
}
