/* home-chef styles - generated for site build */

:root {
  --primary: #E2622F;
  --primary-dark: #C44A1C;
  --accent: #2F855A;
  --ink: #1F2933;
  --text: #374151;
  --muted: #6B7280;
  --bg: #FFFDF9;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --footer-bg: #20303C;
  --footer-text: #D1D5DB;
  --footer-link: #A7F3D0;
  --font: 'Outfit', 'Manrope', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}
/* Reserve bottom space only when an ad is shown or in operator preview mode. */
body.show-ads,
body.ad-anchor-active { padding-bottom: 66px; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* header */
.site-topbar {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  padding: 8px 16px;
}
.site-topbar .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.site-topbar a { color: rgba(255,255,255,0.8); }
.site-topbar a:hover { color: #fff; }

.main-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 80;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo svg { width: 34px; height: 34px; flex-shrink: 0; }
.logo span { color: var(--primary); }

.search-bar {
  flex: 1;
  max-width: 560px;
  display: flex;
}
.search-bar input {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 999px 0 0 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}
.search-bar input:focus { border-color: var(--primary); }
.search-bar button {
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 0 999px 999px 0;
  padding: 0 20px;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 10px;
  line-height: 0;
}
.nav-toggle:active { transform: translateY(1px); }

.category-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.category-nav .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}
.category-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav ul::-webkit-scrollbar { display: none; }
.category-nav a {
  display: block;
  padding: 14px 10px;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
}
.category-nav a:hover,
.category-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-decoration: none;
}

/* layout */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.page-section { padding: 26px 0; }
.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 18px;
}

/* hero */
.hero {
  background: linear-gradient(105deg, #fff4ec 0%, #ffffff 55%, #f1faf5 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 34px 16px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.hero-text h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: -0.03em;
}
.hero-text p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 22px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
}
.hero-cta:hover { background: var(--primary-dark); text-decoration: none; }
.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(31,41,51,0.12);
}
.hero-image img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

/* card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.recipe-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(31,41,51,0.09);
  text-decoration: none;
}
.recipe-card .media { position: relative; }
.recipe-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.recipe-card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
}
.recipe-card .body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.recipe-card h3 {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.3;
}
.recipe-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: auto;
}
.recipe-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.recipe-card .rating { color: #F59E0B; font-weight: 700; }

/* ads */
.adbox {
  width: 100%;
  max-width: 728px;
  margin: 24px auto;
  min-height: 250px;
  border: 1.5px dashed #CBD5E1;
  border-radius: 10px;
  background: #F8FAFC;
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.adbox .ad-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
}
.ad-slot {
  width: 100%;
  height: auto;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* real ad reveal: show the box and drop placeholder chrome when an iframe or filled ins appears */
.adbox:has(iframe),
.adbox:has(ins[data-ad-status="filled"]),
.adbox:has(ins.adsbygoogle) {
  display: flex;
  border: none;
  background: transparent;
  min-height: 0;
}
.adbox:has(iframe) .ad-label,
.adbox:has(ins[data-ad-status="filled"]) .ad-label,
.adbox:has(ins.adsbygoogle) .ad-label { display: none; }

/* operator preview: show empty placeholder boxes at ?ads=1 so ad positions are visible */
.show-ads .adbox { display: flex; }

/* anchor ad */
#anchorPad {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: var(--footer-bg);
  z-index: 40;
}
body.show-ads #anchorPad,
body.ad-anchor-active #anchorPad { height: 66px; }
#adAnchor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 50px;
  max-height: 60px;
  background: var(--footer-bg);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.15);
}
#adAnchor .ad-slot { min-height: 50px; border: none; background: transparent; }

/* interstitial */
#adInterstitial {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.interstitial-inner {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.35);
  position: relative;
}
.inter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.inter-head span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.inter-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.inter-body {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.inter-body .ad-slot { min-height: 250px; width: 100%; border: none; background: transparent; }

/* recipe detail */
.recipe-hero {
  padding-top: 24px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--muted); }
.recipe-hero h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.recipe-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.recipe-meta-bar strong { color: var(--ink); }
.rating-stars { color: #F59E0B; letter-spacing: 1px; }

.recipe-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
.recipe-main { min-width: 0; }
.recipe-sidebar { position: sticky; top: 100px; }

.recipe-lede {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 22px;
}
.recipe-figure {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.recipe-figure img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

.recipe-main h2 {
  font-size: 1.35rem;
  color: var(--ink);
  margin: 28px 0 14px;
}
.recipe-main h3 {
  font-size: 1.15rem;
  color: var(--ink);
  margin: 24px 0 10px;
}
.recipe-main p { margin: 0 0 14px; }

.ingredient-list {
  background: #F9FAFB;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 18px 0 22px;
}
.ingredient-list ul { margin: 0; padding: 0; list-style: none; }
.ingredient-list li {
  padding: 8px 0;
  border-bottom: 1px solid #E5E7EB;
  font-size: 0.95rem;
}
.ingredient-list li:last-child { border-bottom: none; }

.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.step h4 {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 6px;
}
.step p { margin: 0 0 8px; }
.step-img {
  grid-column: 2;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 4px;
}
.step-img img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

.tips-box {
  background: #F1FAF5;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 22px 0;
}
.tips-box h3 { margin: 0 0 10px; }
.tips-box ul { margin: 0; padding-left: 18px; }
.tips-box li { margin-bottom: 6px; }

.nutrition-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.92rem;
}
.nutrition-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.nutrition-table td:last-child { text-align: right; font-weight: 700; color: var(--ink); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.related-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.related-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.related-card h4 {
  font-size: 0.9rem;
  padding: 10px 12px;
  margin: 0;
  color: var(--ink);
}

/* category page */
.category-header {
  padding: 26px 0 10px;
}
.category-header h1 {
  font-size: 2rem;
  color: var(--ink);
  margin: 0 0 8px;
}
.category-header p { color: var(--muted); margin: 0; }

/* footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 38px 16px 18px;
  margin-top: 36px;
}
.footer-top {
  max-width: var(--max-width);
  margin: 0 auto 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.footer-brand .logo { color: #fff; margin-bottom: 12px; font-size: 1.35rem; }
.footer-brand .logo span { color: #fff; }
.footer-brand p { font-size: 0.92rem; line-height: 1.55; margin: 0; max-width: 560px; color: rgba(255,255,255,0.8); }
.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--footer-text); font-size: 0.92rem; }
.footer-col a:hover { color: var(--footer-link); text-decoration: none; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

/* back to top */
#backToTop {
  position: fixed;
  right: 20px;
  bottom: 100px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
#backToTop.visible { display: flex; }
#backToTop:hover { background: var(--primary-dark); }

/* legal pages */
.legal-page { padding: 32px 0 50px; }
.legal-page h1 { font-size: 2rem; color: var(--ink); margin: 0 0 18px; }
.legal-page h2 { font-size: 1.25rem; color: var(--ink); margin: 26px 0 10px; }
.legal-page p { margin: 0 0 14px; }
.legal-page ul { padding-left: 20px; }

/* responsive */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .recipe-layout { grid-template-columns: 1fr 260px; }
}

@media (max-width: 768px) {
  /* Keep the first in-page ad slot above the fold on a phone. */
  .site-topbar { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 18px; padding-bottom: 14px; }
  .hero-image img { aspect-ratio: 16/9; }
  .hero-text h1 { font-size: 2rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .search-bar { display: none; }
  .nav-toggle { display: block; }
  .category-nav { display: none; }
  .category-nav.open { display: block; position: fixed; inset: 0; top: 62px; background: #fff; z-index: 70; padding: 16px; }
  .category-nav.open ul { flex-direction: column; gap: 0; }
  .category-nav.open a { border-bottom: 1px solid var(--border); padding: 14px 0; }
  .recipe-layout { grid-template-columns: 1fr; }
  .recipe-sidebar { position: static; display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  /* comfortable side padding so content never touches the screen edges */
  .wrap { padding-left: 20px; padding-right: 20px; }
  .site-footer { padding: 36px 20px 18px; }
  .hero-inner { padding-left: 20px; padding-right: 20px; }
  .adbox { min-height: 200px; }
  .ad-slot { min-height: 200px; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .recipe-hero h1 { font-size: 1.75rem; }
  .step { grid-template-columns: 1fr; }
  .step::before { margin-bottom: 6px; }
  .step-img { grid-column: 1; }
  .inter-body { min-height: 360px; }
}

/* utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
