/* =========================================================
HERO SCALE — SINGLE SOURCE OF TRUTH
========================================================= */

:root {
  --hero-pad-y: clamp(3.25rem, 5vw, 4.5rem);
  --hero-pad-y-home: clamp(4.5rem, 6vw, 6rem);

  --hero-title-size: clamp(2.2rem, 4.5vw, 3.2rem);
  --hero-title-line: 1.15;

  --hero-desc-size: 1.05rem;
  --hero-desc-line: 1.7;

  --hero-max-width: 46rem;
}

/* ============================
   MOBILE NAV — SCROLL FIX
   ============================ */

#mobile-panel {
  position: fixed;
  top: 0;
  right: 0;

  width: 18rem; /* w-72 */
  max-width: 90vw;

  height: 100dvh; /* 👈 dynamic viewport height */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  background: var(--warm);
  z-index: 50;
}

/* Prevent background scroll WITHOUT breaking iOS */
body.nav-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

/* Ensure closed menu is truly inactive */
#mobile-panel.translate-x-full {
  pointer-events: none;
}

#mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 40;
}

/* When hidden */
#mobile-backdrop.hidden {
  display: none;
}


/* =========================================================
PAGE HERO — LISTING PAGES
========================================================= */

.page-hero {
  background: var(--warm);
  padding: var(--hero-pad-y) 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.page-hero-inner {
  max-width: var(--hero-max-width);
  margin: 0 auto;
  text-align: center;
}

.page-eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

.page-hero-title {
  font-family: "Crimson Pro", serif;
  font-size: var(--hero-title-size);
  line-height: var(--hero-title-line);
  color: var(--charcoal);
  margin-bottom: 0.9rem;
}

.page-hero-description {
  font-size: var(--hero-desc-size);
  line-height: var(--hero-desc-line);
  color: #4b5563;
  max-width: 46ch;
  margin: 0 auto;
}

.page-hero-search {
  padding-inline: 1rem;
  max-width: 36rem;      /* mobile + small screens */
  margin-inline: auto;   /* center horizontally */
}

@media (min-width: 768px) {
  .page-hero-search {
    max-width: 42rem;
  }
}

@media (min-width: 1024px) {
  .page-hero-search {
    max-width: 48rem;
  }
}

/* Ensure the input fills the container */
.page-hero-search input {
  width: 100%;
  padding: 0.9rem 1.25rem;
  border-radius: 9999px;
}


.hero-search-empty {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #6b7280;
  text-align: center;
}

.hero-search-empty:not(.hidden) {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
RECIPE PAGE LAYOUT
========================================================= */

.editorial-page--recipe {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .editorial-page--recipe {
    grid-template-columns: minmax(0, 680px) 320px;
    justify-content: center;
    align-items: start;
    gap: 4rem;
  }
}

/* =========================================================
RECIPE HERO — BALANCED
========================================================= */

.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;
  border-radius: 1.5rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  display: block;
  box-shadow: 0 10px 26px rgba(0,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;
  max-width: 30ch;
  color: #3f4a54;
}

/* =========================================================
CONTENT
========================================================= */

.editorial-page--recipe .editorial-content {
  font-size: 1.12rem;
  line-height: 1.95;
  counter-reset: recipe-step;
}

.editorial-page--recipe .editorial-content p {
  margin-bottom: 1.5rem;
}

.editorial-page--recipe .editorial-content li {
  margin-bottom: 1rem;
}

.editorial-page--recipe .editorial-content strong {
  font-weight: 700;
}

/* =========================================================
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,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: 0.9rem 0;
}

/* =========================================================
BUTTONS
========================================================= */

.editorial-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* =========================================================
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%;
  max-width: 680px;
  border-radius: 1.25rem;
  box-shadow: 0 10px 26px rgba(0,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;
}

/* =========================================================
MOBILE / TABLET
========================================================= */

@media (max-width: 1100px) {
  .detail-hero-inner--recipe {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .detail-hero-title {
    max-width: 100%;
  }

  .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: 0.7rem;
  }

  .editorial-page--recipe .editorial-content {
    font-size: 1rem;
    line-height: 1.85;
    overflow-wrap: break-word;
  }
}

@media (max-width: 768px) {
  .detail-hero-image img {
    border-radius: 1rem;
    aspect-ratio: 4 / 3;
  }

  .recipe-ingredients {
    font-size: 1rem;
    line-height: 1.7;
  }

  .detail-hero-title {
    margin-bottom: 1.5rem;
  }
}

/* =========================================================
RELATED CONTENT — EDITORIAL EPILOGUE
========================================================= */

.related-content {
  background: var(--warm);
  padding-block: clamp(3.5rem, 6vw, 5rem);
  border-top: 1px solid rgba(0,0,0,0.06);
}

.related-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.related-eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.6rem;
}

.related-title {
  font-family: "Crimson Pro", serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--charcoal);
}

/* GRID */
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* CARD */
.related-card {
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

.related-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* IMAGE */
.related-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* TEXT */
.related-body {
  padding: 1.1rem 1.25rem 1.35rem;
}

.related-card-title {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--charcoal);
}

/* =====================================
EDITORIAL HERO — IMAGE PANEL
===================================== */

.editorial-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.editorial-hero .container {
  position: relative;
  z-index: 2;
}

.editorial-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 50%;
  z-index: 0;

  background-image: url("/assets/images/hero-patternV2.png");
  background-repeat: repeat;
  background-size: 420px auto;
  background-position: top right;

  opacity: 0.7;
  pointer-events: none;

  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0,0,0,0.25) 20%,
    rgba(0,0,0,0.55) 40%,
    rgba(0,0,0,0.85) 60%,
    black 75%
  );
}

/* =====================================
EDITORIAL HERO — MEDIUM SCREENS
===================================== */

@media (min-width: 768px) {

  .editorial-hero {
    padding: 3.5rem 0 3rem;
  }

  .editorial-hero h1 {
    font-size: 2.4rem;
    line-height: 1.15;
  }

  .editorial-hero p {
    font-size: 1rem;
    max-width: 36ch;
  }

  .editorial-hero::after {
    width: 50%;
    opacity: 0.65;
  }
}

#mobile-menu-btn {
  display: block;
}

@media (min-width: 1024px) {
  #mobile-menu-btn {
    display: none;
  }
}

/* =====================================
EDITORIAL HERO — LARGE SCREENS
===================================== */

@media (min-width: 1200px) {

  .editorial-hero {
    padding: 4.25rem 0 3.75rem;
  }

  .editorial-hero h1 {
    font-size: 2.9rem;
  }

  .editorial-hero p {
    font-size: 1.05rem;
    max-width: 40ch;
  }

  .editorial-hero::after {
    width: 50%;
    opacity: 0.6;
  }
}

@media (max-width: 767px) {
  .editorial-hero::after {
    display: none;
  }
}

@media (max-width: 767px) {
  .editorial-hero {
    padding-top: 2.75rem;
    padding-bottom: 3rem;
  }

  .editorial-hero h1 {
    margin-top: 0.5rem;
  }
}

/* Navbar badge (Courses → Members) */
.nav-badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(127,156,134,0.15); /* sage tint */
  color: var(--sage);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .nav-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.45rem;
  }
}

.site-header .container {
  align-items: center;
}


.site-header .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 1100px) {
  .nav-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.45rem;
  }
}

.editorial-hero {
  padding-inline: calc((100vw - 100%) / 2);
}

/* Tablet balance fix */

/* Prevent nav compression */
.site-header .container {
  gap: 2rem;
}

/* Keep nav items vertically aligned */
.site-header .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .site-header {
    font-size: 2.1rem; /* slightly calmer than desktop */
  }

  #mobile-menu-btn {
    margin-left: 1rem; /* optical breathing room */
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .site-header a[href="/"] {
    align-items: center;
  }
}



/* =========================================================
DETAIL CONTENT — RESTORE RHYTHM
========================================================= */

.editorial-shell {
  padding-top: 3.5rem;
  padding-bottom: 5rem;
}

.editorial-content {
  max-width: 42rem;
  margin: 0 auto;
}

.editorial-content p {
  margin-bottom: 1.25rem;
}


/* =========================================================
   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;
}

/* ================= ACTIONS ================= */

.editorial-actions {
  display: flex;
}

.editorial-actions .cta-btn {
  justify-content: center;
}

/* =====================================
   BACK BUTTON — REMOVE SEPARATE DIVIDER
===================================== */

.editorial-back {
  margin-top: clamp(3rem, 6vw, 4rem);
  padding-top: 0;
  border-top: none;
}

.back-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.1);

  color: var(--sage);
  background: transparent;

  text-decoration: none;

  transition:
    transform 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.back-icon-link i {
  font-size: 1rem;
  line-height: 1;
}

/* Hover */
.back-icon-link:hover {
  color: var(--charcoal);
  border-color: rgba(0,0,0,0.2);
  background-color: rgba(0,0,0,0.03);
  transform: translateX(-2px);
}

/* Keyboard focus */
.back-icon-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(127,156,134,0.35);
}

/* Mobile tuning */
@media (max-width: 640px) {
  .back-icon-link {
    width: 38px;
    height: 38px;
  }

  .back-icon-link i {
    font-size: 0.95rem;
  }
}


/* Mobile balance */
@media (max-width: 640px) {
  .back-link {
    font-size: 0.9rem;
  }
}

/* =====================================
   EDITORIAL BACK — CONTAINMENT FIX
===================================== */

.editorial-back {
  max-width: 42rem;              /* match editorial-content */
  margin: 3rem auto 0;           /* center horizontally */
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  display: flex;
  justify-content: flex-start;
}

/* Mobile: keep centered */
@media (max-width: 767px) {
  .editorial-back {
    justify-content: center;
  }
}


/* =========================================================
   SOFT BACKGROUND BAND — RECIPE CONTENT
========================================================= */

.recipe-content-wrap {
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #ffffff 85%,
    rgba(255,255,255,0.95) 100%
  );
  border-radius: 2rem;
  padding: clamp(1.75rem, 4vw, 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;
  }
}


/* Homepage hero image */
.hero--home .hero-image img {
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
  box-shadow: 0 18px 40px rgba(0,0,0,.08);
}

/* Optional: soften on very large screens */
@media (min-width: 1280px) {
  .hero--home .hero-image img {
    max-width: 560px;
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .hero--home .hero-image {
    display: none;
  }
}

/* IMAGE — takes 50% with editorial left fade */
.hero-image {
  position: relative;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;

  border-radius: 1.75rem;
  box-shadow: 0 18px 40px rgba(0,0,0,.12);

  /* Full visibility */
  opacity: 1;

  /* Fade ONLY toward the left */
  -webkit-mask-image: linear-gradient(
    to left,
    rgba(0,0,0,1) 65%,
    rgba(0,0,0,0) 100%
  );
  mask-image: linear-gradient(
    to left,
    rgba(0,0,0,1) 65%,
    rgba(0,0,0,0) 100%
  );
}

/* =========================================================
NAVBAR — FINAL BALANCE REFINEMENTS
========================================================= */

/* Prevent awkward wrapping on nav links only */
.site-header nav .nav-link {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

/* Compact desktop / tablet mode */
@media (max-width: 1100px) {
  .site-header nav {
    gap: 1.25rem;
  }

  .site-header .nav-link {
    font-size: 0.875rem;
  }
}

/* Language switch spacing */
.site-header .language-switch {
  margin-left: 1.5rem;
}

@media (max-width: 1100px) {
  .site-header .language-switch {
    margin-left: 1rem;
  }
}

/* Bulgarian navbar only — readability */
html[lang="bg"] .site-header nav {
  letter-spacing: 0.01em;
}

/* ===============================
   HEADER LOGO — LARGE & VISIBLE
   =============================== */

.site-header {
  height: 80px;                 /* Header depth */
  display: flex;
  align-items: center;
  overflow: visible;
}

.logo-img {
  height: 74px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .logo-img {
    height: 58px;
  }
}

/* ===============================
   TABLET & MOBILE
   =============================== */

@media (max-width: 768px) {
  .site-header {
    height: 64px;
  }
}



/* =========================================================
MEMBERSHIP CTA — RESTORED & STYLED
========================================================= */

.members-cta {
  margin-top: 4.5rem;
  padding: 3rem 2rem;
  background: linear-gradient(
    135deg,
    var(--sage) 0%,
    #8faa98 100%
  );
  border-radius: 1.75rem;
  color: white;
}

.members-cta-inner {
  max-width: 1100px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

.members-cta-title {
  font-family: "Crimson Pro", serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.members-cta-description {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.92;
  max-width: 40ch;
}

/* Button */
.members-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.85rem 1.75rem;
  border-radius: 999px;

  background: white;
  color: var(--sage);
  font-weight: 600;
  font-size: 0.95rem;

  text-decoration: none;
  white-space: nowrap;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.members-cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Mobile */
@media (max-width: 768px) {
  .members-cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .members-cta-description {
    max-width: none;
  }
}

/* =========================================================
MEMBERS PAGE — MOBILE CTA WIDTH FIX
========================================================= */

/* Target Ghost members primary button */
@media (max-width: 640px) {
  .members-page .cta-btn,
  .members-page button,
  .members-page a.cta-btn {
    max-width: 320px;      /* 👈 key control */
    margin-inline: auto;   /* center */
  }
}

@media (max-width: 640px) {
  .members-page .cta-btn {
    padding: 0.9rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 999px;
  }
}


/* =========================================================
MOBILE REFINEMENTS
========================================================= */

@media (max-width: 768px) {
  .pillar-card {
    padding: 2rem 1.5rem;
  }

  .pillar-detail ul {
    grid-template-columns: 1fr;
  }
}


/* Mobile breathing room */
@media (max-width: 768px) {
  .page-hero--pillars {
    padding-top: 3rem;
    padding-bottom: 4.5rem;
  }
}


/* Mobile tuning */
@media (max-width: 640px) {
  .page-hero--pillars .cta-btn {
    min-width: unset;
  }
}

.page-hero--courses .page-hero-search {
  margin-top: 2rem;
}


/* MOBILE */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero-title {
    max-width: none;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-image {
    order: -1;
    margin-bottom: 2rem;
  }

  .hero--strip::after {
    display: none;
  }
}

/* =========================================================
HOMEPAGE HERO — VERTICAL RHYTHM FIX
========================================================= */

/* Ensure breathing room below homepage hero */
.hero--home {
  padding-bottom: clamp(4rem, 7vw, 6rem);
}

/* Space before first section after hero */
.hero--home + section {
  margin-top: clamp(3.5rem, 6vw, 5rem);
}

/* Mobile comfort */
@media (max-width: 640px) {
  .hero--home {
    padding-bottom: 3.5rem;
  }

  .hero--home + section {
    margin-top: 3rem;
  }
}

/* =========================================================
HOMEPAGE SECTION HEADERS — MOBILE TAP FIX
========================================================= */

.editorial-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Improve spacing + tap accuracy on mobile */
@media (max-width: 640px) {
  .editorial-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .editorial-section-header h2 {
    margin-bottom: 0.25rem;
  }

  .editorial-section-header .editorial-text-link {
    padding: 0.35rem 0;
    font-size: 0.95rem;
  }
}

@media (max-width: 640px) {
  .editorial-text-link {
    font-weight: 500;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
  }
}


/* ============================
   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;
}

/* =========================================================
HERO BUTTON WIDTH FIX (MOBILE)
========================================================= */

/* Default hero button behavior */
.page-hero .cta-btn {
  width: auto;
}

/* Mobile: prevent full-width buttons */
@media (max-width: 640px) {
  .page-hero .cta-btn {
    width: 100%;
    max-width: 320px;   /* 👈 key control */
    margin-inline: auto;
  }

  /* Stack spacing */
  .page-hero .hero-actions,
  .page-hero .flex {
    gap: 0.75rem;
  }
}

/* =========================================================
MEMBERSHIP CTA — WIDTH & ALIGNMENT FIX
========================================================= */

.members-cta {
  padding: clamp(3rem, 6vw, 5rem) 1.5rem;
}

/* Constrain content width */
.members-cta-inner {
  max-width: 1100px;          /* 👈 keeps content together */
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

/* Text block */
.members-cta-inner > div {
  max-width: 520px;
}

/* Button */
.members-cta-button {
  white-space: nowrap;
}

/* Mobile: stack cleanly */
@media (max-width: 768px) {
  .members-cta-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
}

.members-cta-button {
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

/* =========================================================
FOOTER
========================================================= */

@media (max-width: 767px) {

  footer .grid {
    gap: 2.5rem;
  }

  footer .space-y-12 {
    gap: 2rem;
  }

  footer .text-center {
    text-align: left;
  }

  footer .justify-center {
    justify-content: flex-start;
  }

  footer .mx-auto {
    margin-left: 0;
    margin-right: 0;
  }

  footer h4 {
    margin-bottom: 0.8rem;
  }

  footer ul {
    margin-top: 0.5rem;
  }

  footer .border-t {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
  }
}


footer .grid {
  align-items: start;
}

/* =========================================================
MEMBERS CTA — LAYOUT REFINEMENT (SIMPLE)
========================================================= */

.members-cta-inner {
  max-width: 1100px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(2rem, 4vw, 3rem);

  padding: clamp(2.5rem, 4vw, 3.25rem);
}

/* Text block width control */
.members-cta-content {
  max-width: 36rem;
}

/* Button alignment polish */
.members-cta-button {
  white-space: nowrap;
}

/* Tablet & mobile */
@media (max-width: 900px) {
  .members-cta-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .members-cta-button {
    margin-top: 1.5rem;
  }
}

.editorial-back {
  margin-top: 3rem;
}

.editorial-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  color: var(--sage);
  transition: all 0.25s ease;
}

.editorial-back-link:hover {
  background: var(--sage);
  color: white;
  transform: translateX(-2px);
}

/* =========================================================
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);
}

/* =========================================================
IMAGE — BANNER BEHAVIOUR
========================================================= */

.detail-hero-image {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;

  border-radius: 1.75rem;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(0,0,0,0.1);
}

.detail-hero-image img {
  width: 100%;
  height: 100%;
  max-height: 340px;        /* 👈 KEY: desktop containment */
  object-fit: cover;
  display: block;
}

/* =========================================================
TEXT BLOCK
========================================================= */

.detail-hero-text {
  max-width: 460px;
}

.detail-hero-meta {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

.detail-hero-title {
  font-family: "Crimson Pro", serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--charcoal);
}

.detail-hero-excerpt {
  font-size: 1rem;
  line-height: 1.65;
  color: #4b5563;
  max-width: 42ch;
}

/* =========================================================
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;
  }
}

/* =========================================================
MOBILE — FULL WIDTH BUT CALM
========================================================= */

@media (max-width: 639px) {
  .detail-hero {
    padding-block: 2.25rem;
  }

  .detail-hero-image img {
    max-height: 260px;
    border-radius: 1.25rem;
  }

  .detail-hero-text {
    text-align: left;
  }

  .detail-hero-title {
    font-size: clamp(1.85rem, 6vw, 2.2rem);
  }
}


/* =========================================================
   RECIPE DETAIL — MOBILE RESPONSIVENESS
   ========================================================= */

/* STACK LAYOUT ON SMALL SCREENS */
@media (max-width: 1023px) {

  .recipe-content-wrap {
    width: 100%;
  }

  .recipe-sidebar {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }
}


/* CONTENT — TIGHTER READABILITY */
@media (max-width: 767px) {
  .editorial-content {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .editorial-content h2 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
  }

  .editorial-content h3 {
    font-size: 1.2rem;
  }
}

/* NUTRITION CARD — MOBILE FRIENDLY */
@media (max-width: 767px) {
  .nutrition-card {
    padding: 1.25rem;
  }

  .nutrition-icons {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* BACK ICON — FIXED & TAP-FRIENDLY */
@media (max-width: 767px) {
  .editorial-back {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
  }

  .back-icon-link {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}


/* =========================================================
AUTHOR SIGNATURE — EDITORIAL (FOOTER-ALIGNED)
========================================================= */

.author-signature {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;

  /* Width + centering */
  max-width: 42rem;
  margin: 2.5rem auto 0;

  /* Inner breathing room */
  padding-top: 1.75rem;

  /* Visual separation from back button */
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* Avatar */
.author-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
}

/* Fallback avatar */
.author-avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--sage);
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 600;
}

/* Eyebrow */
.author-eyebrow {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

/* Name */
.author-name {
  font-family: "Crimson Pro", serif;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

/* Bio */
.author-bio {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #4b5563;
}

/* ===============================
   MOBILE REFINEMENT
================================ */

@media (max-width: 640px) {
  .author-signature {
    grid-template-columns: 40px 1fr;
    padding-inline: 0.25rem; /* 👈 prevents screen-edge touching */
  }

  .author-avatar img,
  .author-avatar-fallback {
    width: 40px;
    height: 40px;
  }
}



/* =========================================================
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-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;
}

/* =========================================================
MEMBERSHIP CTA — CONTAIN WIDTH
========================================================= */

/* Base: prevent full-width stretch */
.gh-portal-btn,
.gh-btn,
button[data-members-button],
.membership-page button {
  width: auto;
  max-width: 100%;
}

/* Specifically your "Join for free" button */
.membership-page .cta-btn,
.membership-page button {
  display: inline-flex;
  justify-content: center;
  padding-inline: 2.5rem;
  min-width: unset;
}

/* Mobile tightening */
@media (max-width: 640px) {
  .membership-page .cta-btn,
  .membership-page button {
    width: auto;
    max-width: 90%;
    margin-inline: auto;
  }
}

.membership-page .cta-btn {
  max-width: 320px;
}

/* =========================================================
MEMBERSHIP CTA — FORCE COMPACT BUTTON ON MOBILE
========================================================= */

@media (max-width: 640px) {
  .editorial-page--wide .cta-btn,
  .membership-page .cta-btn,
  button[data-portal="signup"] {
    width: auto !important;          /* override width:100% */
    max-width: fit-content;
    padding-inline: 1.5rem !important; /* override px-10 */
    margin-inline: auto;
  }
}

/* =========================================================
WORK WITH ME
========================================================= */
.editorial-card {
  min-height: 100%;
  border: 1px solid rgba(0,0,0,0.05);
}
