/* ==========================================================================
   James Einrichtungsassistent – Frontend Styles
   Bootstrap 5 + Font Awesome loaded as base.
   Fonts: Anton (headings), Noto Sans (body) — locally hosted
   Primary: #f9b03d (yellow) | Secondary: #2a4b9b / #0871b8 (blue)
   ========================================================================== */

/* ── Font Faces ─────────────────────────────────────────────── */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Anton/Anton-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF;
}
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Anton/Anton-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC;
}

@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/NotoSans/NotoSans-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/NotoSans/NotoSans-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/NotoSans/NotoSans-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0100-02FF;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/NotoSans/NotoSans-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0100-02FF;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/NotoSans/NotoSans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC;
}

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --j-primary: #f9b03d;
  --j-primary-hover: #e9a02d;
  --j-primary-light: #fef5e0;
  --j-primary-dark: #c88a1e;
  --j-secondary: #2a4b9b;
  --j-secondary-light: #0871b8;
  --j-bg2: #f5f5f7;
  --j-text: #1d1d1f;
  --j-text2: #6e6e73;
  --j-border: rgba(0,0,0,0.08);
  --j-warn: #FF9500;
  --j-warn-bg: #FFF8EC;
  --j-ok: #198754;
  --j-danger: #dc3545;
  --j-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --j-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --j-radius: 20px;
  --j-heading: 'Anton', Impact, sans-serif;
  --j-body: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --j-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ── Base ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--j-body);
  font-size: 16px;
  color: var(--j-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--j-heading);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.container { max-width: 980px; }
[hidden] { display: none !important; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--j-border);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.header-nav { display: flex; gap: 4px; margin-left: 1.5rem; }

.nav-link {
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  color: var(--j-text2);
  text-decoration: none;
  transition: 0.25s;
}

.header-nav .nav-link:hover { background: var(--j-bg2); color: var(--j-text); }
.header-nav .nav-link.active { background: var(--j-primary-light); color: var(--j-primary-dark); font-weight: 600; }

.header-right { margin-left: auto; }

.lang-switcher {
  display: flex; gap: 2px;
  background: var(--j-bg2); border-radius: 980px; padding: 2px;
}

.lang-btn {
  padding: 5px 12px; border-radius: 980px;
  font-size: 13px; font-weight: 600;
  color: var(--j-text2); text-decoration: none; transition: 0.2s;
}

.lang-btn.active {
  background: #fff; color: var(--j-primary-dark);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px; text-align: center;
  background: linear-gradient(180deg, var(--j-primary-light) 0%, #fff 100%);
}

.hero-logo {
  width: 180px; height: 180px;
  border-radius: 32px; object-fit: contain;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 60px;
  color: var(--j-text);
  line-height: 1.1;
}

.hero-subtitle {
  margin-top: 16px; font-size: 20px;
  color: var(--j-text2); max-width: 600px;
  margin-left: auto; margin-right: auto;
  font-weight: 400;
}

/* ── James Buttons ──────────────────────────────────────────── */
.btn-james {
  background: var(--j-primary); color: #fff; border: none;
  border-radius: 980px; padding: 16px 32px;
  font-weight: 600; font-size: 17px;
  box-shadow: 0 4px 14px rgba(249,176,61,0.35);
  transition: 0.25s var(--j-ease);
}

.btn-james:hover:not(:disabled) {
  background: var(--j-primary-hover); color: #fff;
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(249,176,61,0.45);
}

.btn-james:active:not(:disabled) { transform: scale(0.98); }
.btn-james:disabled { opacity: 0.4; box-shadow: none; }

.btn-back {
  background: none; border: none;
  color: var(--j-primary);
  font-size: 17px; cursor: pointer;
  padding: 0; margin-bottom: 2rem;
  font-weight: 500;
}

.btn-back:hover { color: var(--j-primary-hover); opacity: 0.85; }

/* ── Wizard ─────────────────────────────────────────────────── */
.wizard { padding: 60px 0 120px; min-height: calc(100vh - 60px); display: flex; flex-direction: column; justify-content: center; }

.progress-bar-wizard { margin-bottom: 3.5rem; }
.progress-steps { display: flex; align-items: center; justify-content: center; }
.progress-step { display: flex; align-items: center; gap: 8px; }

.step-number {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  background: var(--j-bg2); color: var(--j-text2); transition: 0.3s;
}

.progress-step.active .step-number { background: var(--j-primary); color: #fff; }
.progress-step.done .step-number { background: var(--j-ok); color: #fff; }

.step-label { font-size: 14px; font-weight: 500; color: var(--j-text2); }
.progress-step.active .step-label, .progress-step.done .step-label { color: var(--j-text); }

.progress-line { width: 60px; height: 2px; background: var(--j-border); margin: 0 16px; }
.progress-line.done { background: var(--j-ok); }

.step { animation: fadeInUp 0.4s var(--j-ease); }
.step-title { font-size: 42px; color: var(--j-text); }
.step-description { margin-top: 12px; font-size: 18px; color: var(--j-text2); }
.step-actions { margin-top: 2.5rem; text-align: center; }

/* ── Card Grid ──────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 2.5rem; }

.card {
  background: #fff; border: 2px solid var(--j-border);
  border-radius: var(--j-radius); padding: 32px 24px;
  cursor: pointer; transition: 0.25s var(--j-ease);
  text-align: left; position: relative; user-select: none;
}

.card:hover { box-shadow: var(--j-shadow-hover); transform: translateY(-2px); }
.card:active { transform: translateY(0); }
.card.selected { border-color: var(--j-primary); background: var(--j-primary-light); box-shadow: 0 0 0 1px var(--j-primary); }

.card-check {
  position: absolute; top: 16px; right: 16px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--j-border);
  display: flex; align-items: center; justify-content: center;
  transition: 0.25s; color: transparent;
}

.card.selected .card-check { background: var(--j-primary); border-color: var(--j-primary); color: #fff; }

.card-icon {
  width: 64px; height: 64px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; overflow: hidden;
  background: var(--j-primary-light); color: var(--j-primary); font-size: 24px;
}

.card-icon img {
  width: 100%; height: 100%; object-fit: contain; padding: 6px;
}

.card-title { font-size: 20px; margin-bottom: 6px; }
.card-description { font-size: 14px; color: var(--j-text2); }

/* ── Connection Cards ───────────────────────────────────────── */
.connection-card {
  background: #fff; border: 1px solid var(--j-border);
  border-radius: var(--j-radius); padding: 2rem; margin-bottom: 1rem;
  animation: fadeInUp 0.4s var(--j-ease) both;
}

.connection-card:nth-child(2) { animation-delay: 0.1s; }
.connection-card:nth-child(3) { animation-delay: 0.2s; }

.connection-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 1.5rem; }

.connection-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--j-primary-light); color: var(--j-primary); font-size: 16px;
}

.connection-card-title { font-size: 20px; }

.connection-row { display: flex; align-items: center; gap: 1rem; }
.connection-side { flex: 1; }

.connection-side-label {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--j-text2); margin-bottom: 10px;
}

.connection-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 980px;
  border: 2px solid var(--j-border); background: #fff;
  font-size: 15px; font-weight: 500; color: var(--j-text);
  cursor: pointer; transition: 0.25s;
}

.pill:hover { border-color: #c0c0c4; background: var(--j-bg2); }
.pill.selected { border-color: var(--j-primary); background: var(--j-primary-light); color: var(--j-primary-dark); }

.direction-pill-lg {
  padding: 20px 36px !important;
  border-radius: 18px !important;
  font-size: 17px !important;
  flex: 1; justify-content: center;
  min-height: 100px;
}

.direction-pill-lg img, .direction-pill-lg span {
  width: 64px !important; height: 64px !important;
  border-radius: 14px !important;
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; }

.connection-arrow {
  flex-shrink: 0; width: 48px;
  display: flex; align-items: center; justify-content: center;
  padding-top: 24px; color: var(--j-text2);
}

.connection-card.complete { border-color: var(--j-ok); background: #e8f5ed; }

.connection-card.complete .connection-card-header::after {
  content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  margin-left: auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--j-ok); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}

/* ── Guide ──────────────────────────────────────────────────── */
.guide { padding: 60px 0 120px; flex: 1; }
.guide-title { font-size: 42px; }

.tab-bar {
  display: flex; gap: 4px;
  border-bottom: 3px solid var(--j-border);
  margin-bottom: 2.5rem; overflow-x: auto;
}

.tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px; border: none; background: none;
  font-family: var(--j-body); font-size: 15px; font-weight: 500;
  color: var(--j-text2); cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px; transition: 0.25s; white-space: nowrap;
}

.tab-btn:hover { color: var(--j-text); }
.tab-btn.active { color: var(--j-primary); border-bottom-color: var(--j-primary); font-weight: 600; }

.tab-panel { display: none; animation: fadeInUp 0.4s var(--j-ease); }
.tab-panel.active { display: block; }

/* ── Connection Visualization ───────────────────────────────── */
.connection-visual {
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1.5rem; margin-bottom: 2.5rem;
  background: linear-gradient(135deg, var(--j-primary-light), #fff3d9);
  border-radius: var(--j-radius); overflow: hidden;
}

.cv-system { display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 2; }

.cv-logo {
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.cv-logo img, .cv-logo span {
  width: 72px !important; height: 72px !important; object-fit: contain;
  border-radius: 14px !important;
}

.cv-role { font-size: 11px; color: var(--j-text2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.cv-flow {
  flex: 1; max-width: 120px; height: 4px;
  background: rgba(0,0,0,0.06); border-radius: 2px;
  margin: 0 20px; position: relative; margin-bottom: 28px;
}

.cv-flow-line {
  position: absolute; inset: 0; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--j-primary) 0 8px, transparent 8px 14px);
  background-size: 200% 100%;
  animation: dashFlow 1.5s linear infinite;
}

.cv-data-icon {
  position: absolute; top: 50%; transform: translate(-50%,-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--j-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(249,176,61,0.4);
  animation: floatData 3s var(--j-ease) infinite; z-index: 3; font-size: 14px;
}

/* ── Inner Stepper ──────────────────────────────────────────── */
.inner-progress { display: flex; align-items: center; justify-content: center; margin-bottom: 2.5rem; }

.inner-progress-step {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 980px;
  font-size: 13px; font-weight: 500; color: var(--j-text2);
  cursor: pointer; white-space: nowrap; transition: 0.25s;
}

.inner-progress-step:hover { background: var(--j-bg2); }
.inner-progress-step.active { background: var(--j-primary); color: #fff; }
.inner-progress-step.done { color: var(--j-ok); }
.inner-progress-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.inner-progress-line { width: 24px; height: 2px; background: var(--j-border); margin: 0 4px; }
.inner-progress-line.done { background: var(--j-ok); }

.inner-step { display: none; animation: fadeInRight 0.4s var(--j-ease); }
.inner-step.active { display: block; }

.inner-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--j-border);
}

.inner-nav-back { background: none; border: none; color: var(--j-primary); font-size: 17px; padding: 12px 0; cursor: pointer; font-weight: 500; }
.inner-nav-back:hover { color: var(--j-primary-hover); }
.inner-nav-back:disabled { opacity: 0.3; cursor: not-allowed; }

.inner-nav-next {
  border: none; border-radius: 980px; padding: 14px 28px;
  background: var(--j-primary); color: #fff;
  font-size: 17px; font-weight: 500; cursor: pointer;
  box-shadow: 0 4px 14px rgba(249,176,61,0.3); transition: 0.25s var(--j-ease);
}

.inner-nav-next:hover { background: var(--j-primary-hover); transform: scale(1.02); }

.btn-guide-next-top {
  background: none; border: 2px solid var(--j-primary); color: var(--j-primary);
  border-radius: 980px; padding: 8px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: 0.2s; white-space: nowrap;
}

.btn-guide-next-top:hover { background: var(--j-primary); color: #fff; }

/* ── Guide Content ──────────────────────────────────────────── */
.guide-section {
  padding: 2.5rem; background: #fff;
  border: 1px solid var(--j-border); border-radius: var(--j-radius);
}

.guide-section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--j-border);
}

.section-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--j-heading); font-size: 16px;
}

.section-overline { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--j-text2); margin-bottom: 2px; }
.section-title { font-size: 26px; }

.text-block { margin-bottom: 1.75rem; }
.text-block:last-child { margin-bottom: 0; }
.text-block-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--j-text2); margin-bottom: 8px; }

.funktionsweise-list { list-style: none; padding: 0; }
.funktionsweise-list li { position: relative; padding-left: 20px; margin-bottom: 6px; }
.funktionsweise-list li::before { content: ''; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--j-primary); }

.anleitung-step { position: relative; padding-left: 52px; padding-bottom: 2rem; }
.anleitung-step:last-child { padding-bottom: 0; }
.anleitung-step::before { content: ''; position: absolute; left: 16px; top: 36px; bottom: 0; width: 2px; background: var(--j-border); }
.anleitung-step:last-child::before { display: none; }

.anleitung-step-number {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--j-primary-light); color: var(--j-primary);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
}

.anleitung-step-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; padding-top: 5px; }
.anleitung-step-content p { margin-bottom: 8px; }

.substeps { list-style: none; padding: 0; margin-top: 10px; }
.substeps li { position: relative; padding-left: 16px; margin-bottom: 8px; }
.substeps li::before { content: ''; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--j-text2); }

.warning-box { margin-top: 12px; padding: 14px 18px; background: var(--j-warn-bg); border-left: 3px solid var(--j-warn); border-radius: 0 12px 12px 0; font-size: 15px; color: #6B4D00; }
.hinweis-box { padding: 20px 24px; background: #FFF8EC; border-left: 3px solid var(--j-primary); border-radius: 0 12px 12px 0; font-size: 15px; color: #6B4D00; }

/* ── Video Button ───────────────────────────────────────────── */
.btn-video {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 980px;
  background: var(--j-primary-light); color: var(--j-primary-dark);
  border: 2px solid var(--j-primary); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: 0.25s; text-decoration: none;
}

.btn-video:hover { background: var(--j-primary); color: #fff; }

.btn-video i { font-size: 16px; }

/* Styled button-link (inserted via admin toolbar) */
.btn-link-styled {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: 10px;
  background: var(--j-secondary); color: #fff;
  font-weight: 600; font-size: 14px;
  text-decoration: none; transition: 0.2s;
  border: none; cursor: pointer;
}

.btn-link-styled:hover {
  background: var(--j-secondary-light); color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42,75,155,0.3);
}

/* Video Modal */
.video-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}

.video-modal-backdrop.active { opacity: 1; pointer-events: all; }

.video-modal {
  width: 90%; max-width: 900px; aspect-ratio: 16/9;
  border-radius: 16px; overflow: hidden; position: relative;
  background: #000;
}

.video-modal video { width: 100%; height: 100%; object-fit: contain; }

.video-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff; border: none;
  font-size: 18px; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
}

.video-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; color: #fff; font-size: 15px;
}

.video-spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--j-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Options Checkboxes (Wizard) ────────────────────────────── */
.options-section {
  margin-top: 1.5rem; padding: 1.5rem;
  background: var(--j-bg2); border-radius: 16px;
}

.options-section h4 { font-size: 16px; margin-bottom: 1rem; }

.option-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--j-border);
}

.option-item:last-child { border-bottom: none; }
.option-item label { font-size: 15px; cursor: pointer; }
.option-item .form-check-input { margin-top: 3px; }
.option-desc { font-size: 13px; color: var(--j-text2); margin-top: 2px; }

/* ── Completion ─────────────────────────────────────────────── */
.completion { text-align: center; padding: 60px 20px; }

.completion-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: #e8f5ed; color: var(--j-ok);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; animation: scaleIn 0.5s var(--j-ease);
}

.completion-title { font-size: 32px; margin-bottom: 8px; }
.completion-text { color: var(--j-text2); }

/* ── Knowledge Base ─────────────────────────────────────────── */
.knowledge-base { padding: 40px 0 120px; flex: 1; }

.kb-sidebar {
  position: sticky; top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 1rem;
}

.kb-title { font-size: 28px; margin-bottom: 1rem; }

.kb-search-wrap { margin-bottom: 1.5rem; }
.kb-search-wrap .form-control { border-radius: 0 12px 12px 0; }
.kb-search-wrap .input-group-text { border-radius: 12px 0 0 12px; border-right: 0; }
.kb-search-wrap .form-control:focus { border-color: var(--j-primary); box-shadow: 0 0 0 3px rgba(249,176,61,0.15); }

/* ── KB Sidebar ──────────────────────────────────────────── */
.kb-nav-system { margin-bottom: 2px; }

.kb-nav-system-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px;
  cursor: pointer; transition: 0.2s;
  font-weight: 600; font-size: 14px;
  border: 1px solid transparent;
}

.kb-nav-system-header img {
  width: 22px; height: 22px; object-fit: contain; border-radius: 5px; flex-shrink: 0;
}

.kb-nav-system-header:hover { background: #f0f0f5; border-color: #e0e0e5; }
.kb-nav-system-header.active {
  background: var(--j-primary-light); border-color: var(--j-primary);
  color: var(--j-text);
}

.kb-nav-items {
  list-style: none; padding: 0; margin: 4px 0 10px 0;
  padding-left: 10px;
  border-left: 2px solid var(--j-primary-light);
  margin-left: 16px;
}

.kb-nav-items li { margin-bottom: 1px; }

.kb-nav-items a {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 8px; font-size: 12px;
  color: var(--j-text2); text-decoration: none;
  transition: 0.15s; gap: 4px;
}

.kb-nav-items a:hover { background: #f0f0f5; color: var(--j-text); }
.kb-nav-items a.active {
  background: var(--j-primary);
  color: #fff; font-weight: 600;
}

.kb-nav-items a.active .kb-nav-badge { background: rgba(255,255,255,0.25); color: #fff; }

/* Role badges */
.kb-nav-badge {
  display: inline-block; padding: 2px 6px;
  border-radius: 4px; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
  flex-shrink: 0; line-height: 1.4;
  white-space: nowrap;
}
.kb-nav-badge-quelle { background: #dbeafe; color: #1e40af; }
.kb-nav-badge-ziel { background: #fef3c7; color: #92400e; }
.kb-nav-badge-api { background: #ede9fe; color: #6d28d9; }

.kb-results { display: flex; flex-direction: column; gap: 1.5rem; min-height: 300px; }

.kb-empty-state { text-align: center; padding: 4rem 2rem; color: var(--j-text2); }

.kb-group { background: #fff; border: 1px solid var(--j-border); border-radius: var(--j-radius); overflow: hidden; }
.kb-group-header { display: flex; align-items: center; gap: 12px; padding: 1.25rem 1.5rem; background: var(--j-bg2); border-bottom: 1px solid var(--j-border); }
.kb-group-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--j-heading); font-size: 14px; }
.kb-group-title { font-size: 18px; }
.kb-group-meta { font-size: 13px; color: var(--j-text2); }
.kb-group-content { padding: 1.5rem; }

.kb-loading, .kb-no-results { text-align: center; padding: 3rem; color: var(--j-text2); }

/* Article header with large logo right */
.kb-article-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--j-border);
}

.kb-article-logo img, .kb-article-logo span {
  width: 64px !important; height: 64px !important;
  object-fit: contain; border-radius: 14px !important;
}

/* Search result cards */
.kb-search-results { display: flex; flex-direction: column; gap: 8px; }

.kb-search-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--j-border);
  border-radius: 14px;
  text-decoration: none; color: inherit;
  transition: 0.2s;
}

.kb-search-card:hover {
  border-color: var(--j-primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateX(4px);
}

.kb-search-card-logo img, .kb-search-card-logo span {
  width: 40px !important; height: 40px !important;
  object-fit: contain; border-radius: 10px !important;
  flex-shrink: 0;
}

.kb-search-card-info { flex: 1; min-width: 0; }

.kb-search-card-title {
  font-weight: 600; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.kb-search-card-meta {
  font-size: 13px; color: var(--j-text2);
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
}

/* ── KB Landing Cards ──────────────────────────────────────── */
.kb-landing-card {
  background: #fff;
  border: 1px solid var(--j-border);
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
  transition: 0.25s var(--j-ease);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.kb-landing-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  border-color: #ddd;
}

.kb-landing-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 22px;
  background: linear-gradient(135deg, var(--j-bg2) 0%, #fff 100%);
  border-bottom: 1px solid var(--j-border);
  font-size: 17px;
}

.kb-landing-card-header img {
  width: 40px !important; height: 40px !important;
  object-fit: contain; border-radius: 10px;
  flex-shrink: 0;
}

.kb-landing-card-header span {
  flex-shrink: 0;
}

.kb-landing-card-links {
  padding: 10px 12px;
}

.kb-landing-link {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px;
  text-decoration: none; color: var(--j-text);
  font-size: 14px; font-weight: 500;
  transition: 0.15s;
  border: 1px solid transparent;
}

.kb-landing-link:hover {
  background: var(--j-primary-light);
  border-color: rgba(249,176,61,0.2);
  color: var(--j-text);
}

.kb-landing-link .kb-nav-badge { margin-left: auto; }

.kb-landing-group { margin-bottom: 2px; }

.kb-landing-group-header {
  display: flex; align-items: center;
  padding: 10px 14px; border-radius: 10px;
  cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--j-text); transition: 0.15s;
}

.kb-landing-group-header:hover { background: var(--j-bg2); }

.kb-landing-group-header[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

.kb-landing-sublinks {
  padding: 4px 0 4px 30px;
  display: flex; flex-wrap: wrap; gap: 6px;
}

.kb-landing-sublink {
  padding: 5px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  border: 1px solid var(--j-border) !important;
  background: #fff;
}

.kb-landing-sublink:hover {
  background: var(--j-primary-light) !important;
  border-color: var(--j-primary) !important;
}

/* ── Bootstrap Color Overrides ──────────────────────────────── */
.bg-primary, .badge.bg-primary { background-color: var(--j-secondary) !important; }
.bg-info, .badge.bg-info { background-color: var(--j-secondary-light) !important; color: #fff !important; }
.bg-success, .badge.bg-success { background-color: var(--j-ok) !important; }
.bg-danger, .badge.bg-danger { background-color: var(--j-danger) !important; }
.bg-warning, .badge.bg-warning { background-color: var(--j-primary) !important; }
.text-primary { color: var(--j-secondary) !important; }
.text-danger { color: var(--j-danger) !important; }
.text-success { color: var(--j-ok) !important; }
.btn-primary { background-color: var(--j-secondary); border-color: var(--j-secondary); }
.btn-outline-primary { color: var(--j-secondary); border-color: var(--j-secondary); }
.btn-outline-primary:hover { background-color: var(--j-secondary); color: #fff; }
.alert-warning { background-color: var(--j-warn-bg); border-color: #fde3a7; color: #6b4d00; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { padding: 1.5rem 0; border-top: 1px solid var(--j-border); margin-top: auto; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-logo { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; }
.footer-powered { font-size: 13px; color: var(--j-text2); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 14px; color: var(--j-text2); text-decoration: none; }
.footer-links a:hover { color: var(--j-primary); }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes dashFlow { to { background-position: -28px 0; } }
@keyframes floatData {
  0% { left: 5%; opacity: 0; transform: translate(-50%,-50%) scale(0.7); }
  10% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  85% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { left: 95%; opacity: 0; transform: translate(-50%,-50%) scale(0.7); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-title { font-size: 44px; }
  .step-title, .guide-title, .kb-title { font-size: 34px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-inner { gap: 0.75rem; }
  .header-nav { margin-left: 0.5rem; }
  .header-nav .nav-link { padding: 6px 10px; font-size: 14px; }
  .hero { padding: 30px 0 40px; }
  .hero-title { font-size: 36px; }
  .step-title, .guide-title, .kb-title { font-size: 28px; }
  .card-grid { grid-template-columns: 1fr; gap: 12px; }
  .guide-section { padding: 1.5rem; }
  .progress-line { width: 32px; margin: 0 8px; }
  .step-label { display: none; }
  .connection-row { flex-direction: column; gap: 12px; }
  .connection-arrow { transform: rotate(90deg); padding-top: 0; }
  .connection-visual { flex-direction: column; gap: 1rem; padding: 2rem 1.5rem; }
  .cv-flow { width: 4px; height: 60px; max-width: none; margin: 0; }
  .cv-flow-line { background: repeating-linear-gradient(180deg, var(--j-primary) 0 8px, transparent 8px 14px); background-size: 100% 200%; animation: dashFlowV 1.5s linear infinite; }
  .cv-data-icon { animation: floatDataV 3s var(--j-ease) infinite; }
  .inner-progress { flex-wrap: wrap; gap: 4px; }
  .inner-progress-line { display: none; }
  .tab-btn { padding: 12px 14px; font-size: 14px; }
  .kb-filters { flex-direction: column; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}

@keyframes dashFlowV { to { background-position: 0 -28px; } }
@keyframes floatDataV {
  0% { top: 5%; left: 50%; opacity: 0; transform: translate(-50%,-50%) scale(0.7); }
  10% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  85% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { top: 95%; left: 50%; opacity: 0; transform: translate(-50%,-50%) scale(0.7); }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .site-header, .hero, .wizard, .site-footer, .btn-back, .tab-bar, .inner-nav, .inner-progress, .connection-visual, .lang-switcher, .header-nav, .kb-search-wrap, .kb-filters { display: none !important; }
  .guide, .knowledge-base { padding: 0 !important; }
  .tab-panel, .inner-step { display: block !important; }
  .guide-section, .kb-group { break-inside: avoid; border: 1px solid #ddd; }
}
