/* LeibSpeisen – Hauptnavigation (docs/STARTSEITE-KONZEPT-2026-11.md, Etappe 1; LS\Navigation, nav.js).
   Mobil zuerst: Kopf 56 px mit Logo und Suche, untere Leiste mit vier Punkten, Sheets von unten.
   Ab 960 px: Kopf 72 px mit vier Hauptpunkten und Aufklappflächen (drei Spalten plus Bildkarte). */

:root { --navh: 64px; }

/* --- Kopf ------------------------------------------------------------------------------------ */
.shead.nav2 { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.shead.nav2 .in { display: flex; align-items: center; gap: 8px; height: 56px; max-width: 1200px; padding: 0 16px; }
.shead.nav2 .slogo { margin-right: auto; }
.shead.nav2 .slogo img { height: 28px; }
.dnav, .hpreis, .hlogin, .shead.nav2 .skcta { display: none; }
.hakt { display: flex; align-items: center; gap: 8px; }
.hsuche { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border-radius: 12px; color: var(--text); }
.hsuche:hover { background: var(--surface2); }
.nico { width: 24px; height: 24px; flex: none; }

/* --- Untere Leiste (Handy) ------------------------------------------------------------------- */
body.site.mitnav { padding-bottom: calc(var(--navh) + env(safe-area-inset-bottom)); }
.mnav { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--lineStrong);
  padding-bottom: env(safe-area-inset-bottom); }
.mnav ul { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 auto; padding: 0 4px; max-width: 560px; list-style: none; }
.mnb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: var(--navh);
  padding: 6px 2px; border: 0; background: none; color: var(--text2); font: 600 13px/1.1 var(--font); cursor: pointer;
  -webkit-tap-highlight-color: transparent; border-radius: 12px; }
.mnb[aria-expanded="true"], .mnb[aria-current="page"] { color: var(--accent); }
.mnb[aria-expanded="true"] .nico { stroke-width: 2.2; }
.mnb:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
/* Feste Aufruf-Leiste (Landingpage, später Startseite): weicht der Navigation – nie zwei Leisten übereinander */
body.mitnav .lpbar { display: none !important; }
/* Cookie-Hinweis steht über der Leiste statt sie zu verdecken */
body.mitnav .consent-bar { bottom: calc(var(--navh) + env(safe-area-inset-bottom)); }

/* --- Flächen: Sheet (Handy) ------------------------------------------------------------------ */
.nschleier { position: fixed; inset: 0; z-index: 41; background: rgba(13, 21, 16, .45); }
.npanel { position: fixed; z-index: 42; left: 0; right: 0; bottom: calc(var(--navh) + env(safe-area-inset-bottom));
  max-height: calc(100dvh - var(--navh) - 72px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--text); border-radius: var(--rl) var(--rl) 0 0; box-shadow: 0 -12px 32px rgba(13, 21, 16, .18); }
.npanel[hidden], .nschleier[hidden] { display: none; }
.npin { padding: 8px 16px 16px; max-width: 560px; margin: 0 auto; }
.nphead { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.nphead::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--lineStrong); }
.nph { margin: 0 auto 0 0; font: 800 22px/1.1 var(--display); letter-spacing: -.02em; }
.nalle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 700; font-size: 15px; color: var(--accent); }
.nzu { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: 12px; background: none; color: var(--text); cursor: pointer; }
.nzu:hover { background: var(--surface2); }
.npbody { display: grid; gap: 16px; }
.ncols { display: grid; gap: 4px 16px; }
.ngr ul { list-style: none; margin: 0; padding: 0; }
.ngh { margin: 8px 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text2); }
.ngr:not(:first-child) .ngh[aria-hidden] { display: none; }
.ngr a { display: flex; align-items: center; min-height: 44px; font-size: 17px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.ngr a:hover { color: var(--accent); }
#np-wochenplan .ngr:first-child a:first-child { font-weight: 700; color: var(--accent); }
/* „Nach Ernährung“: zehn Punkte als Chips in zwei Spalten, damit das Sheet nicht scrollt */
#np-wochenplan .ngr:nth-child(2) ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#np-wochenplan .ngr:nth-child(2) a { justify-content: center; border: 1px solid var(--lineStrong); border-radius: 10px; font-size: 15px; font-weight: 600; }

/* --- Bildkarte -------------------------------------------------------------------------------- */
.nkarte { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface2); color: var(--text); text-decoration: none; }
.nkbild { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--ph); }
.nkbild img, .nkbild picture { display: block; width: 100%; height: 100%; object-fit: cover; }
.nkarte:not(:has(.nkbild)) { grid-template-columns: 1fr; padding: 16px; }
.nktxt { display: grid; gap: 2px; }
.nkk { justify-self: start; padding: 2px 8px; border-radius: 6px; background: #F5C518; color: #1F2421; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.nktxt b { font: 700 17px/1.2 var(--display); letter-spacing: -.01em; }
.nkt { font-size: 14px; color: var(--text2); }
.nkarte:hover b { color: var(--accent); }

.npanel a:focus-visible, .nkarte:focus-visible, .hsuche:focus-visible, .nzu:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nkk { background: #E8C04A; } }
:root[data-theme="dark"] .nkk { background: #E8C04A; }

/* --- Desktop ---------------------------------------------------------------------------------- */
@media (min-width: 960px) {
  body.site.mitnav { padding-bottom: 0; }
  .mnav { display: none; }
  body.mitnav .consent-bar { bottom: 0; }
  .shead.nav2 .in { height: 72px; gap: 20px; }
  .shead.nav2 .slogo { margin-right: 8px; }
  .shead.nav2 .slogo img { height: 32px; }
  .dnav { display: block; margin-right: auto; }
  .dnav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
  .dnb { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none;
    color: var(--text); font: 600 16px/1 var(--font); cursor: pointer; }
  .dnb:hover, .dnb[aria-expanded="true"] { background: var(--surface2); }
  .dnb[aria-expanded="true"] { color: var(--accent); }
  .npf { width: 16px; height: 16px; transition: transform .15s; }
  .dnb[aria-expanded="true"] .npf { transform: rotate(180deg); }
  .hakt { gap: 16px; }
  .hsuche { margin-right: 0; }
  .hpreis, .hlogin { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; color: var(--text); text-decoration: none; }
  .hpreis:hover, .hlogin:hover { color: var(--accent); }
  .shead.nav2 .skcta { display: inline-flex; min-height: 44px; padding: 0 18px; font-size: 15px; }

  .nschleier { top: 72px; background: rgba(13, 21, 16, .25); }
  .npanel { position: absolute; top: 100%; bottom: auto; max-height: calc(100vh - 96px); border-radius: 0 0 var(--rl) var(--rl);
    border-top: 1px solid var(--line); box-shadow: var(--shadow); }
  .npin { max-width: 1200px; padding: 20px 32px 28px; }
  .nphead { min-height: 0; margin-bottom: 12px; }
  .nphead::before, .nzu { display: none; }
  .nph { margin: 0; font-size: 20px; }
  .nalle { margin-left: 8px; }
  .npbody { grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); gap: 32px; align-items: start; }
  .ncols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
  .ngr:not(:first-child) .ngh[aria-hidden] { display: block; }
  .ngr a { min-height: 40px; font-size: 16px; border-bottom: 0; }
  #np-wochenplan .ngr:nth-child(2) { grid-column: span 2; }
  #np-wochenplan .ngr:nth-child(2) ul { grid-template-columns: 1fr 1fr; gap: 0 32px; }
  #np-wochenplan .ngr:nth-child(2) a { justify-content: flex-start; border: 0; border-radius: 0; font-weight: 400; font-size: 16px; }
  .nkarte { grid-template-columns: 1fr; padding: 0; overflow: hidden; background: var(--surface); }
  .nkbild { aspect-ratio: 4 / 3; border-radius: 0; }
  .nktxt { padding: 12px 16px 16px; }
  .nkarte:not(:has(.nkbild)) { padding: 0; }
}

@media (prefers-reduced-motion: reduce) { .npf { transition: none; } }
@media print { .mnav, .npanel, .nschleier, .dnav, .hakt { display: none !important; } body.site.mitnav { padding-bottom: 0; } }
.inapp .mnav, .inapp .npanel, .inapp .nschleier { display: none !important; }

@media (max-width: 959px) { html.navoffen, html.navoffen body { overflow: hidden; } }
