/* =========================================================
RECIPE LAYOUT
========================================================= */

.editorial-page--recipe {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .editorial-page--recipe {
    grid-template-columns: minmax(0, 760px) 320px;
    justify-content: center;
    align-items: start;
    gap: 4rem;
  }
}

.recipe-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width:1024px){

.recipe-sidebar{
    position:sticky;
    top:6rem;
}

}

/* =========================================================
RECIPE HERO
========================================================= */

.detail-hero-inner--recipe{
    display:grid;
    grid-template-columns:minmax(0,760px) minmax(320px,420px);
    gap:4rem;
    align-items:center;
}

.detail-hero-image img{
    width:100%;
    max-width:760px;
    aspect-ratio:16/10;
    object-fit:cover;
    object-position:center;
    display:block;
    border-radius:1.5rem;
    box-shadow:0 10px 26px rgba(0,0,0,.08);
}

.detail-hero-text{
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.detail-hero-title{
    margin-bottom:2rem;
    max-width:12ch;
}

/* =========================================================
HERO INGREDIENTS
========================================================= */

.recipe-ingredients{
    white-space:pre-line;
    line-height:1.75;
    font-size:1.05rem;
    color:#3f4a54;
    max-width:30ch;
}

/* =========================================================
RECIPE CONTENT
========================================================= */

.editorial-page--recipe .editorial-content{
    font-size:1.12rem;
    line-height:1.75;
    counter-reset:recipe-step;
}

.editorial-page--recipe .editorial-content>*:first-child{
    margin-top:0;
}

.editorial-page--recipe .editorial-content h2{
    margin-top:2rem;
    margin-bottom:1rem;
    padding-bottom:.35rem;
    border-bottom:1px solid rgba(0,0,0,.08);
    font-weight:700;
}

.editorial-page--recipe .editorial-content h2:first-child{
    margin-top:0;
}

.editorial-page--recipe .editorial-content p{
    margin-bottom:1.5rem;
}

.editorial-page--recipe .editorial-content ul,
.editorial-page--recipe .editorial-content ol{
    margin:0 0 2rem;
    padding-left:1.5rem;
}

.editorial-page--recipe .editorial-content ul{
    list-style:disc;
    list-style-position:outside;
}

.editorial-page--recipe .editorial-content ul li{
    display:list-item;
    margin-bottom:.5rem;
    line-height:1.6;
}

.editorial-page--recipe .editorial-content ol{
    list-style:decimal;
    list-style-position:outside;
}

.editorial-page--recipe .editorial-content ol li{
    margin-bottom:.9rem;
    line-height:1.7;
}

.editorial-page--recipe .editorial-content li p{
    margin:0;
}

.editorial-page--recipe .editorial-content strong{
    font-weight:700;
}

.editorial-page--recipe .editorial-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* =========================================================
SIDEBAR
========================================================= */

.recipe-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .recipe-sidebar {
    position: sticky;
    top: 6rem;
  }
}

/* =========================================================
NUTRITION CARD
========================================================= */

.nutrition-card{
    box-shadow:0 8px 22px rgba(0,0,0,.04);
}

.nutrition-card-title{
    font-family:"Crimson Pro",serif;
    font-size:1.8rem;
    margin-bottom:1.5rem;
}

.nutrition-icons{
    list-style:none;
    margin:0;
    padding:0;
}

.nutrition-icons li{
    display:grid;
    grid-template-columns:20px 1fr auto;
    align-items:center;
    gap:1rem;
    padding:.9rem 0;
}

/* =========================================================
RECIPE RESPONSIVE
========================================================= */

@media (max-width:1100px){

.detail-hero-inner--recipe{
    grid-template-columns:1fr;
    gap:2.5rem;
}

.detail-hero-title,
.recipe-ingredients{
    max-width:100%;
}

.detail-hero-image img{
    max-width:100%;
}

}

@media (max-width:900px){

.recipe-sidebar{
    position:static;
}

.nutrition-icons li{
    grid-template-columns:18px 1fr auto;
    gap:.7rem;
}

.editorial-page--recipe .editorial-content{
    font-size:1rem;
    line-height:1.8;
    overflow-wrap:anywhere;
}

}

@media (max-width:768px){

.editorial-shell{
    padding-inline:1rem;
}

.editorial-page--recipe{
    gap:2rem;
}


.detail-hero-title{
    margin-bottom:1.5rem;
}

.detail-hero-image img{
    border-radius:1rem;
    aspect-ratio:4/3;
}

.recipe-ingredients{
    font-size:1rem;
    line-height:1.7;
}

.editorial-page--recipe .editorial-content h2{
    margin-top:1.5rem;
}

.recipe-sidebar{
    gap:1.5rem;
}

}

/* =========================================================
IMAGES
========================================================= */

.editorial-page--recipe .editorial-content figure {
  position: relative;
  counter-increment: recipe-step;
  margin: 2.5rem auto;
}

.editorial-page--recipe .editorial-content img{
    display:block;
    width:100%;
    border-radius:1.25rem;
    box-shadow:0 10px 26px rgba(0,0,0,.08);
}

/* =========================================================
STEP BADGE
========================================================= */

.editorial-page--recipe .editorial-content figure::after {
  content: "Step " counter(recipe-step);
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255,255,255,0.92);
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
}

/* =========================================================
FIGURE CAPTIONS
========================================================= */

.editorial-page--recipe figure figcaption {
  font-size: 0.85rem;
  color: #6b7280;
  text-align: center;
  margin-top: 0.6rem;
}

/* =========================================================
HIDE NUTRITION HTML
========================================================= */

.nutrition-data {
  display: none;
}

/* =========================================================
COOK MODE
========================================================= */

body.cook-mode{
    background:#fffef9;
}

body.cook-mode .editorial-page--recipe .editorial-content{
    font-size:1.22rem;
    line-height:2.1;
}

body.cook-mode .recipe-sidebar{
    top:2rem;
}

/* =========================================================
   RECIPE DETAIL — LAYOUT SYSTEM
========================================================= */

.recipe-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

/* Desktop: 2-column editorial layout */
@media (min-width: 1024px) {
  .recipe-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}

/* ================= MAIN COLUMN ================= */

.recipe-main {
  max-width: 720px;
}

/* ================= SIDEBAR ================= */

.recipe-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .recipe-sidebar {
    position: sticky;
    top: 6rem;
  }
}

/* ================= NUTRITION CARD ================= */

.nutrition-card-title {
  font-family: "Crimson Pro", serif;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.nutrition-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nutrition-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
  font-size: 0.95rem;
}

.nutrition-list li:last-child {
  border-bottom: none;
}

/* =========================================================
   SOFT BACKGROUND BAND — RECIPE CONTENT
========================================================= */

.recipe-content-wrap {
  width: 100%;
  min-width: 0;

  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #ffffff 85%,
    rgba(255,255,255,0.95) 100%
  );

  border-radius: 2rem;
  padding: clamp(1.5rem, 3vw, 3rem);
  box-shadow: 0 18px 40px rgba(0,0,0,0.06);
}

/* Subtle separation on very large screens */
@media (min-width: 1280px) {
  .recipe-content-wrap {
    margin-left: -1rem;
    margin-right: -1rem;
  }
}

/* =========================================================
   NUTRITION ICONS — SUBTLE EDITORIAL ANIMATION
   ========================================================= */

.nutrition-icons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.nutrition-icons li {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  align-items: center;
  gap: 0.75rem;

  padding: 0.65rem 0.25rem;
  border-radius: 0.75rem;

  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

/* ICON */
.nutrition-icons i {
  font-size: 0.95rem;
  color: var(--sage);

  transition:
    transform 0.25s ease,
    color 0.25s ease,
    filter 0.25s ease;
}

/* LABEL + VALUE */
.nutrition-icons .label {
  font-size: 0.8rem;
  color: var(--ink);
}

.nutrition-icons .value {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--charcoal);
}

/* HOVER EFFECT (DESKTOP + TOUCH SAFE) */
.nutrition-icons li:hover {
  background-color: rgba(127, 156, 134, 0.08);
}

.nutrition-icons li:hover i {
  transform: translateY(-2px) scale(1.05);
  color: var(--charcoal);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.12));
}

/* ---------------------------------------------------------
   SOFT STAGGERED ENTRANCE (DESKTOP ONLY)
   --------------------------------------------------------- */

@media (min-width: 1024px) {
  .nutrition-icons li {
    opacity: 0;
    transform: translateY(6px);
    animation: nutritionFadeUp 0.5s ease forwards;
  }

  .nutrition-icons li:nth-child(1) { animation-delay: 0.05s; }
  .nutrition-icons li:nth-child(2) { animation-delay: 0.1s; }
  .nutrition-icons li:nth-child(3) { animation-delay: 0.15s; }
  .nutrition-icons li:nth-child(4) { animation-delay: 0.2s; }
}

@keyframes nutritionFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------
   ACCESSIBILITY — RESPECT REDUCED MOTION
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .nutrition-icons li,
  .nutrition-icons i {
    animation: none;
    transition: none;
    transform: none;
  }
}

/* ============================
   Recipe Nutrition Card
============================ */

/* =========================================================
NUTRITION CARD
========================================================= */

.nutrition-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 1.5rem;
  padding: 1.75rem;
  max-width: 360px;
}

.nutrition-card--featured {
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
}

.nutrition-card-header {
  margin-bottom: 1.25rem;
}

.nutrition-badge {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.35rem;
}

.nutrition-card-title {
  font-family: "Crimson Pro", serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--charcoal);
}

.nutrition-card-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

.nutrition-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nutrition-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px dashed rgba(0,0,0,.08);
}

.nutrition-list li:last-child {
  border-bottom: none;
}

.nutrition-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--charcoal);
}

.nutrition-label i {
  font-size: 0.8rem;
  color: var(--sage);
}

.nutrition-card strong {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--charcoal);
}

.nutrition-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #6b7280;
}


.nutrition-card strong {
  transition: color 0.3s ease, transform 0.3s ease;
}

.nutrition-card strong:not(:empty) {
  color: var(--charcoal);
}


/* =========================================
NUTRITION CARD — VALUE REVEAL
========================================= */

.nutrition-card span[data-calories],
.nutrition-card span[data-protein],
.nutrition-card span[data-carbs],
.nutrition-card span[data-fat] {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity .35s ease,
    transform .35s ease;
}

.nutrition-card span.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
DESKTOP — TWO COLUMN EDITORIAL
========================================================= */

@media (min-width: 1024px) {
  .detail-hero-inner--recipe {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
  }

  .detail-hero-image {
    max-width: none;
  }

  .detail-hero-image img {
    max-height: 300px;     /* 👈 calmer, banner-like */
  }
}

/* =========================================================
TABLET — SOFT STACK (MOST IMPORTANT FIX)
========================================================= */

@media (min-width: 640px) and (max-width: 1023px) {
  .detail-hero-inner--recipe {
    grid-template-columns: 1fr;
  }

  .detail-hero-image img {
    max-height: 280px;     /* 👈 stops dominance on iPad */
  }

  .detail-hero-text {
    margin-inline: auto;
    text-align: center;
  }
}

/* =========================================================
   RECIPE DETAIL — MOBILE RESPONSIVENESS
   ========================================================= */

@media (max-width: 1023px) {

  .recipe-content-wrap {
    width: 100%;
    padding: 1.25rem;
    border-radius: 1.5rem;
  }

  .recipe-sidebar {
    width: 100%;
    max-width: none;
    margin: 0;
  }
}

/* =========================================================
RECIPE PAGE — MEDIUM SCREEN STABILITY
========================================================= */

.editorial-page--recipe {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 4vw, 3rem);
}

@media (max-width: 1023px) {
  .editorial-page--recipe {
    grid-template-columns: 1fr;
  }

  .recipe-sidebar {
    max-width: 420px;
    margin-inline: auto;
  }
}

/* =========================================================
EDITORIAL CONTENT — UNIVERSAL PADDING RESTORE
(Articles, Courses, Recipes)
========================================================= */

.editorial-shell {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.editorial-page:not(.editorial-page--recipe) .editorial-content {
  max-width: 42rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Larger screens: slightly more breathing room */
@media (min-width: 1024px) {
  .editorial-content {
    padding-inline: 0;
  }
}

/* Articles & Courses feel airier than recipes */
.editorial-page:not(.editorial-page--recipe) .editorial-content {
  max-width: 46rem;
}

/* =========================================================
RECIPE LISTS
========================================================= */

.editorial-page--recipe .editorial-content ul {
  list-style: disc !important;
  list-style-position: outside;
  padding-left: 1.5rem !important;
  margin: 0 0 2rem !important;
}

.editorial-page--recipe .editorial-content ul li {
  display: list-item !important;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.editorial-page--recipe .editorial-content ol {
  list-style: decimal !important;
  list-style-position: outside;
  padding-left: 1.5rem !important;
}

/* =========================================================
DETAIL HERO — EDITORIAL BANNER SYSTEM
(Single source of truth)
========================================================= */

.detail-hero {
  background: var(--warm);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.detail-hero-inner--recipe {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 4vw, 3rem);

  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

/* =========================================================
TEMP FIX — BG RECIPE LAYOUT
Remove after recipe CSS refactor
========================================================= */

.editorial-page--recipe[lang="bg"] .recipe-content-wrap,
.editorial-page--recipe[lang="bg"] .editorial-content,
.editorial-page--recipe[lang="bg"] .recipe-sidebar {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

@media (max-width: 1023px) {

  .editorial-page--recipe[lang="bg"] {
      grid-template-columns: 1fr !important;
  }

  .editorial-page--recipe[lang="bg"] .recipe-content-wrap {
      padding: 1.25rem !important;
      border-radius: 1.5rem;
  }

  .editorial-page--recipe[lang="bg"] .recipe-sidebar {
      padding: 0 !important;
      margin-top: 1.5rem !important;
  }

}