/* SIMON PROtec Consulting - Design System
   Farbwelt: Weiss/Hellgrau (Flaechen), Anthrazit/Schwarz (Text/Navigation),
   Rot als Akzentfarbe. Modernes B2B-/Engineering-Erscheinungsbild. */

:root {
  --color-bg: #ffffff;
  --color-bg-subtle: #f5f5f6;
  --color-bg-muted: #eceded;
  --color-ink: #1a1c1f;
  --color-ink-soft: #4b4f54;
  --color-border: #dcdedf;
  --color-accent: #b30f0f;
  --color-accent-dark: #8a0c0c;
  --color-accent-soft: #fbe9e9;
  --color-success: #1c7a3e;
  --color-success-soft: #e6f4ea;
  --color-warning: #9a6b00;
  --color-warning-soft: #fdf3d9;
  --color-danger: #b30f0f;
  --color-danger-soft: #fbe9e9;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 22, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 20, 22, 0.08);
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 3.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--color-ink-soft); }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.reveal-init { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal-init { opacity: 1; transform: none; transition: none; }
}
.section-subtle { background: var(--color-bg-subtle); }
.section-dark { background: var(--color-ink); color: #fff; }
.section-dark p { color: #c7c9cc; }
.section-header { max-width: 680px; margin: 0 0 40px; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  background: url("/images/logo-mark.png") center / contain no-repeat;
  flex-shrink: 0;
}
.section-dark .eyebrow, .cta-banner .eyebrow { color: #ff6b6b; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--color-accent); color: #fff; box-shadow: 0 1px 2px rgba(179,15,15,0.15); }
.btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(179,15,15,0.28); }
.btn-secondary { background: var(--color-ink); color: #fff; }
.btn-secondary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-ink); }
.btn-outline:hover { border-color: var(--color-ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--color-ink); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Public header */
.site-header { position: sticky; top: 0; background: rgba(255,255,255,0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--color-border); z-index: 40; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--color-ink); display: inline-flex; align-items: center; }
.brand span { color: var(--color-accent); }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-footer { color: #fff; }
.brand-sidebar { display: block; padding: 22px 22px 12px; font-size: 1rem; }
.main-nav { display: flex; gap: 32px; }
.nav-link { position: relative; color: var(--color-ink-soft); font-weight: 500; font-size: 0.95rem; padding-bottom: 4px; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--color-accent); transition: right 0.2s ease;
}
.nav-link:hover { color: var(--color-ink); text-decoration: none; }
.nav-link:hover::after { right: 0; }
.nav-link-active { color: var(--color-ink); font-weight: 700; }
.nav-link-active::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--color-ink); display: block; }
.mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 12px 24px 20px; border-top: 1px solid var(--color-border); }
.mobile-nav .nav-link { padding: 10px 0; }
.mobile-nav.open { display: flex; }

/* Hero */
.hero { padding: 96px 0 80px; background: linear-gradient(180deg, #fff 0%, var(--color-bg-subtle) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero-sub { font-size: 1.15rem; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-visual {
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, #1a1c1f 0%, #26292e 55%, #1a1c1f 100%);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
}
.hero-visual::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 40px);
}
.hero-visual::after {
  content: "";
  position: absolute; right: -30%; bottom: -30%; width: 70%; height: 70%;
  background: radial-gradient(circle, rgba(179,15,15,0.55), transparent 70%);
}
.hero-visual-mark {
  position: absolute;
  top: 50%; left: 50%;
  width: 62%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: url("/images/logo-mark.png") center / contain no-repeat;
  opacity: 0.14;
  animation: hero-mark-spin 50s linear infinite;
}
@keyframes hero-mark-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual-mark { animation: none; }
}

/* Stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--color-border); padding-top: 40px; margin-top: 56px; }
.stat-item { position: relative; padding-left: 16px; border-left: 2px solid var(--color-border); transition: border-color 0.2s ease; }
.stat-item:hover { border-left-color: var(--color-accent); }
.stat-item .stat-value { font-size: 2rem; font-weight: 800; color: var(--color-ink); }
.stat-item .stat-label { color: var(--color-ink-soft); font-size: 0.9rem; }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card-link { display: block; height: 100%; color: inherit; }
.card-link:hover { text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: transparent; }
.card-link:hover .card-icon { transform: rotate(-6deg) scale(1.06); border-color: var(--color-accent); }
.card-icon {
  width: 46px; height: 46px; border-radius: 999px;
  background: var(--color-accent-soft); color: var(--color-accent);
  border: 1.5px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; margin-bottom: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

/* Feature list */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 12px; color: var(--color-ink-soft); }
.check-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--color-accent); font-weight: 800; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, #1a1c1f 0%, #26292e 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 56px;
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute; top: 50%; right: -60px; width: 260px; aspect-ratio: 1/1;
  transform: translateY(-50%);
  background: url("/images/logo-mark.png") center / contain no-repeat;
  opacity: 0.08;
}
.cta-banner > * { position: relative; }
.cta-banner h2 { color: #fff; margin-bottom: 8px; }
.cta-banner p { color: #c7c9cc; margin: 0; }

/* Footer */
.site-footer { background: var(--color-ink); color: #c7c9cc; padding: 56px 0 24px; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-text { color: #9a9da1; font-size: 0.9rem; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #c7c9cc; font-size: 0.92rem; }
.footer-links a:hover { color: #fff; }
.footer-copyright { padding-top: 20px; font-size: 0.82rem; color: #8a8d91; }

/* Forms */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.form-field .hint { font-size: 0.8rem; color: var(--color-ink-soft); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="date"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit; background: #fff; color: var(--color-ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--color-ink); outline-offset: 1px; }
textarea { resize: vertical; min-height: 120px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-field input { width: auto; margin-top: 4px; }
fieldset { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px; margin: 0 0 20px; }
legend { font-weight: 700; padding: 0 8px; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.92rem; border: 1px solid transparent; }
.alert-error { background: var(--color-danger-soft); color: var(--color-danger); border-color: rgba(179,15,15,0.25); }
.alert-success { background: var(--color-success-soft); color: var(--color-success); border-color: rgba(28,122,62,0.25); }
.alert-info { background: var(--color-bg-muted); color: var(--color-ink-soft); }

/* Auth pages */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--color-bg-subtle); padding: 24px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); }
.auth-card .brand { display: block; text-align: center; margin-bottom: 28px; }
.auth-card .brand-logo { height: 42px; margin: 0 auto; }
.auth-links { text-align: center; margin-top: 18px; font-size: 0.9rem; }

/* App shell (Portal + Admin) */
.app-body { background: var(--color-bg-subtle); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--color-ink); color: #d7d9db; display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0; height: 100vh; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; padding: 8px 14px; gap: 2px; overflow-y: auto; }
.sidebar-link { color: #c7c9cc; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 500; }
.sidebar-link:hover { background: rgba(255,255,255,0.06); text-decoration: none; color: #fff; }
.sidebar-link-active { background: var(--color-accent); color: #fff; }
.sidebar-divider { text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em; color: #7d8085; margin: 16px 14px 6px; }
.sidebar-logout { padding: 14px; border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-logout-btn { width: 100%; text-align: left; background: none; border: none; cursor: pointer; font-family: inherit; }
.app-main { flex: 1; min-width: 0; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; background: #fff; border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 10; }
.app-topbar-user { font-weight: 600; font-size: 0.9rem; }
.app-nav-toggle { display: none; }
.app-content { padding: 32px; max-width: 1200px; }

/* Dashboard widgets */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-bottom: 36px; }
.kpi-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px; }
.kpi-value { font-size: 1.7rem; font-weight: 800; }
.kpi-label { color: var(--color-ink-soft); font-size: 0.85rem; margin-top: 4px; }

.course-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; margin-bottom: 18px; }
.course-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.course-card h3 { margin-bottom: 4px; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--color-bg-muted); overflow: hidden; margin: 10px 0; }
.progress-bar-fill { height: 100%; background: var(--color-accent); border-radius: 999px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--color-ink-soft); }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.badge-neutral { background: var(--color-bg-muted); color: var(--color-ink-soft); }

/* Tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--color-border); }
th { color: var(--color-ink-soft); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; background: var(--color-bg-subtle); }
tr:last-child td { border-bottom: none; }

/* Module / Lesson player */
.lesson-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.lesson-nav { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 8px; position: sticky; top: 90px; }
.lesson-nav a { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--color-ink); }
.lesson-nav a:hover { background: var(--color-bg-subtle); text-decoration: none; }
.lesson-nav a.active { background: var(--color-accent-soft); color: var(--color-accent); font-weight: 700; }
.lesson-nav .lesson-status { font-size: 0.75rem; }
.lesson-content { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 32px; }
.lesson-content video { width: 100%; border-radius: var(--radius-sm); background: #000; }
.infobox { background: var(--color-accent-soft); border-left: 4px solid var(--color-accent); padding: 16px 20px; border-radius: var(--radius-sm); margin: 20px 0; }
.download-box { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin: 16px 0; }

/* Quiz */
.quiz-question { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--color-border); }
.quiz-question:last-child { border-bottom: none; }
.quiz-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; }
.quiz-option:hover { border-color: var(--color-ink); }
.quiz-option input { margin-top: 3px; }
.quiz-option.correct { border-color: var(--color-success); background: var(--color-success-soft); }
.quiz-option.incorrect { border-color: var(--color-danger); background: var(--color-danger-soft); }
.quiz-explanation { font-size: 0.88rem; color: var(--color-ink-soft); margin-top: 8px; }

.exam-result { text-align: center; padding: 48px 24px; }
.exam-result .score { font-size: 3.5rem; font-weight: 800; }
.exam-timer { position: sticky; top: 90px; float: right; background: var(--color-ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; }

/* Placeholder-Bild für Kurs-/Leistungsbilder ohne Upload */
.media-placeholder {
  background: linear-gradient(135deg, #1a1c1f 0%, #33363b 100%);
  border-radius: var(--radius-md);
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}
.media-placeholder::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 14px);
}

.legal-content h2 { margin-top: 2em; }
.legal-content { max-width: 760px; }
.placeholder-note { background: var(--color-warning-soft); color: var(--color-warning); padding: 14px 18px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 32px; }

.empty-state { text-align: center; padding: 64px 24px; color: var(--color-ink-soft); }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-nav { position: static; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .sidebar { position: fixed; left: -260px; z-index: 50; transition: left 0.2s ease; box-shadow: var(--shadow-md); }
  .sidebar.open { left: 0; }
  .app-nav-toggle { display: flex; }
  .app-content { padding: 20px; }
  .cta-banner { padding: 32px; }
}
