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

:root {
  --farbe-text: #1a1a1a;
  --farbe-text-gedaempft: #555;
  --farbe-akzent: #b8860b;
  --farbe-akzent-hell: #d4a017;
  --farbe-hintergrund: #fff;
  --farbe-hintergrund-grau: #f8f8f6;
  --farbe-rahmen: #e5e5e5;
  --schrift: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --breite-max: 780px;
  --radius: 6px;
}

html {
  font-family: var(--schrift);
  font-size: 18px;
  line-height: 1.6;
  color: var(--farbe-text);
  background: var(--farbe-hintergrund);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--farbe-akzent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout */
.container {
  max-width: var(--breite-max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  border-bottom: 2px solid var(--farbe-rahmen);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  height: 110px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.site-nav a {
  color: var(--farbe-text);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--farbe-rahmen);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--farbe-text-gedaempft);
  font-size: 0.85rem;
}

/* Rezept-Grid */
.rezept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

/* Rezept-Karte */
.rezept-karte {
  border: 1px solid var(--farbe-rahmen);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.rezept-karte:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.rezept-karte a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.rezept-karte__bild {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--farbe-hintergrund-grau);
}

.rezept-karte__bild-placeholder {
  width: 100%;
  height: 200px;
  background: var(--farbe-hintergrund-grau);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.rezept-karte__inhalt {
  padding: 1rem;
}

.rezept-karte__name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.rezept-karte__meta {
  font-size: 0.8rem;
  color: var(--farbe-text-gedaempft);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rezept-karte__beschreibung {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--farbe-text-gedaempft);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Rezept-Detailseite */
.rezept-seite {
  padding-bottom: 3rem;
}

.rezept-kopf {
  margin-bottom: 1.5rem;
}

.rezept-kopf h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.rezept-kopf .kurzfassung {
  font-size: 1.05rem;
  color: var(--farbe-text-gedaempft);
  line-height: 1.5;
  background: var(--farbe-hintergrund-grau);
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--farbe-akzent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1rem;
}

.rezept-meta-leiste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.88rem;
  color: var(--farbe-text-gedaempft);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--farbe-rahmen);
}

.rezept-meta-leiste strong {
  color: var(--farbe-text);
}

.rezept-meta-leiste .schwierigkeit-einfach { color: #27ae60; }
.rezept-meta-leiste .schwierigkeit-mittel { color: #e67e22; }
.rezept-meta-leiste .schwierigkeit-schwer { color: var(--farbe-akzent); }

.rezept-bewertung {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--farbe-text-gedaempft);
  margin-bottom: 1rem;
}

.sterne {
  color: #f39c12;
  letter-spacing: -1px;
}

/* Bild */
.rezept-bild {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

/* Zutaten + Anleitung nebeneinander auf Desktop */
@media (min-width: 700px) {
  .rezept-hauptinhalt {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
  }
}

/* Zutaten */
.zutaten-box {
  background: var(--farbe-hintergrund-grau);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.zutaten-box h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.zutaten-liste {
  list-style: none;
}

.zutaten-liste li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--farbe-rahmen);
  font-size: 0.95rem;
  line-height: 1.4;
}

.zutaten-liste li:last-child {
  border-bottom: none;
}

.portionen-anzeige {
  font-size: 0.82rem;
  color: var(--farbe-text-gedaempft);
  margin-bottom: 0.5rem;
}

/* Anleitung */
.anleitung h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.anleitung-schritt {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.schritt-nummer {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: var(--farbe-akzent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 0.1rem;
}

.schritt-text {
  font-size: 0.97rem;
  line-height: 1.55;
}

/* Sektionen nach Hauptinhalt */
.rezept-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--farbe-rahmen);
}

.rezept-section h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

/* Nährwerte */
.naehrwert-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.naehrwert-tabelle td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--farbe-rahmen);
}

.naehrwert-tabelle td:first-child {
  color: var(--farbe-text-gedaempft);
}

.naehrwert-tabelle td:last-child {
  font-weight: 600;
  text-align: right;
}

/* FAQ */
.faq-liste {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-element h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--farbe-text);
}

.faq-element p {
  font-size: 0.93rem;
  color: var(--farbe-text-gedaempft);
  line-height: 1.5;
}

/* Empfehlung */
.empfehlung-box {
  background: var(--farbe-hintergrund-grau);
  border: 1px solid var(--farbe-rahmen);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
}

/* Schlagwörter */
.schlagwoerter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.schlagwort {
  background: var(--farbe-hintergrund-grau);
  border: 1px solid var(--farbe-rahmen);
  border-radius: 2rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  color: var(--farbe-text-gedaempft);
  text-decoration: none;
}

.schlagwort:hover {
  background: var(--farbe-rahmen);
  text-decoration: none;
}

/* Ad-Slots */
.ad-slot {
  background: var(--farbe-hintergrund-grau);
  border: 1px dashed var(--farbe-rahmen);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--farbe-text-gedaempft);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--farbe-text-gedaempft);
  margin-bottom: 1rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--farbe-text-gedaempft);
}

/* Seitenüberschriften */
.seite-titel {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.seite-beschreibung {
  color: var(--farbe-text-gedaempft);
  margin-bottom: 1.5rem;
}

/* Kategorien-Grid */
.kategorien-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.kategorie-karte {
  border: 1px solid var(--farbe-rahmen);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--farbe-text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}

.kategorie-karte:hover {
  border-color: var(--farbe-akzent);
  background: #fdf9ed;
  text-decoration: none;
}

.kategorie-karte__emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.4rem;
}

.kategorie-karte__anzahl {
  font-size: 0.78rem;
  color: var(--farbe-text-gedaempft);
  font-weight: 400;
  display: block;
  margin-top: 0.2rem;
}

/* 404 */
.fehler-seite {
  text-align: center;
  padding: 4rem 1rem;
}

.fehler-seite h1 {
  font-size: 4rem;
  color: var(--farbe-akzent);
  margin-bottom: 0.5rem;
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .site-nav,
  .ad-slot,
  .breadcrumb,
  .schlagwoerter,
  .empfehlung-box {
    display: none !important;
  }

  body {
    font-size: 12pt;
  }

  .rezept-kopf h1 {
    font-size: 1.6rem;
  }

  .rezept-hauptinhalt {
    display: block;
  }

  a[href]::after {
    content: none;
  }
}
