/* ═══════════════════════════════════════════════════════════════════
   MAGAZIN — Editorial-Blog-Layout für Bestattungsverfügung
   Aufbau inspiriert vom Beispielblog, adaptiert auf die CI:
   Aubergine-Akzent, Instrument Serif + Geist.
   Scope: .wm-blog (isoliert von base.css)
   ═══════════════════════════════════════════════════════════════════ */

.wm-blog {
  --wm-bg: var(--warm, #f0ebe4);
  --wm-surface: var(--paper, #f8f4ef);
  --wm-ink: var(--ink, #1e1610);
  --wm-ink-soft: var(--ink-2, #3a2a1e);
  --wm-muted: var(--muted, #7a6a58);
  --wm-line: rgba(30, 22, 16, 0.10);
  --wm-accent: var(--accent, #704861);
  --wm-accent-soft: color-mix(in srgb, var(--accent, #704861) 10%, #fff);
  --wm-accent-hover: var(--accent-deep, #3d2235);
  --wm-radius: 14px;
  --wm-radius-lg: 24px;
  --wm-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --wm-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --wm-mono: "Geist Mono", monospace;

  color: var(--wm-ink);
  font-family: var(--wm-sans);
  line-height: 1.7;
  background: var(--wm-bg);
}

.wm-blog * { box-sizing: border-box; }

html:has(.wm-blog) { scroll-behavior: smooth; }

/* Anchor offset under the floating glass nav */
.wm-blog h2[id],
.wm-blog h3[id] { scroll-margin-top: 120px; }

/* === HERO === */
.wm-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  min-height: 88vh;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 60px 24px 84px;
}

.wm-hero__inner {
  position: relative;
  max-width: 880px;
  text-align: center;
  color: #fff;
}

.wm-hero__eyebrow {
  display: inline-block;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--wm-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  margin-bottom: 26px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.wm-hero__title {
  font-family: var(--wm-serif);
  font-size: clamp(36px, 5.4vw, 66px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
  color: #fff;
  text-wrap: balance;
}
.wm-hero__title em { font-style: italic; }

.wm-hero__subtitle {
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.90);
  max-width: 680px;
  margin: 0 auto 34px;
}

.wm-hero__meta {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  flex-wrap: wrap; margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.82); font-size: 13px; font-family: var(--wm-mono);
  letter-spacing: 0.04em;
}
.wm-hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.wm-hero__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.5); }

.wm-hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  transition: color 0.2s ease;
}
.wm-hero__scroll:hover { color: #fff; }
.wm-hero__scroll svg { width: 18px; height: 18px; animation: wm-bounce 2s infinite; }
@keyframes wm-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* === ARTICLE LAYOUT === */
.wm-article {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px 100px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: start;
}

/* === SIDEBAR / TOC === */
.wm-toc { position: sticky; top: 120px; max-height: calc(100vh - 140px); overflow-y: auto; padding-right: 8px; }
.wm-toc__label {
  font-family: var(--wm-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--wm-accent); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--wm-line);
}
.wm-toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.wm-toc__list a {
  display: block; padding: 9px 14px 9px 16px; color: var(--wm-ink-soft); text-decoration: none;
  font-size: 14px; line-height: 1.45; border-left: 2px solid transparent; border-radius: 0 8px 8px 0;
  transition: all 0.2s ease;
}
.wm-toc__list a:hover { color: var(--wm-accent); background: var(--wm-accent-soft); border-left-color: var(--wm-accent); }
.wm-toc__list a.is-active { color: var(--wm-accent); background: var(--wm-accent-soft); border-left-color: var(--wm-accent); font-weight: 600; }
.wm-toc__list .is-sub a { padding-left: 28px; font-size: 13px; color: var(--wm-muted); }
.wm-toc::-webkit-scrollbar { width: 4px; }
.wm-toc::-webkit-scrollbar-thumb { background: var(--wm-line); border-radius: 4px; }

/* === CONTENT === */
.wm-content { max-width: 720px; font-size: 17px; color: var(--wm-ink-soft); }
.wm-content > p:first-of-type::first-letter {
  font-family: var(--wm-serif); float: left; font-size: 76px; line-height: 0.82; font-weight: 400;
  color: var(--wm-accent); padding: 10px 12px 0 0; margin-top: 4px;
}
.wm-content p { margin: 0 0 22px; }
.wm-content strong { color: var(--wm-ink); font-weight: 600; }
.wm-content a { color: var(--wm-accent); text-decoration: underline; text-underline-offset: 2px; }
.wm-content a:hover { color: var(--wm-accent-hover); }

.wm-content h2 {
  font-family: var(--wm-serif); font-size: clamp(28px, 3.2vw, 40px); font-weight: 400;
  line-height: 1.18; letter-spacing: -0.01em; color: var(--wm-ink);
  margin: 64px 0 24px; padding-top: 32px; border-top: 1px solid var(--wm-line); position: relative;
}
.wm-content h2 em { font-style: italic; color: var(--wm-accent); }
.wm-content h2::before { content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 2px; background: var(--wm-accent); }

.wm-content h3 {
  font-family: var(--wm-sans); font-size: 20px; font-weight: 600; line-height: 1.35;
  color: var(--wm-ink); margin: 36px 0 14px;
}

.wm-content ul, .wm-content ol { margin: 0 0 24px; padding-left: 0; list-style: none; }
.wm-content ul li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.wm-content ul li::before { content: ""; position: absolute; left: 6px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--wm-accent); }
.wm-content ol { counter-reset: wm-ol; }
.wm-content ol li { position: relative; padding-left: 30px; margin-bottom: 10px; counter-increment: wm-ol; }
.wm-content ol li::before { content: counter(wm-ol); position: absolute; left: 0; top: 0; font-family: var(--wm-mono); font-size: 13px; color: var(--wm-accent); font-weight: 600; }

/* Lead paragraph */
.wm-content .wm-lead {
  font-family: var(--wm-serif); font-size: 23px; line-height: 1.5; color: var(--wm-ink);
  font-style: italic; margin-bottom: 36px; padding-left: 20px; border-left: 3px solid var(--wm-accent);
}
.wm-content .wm-lead::first-letter { all: unset; }
.wm-content > .wm-lead + p::first-letter,
.wm-content > .wm-lead ~ p:first-of-type::first-letter { all: unset; }

/* === PRICE CARDS === */
.wm-pricecards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 14px 0 28px; }
.wm-pricecard {
  background: var(--wm-surface); border: 1px solid var(--wm-line); border-radius: var(--wm-radius);
  padding: 22px 20px; box-shadow: 0 18px 40px -30px rgba(46,30,40,.28); display: flex; flex-direction: column;
}
.wm-pricecard.is-featured { border-color: color-mix(in srgb, var(--wm-accent) 40%, transparent); box-shadow: 0 22px 50px -28px color-mix(in srgb, var(--wm-accent) 45%, transparent); }
.wm-pricecard__tag { font-family: var(--wm-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--wm-accent); margin-bottom: 8px; }
.wm-pricecard__name { font-family: var(--wm-serif); font-size: 22px; line-height: 1.15; color: var(--wm-ink); margin-bottom: 4px; }
.wm-pricecard__price { font-family: var(--wm-serif); font-size: 30px; color: var(--wm-accent); margin: 8px 0 12px; letter-spacing: -.01em; }
.wm-pricecard__price small { font-size: 13px; color: var(--wm-muted); font-family: var(--wm-sans); }
.wm-pricecard p { font-size: 13.5px; line-height: 1.55; color: var(--wm-ink-soft); margin: 0 0 14px; }
.wm-pricecard ul { margin: auto 0 0; }
.wm-pricecard ul li { font-size: 13px; padding-left: 22px; margin-bottom: 7px; }
.wm-pricecard ul li::before { top: 9px; }

/* === TABLE === */
.wm-tablewrap { overflow-x: auto; margin: 8px 0 28px; border: 1px solid var(--wm-line); border-radius: var(--wm-radius); }
.wm-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 540px; background: var(--wm-surface); }
.wm-table th, .wm-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--wm-line); }
.wm-table thead th { font-family: var(--wm-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--wm-accent); background: var(--wm-accent-soft); }
.wm-table td:first-child, .wm-table th:first-child { font-weight: 500; color: var(--wm-ink); }
.wm-table tbody tr:last-child td { border-bottom: none; }
.wm-table .yes { color: var(--wm-accent); font-weight: 600; }
.wm-table .no { color: var(--wm-muted); }

/* === CALLOUT / CTA BOX === */
.wm-callout {
  background: var(--wm-ink); color: var(--wm-surface); border-radius: var(--wm-radius-lg);
  padding: 34px 32px; margin: 40px 0; position: relative; overflow: hidden;
}
.wm-callout h3 { font-family: var(--wm-serif); font-size: 26px; color: #fff; margin: 0 0 10px; font-weight: 400; }
.wm-callout p { color: #cbbcc4; font-size: 15px; line-height: 1.6; margin: 0 0 20px; }
.wm-callout .wm-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 22px; border-radius: 999px;
  background: var(--wm-surface); color: var(--wm-ink); font-family: var(--wm-sans); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: background .2s, gap .2s, transform .2s;
}
.wm-callout .wm-btn:hover { background: #fff; gap: 13px; transform: translateY(-1px); }
.wm-callout .wm-btn.is-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.32); margin-left: 8px; }
.wm-callout .wm-btn.is-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* Inline info note */
.wm-note {
  display: flex; gap: 12px; padding: 16px 18px; margin: 0 0 24px; border-radius: var(--wm-radius);
  background: var(--wm-accent-soft); border: 1px solid color-mix(in srgb, var(--wm-accent) 18%, transparent);
}
.wm-note svg { flex-shrink: 0; color: var(--wm-accent); margin-top: 2px; }
.wm-note p { margin: 0; font-size: 14.5px; color: var(--wm-ink-soft); }

/* Two-column lists (häfen) */
.wm-cols2 { columns: 2; column-gap: 32px; }
@media (max-width: 520px) { .wm-cols2 { columns: 1; } }

/* === MOBILE TOC === */
.wm-toc-mobile { display: none; margin: 0 0 40px; background: var(--wm-surface); border: 1px solid var(--wm-line); border-radius: var(--wm-radius); overflow: hidden; }
.wm-toc-mobile__btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 16px 20px;
  background: none; border: none; cursor: pointer; font-family: var(--wm-mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--wm-accent); text-align: left;
}
.wm-toc-mobile__btn svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.wm-toc-mobile.is-open .wm-toc-mobile__btn svg { transform: rotate(180deg); }
.wm-toc-mobile__panel { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.wm-toc-mobile.is-open .wm-toc-mobile__panel { max-height: 900px; }
.wm-toc-mobile__list { list-style: none; margin: 0; padding: 4px 8px 16px; }
.wm-toc-mobile__list a { display: block; padding: 10px 14px; color: var(--wm-ink-soft); text-decoration: none; font-size: 14px; border-radius: 8px; transition: background 0.15s ease; }
.wm-toc-mobile__list a:hover { background: var(--wm-accent-soft); color: var(--wm-accent); }
.wm-toc-mobile__list .is-sub a { padding-left: 28px; font-size: 13px; color: var(--wm-muted); }

/* === RESPONSIVE === */
@media (max-width: 960px) {
  .wm-article { grid-template-columns: 1fr; gap: 0; padding: 56px 24px 80px; }
  .wm-toc { display: none; }
  .wm-toc-mobile { display: block; }
  .wm-content { max-width: 100%; font-size: 16px; }
  .wm-content > p:first-of-type::first-letter { font-size: 60px; }
  .wm-pricecards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wm-hero { min-height: 84vh; padding: 40px 20px 56px; }
  .wm-hero__eyebrow { font-size: 11px; padding: 6px 14px; margin-bottom: 20px; }
  .wm-content .wm-lead { font-size: 19px; padding-left: 16px; }
  .wm-content h2 { margin: 48px 0 20px; padding-top: 28px; }
  .wm-content h3 { font-size: 18px; }
  .wm-callout { padding: 26px 22px; }
  .wm-callout .wm-btn.is-ghost { margin-left: 0; margin-top: 10px; }
}

/* ═══ MAGAZIN INDEX (Listing) ═══ */
.mag-hero { padding: 150px 0 56px; text-align: center; }
.mag-hero .eye {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(247,245,243,.55);
  font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: .18em; color: var(--accent);
  text-transform: uppercase; margin-bottom: 22px;
}
.mag-hero h1 { font-family: "Instrument Serif", serif; font-size: clamp(42px, 6vw, 76px); line-height: 1.04; letter-spacing: -.025em; }
.mag-hero h1 em { font-style: italic; color: var(--accent); }
.mag-hero p { margin: 18px auto 0; max-width: 56ch; font-size: 17px; line-height: 1.65; color: var(--ink-2); }

.mag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 28px; padding: 24px 0 100px; }
.mag-card {
  display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: 0 18px 44px -34px rgba(46,30,40,.34); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.mag-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(46,30,40,.42); }
.mag-card__media { aspect-ratio: 16/10; overflow: hidden; }
.mag-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.mag-card:hover .mag-card__media img { transform: scale(1.05); }
.mag-card__body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.mag-card__cat { font-family: "Geist Mono", monospace; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.mag-card__title { font-family: "Instrument Serif", serif; font-size: 26px; line-height: 1.12; letter-spacing: -.01em; margin-bottom: 10px; }
.mag-card__excerpt { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin-bottom: 18px; flex: 1; }
.mag-card__foot { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-family: "Geist Mono", monospace; letter-spacing: .04em; }
.mag-card__more { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 500; font-family: "Geist", sans-serif; }
.mag-card:hover .mag-card__more { gap: 11px; }
