/* ── Familienküche Dokumentation — Stylesheet ───────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Serif+4:ital,wght@0,300;0,400;1,300&display=swap');

/* ── Design-Token ──────────────────────────────────────────── */
:root {
  --braun-dunkel:  #2C1A0E;
  --braun-mittel:  #5C3317;
  --braun-hell:    #8C6A4A;
  --gold:          #C8954A;
  --gold-hell:     #F0C070;
  --creme:         #FDF6EE;
  --creme-dunkel:  #F5EBD8;
  --creme-rand:    #E8D5C0;
  --weiss:         #FFFDF8;
  --gruen:         #4CAF50;
  --rot:           #E57373;
  --text:          #2C1A0E;
  --text-weich:    #8C6A4A;

  --radius-s:   6px;
  --radius-m:   12px;
  --radius-l:   20px;
  --schatten:   0 2px 12px rgba(44,26,14,.10);
  --schatten-l: 0 8px 32px rgba(44,26,14,.15);
  --header-h:   108px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--creme);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
  width: 100%;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--braun-mittel); }
img { max-width: 100%; height: auto; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, var(--braun-dunkel) 0%, var(--braun-mittel) 100%);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(44,26,14,.3);
  width: 100%;
}

.header-top {
  border-bottom: 1px solid rgba(200,149,74,.12);
}

.header-top-inner {
  display: flex;
  align-items: center;
  padding: 0 32px;
  height: 72px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 12px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}
.site-logo-img { height: 56px; width: auto; display: block; }
.site-logo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-logo-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--creme);
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}
.site-claim {
  font-size: .6rem;
  color: rgba(253,246,238,.45);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.header-badge {
  margin-left: auto;
  background: rgba(200,149,74,.2);
  color: var(--gold-hell);
  padding: 5px 14px;
  border-radius: var(--radius-m);
  font-size: .82rem;
  border: 1px solid rgba(200,149,74,.3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Hamburger-Button (nur Mobile) ────────────────────────── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 1px solid rgba(200,149,74,.35);
  border-radius: var(--radius-m);
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(253,246,238,.85);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
  transform-origin: center;
}
.hamburger-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Desktop-Navigationsleiste ─────────────────────────────── */
.header-nav {
  background: rgba(0,0,0,.18);
}
.header-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.doc-nav-links {
  display: flex;
  gap: 0;
}
.doc-nav-links a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(253,246,238,.65);
  padding: 9px 14px;
  font-size: .85rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: background .2s, color .2s;
}
.doc-nav-links a:hover {
  background: rgba(200,149,74,.1);
  color: rgba(253,246,238,.95);
}
.doc-app-link {
  color: var(--gold) !important;
  border: 1px solid rgba(200,149,74,.3);
  border-radius: var(--radius-m);
  padding: 5px 14px !important;
  font-size: .82rem !important;
  white-space: nowrap;
  flex-shrink: 0;
  margin: 4px 0;
  transition: background .2s !important;
}
.doc-app-link:hover {
  background: rgba(200,149,74,.15) !important;
  color: var(--gold-hell) !important;
}

/* ── Mobile-Nav-Overlay ────────────────────────────────────── */
.mobile-nav {
  display: none; /* wird per JS mit is-open angezeigt */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--braun-dunkel);
  border-top: 1px solid rgba(200,149,74,.2);
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  z-index: 300;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav.is-open { display: block; }

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font-size: .95rem;
  color: rgba(253,246,238,.75);
  border-bottom: 1px solid rgba(200,149,74,.08);
  transition: background .15s, color .15s;
  min-height: 52px;
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(200,149,74,.12);
  color: var(--gold-hell);
}
.mobile-nav-link span { font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }

.mobile-nav-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(200,149,74,.15);
  margin-top: 4px;
}
.mobile-nav-app-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold) !important;
  font-size: .9rem;
  border: 1px solid rgba(200,149,74,.3);
  border-radius: var(--radius-m);
  padding: 8px 18px;
  transition: background .2s;
}
.mobile-nav-app-link:hover { background: rgba(200,149,74,.15); }

/* Scroll-Lock wenn Menü offen */
body.nav-open { overflow: hidden; }

/* ── Layout: Sidebar + Content ─────────────────────────────── */
.doc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h));
}

/* ── Sidebar (Desktop) ─────────────────────────────────────── */
.doc-sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 28px 16px 28px 24px;
  border-right: 1px solid var(--creme-rand);
  background: var(--weiss);
  scrollbar-width: thin;
  scrollbar-color: var(--creme-rand) transparent;
}
.doc-sidebar::-webkit-scrollbar { width: 3px; }
.doc-sidebar::-webkit-scrollbar-thumb { background: var(--creme-rand); border-radius: 4px; }

.doc-sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-weich);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--creme-rand);
}

.doc-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.doc-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-m);
  font-size: .87rem;
  color: var(--text-weich);
  transition: background .15s, color .15s;
  line-height: 1.3;
}
.doc-sidebar nav a:hover { background: var(--creme-dunkel); color: var(--text); }
.doc-sidebar nav a.active { background: rgba(200,149,74,.12); color: var(--gold); font-weight: 600; }
.doc-sidebar .nav-icon { font-size: .95rem; width: 20px; text-align: center; flex-shrink: 0; }

/* ── Hauptinhalt ───────────────────────────────────────────── */
.doc-content {
  padding: 40px 48px 80px;
  min-width: 0;
  width: 100%;
}

/* ── Sektionen ─────────────────────────────────────────────── */
.doc-section {
  margin-bottom: 72px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.doc-section + .doc-section {
  padding-top: 40px;
  border-top: 1px solid var(--creme-rand);
}

.section-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
}
h2.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.2;
}
.section-intro {
  font-size: 1rem;
  color: var(--text-weich);
  margin-bottom: 28px;
  max-width: 600px;
  line-height: 1.6;
}
h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--text); margin: 28px 0 10px; }
h4 { font-size: .82rem; font-weight: 700; color: var(--text-weich); text-transform: uppercase; letter-spacing: .09em; margin: 18px 0 6px; }
p { margin-bottom: 12px; font-size: .95rem; }

/* ── Hero ──────────────────────────────────────────────────── */
.doc-hero {
  background: linear-gradient(135deg, var(--braun-dunkel) 0%, var(--braun-mittel) 100%);
  color: var(--creme);
  padding: 40px 44px;
  border-radius: var(--radius-l);
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.doc-hero::before {
  content: '🍽️';
  position: absolute;
  font-size: 7rem;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .07;
  pointer-events: none;
}
.doc-hero-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); margin-bottom: 8px; }
.doc-hero-title { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: 12px; color: var(--creme); }
.doc-hero-sub { font-size: .95rem; color: rgba(253,246,238,.72); max-width: 480px; line-height: 1.65; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--weiss);
  border: 1.5px solid var(--creme-rand);
  border-radius: var(--radius-l);
  padding: 22px;
  box-shadow: var(--schatten);
}
.card-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }

/* ── Quick-Nav ─────────────────────────────────────────────── */
.quick-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 28px;
}
.quick-nav-card {
  background: var(--weiss);
  border: 1.5px solid var(--creme-rand);
  border-radius: var(--radius-m);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, transform .15s;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.quick-nav-card:hover { border-color: var(--gold); box-shadow: var(--schatten-l); transform: translateY(-2px); color: var(--text); }
.quick-nav-card .qn-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.quick-nav-card .qn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quick-nav-card .qn-label { display: block; font-size: .87rem; font-weight: 600; line-height: 1.3; color: var(--text); }
.quick-nav-card .qn-desc  { display: block; font-size: .75rem; color: var(--text-weich); line-height: 1.4; }

/* ── Feature-Grid ──────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0;
}
.feature-card { background: var(--creme); border: 1.5px solid var(--creme-rand); border-radius: var(--radius-m); padding: 18px 16px; transition: border-color .2s; }
.feature-card:hover { border-color: var(--gold); }
.feature-icon { font-size: 1.8rem; margin-bottom: 8px; display: block; }
.feature-name { font-family: 'Playfair Display', serif; font-size: .95rem; margin-bottom: 5px; }
.feature-desc { font-size: .82rem; color: var(--text-weich); line-height: 1.5; }

/* ── Schritte ──────────────────────────────────────────────── */
.steps { list-style: none; margin: 16px 0 24px; display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; gap: 14px; align-items: flex-start; background: var(--weiss); border: 1px solid var(--creme-rand); border-radius: var(--radius-m); padding: 14px 16px; }
.step-num { background: var(--gold); color: var(--braun-dunkel); font-family: 'Playfair Display', serif; font-size: .82rem; font-weight: 700; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.step-body { flex: 1; min-width: 0; }
.step-body strong { display: block; margin-bottom: 3px; font-size: .92rem; color: var(--text); }
.step-body p { font-size: .85rem; color: var(--text-weich); margin: 0; line-height: 1.55; }

/* ── Hinweis-Boxen ─────────────────────────────────────────── */
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-m); margin: 14px 0; font-size: .87rem; line-height: 1.55; }
.hint-icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.hint.info { background: #EFF8FF; border-left: 3px solid #60A5FA; color: #1E3A5F; }
.hint.tip  { background: #FFF8E1; border-left: 3px solid var(--gold); color: #6B4F0A; }
.hint.warn { background: #FFF3E0; border-left: 3px solid #FF9800; color: #6D3B00; }
.hint.ok   { background: #E8F5E9; border-left: 3px solid var(--gruen); color: #1B5E20; }

/* ── Tabellen ──────────────────────────────────────────────── */
.doc-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .88rem; }
.doc-table th, .doc-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--creme-rand); vertical-align: top; }
.doc-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-weich); background: var(--creme-dunkel); font-weight: 700; white-space: nowrap; }
.doc-table tr:last-child td { border-bottom: none; }
.doc-table tr:hover td { background: #FFF9F2; }

/* ── Badges ────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-gold  { background: rgba(200,149,74,.15); color: var(--braun-mittel); border: 1px solid rgba(200,149,74,.3); }
.badge-gruen { background: #E8F5E9; color: #2E7D32; }
.badge-warn  { background: #FFF3E0; color: #E65100; border: 1px solid #FFCC80; }

/* ── Code ──────────────────────────────────────────────────── */
code { background: var(--creme-dunkel); border: 1px solid var(--creme-rand); border-radius: 4px; padding: 1px 6px; font-size: .82em; font-family: 'SF Mono', 'Fira Code', monospace; color: var(--braun-mittel); }

/* ── UI-Mockup ─────────────────────────────────────────────── */
.ui-mockup { background: var(--creme-dunkel); border: 1.5px solid var(--creme-rand); border-radius: var(--radius-m); padding: 16px 18px; margin: 14px 0; }
.ui-mockup-title { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-weich); margin-bottom: 10px; font-weight: 700; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { padding: 20px 32px; border-top: 1px solid var(--creme-rand); text-align: center; font-size: .8rem; color: var(--text-weich); background: var(--weiss); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 1024px) ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .doc-layout { grid-template-columns: 200px 1fr; }
  .doc-content { padding: 32px 32px 64px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-nav { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile (≤ 768px) ──────────────────────────────────────── */
@media (max-width: 768px) {

  :root { --header-h: 72px; }

  /* Header */
  .header-top-inner { padding: 0 16px; height: 60px; }
  .site-logo-img { height: 38px; }
  .site-logo-name { font-size: 1rem; }
  .site-claim { display: none; }
  .header-badge { display: none; }   /* Platz sparen, Hamburger-Btn genug */
  .hamburger-btn { display: flex; margin-left: auto; }
  .header-nav { display: none; }     /* Desktop-Nav ausblenden */

  /* Layout: 1 Spalte */
  .doc-layout { grid-template-columns: 1fr; }

  /* Sidebar: auf Mobile komplett ausblenden (Hamburger übernimmt) */
  .doc-sidebar { display: none; }

  /* Inhalt */
  .doc-content { padding: 20px 16px 56px; }

  /* Hero */
  .doc-hero { padding: 24px 20px; border-radius: var(--radius-m); margin-bottom: 20px; }
  .doc-hero::before { display: none; }
  .doc-hero-title { font-size: 1.5rem; }
  .doc-hero-sub { font-size: .88rem; }

  /* Quick-Nav */
  .quick-nav { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px; }
  .quick-nav-card { padding: 12px; gap: 8px; }
  .quick-nav-card .qn-icon { font-size: 1.2rem; }
  .quick-nav-card .qn-label { font-size: .82rem; }
  .quick-nav-card .qn-desc { font-size: .72rem; }

  /* Feature-Grid */
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .feature-card { padding: 14px 12px; }
  .feature-icon { font-size: 1.5rem; margin-bottom: 6px; }
  .feature-name { font-size: .88rem; }
  .feature-desc { font-size: .78rem; }

  /* Sektionen */
  .doc-section { margin-bottom: 48px; scroll-margin-top: 80px; }
  .doc-section + .doc-section { padding-top: 28px; }
  h2.section-title { font-size: 1.4rem; }
  .section-intro { font-size: .9rem; margin-bottom: 20px; }
  h3 { font-size: 1rem; margin: 20px 0 8px; }

  /* Cards */
  .card { padding: 16px; border-radius: var(--radius-m); }

  /* Schritte */
  .step { padding: 12px; gap: 10px; }
  .step-body strong { font-size: .88rem; }
  .step-body p { font-size: .82rem; }

  /* Tabellen: horizontal scrollbar statt abgeschnitten.
     .doc-table wird selbst zum Scroll-Container (display:block),
     damit auch nicht in .doc-table-wrap gehüllte Tabellen scrollen. */
  .doc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
  .doc-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .doc-table th, .doc-table td { padding: 8px 10px; white-space: nowrap; }

  /* Hint */
  .hint { font-size: .83rem; padding: 10px 12px; }

  /* Footer */
  .site-footer { padding: 16px; font-size: .78rem; }
}

/* ── Sehr schmale Phones (≤ 390px) ─────────────────────────── */
@media (max-width: 390px) {
  .header-top-inner { padding: 0 12px; }
  .doc-content { padding: 16px 12px 48px; }
  .doc-hero { padding: 20px 16px; }
  .doc-hero-title { font-size: 1.3rem; }
  .quick-nav { grid-template-columns: 1fr 1fr; gap: 6px; }
  .feature-grid { grid-template-columns: 1fr; }
  .mobile-nav-link { padding: 12px 16px; font-size: .88rem; }
}

/* ── Safe-Area (iPhone Notch) ──────────────────────────────── */
@supports (padding: env(safe-area-inset-top)) {
  .site-header { padding-top: env(safe-area-inset-top); }
  body { padding-bottom: env(safe-area-inset-bottom); }
}
