/* Gemeinsames Seiten-CSS, ausgelagert aus dem <style>-Block der Seiten.
   Unveraendert uebernommen; Reihenfolge im <head> wie zuvor. */
:root {
  --primary: #f67813;
  --primary-dark: #df6608;
  --secondary: #234f7e;
  --background: #080d16;
  --card: #111827;
  --card-2: #151e2d;
  --popover: #111827;
  --foreground: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --border: rgba(148, 163, 184, 0.18);
  --header-bg: #111827;
  --footer-bg: #111827;
  --shadow-heavy:
    0 8px 20px rgba(0, 0, 0, 0.18), 0 24px 60px rgba(0, 0, 0, 0.28);
  --shadow-glow: 0 0 80px rgba(246, 120, 19, 0.18);
}

html[data-theme="light"] {
  --background: #f6f8fb;
  --card: #ffffff;
  --card-2: #eef3f8;
  --popover: #ffffff;
  --foreground: #102033;
  --muted: #5f6f84;
  --muted-strong: #334155;
  --border: rgba(15, 23, 42, 0.12);
  --header-bg: #ffffff;
  --footer-bg: #111827;
  --shadow-heavy:
    0 10px 25px rgba(15, 23, 42, 0.08), 0 28px 70px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 70px rgba(246, 120, 19, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-main);
}

#global-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  width: 100%;
}

#global-footer {
  position: relative;
  z-index: 10;
  width: 100%;
}

#global-header a,
#global-footer a {
  text-decoration: none;
}

.blog-page {
  --blog-primary: #f67813;
  --blog-primary-dark: #df6608;
  --blog-secondary: #234f7e;
  --blog-surface: #111827;
  --blog-surface-soft: #151e2d;
  --blog-text: #f8fafc;
  --blog-muted: #94a3b8;
  --blog-muted-strong: #cbd5e1;
  --blog-border: rgba(148, 163, 184, 0.18);
  --blog-shadow:
    0 8px 20px rgba(0, 0, 0, 0.18), 0 24px 60px rgba(0, 0, 0, 0.28);
  --blog-radius-lg: 28px;
  --blog-radius-md: 18px;
  --blog-max-width: 1120px;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  padding: 112px 0 4rem;
  font-family: var(--font-main);
  color: var(--blog-text);
  background:
    radial-gradient(
      circle at 10% 8%,
      rgba(246, 120, 19, 0.28),
      transparent 29rem
    ),
    radial-gradient(
      circle at 80% 18%,
      rgba(35, 79, 126, 0.34),
      transparent 34rem
    ),
    radial-gradient(
      circle at 50% 78%,
      rgba(246, 120, 19, 0.14),
      transparent 38rem
    ),
    linear-gradient(135deg, #080d16 0%, #101827 44%, #1a1110 100%);
  line-height: 1.65;
}

html[data-theme="light"] .blog-page {
  --blog-surface: #ffffff;
  --blog-surface-soft: #eef3f8;
  --blog-text: #102033;
  --blog-muted: #5f6f84;
  --blog-muted-strong: #334155;
  --blog-border: rgba(15, 23, 42, 0.12);
  --blog-shadow:
    0 10px 25px rgba(15, 23, 42, 0.08), 0 28px 70px rgba(15, 23, 42, 0.12);
  background:
    radial-gradient(
      circle at 12% 8%,
      rgba(246, 120, 19, 0.13),
      transparent 30rem
    ),
    radial-gradient(
      circle at 80% 18%,
      rgba(35, 79, 126, 0.11),
      transparent 34rem
    ),
    linear-gradient(180deg, #f9fbfe 0%, #eef3f8 48%, #f8fafc 100%);
}

.blog-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(246, 120, 19, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 120, 19, 0.16) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}

html[data-theme="light"] .blog-page::before {
  display: none;
}

.blog-page a {
  color: var(--blog-primary);
  text-decoration: none;
}

.blog-page a:hover {
  text-decoration: underline;
}

.blog-page strong,
.blog-page h1,
.blog-page h2,
.blog-page h3 {
  font-family: var(--font-main);
  font-weight: 700;
}

.blog-shell {
  width: min(100% - 32px, var(--blog-max-width));
  margin: 0 auto;
}

.hero {
  padding: clamp(32px, 6vw, 72px);
  border-radius: var(--blog-radius-lg);
  background:
    linear-gradient(
      135deg,
      rgba(246, 120, 19, 0.16),
      rgba(35, 79, 126, 0.12)
    ),
    var(--blog-surface);
  border: 1px solid var(--blog-border);
  box-shadow: var(--blog-shadow);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  right: -8rem;
  top: -8rem;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  background: rgba(246, 120, 19, 0.11);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(246, 120, 19, 0.16);
  border: 1px solid rgba(246, 120, 19, 0.34);
  color: var(--blog-primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--blog-primary);
  box-shadow: 0 0 12px rgba(246, 120, 19, 0.75);
}

.hero h1 {
  margin: 0 0 22px;
  max-width: 950px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  background: linear-gradient(
    135deg,
    #ffffff,
    var(--blog-primary),
    #ffb45a
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 22px 46px rgba(246, 120, 19, 0.12));
}

html[data-theme="light"] .hero h1 {
  background: linear-gradient(
    135deg,
    #102033,
    var(--blog-primary),
    var(--blog-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  max-width: 800px;
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--blog-muted);
}

.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
  color: var(--blog-muted-strong);
  font-size: 15px;
}

.article-meta span {
  padding: 8px 11px;
  border: 1px solid var(--blog-border);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.42);
}

html[data-theme="light"] .article-meta span {
  background: #ffffff;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: start;
  padding: 42px 0 72px;
}

.article-card,
.toc-card,
.cta-card,
.check-card,
.why-buekom-card {
  background: rgba(17, 24, 39, 0.88);
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius-md);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] .article-card,
html[data-theme="light"] .toc-card,
html[data-theme="light"] .cta-card,
html[data-theme="light"] .check-card,
html[data-theme="light"] .why-buekom-card {
  background: var(--blog-surface);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.07);
}

.article-card {
  min-width: 0;
  padding: clamp(28px, 5vw, 56px);
}

.article-card h2 {
  margin-top: 46px;
  margin-bottom: 14px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--blog-text);
}

.article-card h2:first-child {
  margin-top: 0;
}

.article-card h3 {
  margin-top: 32px;
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.3;
  color: var(--blog-muted-strong);
}

.article-card p {
  margin: 0 0 20px;
  color: var(--blog-text);
}

.article-card ul {
  margin: 18px 0 26px;
  padding-left: 22px;
}

.article-card li {
  margin-bottom: 10px;
  color: var(--blog-text);
}

.article-card li::marker {
  color: var(--blog-primary);
}

.highlight-box {
  margin: 32px 0;
  padding: 24px;
  border-radius: var(--blog-radius-md);
  background:
    linear-gradient(
      135deg,
      rgba(246, 120, 19, 0.12),
      rgba(35, 79, 126, 0.12)
    ),
    var(--blog-surface-soft);
  border-left: 5px solid var(--blog-primary);
}

.highlight-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--blog-primary);
}

.blog-aside {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 18px;
}

.toc-card,
.cta-card,
.check-card {
  padding: 22px;
  overflow: hidden;
  position: relative;
}

.toc-card::before,
.cta-card::before,
.check-card::before,
.why-buekom-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--blog-primary),
    var(--blog-secondary)
  );
}

.toc-card h2,
.cta-card h2,
.check-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  color: var(--blog-text);
}

.toc-card nav {
  display: grid;
  gap: 10px;
}

.toc-card a {
  color: var(--blog-muted);
  font-size: 15px;
  transition:
    color 0.22s ease,
    transform 0.22s ease;
}

.toc-card a:hover {
  color: var(--blog-primary);
  transform: translateX(4px);
  text-decoration: none;
}

.cta-card {
  background:
    linear-gradient(
      145deg,
      rgba(246, 120, 19, 0.16),
      rgba(35, 79, 126, 0.1)
    ),
    rgba(17, 24, 39, 0.88);
}

html[data-theme="light"] .cta-card {
  background:
    linear-gradient(
      145deg,
      rgba(246, 120, 19, 0.12),
      rgba(35, 79, 126, 0.08)
    ),
    #ffffff;
}

.cta-card p,
.check-card p {
  margin: 0 0 18px;
  color: var(--blog-muted);
  font-size: 15px;
}

.primary-link {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 13px 16px;
  border-radius: 999px;
  background: var(--blog-primary);
  color: #ffffff !important;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 18px 40px rgba(246, 120, 19, 0.24);
  transition:
    background 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.primary-link:hover {
  text-decoration: none;
  background: var(--blog-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(246, 120, 19, 0.34);
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--blog-muted);
  font-size: 15px;
}

.check-list li::before {
  content: "✓";
  margin-right: 8px;
  color: var(--blog-primary);
  font-weight: 800;
}

.why-buekom {
  padding: 0 0 72px;
}

.why-buekom-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  background:
    linear-gradient(
      135deg,
      rgba(246, 120, 19, 0.18),
      rgba(35, 79, 126, 0.16)
    ),
    rgba(17, 24, 39, 0.9);
}

html[data-theme="light"] .why-buekom-card {
  background:
    linear-gradient(
      135deg,
      rgba(246, 120, 19, 0.12),
      rgba(35, 79, 126, 0.08)
    ),
    #ffffff;
}

.why-buekom-card::after {
  content: "";
  position: absolute;
  right: -8rem;
  top: -9rem;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  background: rgba(246, 120, 19, 0.12);
}

.why-buekom-inner {
  position: relative;
  z-index: 1;
}

.why-buekom h2 {
  max-width: 880px;
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  color: var(--blog-text);
}

.why-buekom p {
  max-width: 840px;
  margin: 0 0 24px;
  color: var(--blog-muted);
  font-size: 18px;
  line-height: 1.75;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.why-item {
  padding: 20px;
  border: 1px solid var(--blog-border);
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.5);
}

html[data-theme="light"] .why-item {
  background: #ffffff;
}

.why-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blog-primary);
  font-size: 17px;
}

.why-item span {
  display: block;
  color: var(--blog-muted);
  font-size: 15px;
  line-height: 1.6;
}

.site-footer {
  width: 100%;
  padding: 4rem 0 2rem;
  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(246, 120, 19, 0.16),
      transparent 32%
    ),
    linear-gradient(135deg, #111827 0%, #0b1220 55%, #15100d 100%);
  color: #ffffff;
  border-top: 1px solid rgba(246, 120, 19, 0.18);
  font-family: var(--font-main);
}

.footer-inner {
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1.25fr;
  gap: 3rem;
  align-items: start;
}

.footer-logo {
  height: 2.3rem;
  width: auto;
  max-width: 14rem;
  margin-bottom: 1.25rem;
  display: block;
}

.footer-description {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 22rem;
  margin: 0;
}

.footer-column h4 {
  color: var(--primary);
  margin: 0 0 1.1rem;
  font-size: 1rem;
  font-weight: 700;
}

.footer-links {
  display: grid;
  gap: 0.7rem;
}

.footer-links a,
.site-footer a {
  color: #cbd5e1;
  font-size: 0.92rem;
  text-decoration: none;
  transition:
    color 0.22s ease,
    transform 0.22s ease;
}

.footer-links a:hover,
.site-footer a:hover {
  color: var(--primary);
  transform: translateX(5px);
  text-decoration: none;
}

.footer-contact-card {
  padding: 1.2rem;
  border-radius: 0.9rem;
  background: linear-gradient(
    135deg,
    rgba(246, 120, 19, 0.12),
    rgba(246, 120, 19, 0.04)
  );
  border: 1px solid rgba(246, 120, 19, 0.22);
}

.footer-contact-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.6;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(246, 120, 19, 0.16);
}

.footer-contact-row:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.footer-icon {
  color: var(--primary);
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.footer-legal {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-legal a,
.footer-cookie-button {
  color: #cbd5e1;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.22s ease;
}

.footer-cookie-button {
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.footer-legal a:hover,
.footer-cookie-button:hover {
  color: var(--primary);
}

.footer-copy {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .blog-aside {
    position: static;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .blog-page {
    padding-top: 96px;
  }

  .footer-inner {
    padding: 0 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-legal {
    justify-content: flex-start;
  }

  .footer-copy {
    text-align: left;
  }
}

/* =========================================================
   LESEKOMFORT & NAVIGATION (30.10.2026)
   ========================================================= */

/* Lesefortschritt (Element setzt script.js) */
.blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100000;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Fliesstext etwas groesser und luftiger */
.article-card p,
.article-card li {
  font-size: 17px;
  line-height: 1.75;
}

/* Abschnittsueberschriften mit kurzer Akzentlinie; Sprungziele
   nicht unter der festen Kopfzeile */
.article-card h2 {
  scroll-margin-top: 120px;
}

.article-card h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blog-primary), var(--blog-secondary));
}

/* Inhaltsverzeichnis: aktueller Abschnitt markiert */
.toc-card nav {
  gap: 2px;
}

.toc-card a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--blog-border);
}

.toc-card a.is-active {
  border-left-color: var(--blog-primary);
  color: var(--blog-primary);
  font-weight: 700;
}

/* "Das koennte Sie auch interessieren" unter dem Artikel.
   Der Abschnitt steht ausserhalb von .blog-page und hatte daher
   keinen Rahmen (randlos, unterstrichene Links). */
.blog-page ~ .section {
  padding: 0 0 clamp(48px, 7vw, 88px);
}

.blog-page ~ .section .content-wrap {
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
}

.blog-page ~ .section h2 {
  margin-top: 0;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.03em;
  color: var(--foreground);
}

.blog-page ~ .section .related-card {
  position: relative;
  display: block;
  padding: 22px 56px 22px 22px;
  border-radius: 18px;
  color: var(--foreground);
  text-decoration: none;
}

.blog-page ~ .section .related-card::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  background-color: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.25s ease;
}

.blog-page ~ .section .related-card:hover {
  border-color: rgba(246, 120, 19, 0.5);
}

.blog-page ~ .section .related-card:hover::after {
  transform: translateX(4px);
}

.blog-page ~ .section .related-card strong {
  font-size: 18px;
}

.blog-page ~ .section .related-card:hover strong {
  color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
  .blog-progress {
    display: none;
  }
}

/* Inhaltsverzeichnis wandert beim Lesen mit. overflow: hidden am
   Seitencontainer hat position: sticky bisher ausgehebelt; clip schneidet
   genauso ab, ohne einen Scroll-Container zu bilden (aeltere Browser
   bleiben bei hidden, dort einfach ohne Mitwandern). */
.blog-page {
  overflow: hidden;
  overflow: clip;
}

@media (min-width: 901px) {
  .blog-aside {
    position: static;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .toc-card {
    position: sticky;
    top: 104px;
    order: 3;
  }
}
