
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #b5341a;
  --primary-dark: #8b2514;
  --accent: #e07b39;
  --bg: #fdf6f0;
  --card-bg: #ffffff;
  --text: #2c2c2c;
  --text-light: #6b6b6b;
  --border: #e8d5c4;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.14);
  --radius: 12px;
}
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  background: linear-gradient(135deg, #8b2514 0%, #b5341a 50%, #c94020 100%);
  color: white; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
}
.site-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 1.8rem; }
.site-name { font-size: 1.45rem; font-weight: 700; color: white; letter-spacing: -0.3px; }
.site-tagline { font-size: 0.75rem; color: rgba(255,255,255,0.7); margin-top: 1px; }
.header-nav a { color: rgba(255,255,255,0.85); margin-left: 20px; font-size: 0.88rem; font-weight: 500; transition: color 0.2s; }
.header-nav a:hover { color: white; }

/* Hero */
.hero { background: linear-gradient(160deg, #fff5ee 0%, #fdeade 50%, #f9d5b8 100%); padding: 56px 28px; text-align: center; border-bottom: 1px solid var(--border); }
.hero-icon { font-size: 3.5rem; margin-bottom: 12px; }
.hero h1 { font-size: 2.3rem; color: var(--primary); margin-bottom: 8px; letter-spacing: -0.5px; }
.hero p { color: var(--text-light); font-size: 1.05rem; max-width: 580px; margin: 0 auto 22px; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary); color: white; padding: 7px 20px; border-radius: 24px; font-size: 0.88rem; font-weight: 500; }
.search-wrap { max-width: 500px; margin: 24px auto 0; position: relative; }
.search-wrap input {
  width: 100%; padding: 13px 48px 13px 20px;
  border: 2px solid var(--border); border-radius: 30px;
  font-size: 0.97rem; background: white; outline: none;
  box-shadow: var(--shadow); transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(181,52,26,0.1); }
.search-wrap .si { position: absolute; right: 17px; top: 50%; transform: translateY(-50%); color: var(--text-light); pointer-events: none; }

/* Tag cloud */
.filter-section { max-width: 1200px; margin: 28px auto 0; padding: 0 28px; }
.filter-section h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-light); margin-bottom: 12px; }
.tags-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-pill {
  padding: 5px 14px; background: white; border: 1px solid var(--border);
  border-radius: 20px; font-size: 0.8rem; cursor: pointer;
  transition: all 0.18s; color: var(--text); user-select: none;
}
.tag-pill:hover { border-color: var(--primary); color: var(--primary); }
.tag-pill.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Recipe grid */
.recipes-section { max-width: 1200px; margin: 32px auto 48px; padding: 0 28px; }
.section-bar { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-bar h2 { font-size: 1.2rem; }
.count-badge { background: #f3e8e2; color: var(--primary); padding: 3px 12px; border-radius: 12px; font-size: 0.82rem; font-weight: 600; }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }

.recipe-card {
  background: var(--card-bg); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.22s, box-shadow 0.22s;
  display: flex; flex-direction: column; cursor: pointer;
  border: 1px solid transparent;
}
.recipe-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: #f0d5c8; }
.card-thumb { height: 175px; overflow: hidden; background: linear-gradient(135deg, #fde8d8, #f9cdb0); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.recipe-card:hover .card-thumb img { transform: scale(1.07); }
.card-thumb .placeholder { font-size: 2.8rem; }
.card-body { padding: 13px 15px 14px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 0.92rem; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 8px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.card-tag { font-size: 0.71rem; background: #fdf0eb; color: var(--primary); padding: 2px 8px; border-radius: 10px; }
.card-date { font-size: 0.72rem; color: var(--text-light); margin-top: 7px; }

/* Recipe page */
.recipe-page { max-width: 840px; margin: 0 auto; padding: 32px 24px 60px; }
.breadcrumb { font-size: 0.83rem; color: var(--text-light); margin-bottom: 22px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 6px; color: var(--border); }
.recipe-hero { width: 100%; max-height: 440px; object-fit: cover; border-radius: var(--radius); margin-bottom: 30px; box-shadow: var(--shadow-hover); }
.recipe-header h1 { font-size: 1.9rem; color: var(--primary); margin-bottom: 10px; line-height: 1.25; }
.recipe-meta { color: var(--text-light); font-size: 0.84rem; display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.recipe-tag { background: #fdf0eb; color: var(--primary); padding: 4px 13px; border-radius: 14px; font-size: 0.79rem; border: 1px solid #f4c4ae; }
.recipe-divider { border: none; border-top: 2px solid var(--border); margin: 24px 0; }
.recipe-content { line-height: 1.85; font-size: 0.97rem; }
.recipe-content b, .recipe-content strong { color: #333; }
.recipe-content ul, .recipe-content ol { padding-left: 1.6em; margin: 0.4em 0 1em; }
.recipe-content li { margin-bottom: 5px; }
.recipe-content div { margin-bottom: 4px; }

/* Related recipes */
.related-section { margin-top: 52px; padding-top: 32px; border-top: 2px solid var(--border); }
.related-section h2 { font-size: 1.15rem; color: var(--text); margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.related-card {
  background: var(--card-bg); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; border: 1px solid transparent;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #f0d5c8; }
.related-thumb { height: 110px; overflow: hidden; background: linear-gradient(135deg, #fde8d8, #f9cdb0); display: flex; align-items: center; justify-content: center; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.related-card:hover .related-thumb img { transform: scale(1.08); }
.related-thumb .placeholder { font-size: 2rem; }
.related-body { padding: 9px 11px 11px; }
.related-body h4 { font-size: 0.8rem; color: var(--text); line-height: 1.35; font-weight: 600; }

.back-btn { display: inline-flex; align-items: center; gap: 7px; margin-top: 36px; padding: 11px 22px; background: var(--primary); color: white; border-radius: 8px; font-size: 0.88rem; font-weight: 500; transition: background 0.2s; }
.back-btn:hover { background: var(--primary-dark); color: white; }

/* Footer */
footer { text-align: center; padding: 26px; color: var(--text-light); font-size: 0.83rem; border-top: 1px solid var(--border); background: white; }

/* No results */
.no-results { text-align: center; padding: 64px 20px; color: var(--text-light); display: none; }
.no-results .nr-icon { font-size: 3.5rem; margin-bottom: 10px; }

/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.65rem; }
  .recipe-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
  .card-thumb { height: 145px; }
  .header-inner { flex-direction: column; gap: 10px; text-align: center; }
  .recipe-header h1 { font-size: 1.5rem; }
  .related-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* Recipe description paragraph */
.recipe-description {
  font-size: 1.02rem;
  color: #444;
  line-height: 1.8;
  background: #fffaf7;
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 4px;
  font-style: italic;
}
