/* ============================================================
   RMH Knowledgebase – Wide (Full-Width / Homepage & Suche)
   ============================================================ */

/* ── Design Tokens ──────────────────── */
:root {
    --accent:      #f9423a;
    --accent-weak: rgba(249,66,58,.12);
    --accent-line: rgba(249,66,58,.35);
    --topbar-bg:   #3b3c3f;
    --hero-bg:     #3b3c3f;
    --text:        #3b3c3f;
    --text-strong: #1f2937;
    --muted:       #475569;
    --faint:       #94a3b8;
    --fainter:     #b0b8c4;
    --border:      #e2e8f0;
    --border-soft: #ebebea;
    --surface:     #ffffff;
    --shadow-card: 0 1px 3px rgba(0,0,0,.05), 0 2px 12px rgba(249,66,58,.06);
}

/* ── Reset ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* font-weight 400 – nicht 300. 300 nur für Hero-Input (explizite Ausnahme unten) */
body {
    font-family: 'Metropolis', system-ui, sans-serif;
    font-weight: 400; font-size: 15px; line-height: 1.65;
    color: var(--text); background: var(--surface);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ── Topbar ─────────────────────────── */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 24px 36px; background: var(--topbar-bg); border-bottom: 1px solid rgba(255,255,255,.08); }
.topbar-logo img { height: 40px; width: auto; display: block; }
.topbar-nav { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.topbar-nav a, .topbar-nav button { color: rgba(255,255,255,.45); background: none; border: none; cursor: pointer; font-size: 13px; padding: 0; font-family: 'Metropolis', sans-serif; }
.topbar-nav a:hover, .topbar-nav button:hover { color: #fff; }

/* ── Hero ───────────────────────────── */
.hero { background: var(--hero-bg); padding: 72px 20px 80px; text-align: center; position: relative; overflow: hidden; }
.hero::after { content: none; }
.hero h1  { font-size: 2.6rem; font-weight: 700; color: #fff; margin-bottom: 6px; letter-spacing: -.03em; position: relative; }
.hero-sub { color: rgba(255,255,255,.45); font-size: 15px; margin-bottom: 28px; position: relative; font-weight: 400; }
.hero-search { max-width: 560px; margin: 0 auto; position: relative; }
/* font-weight 300 hier explizit erlaubt – Hero-Layout-Ausnahme laut Design-System */
.hero-search input { width: 100%; padding: 15px 20px 15px 50px; border-radius: 50px; border: 1px solid rgba(255,255,255,.12); font-size: 15px; background: rgba(255,255,255,.07); color: #fff; outline: none; transition: .15s; font-family: 'Metropolis', sans-serif; font-weight: 300; }
.hero-search input::placeholder { color: rgba(255,255,255,.3); }
.hero-search input:focus { background: rgba(255,255,255,.12); border-color: rgba(249,66,58,.5); }
.hero-search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.3); pointer-events: none; }

/* ── Content ────────────────────────── */
.content { max-width: 900px; margin: 0 auto; padding: 60px 24px 80px; }

/* ── Kategorie-Sektion ──────────────── */
.cat-section { margin-bottom: 56px; }
.cat-header  { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); }
.cat-header-left { display: flex; align-items: center; gap: 10px; }
.cat-dot     { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; display: inline-block; }
.cat-name    { font-size: 1.15rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.cat-see-all {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent-line);
  padding: 5px 12px; border-radius: 7px; flex-shrink: 0;
  text-decoration: none; transition: background .15s;
}
.cat-see-all:hover { background: var(--accent-weak); opacity: 1; }
.article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 40px; }
.article-link { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13.5px; color: var(--muted); font-weight: 400; }
.article-link::before { content: "·"; color: var(--faint); flex-shrink: 0; font-size: 16px; line-height: 1; }
.article-link:hover { color: var(--accent); text-decoration: none; }
.sub-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 16px 0 8px; grid-column: 1 / -1; }

/* ── Highlights ─────────────────────── */
.highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 56px; padding-bottom: 52px; border-bottom: 1px solid var(--border-soft); }
.highlight-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.highlight-label{ font-size: 1.15rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.highlight-row { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f3f3f1; gap: 12px; text-decoration: none; }
.highlight-row:hover .hl-title { color: var(--accent); }
.hl-title { font-size: 14px; font-weight: 500; color: var(--text); transition: color .12s; }
.hl-cat   { font-size: 12px; color: var(--faint); margin-left: 8px; }
/* war #b0b8c4 – jetzt als Variable, minimal heller als faint */
.hl-meta  { font-size: 12px; color: var(--fainter); white-space: nowrap; flex-shrink: 0; }
/* war #e2e8f0 – Rang-Nummer deutlicher */
.hl-rank  { font-size: 12px; font-weight: 700; color: var(--faint); min-width: 18px; }

/* ── Search results ─────────────────── */
.search-card { display: block; padding: 18px 20px; border-radius: 10px; border: 1px solid var(--border); text-decoration: none; transition: border-color .15s, box-shadow .15s; background: var(--surface); margin-bottom: 10px; }
.search-card:hover { border-color: var(--accent); box-shadow: var(--shadow-card); }
.search-title   { font-size: 15px; font-weight: 600; color: var(--text); display: block; margin-bottom: 6px; }
.search-excerpt { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin-bottom: 10px; font-weight: 400; }
.search-meta    { display: flex; gap: 12px; font-size: 12.5px; color: var(--faint); font-weight: 400; align-items: center; }

/* ── Responsive ─────────────────────── */
@media (max-width: 640px) {
    .hero h1      { font-size: 1.8rem; }
    .article-grid { grid-template-columns: 1fr; }
    .highlights   { grid-template-columns: 1fr; }
    .topbar       { padding: 12px 20px; }
}

/* ── Kategorie-Logo (Homepage) ──────── */
/* Ersetzt den Farb-Punkt wenn Logo vorhanden – immer gleich groß */
.cat-logo { height: 80px; width: auto; object-fit: contain; flex-shrink: 0; }

/* ── Highlights-Helfer ──────────────── */
.hl-left  { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1; }
.cat-empty { font-size: 13.5px; color: var(--fainter); padding: 4px 0; }

/* ── Buttons (für Kurs-Seiten im Wide-Layout) ──────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: 7px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border); background: transparent;
  color: var(--text); text-decoration: none; font-family: 'Metropolis', sans-serif;
  transition: .15s; white-space: nowrap;
}
.btn:hover        { background: var(--surface); text-decoration: none; }
.btn-primary      { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.05); color: #fff; }
.btn-ghost        { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover  { background: var(--surface); color: var(--text); }
.btn-sm           { padding: 6px 13px; font-size: 12px; }
.btn-block        { width: 100%; justify-content: center; }

/* ── Abschnitts-Label ──────────────────────────────────────── */
.section-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
  display: block;
}

/* ── Kurse – Kurs-Index ────────────────────────────────────── */
.courses-header   { margin-bottom: 32px; }
.courses-title    { font-size: 1.6rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.courses-sub      { font-size: 15px; color: var(--muted); }
.course-card      { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); text-decoration: none; margin-bottom: 16px; transition: box-shadow .15s, border-color .15s; }
.course-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); border-color: var(--accent-line); }
.course-card-img img { width: 100%; height: 200px; object-fit: cover; display: block; }
.course-card-body { padding: 20px 22px; flex: 1; }
.course-card-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.course-card-desc  { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 12px; }
.course-card-meta  { display: flex; gap: 12px; font-size: 13px; color: var(--faint); align-items: center; }
.course-card-cta   { padding: 14px 22px; border-top: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--accent); }

/* ── Kurse – Kurs-Vorschau (show) ──────────────────────────── */
.course-hero-img img    { width: 100%; height: 280px; object-fit: cover; border-radius: 12px; margin-bottom: 28px; }
.course-hero-title      { font-size: 2.2rem; font-weight: 700; color: var(--text); margin-bottom: 12px; letter-spacing: -.025em; line-height: 1.15; }
.course-hero-desc       { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 22px; max-width: 640px; }
.course-hero-meta       { display: flex; gap: 20px; font-size: 14px; color: var(--muted); margin-bottom: 28px; align-items: center; }
.course-progress-bar-wrap { background: var(--border); border-radius: 99px; height: 6px; overflow: hidden; margin-bottom: 8px; max-width: 300px; }
.course-progress-bar    { background: var(--accent); height: 6px; border-radius: 99px; transition: width .3s ease; }

/* ── Kursinhalt-Liste ──────────────────────────────────────── */
.course-outline-section  { margin-top: 48px; }
.course-outline-list     { display: flex; flex-direction: column; gap: 6px; }
.course-outline-item     { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.course-outline-item:hover { border-color: var(--accent-line); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.course-outline-item.is-read { border-color: var(--accent-line); }
.course-outline-num      { width: 32px; height: 32px; border-radius: 50%; background: var(--border); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.is-read .course-outline-num { background: var(--accent); color: #fff; }
.course-outline-text     { flex: 1; min-width: 0; }
.course-outline-title    { font-size: 14.5px; font-weight: 500; color: var(--text); display: block; }
.course-outline-cat      { font-size: 12px; color: var(--faint); margin-top: 2px; display: block; }

/* notice */
.notice         { border-radius: 7px; padding: 11px 15px; font-size: 13.5px; margin-bottom: 18px; border: 1px solid var(--border); }
.notice-ok      { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.3); }
.notice-danger  { background: rgba(249,66,58,.07); border-color: rgba(249,66,58,.3); }
