/* =========================
   Grundlegendes Box-Sizing
   ========================= */
html {
  box-sizing: border-box;
}

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

/* =========================
   Navigation / Kategorien
   ========================= */
.meal-bar {
  display: flex;
  gap: 10px;
  margin: 20px;
}

.meal-btn {
  padding: 10px 18px;
  border: 1px solid #d9d9d9;
  background-color: #ffffff;
  font-size: 16px;
  font-family: inherit;
  color: #666666;
  cursor: pointer;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
}

.meal-btn:hover {
  background-color: #f5f5f5;
}

.meal-btn--active {
  color: #003bc4;
  border-color: #003bc4;
  background-color: #ffffff;
  font-weight: 600;
}

/* =========================
   Rezept-Übersicht (Liste)
   ========================= */
.recipe-grid {
  /* vertikale Liste statt Kachel-Grid */
  display: flex;
  flex-direction: column;
  gap: 40px;          /* mehr Abstand zwischen den Rezeptkarten */
  padding: 30px;
  max-width: 60%;   /* Lesebreite begrenzen */
  margin: 0 auto;     /* Liste zentrieren */
}

/* =========================
   Rezeptkarte
   ========================= */
.recipe-card {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;        /* Karte nutzt die ganze Listenbreite */
  margin-bottom: 20px; /* zusätzlicher Abstand zwischen den Karten */
}

.recipe-card:hover {
  border-color: #cfcfcf;
}

.recipe-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.recipe-title {
  font-size: 18px;
  font-weight: 700;
  margin: 16px 12px 6px 12px;
}

.recipe-sub {
  margin: 0 12px 14px 12px;
  font-size: 14px;
  color: #666666;
}

/* =========================
   Rezept-Detailseite
   ========================= */
.back-link {
  display: inline-block;
  margin: 0 20px 10px;
  text-decoration: none;
  color: #003bc4;
}

.back-link:hover {
  text-decoration: underline;
}

.recipe-detail {
  margin: 0 20px 20px;
  border: 1px solid #e6e6e6;
  background: #ffffff;
}

.recipe-detail img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.recipe-detail-content {
  padding: 16px;
}

.recipe-detail h1 {
  margin-top: 0;
  font-size: 24px;
}

.recipe-detail h2 {
  margin-top: 18px;
  font-size: 18px;
}

/* Inline geöffnete Rezept-Details unter den Karten
   sollen oberhalb der übrigen Karten liegen */
.recipe-detail-inline {
  position: relative;
  z-index: 100;
  background: #ffffff; /* Sicherheits-Hintergrund, damit nichts durchscheint */
}
/* Modal-Overlay für Rezept-Details, die aus der Übersicht geöffnet werden */
.recipe-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  z-index: 1000;
}
.recipe-modal-content {
  position: relative;
  background: #ffffff;
  max-width: 800px;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.recipe-modal-content .recipe-detail {
  margin: 0;
  border: none;
}
.recipe-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}