/* efy care — Website/Blog Design-System
   Abgeleitet aus app/src/theme/palettes.ts (Palette „efycare").
   Nur semantische Tokens verwenden — keine neuen Roh-Hexwerte in Seiten. */

/* Figtree selbst gehostet (DSGVO: kein Google-Fonts-CDN), variabel 400–800.
   Pfad relativ zur CSS-Datei — funktioniert in website/ und dist/. */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/figtree-latin.woff2') format('woff2');
}

:root {
  --primary: #2D7A63;
  --primary-dark: #0F5E57;
  --on-primary: #FFFFFF;
  --secondary: #A9CBB5;
  --secondary-soft: #E4EFE8;
  --accent: #D8C29D;
  --accent-soft: #F3EAD9;

  --background: #F8F6F2;
  --surface: #FFFFFF;
  --surface-alt: #F0EDE6;

  --text: #2D3135;
  --text-muted: #5F6A65;
  --text-inverse: #F8F6F2;

  --border: #E6E1D8;

  --success-soft: #DCEEE4;
  --warning: #C8912F;
  --warning-soft: #F5E4C4;
  --info: #0F5E57;
  --info-soft: #DFEBE9;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(45, 49, 53, 0.07);
  --content-width: 760px;
  --wide-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--primary); }
.site-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--primary-dark); }

/* ---------- Layout ---------- */
main { display: block; }
.container { max-width: var(--content-width); margin: 0 auto; padding: 0 1.25rem; }
.container-wide { max-width: var(--wide-width); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--on-primary);
  padding: 3.5rem 0 3rem;
}
.hero h1 { margin: 0 0 0.75rem; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; letter-spacing: -0.02em; }
.hero p { margin: 0; max-width: 46rem; font-size: 1.1rem; opacity: 0.92; }
.hero .container, .hero .container-wide { padding-top: 0; padding-bottom: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 1rem 0 0;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Artikel ---------- */
.article-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0.75rem 0 0;
}
.article-meta .badge {
  background: var(--secondary-soft);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  font-weight: 600;
}
article.post { padding: 2.5rem 0 3rem; }
article.post h2 { font-size: 1.55rem; margin: 2.5rem 0 0.75rem; letter-spacing: -0.01em; line-height: 1.3; }
article.post h3 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
article.post p { margin: 0.9rem 0; }
article.post ul, article.post ol { padding-left: 1.4rem; }
article.post li { margin: 0.4rem 0; }
article.post a { color: var(--primary-dark); font-weight: 600; }
article.post img { max-width: 100%; border-radius: var(--radius); }

/* Info-/Warn-Boxen */
.box {
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}
.box.info { background: var(--info-soft); border-color: var(--info); }
.box.warning { background: var(--warning-soft); border-color: var(--warning); }
.box.success { background: var(--success-soft); border-color: var(--primary); }
.box .box-title { font-weight: 700; display: block; margin-bottom: 0.3rem; }

/* Key-Fact-Leiste */
.key-facts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.4rem;
  margin: 1.75rem 0;
}
.key-facts h2, .key-facts h3 { margin-top: 0 !important; font-size: 1.05rem; color: var(--primary-dark); }
.key-facts ul { margin: 0.5rem 0 0; }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table.data {
  border-collapse: collapse;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 0.95rem;
}
table.data th {
  background: var(--primary-dark);
  color: var(--on-primary);
  text-align: left;
  padding: 0.7rem 0.9rem;
  font-weight: 700;
}
table.data td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:nth-child(even) td { background: var(--surface-alt); }

/* Inhaltsverzeichnis */
.toc {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin: 1.75rem 0;
  font-size: 0.95rem;
}
.toc strong { display: block; margin-bottom: 0.4rem; color: var(--primary-dark); }
.toc ol { margin: 0; padding-left: 1.3rem; }
.toc a { color: var(--text); text-decoration: none; font-weight: 500; }
.toc a:hover { color: var(--primary-dark); text-decoration: underline; }

/* FAQ */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0.6rem 0;
  padding: 0.9rem 1.1rem;
}
.faq summary { font-weight: 700; cursor: pointer; color: var(--primary-dark); }
.faq details p { margin: 0.6rem 0 0; }

/* Weiterlesen / verwandte Artikel */
.related {
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.related h2 { font-size: 1.25rem; margin: 0 0 1rem; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 1.25rem 0;
  list-style: none;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(45, 49, 53, 0.12); }
.card a.card-title {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.02rem;
  line-height: 1.35;
}
.card a.card-title::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.card .tag {
  align-self: flex-start;
  background: var(--accent-soft);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--on-primary);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem;
  margin: 2.5rem 0;
}
.cta h2, .cta h3 { margin: 0 0 0.5rem; color: var(--on-primary); }
.cta p { margin: 0 0 1rem; opacity: 0.92; }
.cta a.button {
  display: inline-block;
  background: var(--on-primary);
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: var(--text-inverse);
  margin-top: 4rem;
  padding: 2.5rem 0;
  font-size: 0.9rem;
}
.site-footer .inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}
.site-footer a { color: var(--text-inverse); }
.site-footer .cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.site-footer h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.3rem 0; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 2.5rem 0 2.25rem; }
  .site-nav { gap: 0.9rem; font-size: 0.9rem; }
}
