/*
Theme Name: CookFast
Theme URI: https://cookfast.org
Author: CookFast
Author URI: https://cookfast.org
Description: Lightning-fast, free AI recipe generator theme. Clean, modern, and optimized for Core Web Vitals. Includes free recipe tool + blog.
Version: 1.8.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cookfast
Tags: blog, food-and-drink, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* ============================================================
   CookFast Theme – Lightning Fast Core Styles
   ============================================================ */

:root {
  --color-primary: #e85d04;
  --color-primary-dark: #d00000;
  --color-primary-light: #f48c06;
  --color-secondary: #370617;
  --color-accent: #faa307;
  --color-bg: #fffbf5;
  --color-bg-alt: #fff3e0;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c5c;
  --color-border: #f0e6d8;
  --color-white: #ffffff;
  --color-success: #2d6a4f;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(232, 93, 4, 0.08);
  --shadow-lg: 0 12px 40px rgba(232, 93, 4, 0.12);
  --max-width: 1140px;
  --header-height: 72px;
  --transition: 0.2s ease;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-secondary);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin-bottom: 1rem; color: var(--color-text-muted); }
p:last-child { margin-bottom: 0; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section { padding: 4.5rem 0; }
.section-alt { background: var(--color-bg-alt); }
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { font-size: 1.1rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50px;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(232, 93, 4, 0.35);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 93, 4, 0.4);
}
.btn-secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-lg { padding: 1.1rem 2.25rem; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--color-secondary);
  text-decoration: none;
  min-width: 0;
}
.site-logo:hover { color: var(--color-primary); }
.site-logo:hover .site-tagline { color: var(--color-primary); }
.site-logo svg { width: 32px; height: 32px; flex-shrink: 0; }
.site-logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
  line-height: 1.15;
}
.site-title {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.site-tagline {
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(280px, 42vw);
}
@media (max-width: 480px) {
  .site-tagline { max-width: 140px; }
}
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.main-nav a {
  font-weight: 500;
  color: var(--color-text);
  font-size: 0.95rem;
}
.main-nav a:hover,
.main-nav .current-menu-item a { color: var(--color-primary); }
.nav-cta { margin-left: 0.5rem; }
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-secondary);
  position: relative;
  transition: background 0.2s;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--color-secondary);
  transition: transform 0.2s;
}
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== HERO ========== */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(165deg, #fffbf5 0%, #fff3e0 50%, #ffedd5 100%);
  overflow: hidden;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(232, 93, 4, 0.1);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 span { color: var(--color-primary); }
.hero-lead {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.hero-stats strong {
  display: block;
  font-size: 1.35rem;
  color: var(--color-secondary);
  font-weight: 700;
}
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-card {
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--color-border);
}
.hero-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ingredient-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.tag {
  background: var(--color-bg-alt);
  color: var(--color-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  border: 1px solid var(--color-border);
}
.tag.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.hero-recipe-preview {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--color-border);
}
.hero-recipe-preview h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.hero-recipe-preview p {
  font-size: 0.85rem;
  margin: 0;
}

/* ========== FEATURES ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.feature-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 52px;
  height: 52px;
  background: rgba(232, 93, 4, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}
.feature-card h3 { margin-bottom: 0.6rem; font-size: 1.2rem; }
.feature-card p { font-size: 0.95rem; }

/* ========== HOW IT WORKS ========== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: step;
}
.step {
  text-align: center;
  position: relative;
}
.step-number {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 auto 1.25rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { font-size: 0.95rem; }

/* ========== GENERATOR TOOL ========== */
.generator-section { padding: 4rem 0 5rem; }
.generator-box {
  background: var(--color-white);
  border-radius: 20px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
}
.generator-header {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
  padding: 1.5rem 2rem;
}
.generator-header h2 { color: white; margin-bottom: 0.25rem; font-size: 1.5rem; }
.generator-header p { color: rgba(255,255,255,0.9); margin: 0; font-size: 0.95rem; }
.generator-body { padding: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-secondary);
  font-size: 0.95rem;
}
.form-group .hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}
.ingredient-input-wrap {
  display: flex;
  gap: 0.5rem;
}
.ingredient-input-wrap input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  transition: border-color var(--transition);
}
.ingredient-input-wrap input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.ingredient-input-wrap button {
  padding: 0.75rem 1.25rem;
  background: var(--color-bg-alt);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--color-secondary);
  transition: all var(--transition);
}
.ingredient-input-wrap button:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.selected-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  min-height: 32px;
}
.selected-ingredients .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  cursor: default;
}
.selected-ingredients .tag button {
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  opacity: 0.8;
  cursor: pointer;
}
.selected-ingredients .tag button:hover { opacity: 1; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
select, .form-group input[type="number"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c5c5c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
select:focus, .form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.95rem;
}
.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}
.generate-btn {
  width: 100%;
  margin-top: 0.5rem;
}
.generator-result {
  display: none;
  padding: 2rem 1.75rem 2.25rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}
.generator-result.active { display: block; }
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.result-header-text { flex: 1; min-width: 0; }
.result-header h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.25;
}
.result-description {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 52rem;
}
.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.result-tag {
  background: rgba(232, 93, 4, 0.1);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
}
.result-timing {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}
.timing-chip {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  min-width: 88px;
}
.timing-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}
.timing-value {
  font-weight: 700;
  color: var(--color-secondary);
  font-size: 0.95rem;
}
.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 720px) {
  .recipe-grid { grid-template-columns: 1fr; }
  .result-header { flex-direction: column; }
}
.recipe-panel {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.25rem 1.2rem;
}
.recipe-panel h4,
.recipe-section h4 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
}
.recipe-panel ul,
.recipe-panel ol,
.recipe-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.recipe-panel ul li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.1rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(240, 230, 216, 0.7);
  font-size: 0.92rem;
  line-height: 1.45;
}
.recipe-panel ul li:last-child { border-bottom: none; }
.recipe-panel ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}
.recipe-panel ol li {
  display: flex;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(240, 230, 216, 0.7);
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.recipe-panel ol li:last-child { border-bottom: none; }
.step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
.nutrition-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 600px) {
  .nutrition-bar { grid-template-columns: repeat(3, 1fr); }
}
.nut-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.75rem 0.5rem;
  text-align: center;
}
.nut-value {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-secondary);
  line-height: 1.2;
}
.nut-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}
.recipe-section {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.2rem 1.25rem;
  margin-bottom: 1rem;
}
.pairing-name {
  font-weight: 700;
  color: var(--color-secondary);
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.pairing-note {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.sub-card {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(240, 230, 216, 0.8);
}
.sub-card:last-child { border-bottom: none; padding-bottom: 0; }
.sub-item {
  display: block;
  color: var(--color-secondary);
  margin-bottom: 0.25rem;
}
.sub-alts {
  font-size: 0.88rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.sub-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}
#result-tips li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.15rem;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
#result-tips li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}
.recipe-fact {
  background: linear-gradient(145deg, #fff9f0 0%, #fff3e0 100%);
  border-color: #f0d9b8;
}
.recipe-fact p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.loading-state {
  text-align: center;
  padding: 2rem;
  display: none;
}
.loading-state.active { display: block; }
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Chat-style generator ========== */
.cf-chat {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.cf-chat-msg {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
  max-width: 92%;
}
.cf-chat-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.cf-chat-bot {
  align-self: flex-start;
}
.cf-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.cf-chat-bubble {
  padding: 0.7rem 0.95rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--color-text);
}
.cf-chat-bot .cf-chat-bubble {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 4px;
}
.cf-chat-user .cf-chat-bubble {
  background: rgba(232, 93, 4, 0.12);
  border: 1px solid rgba(232, 93, 4, 0.2);
  border-bottom-right-radius: 4px;
  color: var(--color-secondary);
}
.cf-chat-actions {
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}
.cf-chat-actions-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-secondary);
  margin-bottom: 0.85rem;
}
.cf-chat-action-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 560px) {
  .cf-chat-action-btns {
    grid-template-columns: 1fr;
  }
}

/* ========== FAQ ========== */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-primary);
  transition: transform 0.2s;
}
.faq-item.active .faq-question::after { content: "−"; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.active .faq-answer { max-height: 300px; }
.faq-answer-inner {
  padding: 0 0 1.25rem;
  color: var(--color-text-muted);
}

/* ========== BLOG ========== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.post-card {
  background: var(--color-white);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.post-card-image {
  aspect-ratio: 16/10;
  background: var(--color-bg-alt);
  object-fit: cover;
  width: 100%;
}
.post-card-body { padding: 1.35rem; }
.post-card-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}
.post-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.post-card h3 a { color: var(--color-secondary); }
.post-card h3 a:hover { color: var(--color-primary); }
.post-card p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.read-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
}

/* Single post / page content */
.entry-header { margin-bottom: 2rem; }
.entry-title { margin-bottom: 0.75rem; }
.entry-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.entry-content {
  max-width: 720px;
}
.entry-content h2, .entry-content h3, .entry-content h4 {
  margin: 1.75rem 0 0.75rem;
}
.entry-content p, .entry-content ul, .entry-content ol {
  margin-bottom: 1.25rem;
}
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }
.entry-content li { margin-bottom: 0.4rem; list-style: disc; }
.entry-content ol li { list-style: decimal; }
.entry-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }

/* ========== CTA ========== */
.cta-section {
  background: linear-gradient(135deg, var(--color-secondary), #4a0d1c);
  color: white;
  text-align: center;
  padding: 4.5rem 0;
}
.cta-section h2 { color: white; margin-bottom: 0.75rem; }
.cta-section p {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  max-width: 520px;
  margin: 0 auto 1.75rem;
}
.cta-section .btn-primary {
  background: var(--color-primary);
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--color-secondary);
  color: rgba(255,255,255,0.75);
  padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand .site-logo { color: white; margin-bottom: 1rem; }
.footer-brand .site-logo:hover { color: var(--color-accent); }
.footer-brand p { font-size: 0.9rem; color: rgba(255,255,255,0.65); max-width: 280px; }
.footer-col h4 {
  color: white;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--color-accent); }

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { order: -1; }
  .features-grid, .steps, .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.25rem 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .main-nav li { border-bottom: 1px solid var(--color-border); }
  .main-nav a {
    display: block;
    padding: 0.85rem 0;
  }
  .nav-cta { margin: 1rem 0 0; }
  .nav-cta .btn { width: 100%; }
  .hero { padding: 3rem 0; }
  .hero-stats { gap: 1.25rem; }
  .section { padding: 3.5rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .generator-body { padding: 1.25rem; }
  .generator-header { padding: 1.25rem; }
}

/* ============================================================
   SINGLE POST + SIDEBAR + AUTHOR BOX
   ============================================================ */

.post-section { padding-top: 3rem; }

.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

.post-main { min-width: 0; }

/* Entry header */
.entry-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.entry-cat {
  display: inline-block;
  background: rgba(232, 93, 4, 0.1);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.entry-cat:hover { background: var(--color-primary); color: white; }

.entry-title { margin-bottom: 1rem; font-size: clamp(1.75rem, 4vw, 2.5rem); }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
}
.meta-author {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.meta-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.meta-author a { color: var(--color-secondary); font-weight: 600; }
.meta-author a:hover { color: var(--color-primary); }

.entry-thumbnail {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.entry-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* Tags */
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}
.tags-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-right: 0.25rem;
}
.tag-link {
  background: var(--color-bg-alt);
  color: var(--color-secondary);
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  border: 1px solid var(--color-border);
}
.tag-link:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Author box – modern E-E-A-T focused */
.author-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.75rem 1.75rem 1.65rem;
  margin: 2.75rem 0 2rem;
  box-shadow: 0 6px 24px rgba(55, 6, 23, 0.05);
  position: relative;
  overflow: hidden;
}
.author-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
  border-radius: 4px 0 0 4px;
}
.author-box-avatar {
  flex-shrink: 0;
}
.author-box-avatar a {
  display: block;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(55, 6, 23, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.author-box-avatar a:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(232, 93, 4, 0.18);
}
.author-box-avatar img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.author-box-content {
  flex: 1;
  min-width: 0;
}
.author-box-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-primary);
  background: rgba(232, 93, 4, 0.1);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}
.author-box-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  line-height: 1.25;
}
.author-box-name a {
  color: var(--color-secondary);
  text-decoration: none;
}
.author-box-name a:hover {
  color: var(--color-primary);
}
.author-box-role {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 0.55rem;
}
.author-box-bio {
  font-size: 0.94rem;
  line-height: 1.55;
  margin-bottom: 0.85rem;
  color: var(--color-text-muted);
}
.author-box-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  text-decoration: none;
  transition: gap 0.15s ease, color 0.15s ease;
}
.author-box-link:hover {
  color: var(--color-primary-dark);
  gap: 0.5rem;
}

/* Post navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-border);
}
.post-navigation a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.post-navigation a:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}
.nav-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}
.nav-title {
  display: block;
  font-weight: 600;
  color: var(--color-secondary);
  font-size: 0.95rem;
  line-height: 1.35;
}
.nav-next { text-align: right; }

/* ============================================================
   MODERN ARTICLE SIDEBAR + SCROLL-ACTIVE TOC
   Sticky, card-based, soft shadows, refined typography
   ============================================================ */

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3rem;
  align-items: start;
}

.post-main {
  min-width: 0;
}

/* Sticky sidebar shell – scrollable so CTA bottom is always reachable */
.post-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.25rem);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  max-height: calc(100vh - var(--header-height) - 2.5rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  padding-bottom: 0.5rem;
  padding-right: 2px;
}
.post-sidebar::-webkit-scrollbar {
  width: 4px;
}
.post-sidebar::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

/* Base widget card */
.post-sidebar .widget {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.35rem 1.25rem;
  box-shadow: 0 4px 18px rgba(55, 6, 23, 0.04);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.post-sidebar .widget:hover {
  box-shadow: 0 8px 28px rgba(55, 6, 23, 0.07);
  border-color: #e8d9c8;
}

.post-sidebar .widget-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--color-primary);
  color: var(--color-secondary);
  line-height: 1.3;
}

/* Generic list reset inside widgets */
.post-sidebar .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-sidebar .widget ul li {
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}

.post-sidebar .widget ul li a {
  color: var(--color-text);
  transition: color 0.15s ease;
}

.post-sidebar .widget ul li a:hover {
  color: var(--color-primary);
}

/* ---------- Table of Contents ---------- */
.toc-widget {
  padding: 1.15rem 0.95rem 1.15rem 0.85rem !important;
}

.toc-widget-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 0 0 0.85rem 0.45rem;
  padding: 0;
  border: none;
}

.toc-container {
  position: relative;
  max-height: min(32vh, 280px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  padding-right: 4px;
}

.toc-container::-webkit-scrollbar {
  width: 4px;
}
.toc-container::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

.toc-list,
.toc-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-sublist {
  margin-left: 0.55rem;
  padding-left: 0.35rem;
  border-left: 1px solid var(--color-border);
}

.toc-item {
  position: relative;
  margin: 0;
}

.toc-link {
  display: block;
  padding: 0.42rem 0.55rem 0.42rem 0.8rem;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 7px;
  transition: color 0.15s ease, background 0.15s ease;
}

.toc-link:hover {
  color: var(--color-secondary);
  background: rgba(232, 93, 4, 0.06);
}

.toc-link.is-active {
  color: var(--color-primary);
  font-weight: 600;
  background: rgba(232, 93, 4, 0.08);
}

.toc-level-3 .toc-link {
  font-size: 0.8rem;
  padding-left: 1rem;
}

/* Moving active indicator */
.toc-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 28px;
  background: var(--color-primary);
  border-radius: 3px;
  opacity: 0;
  transition: transform 0.22s ease, height 0.18s ease, opacity 0.15s ease;
  pointer-events: none;
  z-index: 2;
}

.toc-empty {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0.25rem 0.5rem;
}

/* ---------- Related Recipes ---------- */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.related-item {
  margin: 0 !important;
}

.related-link {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  text-decoration: none;
  padding: 0.35rem;
  margin: -0.35rem;
  border-radius: 10px;
  transition: background 0.18s ease;
}

.related-link:hover {
  background: rgba(232, 93, 4, 0.05);
}

.related-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--color-bg-alt);
}

.related-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.related-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.related-title {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--color-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-link:hover .related-title {
  color: var(--color-primary);
}

.related-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.related-empty {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- CTA widget ---------- */
.widget-cta {
  background: linear-gradient(145deg, #fff9f0 0%, #fff3e0 100%) !important;
  border-color: #f0d9b8 !important;
}

.widget-cta .widget-title {
  border-bottom-color: var(--color-accent);
}

.widget-cta p {
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.widget-cta .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.92rem;
  padding: 0.8rem 1rem;
}

/* ---------- Search form in sidebar ---------- */
.widget_search form {
  display: flex;
  gap: 0.45rem;
}

.widget_search input[type="search"] {
  flex: 1;
  padding: 0.7rem 0.95rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  font-size: 0.9rem;
  min-width: 0;
}

.widget_search input[type="search"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.12);
}

.widget_search input[type="submit"],
.widget_search button {
  padding: 0.7rem 1.05rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.widget_search input[type="submit"]:hover,
.widget_search button:hover {
  background: var(--color-primary-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 2.25rem;
  }
}

@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .post-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    order: -1; /* TOC + sidebar first on mobile */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-right: 0;
  }

  .post-sidebar .toc-widget {
    grid-column: 1 / -1;
  }

  .toc-container {
    max-height: 220px;
  }

  .author-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.15rem;
    text-align: left;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .nav-next {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .post-sidebar {
    grid-template-columns: 1fr;
  }

  .toc-widget {
    padding: 1rem 0.8rem !important;
  }

  .toc-link {
    font-size: 0.825rem;
    padding: 0.45rem 0.5rem 0.45rem 0.75rem;
  }

  .related-thumb {
    width: 52px;
    height: 52px;
  }
}

/* Legacy full-width helper (kept for compatibility) */
.post-main-full {
  max-width: 760px;
  margin: 0 auto;
}
