/* ═══════════════════════════════════════════════════════════════
   krankenversicherung.digital – Zentrales Stylesheet
   Basis: besserestyles.css · Schrift: Inter (Grotesk, DSGVO-konform gehostet)
   Kein Build-Schritt · direkt editierbar · /style.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Lokale Font (Grotesk, self-hosted) ─────────────────────── */
@font-face {
  font-family: "Inter";
  src: url("https://krankenversicherung.digital/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --sd-navy:   #0F2044;
  --sd-gold:   #F59E0B;
  --sd-green:  #059669;
  --sd-green2: #34D399;
  --sd-red:    #DC2626;
  --sd-red2:   #F87171;
  --sd-blue:   #2563EB;
  --sd-bg:     #F8FAFC;
  --sd-card:   #FFFFFF;
  --sd-border: #E2E8F0;
  --sd-muted:  #64748B;
  --sd-text:   #1E293B;
  --sd-amber:  #FEF3C7;

  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 24px rgba(0,0,0,.12);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; scroll-behavior: smooth; }
body  {
  font-family: var(--font-sans);
  background: var(--sd-bg);
  color: var(--sd-text);
  line-height: 1.65;
  border-top: 4px solid var(--sd-gold);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--sd-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────── */
.container        { max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
.container--prose { max-width: 780px;  margin: 0 auto; padding: 0 1.25rem; }

/* ── Skip Link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--sd-navy);
  color: #fff;
  padding: 0.5rem 1.25rem;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  z-index: 300;
}
.skip-link:focus { top: 0; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--sd-navy);
  border-bottom: 2px solid var(--sd-gold);
  padding: 0.75rem 0;
  position: sticky; top: 0; z-index: 200;
}
.site-header__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
}
.site-logo {
  font-family: var(--font-sans);
  font-size: 1.375rem; font-weight: 700; font-style: normal;
  color: #fff; text-decoration: none; white-space: nowrap;
}
.site-logo span { color: var(--sd-gold); }
.site-logo:hover { text-decoration: none; }
.site-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a {
  color: rgba(255,255,255,.85); font-size: 0.8rem; font-weight: 600;
  transition: color .15s; white-space: nowrap; text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--sd-gold); text-decoration: none; }
.site-nav a:focus-visible { outline: 2px solid var(--sd-gold); outline-offset: 2px; }

/* ── Hamburger-Button ────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.25rem;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  background: var(--sd-navy);
  background-image: radial-gradient(ellipse at 70% 50%, #162d5e 0%, #0F2044 60%);
  color: #fff;
  padding: 3.5rem 0 3rem;
}
.hero__label {
  display: inline-block;
  background: var(--sd-gold); color: var(--sd-navy);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 0.2rem 0.7rem; border-radius: 4px; margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700; font-style: normal; line-height: 1.2;
  margin-bottom: 1rem; max-width: 680px;
}
.hero h1 em { font-style: normal; color: var(--sd-gold); }
.hero__sub   { font-size: 1.05rem; color: rgba(255,255,255,.8); max-width: 560px; }

/* ── Sections ────────────────────────────────────────────────── */
.section      { padding: 3rem 0; }
.section--alt { background: var(--sd-card); }
.section--dark{ background: var(--sd-navy); color: #fff; }
.section__head { margin-bottom: 2rem; }
.section__head h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.4rem, 3vw, 1.875rem);
  font-weight: 700; font-style: normal; color: var(--sd-navy); margin-bottom: 0.4rem;
}
.section--dark .section__head h2 { color: #fff; }
.section__sub { font-size: 0.95rem; color: var(--sd-muted); max-width: 600px; }

/* ── Cards ───────────────────────────────────────────────────── */
.cards    { display: grid; gap: 1.25rem; }
.cards--2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cards--3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: var(--sd-card);
  border: 1px solid var(--sd-border);
  border-left: 4px solid var(--sd-gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  color: inherit; text-decoration: none; display: block;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.1); text-decoration: none; }
.card h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem; font-weight: 700; font-style: normal;
  color: var(--sd-navy); margin-bottom: 0.5rem;
}
.card p     { font-size: 0.88rem; color: var(--sd-muted); line-height: 1.55; }
.card__meta { font-size: 0.7rem; color: var(--sd-muted); margin-top: 0.5rem; }

/* ── Tabellen ────────────────────────────────────────────────── */
.lv-table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.lv-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.lv-table th {
  background: var(--sd-navy); color: #fff;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: 0.7rem 1rem; text-align: left; white-space: nowrap;
}
.lv-table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--sd-border); }
.lv-table tr:nth-child(even) td { background: #F8FAFC; }
.lv-table tr:hover td { background: #EFF6FF; }
.lv-table .val-pos { color: var(--sd-green); font-weight: 700; }
.lv-table .val-neg { color: var(--sd-red);   font-weight: 700; }
.lv-table .val-neu { color: var(--sd-navy);  font-weight: 700; }

/* ── Prose ───────────────────────────────────────────────────── */
.prose { font-size: 1rem; line-height: 1.75; color: var(--sd-text); }
.prose h2 { font-family: var(--font-sans); font-size: 1.5rem; font-weight: 700; font-style: normal; color: var(--sd-navy); margin: 2.5rem 0 0.75rem; }
.prose h3 { font-family: var(--font-sans); font-size: 1.15rem; font-weight: 700; font-style: normal; color: var(--sd-navy); margin: 1.75rem 0 0.5rem; }
.prose p  { margin-bottom: 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.1rem 1.5rem; }
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--sd-navy); }
.prose a { color: var(--sd-blue); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin: 1.5rem 0; }
.prose th { background: var(--sd-navy); color: #fff; padding: 0.6rem 1rem; text-align: left; }
.prose td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--sd-border); }
.prose tr:nth-child(even) td { background: #F8FAFC; }

/* ── Infobox / Action-Insert ─────────────────────────────────── */
.action-insert {
  background: #FFFBEB;
  border: 1px solid #F59E0B;
  border-left: 4px solid #F59E0B;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  font-size: 0.9rem;
  color: #78350F;
  line-height: 1.6;
}
.action-insert p { margin: 0; }

/* ── NotAsked Badge ──────────────────────────────────────────── */
.notasked-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #FEF3C7; border: 1px solid var(--sd-gold);
  color: #92400E; font-size: 0.68rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 0.2rem 0.6rem; border-radius: 4px; margin-bottom: 0.75rem;
}

/* ── Insight Cards ───────────────────────────────────────────── */
.insight-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 1.5rem 0; }
.insight-card {
  background: linear-gradient(135deg, #1a3a6e 0%, var(--sd-navy) 100%);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 1.5rem; color: #fff;
}
.insight-card__num  { font-size: 2rem; font-weight: 700; color: var(--sd-gold); line-height: 1; }
.insight-card__head { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; font-style: normal; margin: 0.4rem 0 0.5rem; }
.insight-card__body { font-size: 0.85rem; color: rgba(255,255,255,.78); line-height: 1.6; }

/* ── FAQ Accordion ───────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--sd-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600; cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--sd-navy);
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--sd-gold); line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:focus-visible { outline: 2px solid var(--sd-gold); outline-offset: -2px; }
.faq-item .faq-body { padding: 0 1.25rem 1rem; font-size: 0.9rem; color: var(--sd-text); line-height: 1.7; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 0.25rem;
  align-items: center; font-size: 0.8rem; color: var(--sd-muted);
  padding: 0.75rem 0; margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--sd-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--sd-blue); text-decoration: underline; }
.breadcrumb__sep { color: var(--sd-border); margin: 0 0.1rem; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.65rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 4px;
}
.badge--gold   { background: #FEF3C7; border: 1px solid var(--sd-gold); color: #92400E; }
.badge--green  { background: #D1FAE5; color: #065F46; }
.badge--blue   { background: #DBEAFE; color: #1E40AF; }
.badge--muted  { background: #F1F5F9; color: var(--sd-muted); }

/* ── Tool Card (Rechner) ─────────────────────────────────────── */
.tool-card {
  background: var(--sd-card);
  border: 1px solid var(--sd-border);
  border-top: 4px solid var(--sd-gold);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  max-width: 680px;
  margin: 1.5rem 0 2.5rem;
}
.tool-card h2 {
  font-family: var(--font-sans);
  font-size: 1.25rem; font-weight: 700; font-style: normal;
  color: var(--sd-navy); margin-bottom: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.875rem;
}
.form-group label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--sd-navy);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-group input,
.form-group select {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 0.55rem 0.875rem;
  border: 1.5px solid var(--sd-border);
  border-radius: 6px;
  background: var(--sd-card);
  color: var(--sd-text);
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--sd-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230F2044' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
}

/* ── Result Box ──────────────────────────────────────────────── */
.result-box {
  margin-top: 1.25rem;
  border: 1px solid var(--sd-border);
  border-left: 4px solid var(--sd-gold);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  background: #FFFBEB;
  display: none;
}
.result-box.visible { display: block; }
.result-box h3 {
  font-family: var(--font-sans);
  font-size: 1rem; font-weight: 700; font-style: normal;
  color: var(--sd-navy); margin-bottom: 0.5rem;
}
.result-disclaimer {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  color: var(--sd-muted);
  border-top: 1px solid #F59E0B40;
  padding-top: 0.75rem;
  max-width: none;
  margin-bottom: 0;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem; border-radius: 6px;
  font-size: 0.875rem; font-weight: 700; cursor: pointer;
  border: none; font-family: var(--font-sans); transition: opacity .15s;
  text-decoration: none; line-height: 1;
}
.btn:hover { opacity: 0.88; text-decoration: none; }
.btn--primary { background: var(--sd-gold); color: var(--sd-navy); }
.btn--ghost   { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn--outline { background: transparent; border: 1.5px solid var(--sd-border); color: var(--sd-text); }
.btn--submit  { background: var(--sd-navy); color: #fff; padding: 0.7rem 2rem; font-size: 1rem; }
.btn--submit:hover { opacity: 1; background: #162d5e; }
.btn:focus-visible { outline: 2px solid var(--sd-gold); outline-offset: 3px; }

/* ── Bild-Platzhalter ────────────────────────────────────────── */
.img-placeholder {
  width: 100%; aspect-ratio: 16/7;
  background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
  border: 1px solid var(--sd-border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--sd-muted); font-size: 0.8rem;
  margin: 1.5rem 0; overflow: hidden;
}
.img-placeholder img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Entity image (real img tag) */
.entity-img {
  width: 100%; max-width: 780px; height: auto;
  border: 1px solid var(--sd-border); border-radius: var(--radius);
  margin: 1.5rem 0; display: block;
}

/* ── Related Topics ──────────────────────────────────────────── */
.related-topics { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.related-topics a {
  background: var(--sd-bg); border: 1px solid var(--sd-border);
  border-radius: 20px; padding: 0.3rem 0.85rem;
  font-size: 0.8rem; color: var(--sd-text);
  text-decoration: none; transition: border-color .15s, color .15s;
}
.related-topics a:hover { border-color: var(--sd-gold); color: var(--sd-navy); text-decoration: none; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--sd-navy); color: #fff;
  padding: 3rem 0 2rem; margin-top: 4rem;
  border-top: 2px solid var(--sd-gold);
}
.site-footer__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.25rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem; margin-bottom: 2rem;
}
.site-footer__col-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.75rem; color: #fff; font-style: normal; }
.site-footer__col-desc  { color: #94a3b8; font-size: 0.875rem; line-height: 1.6; }
.site-footer__col nav   { display: flex; flex-direction: column; gap: 0.4rem; }
.site-footer__col nav a { color: #94a3b8; text-decoration: none; font-size: 0.875rem; }
.site-footer__col nav a:hover { color: var(--sd-gold); }
.site-footer__bottom {
  border-top: 1px solid #334155; padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; font-size: 0.8rem; color: #64748b;
}
.site-footer__bottom a { color: #64748b; text-decoration: none; }
.site-footer__bottom a:hover { color: #fff; }
.site-footer__bottom nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer__legal {
  width: 100%; font-size: 0.75rem; color: #475569;
  border-top: 1px solid #334155; padding-top: 1.25rem; margin-top: 0.5rem;
  max-width: 720px; line-height: 1.65;
}

/* ── Consent Banner ──────────────────────────────────────────── */
#consent-banner {
  position: fixed; bottom: 1.25rem; left: 1.25rem; right: 1.25rem;
  max-width: 520px;
  background: var(--sd-navy); color: #fff;
  border: 1px solid var(--sd-gold); border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  z-index: 9999; font-size: 0.875rem;
  display: none;
}
#consent-banner p { margin-bottom: 1rem; line-height: 1.55; color: #e2e8f0; }
#consent-banner a { color: var(--sd-gold); }
.consent-banner__btns { display: flex; gap: 0.75rem; }
.btn-consent-accept {
  background: var(--sd-gold); color: var(--sd-navy);
  border: none; padding: 0.5rem 1.25rem;
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 700;
  cursor: pointer; border-radius: 6px;
}
.btn-consent-accept:hover { opacity: 0.88; }
.btn-consent-reject {
  background: transparent; color: #94a3b8;
  border: 1.5px solid #334155; padding: 0.5rem 1.25rem;
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; border-radius: 6px;
}
.btn-consent-reject:hover { border-color: #64748b; color: #e2e8f0; }
.btn-consent-accept:focus-visible,
.btn-consent-reject:focus-visible { outline: 2px solid var(--sd-gold); outline-offset: 2px; }

/* ── Skip Link ──────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    order: 10;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 0.25rem 0;
  }
  .site-nav.is-open { display: flex; }
  .site-nav.is-open a {
    padding: 0.7rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
  }
  .site-nav.is-open a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 2.5rem 0 2rem; }
  .cards--2, .cards--3 { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: 1fr; }
  .tool-card { padding: 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
  #consent-banner { bottom: 0; left: 0; right: 0; border-radius: 0; max-width: 100%; border-left: none; border-right: none; border-bottom: none; }
  .site-footer__bottom { flex-direction: column; }
}
