/* ================================================================
   KUNDEN MASCHINE — Blog CSS
   Styles für Ressourcen-Hub + Blog-Artikel-Layout
   ================================================================ */

/* ─── BLOG CARD (Übersicht) ─── */
.blog-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.blog-thumb {
  height: 200px;
  background: linear-gradient(135deg, #1a2a1e, #0d1f15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-thumb img {
  transform: scale(1.04);
}

.blog-thumb-placeholder {
  font-size: 11px;
  font-family: var(--font-mono);
  color: rgba(49, 207, 150, 0.35);
  text-align: center;
  padding: 20px;
  line-height: 1.6;
}

.blog-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.blog-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-tag {
  display: inline-block;
  background: rgba(49, 207, 150, 0.1);
  color: var(--green);
  border: 1px solid rgba(49, 207, 150, 0.25);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.blog-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-dark);
  margin-bottom: var(--space-2);
  transition: color 0.2s;
}

.blog-card:hover .blog-title {
  color: var(--green);
}

.blog-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-4);
  flex: 1;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
}

.blog-meta-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* ─── BLOG ARTICLE LAYOUT ─── */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-16);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Article main content */
.article-main {
  min-width: 0;
}

.article-header {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-light);
}

.article-header .blog-tag {
  margin-bottom: var(--space-4);
}

.article-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: var(--space-4);
}

.article-intro {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.article-byline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--text-subtle);
}

.article-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.article-byline-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.article-byline-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-subtle);
}

/* Table of Contents */
.toc {
  background: var(--green-tint-bg);
  border: 1px solid var(--green-tint-bdr);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.toc-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green-dark);
  margin-bottom: var(--space-4);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toc-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.toc-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  min-width: 20px;
  margin-top: 2px;
}

.toc-list a {
  font-size: 14px;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.2s;
}

.toc-list a:hover {
  color: var(--green);
}

/* Article body typography */
.article-body h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-dark);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  line-height: 1.3;
  scroll-margin-top: 100px;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  line-height: 1.4;
  scroll-margin-top: 100px;
}

.article-body p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: var(--space-4);
}

.article-body strong {
  font-weight: 700;
  color: var(--text-dark);
}

.article-body ul,
.article-body ol {
  margin: var(--space-4) 0;
  padding-left: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
}

.article-body blockquote {
  border-left: 3px solid var(--green);
  padding: var(--space-4) var(--space-6);
  background: var(--green-tint-bg);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: var(--space-8) 0;
  font-size: 17px;
  font-style: italic;
  color: var(--text-dark);
  line-height: 1.7;
}

.article-body .info-box {
  margin: var(--space-8) 0;
}

/* In-article CTA box */
.article-cta-box {
  background: var(--bg-deep);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin: var(--space-10) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.article-cta-box > * { position: relative; z-index: 1; }

.article-cta-box h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-2);
}

.article-cta-box p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  margin-bottom: var(--space-6);
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: 96px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.sidebar-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-light);
}

/* Related articles */
.related-article {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-light);
}

.related-article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.related-article a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  transition: color 0.2s;
}

.related-article a:hover {
  color: var(--green);
}

/* Article footer CTA */
.article-footer-cta {
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 2px solid var(--border-light);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-subtle);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--green);
}

.breadcrumb-sep {
  color: var(--text-subtle);
  opacity: 0.5;
}

.breadcrumb span {
  color: var(--text-muted);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .article-wrap {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .article-title {
    font-size: 26px;
  }

  .article-body h2 {
    font-size: 22px;
  }

  .article-body p,
  .article-body li {
    font-size: 15px;
  }
}
