/*
Theme Name: Meals Joy
Theme URI: https://mealsjoy.example.com/
Author: Meals Joy
Author URI: https://mealsjoy.example.com/
Description: Bold & Playful recipe theme — orange accent, Baloo 2 rounded headings, pill buttons, yellow hover underline. Easy recipes for every meal.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: meals-joy
Tags: food, recipes, orange, playful, grid, custom-header
*/

/* ---- Design tokens (Design 2 — Bold & Playful, from the demo) ---- */
:root {
  --bg: #fff9f1;
  --surface: #ffffff;
  --surface2: #fff1de;
  --ink: #2e2118;
  --muted: #7d6a58;
  --accent: #f97316;
  --accent-ink: #ffffff;
  --accent-soft: #ffe8d1;
  --line: #f3ddc4;
  --yellow: #facc15;
  --head-font: 'Baloo 2', system-ui, sans-serif;
  --body-font: 'Nunito', system-ui, sans-serif;
  --radius: 20px;
  --img-radius: 16px;
  --btn-radius: 999px;
  --shadow: 0 12px 0 -4px rgba(249, 115, 22, .14), 0 18px 34px rgba(180, 100, 20, .14);
  --hero-bg: linear-gradient(120deg, #fff3e0 0%, #ffe3c2 55%, #ffd9a8 100%);
  --nav-ink: #2e2118;
  --chip-bg: #fff1de;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--head-font);
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--ink);
}

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.site-brand a { text-decoration: none; color: var(--ink); display: block; line-height: 1.1; }
.site-brand .site-title {
  font-family: var(--head-font);
  font-weight: 800;
  font-size: 30px;
  color: var(--accent);
}
.site-brand .site-tagline { font-size: 13px; color: var(--muted); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: inline-block;
  padding: 8px 12px;
  color: var(--nav-ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.main-nav a:hover, .main-nav .current-menu-item a, .main-nav a.current {
  border-bottom: 3px solid var(--yellow);
  text-decoration: none;
}

/* ---- Hero ---- */
.hero {
  background: var(--hero-bg);
  border-bottom: 1px solid var(--line);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 32px;
  align-items: center;
  padding-top: 44px;
  padding-bottom: 44px;
}
.hero-kicker {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--btn-radius);
  margin-bottom: 14px;
}
.hero h1 { font-size: 52px; font-weight: 800; margin-bottom: 12px; }
.hero .hero-lead { font-size: 19px; color: #5d4632; max-width: 34em; }
.hero-stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 18px 0; font-weight: 800; }
.hero-stats span { font-family: var(--head-font); font-size: 18px; }
.hero-stats small { display: block; font-family: var(--body-font); font-weight: 600; font-size: 13px; color: var(--muted); }
.hero-search { display: flex; gap: 10px; margin-top: 8px; }
.hero-search input[type="search"] {
  flex: 1;
  border: 2px solid var(--line);
  border-radius: var(--btn-radius);
  padding: 12px 18px;
  font: inherit;
  background: var(--surface);
  min-width: 0;
}
.hero-card { position: relative; }
.hero-card img {
  width: 100%;
  border-radius: var(--img-radius);
  box-shadow: var(--shadow);
  display: block;
}
.hero-card .hero-card-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  background: rgba(255, 255, 255, .94);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
}
.hero-card .hero-card-overlay small { display: block; color: var(--muted); font-weight: 600; }

/* ---- Buttons ---- */
.btn, button[type="submit"], input[type="submit"] {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: var(--btn-radius);
  padding: 12px 24px;
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover, button[type="submit"]:hover, input[type="submit"]:hover { text-decoration: none; filter: brightness(1.05); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line);
}

/* ---- Category chips ---- */
.cats { padding: 26px 0 6px; }
.cats h2 { font-size: 22px; margin-bottom: 12px; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-block;
  background: var(--chip-bg);
  color: var(--ink);
  border: 2px solid transparent;
  border-radius: var(--btn-radius);
  padding: 8px 18px;
  font-weight: 800;
  text-decoration: none;
}
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.active { background: var(--accent); color: var(--accent-ink); }

/* ---- Ad slot placeholder ---- */
.ad-slot {
  margin: 22px 0 4px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface2);
  text-align: center;
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ---- Recipe grid ---- */
.recipes { padding: 26px 0 10px; }
.recipes h2 { font-size: 28px; }
.result-count { color: var(--muted); font-weight: 700; margin-bottom: 18px; }
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.recipe-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease;
  display: flex;
  flex-direction: column;
}
.recipe-card:hover { transform: translateY(-3px); }
.recipe-card a.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.recipe-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; display: block; }
.recipe-card .card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.recipe-card .card-cat {
  align-self: flex-start;
  background: var(--chip-bg);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--btn-radius);
}
.recipe-card h3 { font-size: 22px; margin: 0; }
.recipe-card .card-desc { color: var(--muted); margin: 0; flex: 1; }
.recipe-card .card-meta { font-weight: 700; font-size: 14px; color: var(--ink); }
.recipe-card .card-meta .stars { color: var(--accent); }

/* ---- Featured ---- */
.featured {
  margin: 30px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.featured img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured .featured-body { padding: 30px; }
.featured .featured-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
}
.featured h2 { font-size: 32px; margin: .3em 0 .5em; }
.featured ul { margin: 0 0 1.2em; padding-left: 20px; }
.featured .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Newsletter ---- */
.newsletter {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  padding: 34px 30px;
  margin: 34px 0;
  text-align: center;
}
.newsletter h2 { color: var(--accent-ink); font-size: 30px; }
.newsletter p { opacity: .95; }
.newsletter form { display: flex; gap: 10px; max-width: 520px; margin: 0 auto; }
.newsletter input[type="email"] {
  flex: 1;
  border: 0;
  border-radius: var(--btn-radius);
  padding: 12px 18px;
  font: inherit;
  min-width: 0;
}
.newsletter button { background: var(--ink); }
.newsletter .news-done { font-weight: 800; font-size: 18px; }

/* ---- Single recipe ---- */
.recipe-single { padding: 34px 0 10px; }
.recipe-single .single-photo img { width: 100%; border-radius: var(--img-radius); box-shadow: var(--shadow); display: block; }
.recipe-single h1 { font-size: 42px; margin: 22px 0 8px; }
.recipe-facts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 22px;
}
.recipe-facts span {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  padding: 8px 16px;
  font-weight: 800;
  font-size: 14px;
}
.recipe-facts .stars { color: var(--accent); }
.recipe-body h2 { font-size: 26px; margin-top: 1.2em; }
.recipe-body ul, .recipe-body ol { padding-left: 22px; }
.recipe-body li { margin-bottom: .45em; }

/* ---- Pages / archives ---- */
.page-wrap, .archive-wrap { padding: 34px 0; }
.page-wrap h1, .archive-wrap h1 { font-size: 40px; }
.archive-desc { color: var(--muted); }

/* ---- Footer ---- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding: 26px 0;
  color: var(--muted);
}
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--ink); font-weight: 700; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- Misc ---- */
.no-results { background: var(--surface2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; font-weight: 700; }
.pagination { margin: 26px 0; text-align: center; font-weight: 800; }
.pagination a, .pagination span { padding: 8px 14px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .recipe-grid { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .recipe-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .newsletter form { flex-direction: column; }
  .hero-search { flex-direction: column; }
}
