/*
Theme Name:  Healthy Recipes Guide
Theme URI:   https://www.healthyrecipesguide.com/
Author:      Katey Lyon
Author URI:  https://www.healthyrecipesguide.com/about/
Description: Fast, SEO-first recipe theme. Downshiftology-inspired elegance (cream, sage, serif display type, generous whitespace) with Skinnytaste-style navigation and internal-link architecture: sticky category nav with dropdowns, recipe index, breadcrumbs with schema, term chips, related recipes. One small stylesheet, zero render-blocking JavaScript.
Version:     1.0.0
Requires at least: 6.0
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: healthyrecipesguide
Tags:        blog, food-and-drink, one-column, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================================
   1. Tokens
   ========================================================================= */
:root {
	--bg:        #FDFBF7; /* warm cream */
	--surface:   #FFFFFF;
	--ink:       #33322D; /* soft charcoal */
	--muted:     #6F6A5E;
	--accent:    #5F7A5E; /* sage green */
	--accent-dk: #465D46;
	--gold:      #B98A2F; /* muted honey for small flourishes */
	--border:    #E9E3D7;
	--shadow:    0 1px 2px rgba(51, 50, 45, .05), 0 6px 24px -8px rgba(51, 50, 45, .10);
	--serif:     "Playfair Display", Georgia, "Times New Roman", serif;
	--sans:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--wrap:      1120px;
	--narrow:    720px;
	--radius:    10px;
}

/* =========================================================================
   2. Reset / base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: 600;
	line-height: 1.22;
	color: var(--ink);
	margin: 0 0 .55em;
	text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.25em; }

a { color: var(--accent-dk); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.content-narrow { max-width: var(--narrow); margin-left: auto; margin-right: auto; }

.skip-link {
	position: absolute; left: -9999px; top: 0;
	background: var(--ink); color: #fff; padding: .6em 1em; z-index: 100;
}
.skip-link:focus { left: 0; }

.eyebrow {
	display: block;
	font-family: var(--sans);
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: .9em;
}

/* =========================================================================
   3. Header — centered wordmark masthead (Downshiftology) +
      sticky category nav bar with dropdowns (Skinnytaste)
   ========================================================================= */
.site-header { background: var(--bg); }

.masthead { text-align: center; padding: 34px 20px 26px; }
.masthead .custom-logo-link img { margin: 0 auto; max-height: 84px; width: auto; }

.site-title {
	font-family: var(--serif);
	font-size: clamp(1.7rem, 4vw, 2.4rem);
	font-weight: 600;
	letter-spacing: .04em;
	margin: 0;
}
.site-title a { color: var(--ink); text-decoration: none; }
.site-tagline {
	margin: .35em 0 0;
	font-size: .78rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--muted);
}

.main-nav-bar {
	position: sticky; top: 0; z-index: 50;
	background: rgba(253, 251, 247, .96);
	backdrop-filter: blur(6px);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: center; gap: 18px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav > ul > li { position: relative; }
.main-nav a {
	display: block;
	padding: 14px 15px;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ink);
	white-space: nowrap;
}
.main-nav a:hover { color: var(--accent-dk); }

/* CSS-only dropdowns */
.main-nav .sub-menu {
	display: none;
	position: absolute; left: 0; top: 100%;
	min-width: 230px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: var(--shadow);
	padding: 6px 0;
}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu a {
	padding: 9px 18px;
	font-size: .82rem;
	font-weight: 400;
	letter-spacing: .02em;
	text-transform: none;
}
.main-nav .sub-menu a:hover { background: var(--bg); }
.main-nav .menu-item-has-children > a::after { content: " ▾"; font-size: .7em; color: var(--muted); }

/* Mobile nav: checkbox toggle, no JS */
.nav-toggle { position: absolute; opacity: 0; }
.nav-toggle-label {
	display: none;
	padding: 12px 4px;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
}

@media (max-width: 880px) {
	.nav-wrap { flex-wrap: wrap; justify-content: space-between; padding-top: 2px; padding-bottom: 2px; }
	.nav-toggle-label { display: block; }
	.main-nav { display: none; width: 100%; order: 3; }
	.nav-toggle:checked ~ .main-nav { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav a { padding: 11px 6px; border-top: 1px solid var(--border); }
	.main-nav .sub-menu {
		display: block; position: static;
		border: 0; box-shadow: none; background: transparent;
		padding: 0 0 4px 16px; min-width: 0;
	}
}

/* =========================================================================
   4. Hero
   ========================================================================= */
.hero { text-align: center; padding: 64px 0 44px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .4em; }
.hero p { max-width: 620px; margin: 0 auto 1.6em; color: var(--muted); font-size: 1.1rem; }
.hero .search-form { max-width: 460px; margin: 0 auto 1.6em; display: flex; }
.hero .search-field {
	flex: 1;
	padding: 13px 20px;
	font-size: 1rem;
	border: 1px solid var(--border);
	border-right: 0;
	border-radius: 99px 0 0 99px;
	background: var(--surface);
}
.hero .search-submit {
	padding: 13px 26px;
	font-size: .95rem;
	font-weight: 600;
	border: 0;
	border-radius: 0 99px 99px 0;
	background: var(--accent);
	color: #fff;
	cursor: pointer;
}
.hero .search-submit:hover { background: var(--accent-dk); }

.hero-topics { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero-topics a {
	display: block;
	padding: 7px 18px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--accent-dk);
	border: 1px solid var(--accent);
	border-radius: 99px;
	transition: background .15s, color .15s;
}
.hero-topics a:hover { background: var(--accent); color: #fff; }

/* =========================================================================
   5. Sections, cards, grids
   ========================================================================= */
.section-title { text-align: center; margin: 56px 0 26px; }
.section-title h2 { margin-bottom: .2em; }
.section-title h2::after {
	content: "";
	display: block;
	width: 44px; height: 2px;
	margin: 14px auto 0;
	background: var(--gold);
}
.section-title p { color: var(--muted); margin: 0; }

.section-link { text-align: center; margin: 26px 0 8px; }
.section-link a {
	display: inline-block;
	padding: 11px 30px;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ink);
	border: 1px solid var(--ink);
	border-radius: 99px;
	transition: background .15s, color .15s;
}
.section-link a:hover { background: var(--ink); color: var(--bg); }

.post-grid, .topic-grid {
	list-style: none; margin: 0; padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
	gap: 28px;
}

.post-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex; flex-direction: column;
	transition: transform .18s, box-shadow .18s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.post-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-card-cat a {
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--accent);
}
.post-card h2, .post-card h3 { font-size: 1.13rem; margin: 0; }
.post-card h2 a, .post-card h3 a { text-decoration: none; color: var(--ink); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--accent-dk); }
.post-card-excerpt { font-size: .9rem; color: var(--muted); margin: 0; }
.post-card-date { font-size: .78rem; color: var(--muted); margin-top: auto; padding-top: 6px; }

/* Featured (hero) card on the front page */
.featured-card { margin-top: 8px; }
.featured-card .post-card { flex-direction: row; align-items: stretch; }
.featured-card .post-card img { width: 55%; aspect-ratio: 3 / 2; }
.featured-card .post-card-body { justify-content: center; padding: 34px 38px; }
.featured-card h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
@media (max-width: 760px) {
	.featured-card .post-card { flex-direction: column; }
	.featured-card .post-card img { width: 100%; }
}

/* Topic cards */
.topic-card {
	position: relative;
	display: block;
	border-radius: var(--radius);
	overflow: hidden;
	text-decoration: none;
	background: var(--surface);
	border: 1px solid var(--border);
	transition: transform .18s, box-shadow .18s;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.topic-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.topic-card.has-image img { filter: saturate(.92); }
.topic-card-body { display: block; text-align: center; padding: 16px 14px; }
.topic-card-body strong {
	display: block;
	font-family: var(--serif);
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--ink);
}
.topic-card-body span { font-size: .8rem; color: var(--muted); }

/* Term chips */
.term-chips { list-style: none; margin: 18px 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.term-chips a {
	display: block;
	padding: 6px 16px;
	font-size: .8rem;
	text-decoration: none;
	color: var(--accent-dk);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 99px;
	transition: border-color .15s, background .15s, color .15s;
}
.term-chips a:hover { border-color: var(--accent); background: var(--accent); color: #fff; }

/* =========================================================================
   6. Breadcrumbs
   ========================================================================= */
.breadcrumbs {
	font-size: .8rem;
	color: var(--muted);
	margin: 22px 0 10px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-dk); text-decoration: underline; }
.breadcrumbs .sep { margin: 0 7px; color: var(--border); }

/* =========================================================================
   7. Single post / page
   ========================================================================= */
.entry-header { text-align: center; margin: 18px 0 22px; }
.entry-meta {
	display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center;
	font-size: .82rem; color: var(--muted);
}
.entry-meta a { color: var(--muted); }
.entry-meta a:hover { color: var(--accent-dk); }

.jump-to-recipe { text-align: center; margin: 18px 0; }
.jump-to-recipe a {
	display: inline-block;
	padding: 11px 28px;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	background: var(--accent);
	border-radius: 99px;
}
.jump-to-recipe a:hover { background: var(--accent-dk); color: #fff; }

.featured-image { margin: 0 0 28px; }
.featured-image img { border-radius: var(--radius); width: 100%; }

.entry-content { font-size: 1.0625rem; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--radius); margin: 1.4em auto; }
.entry-content blockquote {
	margin: 1.6em 0;
	padding: .2em 0 .2em 1.4em;
	border-left: 3px solid var(--gold);
	font-family: var(--serif);
	font-size: 1.15rem;
	font-style: italic;
	color: var(--muted);
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin-bottom: 1.25em; }
.entry-content li { margin-bottom: .4em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.entry-content th { background: var(--surface); font-weight: 600; }
.entry-content a { color: var(--accent-dk); }

.wp-block-image figcaption, .featured-image figcaption {
	font-size: .8rem; color: var(--muted); text-align: center; margin-top: .5em;
}

/* Table of contents */
.hrg-toc {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px 26px;
	margin: 1.8em 0;
	font-size: .93rem;
}
.hrg-toc strong {
	font-family: var(--serif);
	font-size: 1.05rem;
	display: block;
	margin-bottom: .4em;
}
.hrg-toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.hrg-toc li { margin-bottom: .35em; break-inside: avoid; }
.hrg-toc a { text-decoration: none; }
.hrg-toc a:hover { text-decoration: underline; }
@media (max-width: 640px) { .hrg-toc ol { columns: 1; } }

/* Author box */
.author-box {
	display: flex; gap: 18px; align-items: flex-start;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 26px 28px;
	margin: 44px 0 0;
	font-size: .95rem;
}
.author-box img { border-radius: 50%; flex-shrink: 0; }
.author-box-name { margin-bottom: .3em; }
.author-box-name a {
	font-family: var(--serif);
	font-size: 1.1rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--ink);
}
.author-box p:last-child { margin-bottom: 0; color: var(--muted); }

/* Related posts */
.related-posts { margin: 48px 0 0; }
.related-posts > h2 { text-align: center; }
.related-posts > h2::after {
	content: "";
	display: block;
	width: 44px; height: 2px;
	margin: 12px auto 26px;
	background: var(--gold);
}

/* Prev/next */
.post-nav {
	display: flex; justify-content: space-between; gap: 20px;
	margin: 44px 0 0; padding-top: 24px;
	border-top: 1px solid var(--border);
	font-size: .92rem;
}
.post-nav a { text-decoration: none; max-width: 46%; }
.post-nav a:hover { text-decoration: underline; }
.post-nav .nav-label {
	display: block;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: .2em;
}

/* =========================================================================
   8. Archives / search / recipe index
   ========================================================================= */
.archive-header { text-align: center; margin: 10px 0 34px; }
.archive-count { color: var(--muted); font-size: .88rem; margin: 0 0 .5em; }
.archive-description { max-width: var(--narrow); margin: 0 auto; color: var(--muted); }

.pagination { text-align: center; margin: 44px 0 10px; font-size: .92rem; }
.pagination .page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	margin: 0 3px;
	text-decoration: none;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
}
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--accent); }

/* Recipe index */
.recipe-index-section { margin: 52px 0 0; }
.recipe-index-section .index-head {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 16px; margin-bottom: 20px;
	border-bottom: 1px solid var(--border);
	padding-bottom: 12px;
}
.recipe-index-section .index-head h2 { margin: 0; }
.recipe-index-section .index-head a {
	font-size: .78rem; font-weight: 700;
	letter-spacing: .14em; text-transform: uppercase;
	text-decoration: none; white-space: nowrap;
}

/* =========================================================================
   9. Comments & forms
   ========================================================================= */
.comments-area { margin-top: 48px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { border-top: 1px solid var(--border); padding: 20px 0; }
.comment-list .children { list-style: none; padding-left: 30px; }
.comment-author img { border-radius: 50%; float: left; margin-right: 12px; }
.comment-metadata { font-size: .78rem; color: var(--muted); }
.comment-metadata a { color: var(--muted); }
.comment-content { clear: both; padding-top: 6px; font-size: .97rem; }
.reply a { font-size: .8rem; }

.comment-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 10px 14px;
	font: inherit;
	font-size: .95rem;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink);
	margin-bottom: 14px;
}
.comment-form .submit {
	padding: 11px 30px;
	font-size: .85rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	border: 0;
	border-radius: 99px;
	background: var(--accent);
	color: #fff;
	cursor: pointer;
}
.comment-form .submit:hover { background: var(--accent-dk); }

/* =========================================================================
   10. Footer
   ========================================================================= */
.site-footer {
	margin-top: 76px;
	background: #33322D;
	color: #CFCBC0;
	font-size: .92rem;
}
.footer-cols {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 44px;
	padding: 52px 20px 40px;
}
.footer-brand a {
	font-family: var(--serif);
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: .03em;
	color: #FDFBF7;
	text-decoration: none;
}
.footer-about { color: #A8A498; }
.footer-col h2 {
	font-family: var(--sans);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #FDFBF7;
	margin-bottom: 1em;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .55em; }
.footer-col a { color: #CFCBC0; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col .search-form { display: flex; margin-top: 14px; }
.footer-col .search-field {
	flex: 1;
	padding: 8px 14px;
	font-size: .85rem;
	border: 1px solid #4A4941;
	border-radius: 99px 0 0 99px;
	background: #3E3D36;
	color: #fff;
}
.footer-col .search-submit {
	padding: 8px 14px;
	border: 0;
	border-radius: 0 99px 99px 0;
	background: var(--accent);
	color: #fff;
	cursor: pointer;
}
.footer-bottom { border-top: 1px solid #4A4941; padding: 18px 0; font-size: .8rem; color: #A8A498; }
.footer-bottom p { margin: 0; }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 800px) {
	.footer-cols { grid-template-columns: 1fr; gap: 30px; }
}

/* =========================================================================
   11. Utilities
   ========================================================================= */
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden;
	padding: 0; position: absolute;
}
.alignwide { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; }
