/* Ratgeber – overview, topic and article. Mirrors the Lovable prototype. */
.ratgeber{--rg-ink-90:color-mix(in oklch,var(--ink) 90%,transparent);--rg-ink-80:color-mix(in oklch,var(--ink) 80%,transparent);--rg-border:color-mix(in oklch,var(--ink) 15%,transparent);--rg-border-hover:color-mix(in oklch,var(--ink) 30%,transparent)}
.ratgeber h2{max-width:none}

/* Hero */
.ratgeber-hero{padding:64px 0;border-bottom:1px solid var(--line);background:var(--lilac-light)}
.ratgeber-hero h1{max-width:42rem;margin-top:8px;font-size:2.25rem;line-height:1.1}
.ratgeber-hero .ratgeber-back+h1{margin-top:16px}
.ratgeber-hero__lead{max-width:42rem;margin:16px 0 0;color:var(--muted);font-size:1.125rem}
.ratgeber-back{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:.75rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;transition:color .2s}
.ratgeber-back:hover{color:var(--ink)}
.ratgeber-back svg,.ratgeber-article__meta svg,.ratgeber-related svg{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Topic sections and grid */
.ratgeber-topic{padding:64px 0}
.ratgeber-topic__head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px}
.ratgeber-topic__head h2{font-size:1.875rem}
.ratgeber-topic__head p{max-width:36rem;margin:8px 0 0;color:var(--muted)}
.ratgeber-pill-link{padding:12px 24px;border:1px solid color-mix(in oklch,var(--ink) 20%,transparent);border-radius:999px;color:var(--ink);font-size:.75rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;transition:background .2s}
.ratgeber-pill-link:hover{background:var(--lilac-light)}
.ratgeber-grid{display:grid;grid-template-columns:1fr;gap:24px;margin-top:32px}
.ratgeber-grid--flush{margin-top:0}

/* Card */
.ratgeber-card{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--rg-border);border-radius:24px;background:var(--card);transition:border-color .2s}
.ratgeber-card:hover{border-color:var(--rg-border-hover)}
.ratgeber-card__media{aspect-ratio:16/10;overflow:hidden;background:var(--lilac-light)}
.ratgeber-card__media img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.ratgeber-card:hover .ratgeber-card__media img{transform:scale(1.05)}
.ratgeber-card__body{display:flex;flex:1;flex-direction:column;padding:24px}
.ratgeber-card__title{font-size:1.25rem;line-height:1.375}
.ratgeber-card:hover .ratgeber-card__title{text-decoration:underline}
.ratgeber-card__teaser{display:-webkit-box;margin:8px 0 0;overflow:hidden;color:var(--muted);font-size:.875rem;-webkit-line-clamp:3;-webkit-box-orient:vertical}
.ratgeber-card__meta{margin:16px 0 0;color:var(--muted);font-size:.75rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase}
.ratgeber-pagination{margin-top:40px}
.ratgeber-pagination .nav-links{display:flex;flex-wrap:wrap;gap:8px}
.ratgeber-pagination .page-numbers{padding:8px 16px;border:1px solid var(--rg-border);border-radius:999px;font-size:.875rem}
.ratgeber-pagination .page-numbers.current{border-color:var(--ink);background:var(--ink);color:var(--background)}

/* Article */
.ratgeber-article{width:min(100% - 40px,768px);margin-inline:auto;padding:64px 0}
.ratgeber-article h1{margin-top:24px;font-size:2.25rem;line-height:1.25}
.ratgeber-article__teaser{margin:20px 0 0;color:var(--muted);font-size:1.125rem;font-style:italic}
.ratgeber-article__meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px;margin-top:24px;color:var(--muted);font-size:.875rem}
.ratgeber-article__meta span{display:inline-flex;align-items:center;gap:6px}
.ratgeber-article__image{margin:32px 0 0;overflow:hidden;border:1px solid var(--line);border-radius:24px}
.ratgeber-article__image img{width:100%;height:auto;object-fit:cover}
.ratgeber-toc{margin-top:40px;padding:28px;border-radius:24px;background:var(--lilac-light)}
.ratgeber-toc ol{display:grid;gap:8px;margin:12px 0 0;padding:0;list-style:none}
.ratgeber-toc a{display:flex;gap:12px;font-size:.875rem;font-weight:600}
.ratgeber-toc a:hover{text-decoration:underline}
.ratgeber-toc a span{color:var(--muted)}

/* Article body (Gutenberg core blocks) */
.ratgeber-content{margin-top:48px}
.ratgeber-content>:first-child{margin-top:0}
.ratgeber-content h2{margin-top:48px;font-size:1.5rem;scroll-margin-top:96px}
.ratgeber-content h3{margin-top:32px;font-size:1.25rem;scroll-margin-top:96px}
.ratgeber-content p{margin:16px 0 0;color:var(--rg-ink-90);line-height:1.625}
.ratgeber-content p a,.ratgeber-content li a{text-decoration:underline;text-underline-offset:3px}
.ratgeber-content .ratgeber-related a{text-decoration:none}
.ratgeber-content ul{display:grid;gap:12px;margin:20px 0 0;padding:0;list-style:none}
.ratgeber-content ul>li{position:relative;padding-left:20px;color:var(--rg-ink-90);line-height:1.625}
.ratgeber-content ul>li:before{content:"";position:absolute;top:.6em;left:0;width:8px;height:8px;border-radius:50%;background:var(--yellow)}
.ratgeber-content ol{display:grid;gap:12px;margin:20px 0 0;padding:0;list-style:none;counter-reset:rg}
.ratgeber-content ol>li{position:relative;padding-left:40px;color:var(--rg-ink-90);line-height:1.625;counter-increment:rg}
.ratgeber-content ol>li:before{content:counter(rg);position:absolute;top:0;left:0;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--yellow);color:var(--ink);font-family:var(--display);font-size:.9375rem;line-height:1}

/* Listicle: list block style "is-style-listicle" */
.ratgeber-content ol.is-style-listicle,.ratgeber-content ul.is-style-listicle{gap:20px;margin-top:24px;counter-reset:rg}
.ratgeber-content .is-style-listicle>li{display:block;min-height:0;padding:20px 20px 20px 76px;border:1px solid var(--rg-border);border-radius:24px;background:var(--card);color:var(--rg-ink-80);counter-increment:rg}
.ratgeber-content .is-style-listicle>li:before{content:counter(rg);top:20px;left:20px;width:40px;height:40px;border-radius:50%;background:var(--yellow);font-family:var(--display);font-size:1.125rem}
.ratgeber-content .is-style-listicle>li>strong:first-child{display:block;margin-bottom:6px;color:var(--ink);font-family:var(--display);font-size:1.125rem;font-weight:400;line-height:1.375}

/* Quote */
.ratgeber-content .wp-block-quote{margin:32px 0;padding:28px;border:0;border-radius:24px;background:var(--ink);color:var(--background)}
.ratgeber-content .wp-block-quote:before{content:"\201D";display:block;height:32px;color:var(--yellow);font-family:Georgia,serif;font-size:3.5rem;line-height:1}
.ratgeber-content .wp-block-quote p{margin:16px 0 0;color:var(--background);font-family:var(--display);font-size:1.25rem;line-height:1.375}
.ratgeber-content .wp-block-quote p:first-of-type:before{content:"\201E"}
.ratgeber-content .wp-block-quote p:last-of-type:after{content:"\201C"}
.ratgeber-content .wp-block-quote cite{display:block;margin-top:16px;color:color-mix(in oklch,var(--background) 70%,transparent);font-size:.75rem;font-style:normal;font-weight:600;letter-spacing:.1em;text-transform:uppercase}

/* Image */
.ratgeber-content .wp-block-image{margin:32px 0;overflow:hidden;border:1px solid var(--line);border-radius:24px}
.ratgeber-content .wp-block-image img{width:100%;height:auto;object-fit:cover}
.ratgeber-content .wp-block-image figcaption{margin:0;padding:12px 20px;background:var(--lilac-light);color:var(--muted);font-size:.75rem;text-align:left}

/* "Passende Inhalte" */
.ratgeber-related{margin:40px 0;padding:24px;border:1px solid var(--rg-border);border-radius:24px;background:var(--lilac-light)}
.ratgeber-content .ratgeber-related ul{display:block;gap:0;margin:16px 0 0}
.ratgeber-content .ratgeber-related li{padding:0;color:var(--ink)}
.ratgeber-content .ratgeber-related li:before{display:none}
.ratgeber-related li+li{border-top:1px solid var(--line)}
.ratgeber-related a{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0}
.ratgeber-related__title{display:block;font-family:var(--display);font-size:1.125rem;line-height:1.375}
.ratgeber-related a:hover .ratgeber-related__title{text-decoration:underline}
.ratgeber-related__meta{display:block;margin-top:4px;color:var(--muted);font-size:.75rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase}

/* Service CTA */
.ratgeber-cta{margin-top:56px;padding:28px;border-radius:24px;background:var(--ink);color:var(--background)}
.ratgeber-cta h2{font-size:1.5rem}
.ratgeber-cta p{margin:12px 0 0;color:color-mix(in oklch,var(--background) 80%,transparent)}
.ratgeber-cta__button{display:inline-block;margin-top:24px;padding:14px 28px;border:0;border-radius:999px;background:var(--yellow);color:var(--ink);font-size:.75rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;cursor:pointer;transition:transform .2s}
.ratgeber-cta__button:hover{transform:translateY(-2px)}

/* FAQ + more posts */
.ratgeber-faq h2{margin-top:8px;font-size:1.875rem}
.ratgeber-more{padding:64px 0;border-top:1px solid var(--line);background:var(--lilac-light)}
.ratgeber-more h2{font-size:1.875rem}

@media(min-width:640px){
  .ratgeber-hero h1,.ratgeber-article h1{font-size:3rem}
  .ratgeber-topic__head h2,.ratgeber-faq h2{font-size:2.25rem}
  .ratgeber-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ratgeber-content h2,.ratgeber-cta h2{font-size:1.875rem}
  .ratgeber-content .wp-block-quote,.ratgeber-cta{padding:36px}
  .ratgeber-content .wp-block-quote p{font-size:1.5rem}
  .ratgeber-content .is-style-listicle>li{padding:24px 24px 24px 84px}
  .ratgeber-content .is-style-listicle>li:before{top:24px;left:24px}
  .ratgeber-related{padding:32px}
}
@media(min-width:1024px){
  .ratgeber-hero{padding:96px 0}
  .ratgeber-topic{padding:80px 0}
  .ratgeber-article{padding:80px 0}
  .ratgeber-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:640px){
  .ratgeber-article{width:min(100% - 32px,768px)}
}
