/* ==========================================================================
   Diäten-Liste.de – Stylesheet
   Mobil zuerst, keine externen Ressourcen (Schriften, Bilder) – alles lokal.
   Farben greifen das frühere Braun/Orange der Seite auf.
   ========================================================================== */

:root {
  --primaer: #a8550b;
  --primaer-dunkel: #7a3d06;
  --primaer-hell: #fbe9d4;
  --creme: #fbf6ee;
  --flaeche: #fff;
  --text: #2a2622;
  --text-leise: #6b625a;
  --linie: #eadfce;
  --gruen: #2f7a3b;
  --gruen-dunkel: #235c2c;
  --radius: 12px;
  --schatten: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 20px rgba(60, 40, 20, .07);
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schrift-titel: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--primaer-dunkel); text-underline-offset: .15em; }
a:hover, a:focus { color: var(--primaer); }
:focus-visible { outline: 3px solid var(--primaer); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 {
  font-family: var(--schrift-titel);
  color: var(--primaer-dunkel);
  line-height: 1.25;
  margin: 1.6em 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin-top: .4em; }
h2 { font-size: clamp(1.25rem, 3.6vw, 1.5rem); }
h3 { font-size: 1.15rem; }

p, ul, ol { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primaer-dunkel); color: #fff; padding: .6em 1em;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Kopf ---------- */

#header {
  background: linear-gradient(135deg, var(--primaer-dunkel), var(--primaer));
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.header-innen {
  max-width: 1160px;
  margin: 0 auto;
  padding: .55em 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}
.logo {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: .6em;
  align-items: center;
  color: #fff;
  text-decoration: none;
}
.logo:hover, .logo:focus { color: #fff; }
.logo-zeichen {
  grid-row: 1 / 3;
  width: 2.3rem; height: 2.3rem;
  border-radius: 50%;
  background: #fff;
  color: var(--primaer);
  font: 700 1.35rem/2.3rem var(--schrift-titel);
  text-align: center;
}
.logo-text { font: 700 1.15rem/1.1 var(--schrift-titel); letter-spacing: .01em; white-space: nowrap; }
@media (min-width: 560px) { .logo-text { font-size: 1.3rem; } }
.logo-text span { opacity: .75; font-weight: 400; }
.logo-claim { font-size: .78rem; opacity: .85; line-height: 1.2; }

.menue-knopf {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  padding: .35em .9em;
  white-space: nowrap;
}
.menue-knopf:hover, .menue-knopf:focus { color: #fff; background: rgba(255, 255, 255, .12); }

.hauptmenue { background: rgba(0, 0, 0, .12); }
.hauptmenue ul {
  list-style: none;
  margin: 0 auto;
  padding: 0 8px;
  max-width: 1160px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hauptmenue ul::-webkit-scrollbar { display: none; }
.hauptmenue a {
  display: block;
  padding: .55em .8em;
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.hauptmenue a:hover, .hauptmenue a:focus, .hauptmenue a[aria-current] { color: #fff; border-bottom-color: #fff; }

/* ---------- Inhalt + Navigation ---------- */

#seite {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#inhalt {
  background: var(--flaeche);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 1.2em 18px 1.6em;
  min-width: 0;
}
#inhalt > p:first-of-type strong:only-child,
#inhalt > p > strong:first-child:last-child { font-weight: 600; }
#inhalt ul, #inhalt ol { padding-left: 1.3em; }
#inhalt li { margin-bottom: .3em; }
#inhalt p, #inhalt li { overflow-wrap: break-word; hyphens: auto; }

.brotkrumen { font-size: .85rem; color: var(--text-leise); }
.brotkrumen a { color: var(--text-leise); }

#navigation {
  background: var(--flaeche);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 1em 18px 1.4em;
  scroll-margin-top: 80px;
}
#navigation h2 {
  font-size: 1.05rem;
  margin: 1.2em 0 .5em;
  padding-bottom: .3em;
  border-bottom: 2px solid var(--primaer-hell);
}
#navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  column-gap: 1em;
}
#navigation a {
  display: block;
  padding: .4em 0;          /* großzügige Tippfläche auf Mobilgeräten */
  color: var(--text);
  text-decoration: none;
  font-size: .95rem;
  line-height: 1.35;
}
#navigation a:hover, #navigation a:focus { color: var(--primaer); text-decoration: underline; }
#navigation a[aria-current] { color: var(--primaer); font-weight: 700; }

@media (min-width: 900px) {
  #seite { flex-direction: row; align-items: flex-start; padding: 24px 16px; }
  #inhalt { flex: 1 1 auto; padding: 1.6em 2.4em 2em; }
  #navigation {
    flex: 0 0 300px;
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
  }
  #navigation ul { display: block; }
  #navigation a { padding: .2em 0; font-size: .92rem; }
  .menue-knopf { display: none; }
}

/* ---------- Bausteine ---------- */

/* Diäten-Kacheln auf der Startseite */
.kacheln {
  list-style: none;
  padding: 0 !important;
  margin: 1.2em 0 1.6em;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.kacheln li { margin: 0 !important; }
.kacheln a {
  display: block;
  height: 100%;
  padding: .75em .9em;
  border: 1px solid var(--linie);
  border-radius: 10px;
  background: var(--creme);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.kacheln a:hover, .kacheln a:focus { border-color: var(--primaer); box-shadow: var(--schatten); transform: translateY(-1px); }
.kacheln strong { display: block; color: var(--primaer-dunkel); font-size: 1rem; }
.kacheln span { display: block; font-size: .85rem; color: var(--text-leise); line-height: 1.45; margin-top: .2em; }

/* Buchtipp „Zuckerfrei leben“ */
/* Werbekennzeichnung „- Anzeige -“ oben rechts in allen Werbeblöcken */
.buchtipp, .produkt-hinweis, .anzeige-bereich { position: relative; }
.anzeige {
  position: absolute;
  top: .45rem;
  right: .8rem;
  margin: 0;
  font-size: .72rem;
  line-height: 1;
  color: #8a8178;
  letter-spacing: .02em;
}
.anzeige-bereich {
  margin: 2em 0;
  padding: 1.6em 1.2em 1.2em;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
}
.anzeige-bereich h2 { margin-top: 0; }

.buchtipp {
  clear: both;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1em;
  margin: 2em 0;
  padding: 1.8em 1.2em 1.2em;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff7ec, #fdeedd);
  border: 1px solid #f2d7b5;
}
.buchtipp-cover { justify-self: center; display: block; }
.buchtipp-cover img { display: block; width: 150px; filter: drop-shadow(0 8px 14px rgba(60, 30, 0, .22)); }
.buchtipp h2 { margin: .1em 0 .4em; font-size: 1.35rem; }
.buchtipp ul { padding-left: 1.2em; margin-bottom: 1em; }
.buchtipp li::marker { color: var(--gruen); }
.buchtipp-label {
  display: inline-block;
  margin: 0;
  padding: .1em .7em;
  border-radius: 999px;
  background: var(--gruen);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hinweis-klein { font-size: .85rem; color: var(--text-leise); margin: .8em 0 0; }

@media (min-width: 560px) {
  .buchtipp { grid-template-columns: 170px 1fr; align-items: center; padding: 1.8em 1.6em 1.4em; }
  .buchtipp-cover img { width: 170px; }
}

.button {
  display: inline-block;
  padding: .7em 1.3em;
  border-radius: 999px;
  background: var(--gruen);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(47, 122, 59, .3);
  transition: background .15s, transform .15s;
}
.button:hover, .button:focus { background: var(--gruen-dunkel); transform: translateY(-1px); }

/* Kompakte Version in der Seitenleiste – nur auf großen Bildschirmen,
   mobil steht der große Buchtipp ohnehin im Text */
.buchtipp-klein { display: none; }
@media (min-width: 900px) {
  .buchtipp-klein {
    display: block;
    margin: .2em 0 1em;
    padding: 1.7em 1em 1em;
    text-align: center;
    font-size: .88rem;
    line-height: 1.5;
  }
  .buchtipp-klein .buchtipp-cover img { width: 120px; margin: .6em auto; }
  .buchtipp-klein p:not(.anzeige) { margin: 0 0 .6em; }
  .buchtipp-klein .button { padding: .55em 1em; font-size: .9rem; }
}

/* Amazon-Textlinks (ersetzen die früheren iframes) */
.produkt-hinweis {
  clear: both;
  margin: 2em 0 1em;
  padding: .9em 1.2em 1em;
  border: 1px solid var(--linie);
  border-left: 4px solid var(--primaer);
  border-radius: 8px;
  background: var(--creme);
}
.produkt-hinweis h2 { font-size: 1.1rem; margin: .8em 0 .5em; }
.produkt-hinweis ul { margin: 0; }
.produkt-hinweis .autor { color: var(--text-leise); font-size: .92em; }

/* Linktipps und externe Links */
.linktipp, .extern {
  font-size: .92rem;
  color: var(--text-leise);
  border-top: 1px dashed var(--linie);
  padding-top: .8em;
}

/* Kästen im Text */
.tipp, .info {
  padding: .9em 1.1em;
  border-radius: 8px;
  background: #eef6ef;
  border-left: 4px solid var(--gruen);
}
.info { background: var(--creme); border-left-color: var(--primaer); }

.hinweis-gesundheit {
  margin-top: 2.2em;
  padding: .9em 1.1em;
  border-radius: 8px;
  background: #f6f3ee;
  font-size: .88rem;
  color: var(--text-leise);
}

.faq h3 { margin-top: 1.2em; }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.tabelle { overflow-x: auto; margin: 1em 0 1.4em; }
td, th { border: 1px solid var(--linie); padding: .5em .7em; text-align: left; vertical-align: top; }
th { background: var(--primaer-hell); color: var(--primaer-dunkel); }

/* ---------- Fuß ---------- */

#footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1em 16px 2.5em;
  text-align: center;
  font-size: .88rem;
  color: var(--text-leise);
}
#footer a { color: var(--text-leise); }
.fuss-amazon { font-size: .8rem; }

.link-knopf {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

button[data-cc]:not(.link-knopf) {
  font: inherit;
  padding: .5em 1em;
  border-radius: 999px;
  border: 1px solid var(--primaer);
  background: #fff;
  color: var(--primaer-dunkel);
  cursor: pointer;
}

/* ---------- Druck ---------- */

@media print {
  body { background: #fff; color: #000; }
  #header { position: static; box-shadow: none; }
  .hauptmenue, .menue-knopf, #navigation, .skip-link, .buchtipp, .produkt-hinweis, #footer .fuss-amazon { display: none; }
  #inhalt { box-shadow: none; padding: 0; }
  a { color: #000; }
}
