/* ===== Variables ===== */
:root {
  --bg:          #080c18;
  --bg-2:        #0d1225;
  --bg-card:     #111827;
  --royal:       #1e3a8a;
  --royal-light: #2563eb;
  --accent:      #3b82f6;
  --accent-glow: rgba(59,130,246,.25);
  --text:        #f1f5f9;
  --text-muted:  #94a3b8;
  --border:      #1e2d5a;
  --border-card: rgba(59,130,246,.15);
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0,0,0,.4);
  --shadow-glow: 0 0 24px var(--accent-glow);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #93c5fd; }

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #2563eb; color: #fff; box-shadow: var(--shadow-glow); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,12,24,.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo:hover { color: var(--text); }
.logo-img { width: 64px; height: 64px; object-fit: contain; }
.logo-dot { color: var(--accent); }
.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: rgba(59,130,246,.1);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
}

/* ===== Hero ===== */
.hero {
  padding: 100px 0 80px;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(30,58,138,.4) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}
.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.hero-content { max-width: 600px; }
.hero-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.3);
  border-radius: 100px;
  font-size: .8rem;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: .04em;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}
.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.hero-content p strong { color: var(--text); }
.hero-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 12px 20px;
  min-width: 140px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.badge-day {
  background: var(--royal);
  color: var(--accent);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .8rem;
  font-weight: 700;
}

/* ===== Page Hero ===== */
.page-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(30,58,138,.3) 0%, transparent 60%);
}
.page-hero h1 { font-size: clamp(1.8rem,4vw,2.5rem); margin-top: 12px; }

/* ===== Blog Section ===== */
.blog-section { padding: 64px 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}
.section-header h2 { font-size: 1.6rem; font-weight: 700; }
.category-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all .2s;
}
.filter-btn:hover, .filter-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(59,130,246,.08);
}

/* ===== Blog Grid ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--shadow-glow);
  border-color: rgba(59,130,246,.35);
}
.card-image-link { display: block; aspect-ratio: 16/9; overflow: hidden; }
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.blog-card:hover .card-image { transform: scale(1.04); }
.card-image-placeholder {
  background: linear-gradient(135deg, var(--royal) 0%, #0d1225 100%);
  aspect-ratio: 16/9;
}
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.card-categories { display: flex; gap: 8px; flex-wrap: wrap; }
.category-tag {
  padding: 3px 10px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.25);
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .02em;
}
.category-tag:hover { background: rgba(59,130,246,.2); color: var(--accent); }
.card-title { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: var(--text-muted); font-size: .9rem; line-height: 1.6; flex: 1; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.card-date { font-size: .8rem; color: var(--text-muted); }

/* ===== Article Page ===== */
.article-hero { max-height: 480px; overflow: hidden; }
.article-hero img { width: 100%; height: 480px; object-fit: cover; }
.article-container { max-width: 760px; padding: 48px 24px 80px; }
.article-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.article-meta time { color: var(--text-muted); font-size: .9rem; }
.article-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.2; margin-bottom: 20px; letter-spacing: -.02em; }
.article-excerpt { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.article-back { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); }

/* ===== Prose ===== */
.prose h2 { font-size: 1.6rem; margin: 40px 0 16px; }
.prose h3 { font-size: 1.25rem; margin: 32px 0 12px; }
.prose p { margin-bottom: 20px; color: var(--text); }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 20px; }
.prose li { margin-bottom: 8px; color: var(--text); }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(59,130,246,.3); }
.prose a:hover { border-color: var(--accent); }
.prose strong { color: var(--text); font-weight: 600; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(59,130,246,.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}
.prose code {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: .85em;
  color: #93c5fd;
}
.prose pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 20px;
}
.prose pre code { background: none; border: none; padding: 0; }
.prose img { border-radius: var(--radius-sm); margin: 24px 0; }
.prose-page { max-width: 760px; padding: 64px 24px; }
.prose-page h1 { font-size: 2rem; margin-bottom: 32px; }

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { color: var(--text-muted); font-size: .9rem; margin-top: 16px; max-width: 280px; line-height: 1.6; }
.footer-links h4 { font-size: .85rem; font-weight: 600; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-muted); font-size: .9rem; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; color: var(--text-muted); font-size: .85rem; }

/* ===== Alerts ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: .9rem;
}
.alert-error { background: rgba(220,38,38,.1); border: 1px solid rgba(220,38,38,.3); color: #fca5a5; }
.alert-success { background: rgba(22,163,74,.1); border: 1px solid rgba(22,163,74,.3); color: #86efac; }

/* ===== Text Muted ===== */
.text-muted { color: var(--text-muted); }

/* ===== Filter Tabs ===== */
.filter-tabs-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;          /* Firefox */
  margin-bottom: 36px;
  /* Fade edges on scroll */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  padding: 4px 16px;
}
.filter-tabs-wrap::-webkit-scrollbar { display: none; }
.filter-tabs {
  display: flex;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  padding: 0 0 2px;
}
.filter-tab {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
  line-height: 1;
}
.filter-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(59,130,246,.06);
}
.filter-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}

/* ===== Category Badges (coloured pills on cards) ===== */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  /* Default: accent blue */
  background: rgba(59,130,246,.13);
  border: 1px solid rgba(59,130,246,.28);
  color: #93c5fd;
}
/* Finanzen → grün */
.category-badge--finanzen {
  background: rgba(22,163,74,.13);
  border-color: rgba(22,163,74,.3);
  color: #86efac;
}
/* E-Commerce → blau (eigene Nuance) */
.category-badge--e-commerce,
.category-badge--ecommerce {
  background: rgba(14,165,233,.13);
  border-color: rgba(14,165,233,.3);
  color: #7dd3fc;
}
/* KI / Künstliche Intelligenz → lila */
.category-badge--ki,
.category-badge--kuenstliche-intelligenz,
.category-badge--kuenstliche-intelligenz-ki,
.category-badge--kuenstliche-intelligenz-ki-1 {
  background: rgba(139,92,246,.13);
  border-color: rgba(139,92,246,.3);
  color: #c4b5fd;
}
/* Marketing → orange */
.category-badge--marketing {
  background: rgba(249,115,22,.13);
  border-color: rgba(249,115,22,.3);
  color: #fdba74;
}
/* Steuern → gelb */
.category-badge--steuern {
  background: rgba(234,179,8,.13);
  border-color: rgba(234,179,8,.3);
  color: #fde047;
}
/* Investing / Investieren → teal */
.category-badge--investing,
.category-badge--investieren {
  background: rgba(20,184,166,.13);
  border-color: rgba(20,184,166,.3);
  color: #5eead4;
}

/* ===== Card filter animation ===== */
.blog-card {
  transition: transform .25s, box-shadow .25s, border-color .25s,
              opacity .25s, visibility .25s;
}
.blog-card.card--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Collapse height smoothly via grid – shrink to 0 with row-gap preserved */
  height: 0;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
}

/* ===== Filter empty state ===== */
.filter-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 16px; border-radius: var(--radius-sm); }
  .site-header { position: relative; }
  .hero .container { flex-direction: column; }
  .hero-badges { flex-direction: row; flex-wrap: wrap; }
  .badge { min-width: 0; }
  .hero { padding: 60px 0 48px; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .blog-grid { grid-template-columns: 1fr; }
  .filter-tabs-wrap { margin-bottom: 28px; padding: 4px 0; }
}
