/* === recipe.css — widok przepisu === */

:root{
  --text: #222222;
  --page: #efeee6;     /* tło głównej karty przepisu (DESKTOP) */
  --tile: #f6f5f0;     /* tło kafelków na telefonie */
  --white: #ffffff;
}

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

html, body{ overflow-x: hidden; }

/* Łamanie długich ciągów */
.recipe-title,
.recipe-desc,
.recipe-meta,
.step-text,
.ingredients-list li,
.steps-list li{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* =========================
   GŁÓWNA KARTA PRZEPISU
========================= */
.recipe-detail-page{
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 24px; /* było 40px 24px 24px */
  background: var(--page);
  border-radius: 18px;
  color: var(--text);
  font-family: 'Georgia', serif;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  text-align: left;
}

/* tytuł i opis */
.recipe-title{
  font-size: 36px;
  margin: 0 0 14px 0;
  color: #3E6644;
}

.recipe-desc{
  font-size: 18px;
  margin: 0 0 12px 0;
  text-align: justify;
  color: #444;
}

/* ✅ Zalecane / Przeciwskazania jako tekst */
.recipe-meta{
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 22px 0;
  color: #333;
}

.recipe-meta-bottom{
  margin-top: 20px;
  margin-bottom: 0;
}

/* =========================
   UKŁAD DWÓCH KOLUMN (DESKTOP)
========================= */
.recipe-columns{
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.recipe-section{
  flex: 1;
  margin: 0;
  background: var(--white);
  padding: 22px 20px;
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.04);
  min-width: 0;
}

.recipe-section h2{
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
}

/* listy (desktop) */
.ingredients-list,
.steps-list{
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  color: var(--text);
}

.ingredients-list li,
.steps-list li{
  margin-bottom: 10px;
}

/* mobile steps domyślnie ukryte na desktopie */
.steps-mobile{ display: none; }

/* =========================
   MOBILE
========================= */
@media (max-width: 768px){

  .recipe-detail-page{
    width: 100%;
    max-width: 520px;
    margin: 0 auto;

    /* ✅ miejsce na przycisk "Wróć" fixed */
    padding-top: 40px;

    /* ✅ ODDECH po bokach na telefonie */
    padding-left: 16px;
    padding-right: 16px;

    padding-bottom: 0;

    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .recipe-title{
    font-size: 34px;
    line-height: 1.05;
    margin-bottom: 8px;

    /* ✅ delikatnie, żeby tytuł też nie kleił się do krawędzi */
    padding: 0 2px;
  }

  .recipe-desc{
    margin-bottom: 10px;

    /* ✅ oddech dla opisu */
    padding: 0 2px;
  }

  .recipe-meta{
    margin: 0 0 16px 0;

    /* ✅ oddech dla meta */
    padding: 0 2px;
  }

  .recipe-meta-bottom{
    margin-top: 14px;
    margin-bottom: 0;
    padding-bottom: 10px;
  }

  .recipe-columns{
    flex-direction: column;
    gap: 16px;
    width: 100%;
    min-width: 0;
  }

  .recipe-section{
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: var(--tile);
    border-radius: 18px;
    padding: 18px 16px;
  }

  .ingredients-list{
    padding-left: 16px;
    line-height: 1.45;
  }
  .ingredients-list li{
    margin-bottom: 6px;
  }

  .steps-desktop{ display: none; }
  .steps-mobile{ display: grid; gap: 12px; }

  .step-card{
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255,255,255,0.98);
    overflow: visible;
  }

  .step-title{
    font-weight: 900;
    font-size: 18px;
    margin: 0 0 10px 0;
  }

  .step-text{
    font-size: 16px;
    line-height: 1.6;
    color: #333;
  }
}

/* bardzo wąskie ekrany */
@media (max-width: 360px){
  .recipe-title{ font-size: 30px; }
}
