/* =============================================================
   FloraCircuit — Blog
   Baut auf den Design-Tokens aus styles.css auf (dunkel, große
   Typografie, Karten mit --radius-card).
   ============================================================= */

/* ---- Hero ---- */
.blog-hero {
  padding: calc(var(--nav-h) + 96px) 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(560px 300px at 30% 10%, var(--accent-glow), transparent 70%),
    radial-gradient(520px 300px at 72% 0%, var(--cool-glow), transparent 70%);
  pointer-events: none;
}
.blog-hero .site-container { position: relative; }
.blog-hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 14px 0 18px;
}
.grad-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.blog-hero-sub {
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Tag-Filterleiste ---- */
.blog-tagbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 44px;
}
.blog-tag-pill {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  color: var(--fg-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.blog-tag-pill:hover { color: var(--fg); border-color: var(--accent-hairline); }
.blog-tag-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent-hairline);
  color: var(--accent-bright);
}

/* ---- Karten-Raster ---- */
.blog-list-section { padding: 0 0 110px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-hairline);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-glow);
}
.blog-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-alt);
}
.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(320px 180px at 50% 20%, var(--accent-glow), transparent 70%),
    var(--bg-alt);
}
.blog-card-media-empty img { width: 46px; height: auto; opacity: 0.55; }
.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 24px;
  flex: 1;
}
.blog-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.blog-tag-chip {
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}
a.blog-tag-chip:hover { background: rgba(72, 199, 116, 0.22); }
.blog-card-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
  color: var(--fg);
}
.blog-card-excerpt {
  color: var(--fg-secondary);
  font-size: 15px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-meta,
.post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--fg-tertiary);
  font-size: 13px;
}
.blog-card-meta { margin-top: auto; padding-top: 6px; }
.meta-dot { opacity: 0.6; }

/* ---- Empty-State ---- */
.blog-empty {
  text-align: center;
  padding: 60px 24px 30px;
  color: var(--fg-secondary);
}
.blog-empty img { margin: 0 auto 22px; opacity: 0.7; }
.blog-empty h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 8px;
}
.blog-empty p { max-width: 420px; margin: 0 auto; }

/* ---- Artikel ---- */
.post-narrow { max-width: 768px; }
.blog-post { padding: calc(var(--nav-h) + 72px) 0 110px; }
.post-preview-banner {
  background: var(--warm-soft);
  border: 1px solid rgba(251, 146, 60, 0.35);
  color: var(--warm);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 26px;
}
.post-breadcrumb { margin-bottom: 22px; }
.post-breadcrumb a {
  color: var(--fg-tertiary);
  font-size: 14px;
  transition: color 0.2s var(--ease);
}
.post-breadcrumb a:hover { color: var(--accent-bright); }
.post-header .blog-card-tags { margin-bottom: 16px; }
.post-title {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 18px;
}
.post-lede {
  color: var(--fg-secondary);
  font-size: 20px;
  line-height: 1.45;
  margin: 0 0 26px;
}
.post-byline { font-size: 14px; margin-bottom: 8px; }
.post-author-name { color: var(--fg-secondary); font-weight: 500; }
.post-author-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-hairline);
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 600;
}
img.post-author-photo { object-fit: cover; flex-shrink: 0; }
.card-author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--hairline);
}
.post-cover {
  margin: 42px 0 0;
}
.post-cover img {
  width: 100%;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-device);
}

/* Markdown-Inhalt */
.post-body {
  padding-top: 46px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--fg-secondary);
}
.post-body h2, .post-body h3, .post-body h4 {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 1.9em 0 0.6em;
}
.post-body h2 { font-size: 30px; }
.post-body h3 { font-size: 23px; }
.post-body h4 { font-size: 19px; }
.post-body p { margin: 0 0 1.15em; }
.post-body strong { color: var(--fg); }
.post-body a {
  color: var(--accent-bright);
  border-bottom: 1px solid var(--accent-hairline);
  transition: border-color 0.2s var(--ease);
}
.post-body a:hover { border-bottom-color: var(--accent-bright); }
.post-body img {
  border-radius: var(--radius-img);
  margin: 1.6em 0;
  box-shadow: var(--shadow-card);
}
.post-body ul, .post-body ol { padding-left: 1.4em; margin: 0 0 1.15em; }
.post-body li { margin-bottom: 0.4em; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-glow);
  border-radius: 0 14px 14px 0;
  margin: 1.6em 0;
  padding: 14px 20px;
  color: var(--fg);
}
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body code {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.88em;
  color: var(--fg);
}
.post-body pre {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 1.6em 0;
}
.post-body pre code { background: none; border: 0; padding: 0; }
.post-body hr {
  border: 0;
  height: 1px;
  background: var(--hairline);
  margin: 2.4em 0;
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 15.5px;
}
.post-body th, .post-body td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
}
.post-body th { color: var(--fg); font-weight: 600; }

/* Erweiterte Markdown-Elemente (Task-Listen, Fußnoten, mark, dl, Embeds) */
.post-body li.task-list-item { list-style: none; margin-left: -1.4em; }
.post-body .task-list-item-checkbox {
  appearance: none;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--fg-tertiary);
  border-radius: 5px;
  margin-right: 9px;
  vertical-align: -3px;
  position: relative;
}
.post-body .task-list-item-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.post-body .task-list-item-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.post-body mark {
  background: var(--accent-soft);
  color: var(--accent-bright);
  border-radius: 4px;
  padding: 1px 5px;
}
.post-body abbr[title] {
  text-decoration: underline dotted var(--fg-tertiary);
  cursor: help;
}
.post-body dl { margin: 0 0 1.15em; }
.post-body dt { color: var(--fg); font-weight: 600; margin-top: 0.8em; }
.post-body dd { margin: 0.2em 0 0 1.2em; }
.post-body .footnote-ref a {
  border-bottom: 0;
  font-weight: 600;
  padding: 0 2px;
}
.post-body .footnotes {
  margin-top: 3em;
  padding-top: 1.4em;
  border-top: 1px solid var(--hairline);
  font-size: 14.5px;
  color: var(--fg-tertiary);
}
.post-body .footnotes ol { padding-left: 1.2em; }
.post-body .footnotes a.footnote { border-bottom: 0; margin-left: 4px; }
.post-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-img);
  margin: 1.6em 0;
  box-shadow: var(--shadow-card);
}
.post-body h2[id], .post-body h3[id], .post-body h4[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
.post-body .spoiler {
  filter: blur(5px);
  transition: filter 0.25s var(--ease);
  cursor: pointer;
}
.post-body .spoiler:hover, .post-body .spoiler:focus-within { filter: none; }
.post-body sup, .post-body sub { font-size: 0.72em; }

/* Autoren-Box */
.post-author-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 26px 28px;
  margin-top: 56px;
  box-shadow: var(--shadow-card);
}
.post-author-avatar-lg { width: 48px; height: 48px; font-size: 20px; flex-shrink: 0; }
.post-author-box-name { font-weight: 600; color: var(--fg); margin-bottom: 4px; }
.post-author-box-bio { color: var(--fg-secondary); font-size: 15px; margin: 0; }

/* CTA-Box zum Produkt */
.post-cta {
  text-align: center;
  background:
    radial-gradient(420px 220px at 50% 0%, var(--accent-glow), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--accent-hairline);
  border-radius: var(--radius-card);
  padding: 44px 30px;
  margin-top: 26px;
}
.post-cta h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 10px 0 10px;
}
.post-cta p {
  color: var(--fg-secondary);
  max-width: 480px;
  margin: 0 auto 26px;
}
.post-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.post-cta-secondary {
  color: var(--accent-bright);
  font-weight: 500;
  transition: opacity 0.2s var(--ease);
}
.post-cta-secondary:hover { opacity: 0.8; }

/* ---- Weiterlesen (ähnliche Beiträge) ---- */
.related-section { margin-top: 90px; }
.related-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}
.related-grid .blog-card-title { font-size: 18px; }

/* ---- 404 ---- */
.error-hero {
  padding: calc(var(--nav-h) + 90px) 0 120px;
  text-align: center;
  position: relative;
}
.error-logo { margin: 0 auto 10px; opacity: 0.85; }
.error-code {
  font-size: clamp(90px, 18vw, 160px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
}
.error-title {
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 6px 0 14px;
}
.error-sub { max-width: 440px; margin: 0 auto 30px; }

@media (max-width: 600px) {
  .blog-hero { padding-top: calc(var(--nav-h) + 64px); }
  .blog-post { padding-top: calc(var(--nav-h) + 48px); }
  .post-body { font-size: 17px; }
  .post-author-box { flex-direction: column; }
}
