/* =============================================================
   Living Healthy Mom Magazine — core design system  (v2.0)
   Forest green / sage / ivory / charcoal with a soft peach accent.
   Fonts are self-hosted (Lora headings, Inter body) — no third-party requests.
   ============================================================= */

/* ---------- Fonts (latin subset, variable) ---------- */
@font-face {
	font-family: "Lora";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/lora-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Lora";
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/lora-latin-wght-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched fallback to limit layout shift while Inter loads. */
@font-face {
	font-family: "Inter Fallback";
	src: local("Arial");
	size-adjust: 107.1%;
	ascent-override: 90.5%;
	descent-override: 22.6%;
	line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
	--lhm-forest: #24483B;
	--lhm-forest-dark: #1B382E;
	--lhm-sage: #A8B9A1;
	--lhm-ivory: #FAF8F2;
	--lhm-ivory-2: #F2EFE5;
	--lhm-white: #FFFFFF;
	--lhm-charcoal: #252B28;
	--lhm-muted: #68716B;
	--lhm-peach: #EBC8B7;
	--lhm-peach-soft: #F8EBE3;
	--lhm-sage-soft: #E9EEE6;
	--lhm-line: rgba(37, 43, 40, .12);

	/* Legacy names still used by the planner/tool stylesheet. */
	--lhm-cream: var(--lhm-ivory);
	--lhm-beige: var(--lhm-ivory-2);
	--lhm-pink: var(--lhm-peach);
	--lhm-lavender: #D6DFD2;
	--lhm-terracotta: var(--lhm-forest);

	--lhm-font-heading: "Lora", Georgia, "Times New Roman", serif;
	--lhm-font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--lhm-font-ui: var(--lhm-font-body);

	--lhm-radius-sm: 6px;
	--lhm-radius-md: 10px;
	--lhm-radius-lg: 16px;
	--lhm-radius-pill: 999px;
	--lhm-shadow-sm: 0 1px 2px rgba(37, 43, 40, .05);
	--lhm-shadow-md: 0 8px 24px -14px rgba(37, 43, 40, .22);
	--lhm-shadow-lg: 0 24px 60px -24px rgba(37, 43, 40, .28);
	--lhm-trans: 180ms ease;

	--lhm-container-w: 1200px;
	--lhm-read-w: 720px;
	--lhm-space-1: 4px;
	--lhm-space-2: 8px;
	--lhm-space-3: 12px;
	--lhm-space-4: 16px;
	--lhm-space-5: 24px;
	--lhm-space-6: 32px;
	--lhm-space-7: 48px;
	--lhm-space-8: 64px;
	--lhm-space-9: 96px;

	--lhm-fs-hero: clamp(2rem, 1.2rem + 3.4vw, 3.375rem);
	--lhm-fs-h2: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem);
	--lhm-fs-card: clamp(1.125rem, 1.05rem + .4vw, 1.375rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body.lhm-body {
	margin: 0;
	background: var(--lhm-ivory);
	color: var(--lhm-charcoal);
	font-family: var(--lhm-font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}
body.lhm-menu-open { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--lhm-forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--lhm-forest-dark); }
:focus-visible { outline: 3px solid var(--lhm-forest); outline-offset: 2px; border-radius: 3px; }
.site-nav-bar :focus-visible, .site-footer :focus-visible, .lhm-on-dark :focus-visible { outline-color: var(--lhm-peach); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--lhm-font-heading);
	color: var(--lhm-charcoal);
	margin: 0 0 .6em;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: -.005em;
	text-wrap: balance;
}
h1 { font-size: var(--lhm-fs-hero); }
h2 { font-size: var(--lhm-fs-h2); }
h3 { font-size: clamp(1.2rem, 1.1rem + .5vw, 1.5rem); }
h4 { font-size: 1.0625rem; font-family: var(--lhm-font-body); font-weight: 650; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--lhm-line); margin: var(--lhm-space-6) 0; }

.lhm-container { width: 100%; max-width: var(--lhm-container-w); margin: 0 auto; padding: 0 var(--lhm-space-5); }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); -webkit-clip-path: inset(50%); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link {
	position: absolute; top: -200px; left: 8px; z-index: 99999;
	background: var(--lhm-forest); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--lhm-radius-md) var(--lhm-radius-md);
}
.skip-link:focus { top: 0; color: #fff; }

.lhm-eyebrow {
	display: inline-block;
	font-family: var(--lhm-font-ui);
	font-size: .8125rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--lhm-forest);
	font-weight: 650;
	margin-bottom: var(--lhm-space-3);
}

/* ---------- Buttons ---------- */
.lhm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: var(--lhm-font-ui); font-weight: 600; font-size: .9375rem; line-height: 1.2;
	padding: 12px 22px; min-height: 44px;
	border-radius: var(--lhm-radius-md);
	border: 1.5px solid var(--lhm-forest);
	background: var(--lhm-forest); color: #fff;
	cursor: pointer; text-decoration: none;
	transition: background var(--lhm-trans), color var(--lhm-trans), border-color var(--lhm-trans);
}
.lhm-btn:hover { background: var(--lhm-forest-dark); border-color: var(--lhm-forest-dark); color: #fff; }
.lhm-btn-primary { background: var(--lhm-forest); color: #fff; }
.lhm-btn-ghost { background: transparent; color: var(--lhm-forest); border-color: var(--lhm-forest); }
.lhm-btn-ghost:hover { background: var(--lhm-forest); color: #fff; }
.lhm-btn-light { background: #fff; border-color: #fff; color: var(--lhm-forest); }
.lhm-btn-light:hover { background: var(--lhm-peach); border-color: var(--lhm-peach); color: var(--lhm-charcoal); }
.lhm-btn-lg { padding: 15px 28px; font-size: 1rem; }
.lhm-btn-sm { padding: 8px 14px; font-size: .875rem; min-height: 40px; }
.lhm-btn[disabled] { opacity: .6; cursor: not-allowed; }
.lhm-link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.lhm-link-arrow::after { content: "→"; transition: transform var(--lhm-trans); }
.lhm-link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Forms ---------- */
input, select, textarea, button { font-family: inherit; font-size: 1rem; }
input[type="text"], input[type="search"], input[type="email"], input[type="number"], input[type="time"], input[type="url"], select, textarea {
	width: 100%; min-height: 44px; padding: 10px 14px;
	background: #fff; color: var(--lhm-charcoal);
	border: 1.5px solid rgba(37, 43, 40, .28); border-radius: var(--lhm-radius-md);
	transition: border-color var(--lhm-trans), box-shadow var(--lhm-trans);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lhm-forest); box-shadow: 0 0 0 3px rgba(36, 72, 59, .2); }
label { font-weight: 500; }

/* ---------- Header ---------- */
.site-header { background: #fff; position: relative; z-index: 50; }
.header-brand-row { border-bottom: 1px solid var(--lhm-line); }
.header-inner { display: flex; align-items: center; gap: var(--lhm-space-5); padding-top: 14px; padding-bottom: 14px; }
.site-branding { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.site-title-link { font-family: var(--lhm-font-heading); font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.85rem); font-weight: 700; color: var(--lhm-forest); text-decoration: none; line-height: 1.1; letter-spacing: -.01em; }
.site-title-link:hover { color: var(--lhm-forest-dark); }
.site-tagline { margin: 0; font-size: .8125rem; color: var(--lhm-muted); display: none; }
.custom-logo { max-height: 48px; width: auto; }
.header-actions { display: flex; align-items: center; gap: var(--lhm-space-2); flex: 0 0 auto; }
.header-search-toggle, .mobile-menu-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0;
	background: transparent; border: 0; border-radius: var(--lhm-radius-md);
	color: var(--lhm-charcoal); cursor: pointer;
}
.header-search-toggle:hover, .mobile-menu-toggle:hover { background: var(--lhm-ivory-2); }
.header-cta { display: none; }
.hamburger { width: 22px; height: 16px; position: relative; display: inline-block; }
.hamburger span { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform var(--lhm-trans), opacity var(--lhm-trans); }
.hamburger span:nth-child(1) { top: 1px; }
.hamburger span:nth-child(2) { top: 7px; }
.hamburger span:nth-child(3) { top: 13px; }
.mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Primary navigation bar (desktop) */
.site-nav-bar { background: var(--lhm-forest); display: none; }
.main-navigation .primary-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--lhm-space-5); }
.main-navigation .primary-menu a {
	display: block; padding: 13px 0; color: #fff; text-decoration: none;
	font-size: .9375rem; font-weight: 500; border-bottom: 3px solid transparent;
}
.main-navigation .primary-menu a:hover { border-bottom-color: var(--lhm-peach); color: #fff; }
.main-navigation .primary-menu .current-menu-item > a,
.main-navigation .primary-menu .current-menu-ancestor > a,
.main-navigation .primary-menu .current-post-ancestor > a,
.main-navigation .primary-menu a[aria-current="page"] { border-bottom-color: var(--lhm-peach); }

.header-search-panel { background: var(--lhm-ivory); border-bottom: 1px solid var(--lhm-line); padding: var(--lhm-space-4) 0; }
.lhm-search-form { display: flex; align-items: center; gap: 8px; position: relative; max-width: 640px; }
.lhm-search-form svg { position: absolute; left: 14px; pointer-events: none; color: var(--lhm-muted); }
.lhm-search-form input[type="search"] { padding-left: 42px; }
.lhm-search-form .lhm-btn { flex: 0 0 auto; }

/* Mobile drawer */
.lhm-drawer-overlay { position: fixed; inset: 0; background: rgba(37, 43, 40, .5); z-index: 58; opacity: 0; pointer-events: none; transition: opacity var(--lhm-trans); }
.lhm-drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu-drawer {
	position: fixed; top: 0; right: 0; width: min(380px, 92vw); height: 100%; max-height: 100dvh; overflow-y: auto;
	background: var(--lhm-ivory); z-index: 60; padding: 20px var(--lhm-space-5) var(--lhm-space-7);
	transform: translateX(100%);
	transition: transform 220ms ease; box-shadow: var(--lhm-shadow-lg);
}
.mobile-menu-drawer.is-open { transform: translateX(0); }
.mobile-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--lhm-space-4); }
.mobile-menu-title { font-family: var(--lhm-font-heading); font-weight: 700; font-size: 1.25rem; color: var(--lhm-forest); }
.mobile-menu-close { width: 44px; height: 44px; border: 0; background: transparent; border-radius: var(--lhm-radius-md); cursor: pointer; color: var(--lhm-charcoal); font-size: 1.6rem; line-height: 1; }
.mobile-menu-close:hover { background: var(--lhm-ivory-2); }
.mobile-menu-list { list-style: none; margin: 0 0 var(--lhm-space-5); padding: 0; }
.mobile-menu-list li { border-bottom: 1px solid var(--lhm-line); }
.mobile-menu-list a { display: block; padding: 14px 4px; font-size: 1.0625rem; font-weight: 500; color: var(--lhm-charcoal); text-decoration: none; }
.mobile-menu-list a:hover { color: var(--lhm-forest); }
.mobile-menu-drawer .lhm-search-form { margin-bottom: var(--lhm-space-5); }
.mobile-menu-drawer .header-cta-mobile { width: 100%; }

/* Logged-in admin bar sits above the fixed drawer */
.admin-bar .mobile-menu-drawer { top: 46px; height: calc(100% - 46px); max-height: calc(100dvh - 46px); }
@media (min-width: 783px) { .admin-bar .mobile-menu-drawer { top: 32px; height: calc(100% - 32px); max-height: calc(100dvh - 32px); } }

@media (min-width: 900px) {
	.site-tagline { display: block; }
	.header-cta { display: inline-flex; }
	.mobile-menu-toggle { display: none; }
	.site-nav-bar { display: block; }
	.lhm-drawer-overlay, .mobile-menu-drawer { display: none; }
}

/* ---------- Cards ---------- */
.lhm-grid { display: grid; gap: 28px 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .lhm-grid-3, .lhm-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .lhm-grid-3 { grid-template-columns: repeat(3, 1fr); } .lhm-grid-4 { grid-template-columns: repeat(4, 1fr); } }

.lhm-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--lhm-line); border-radius: var(--lhm-radius-lg); overflow: hidden; transition: border-color var(--lhm-trans), box-shadow var(--lhm-trans); }
.lhm-card:hover { border-color: rgba(36, 72, 59, .45); box-shadow: var(--lhm-shadow-md); }
.lhm-card:focus-within { border-color: var(--lhm-forest); }
.lhm-card-media { aspect-ratio: 3 / 2; background: var(--lhm-sage-soft); overflow: hidden; }
.lhm-card-media img { width: 100%; height: 100%; object-fit: cover; }
.lhm-card-media--empty { display: flex; align-items: center; justify-content: center; color: var(--lhm-sage); background: linear-gradient(135deg, var(--lhm-sage-soft), var(--lhm-peach-soft)); }
.lhm-card-media--empty svg { width: 56px; height: 56px; opacity: .8; }
.lhm-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.lhm-card-tag, .lhm-tag {
	position: relative; z-index: 2; align-self: flex-start;
	display: inline-block; font-family: var(--lhm-font-ui); font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
	color: var(--lhm-forest); background: var(--lhm-sage-soft); padding: 4px 10px; border-radius: var(--lhm-radius-pill); text-decoration: none; margin-bottom: 12px;
}
.lhm-card-tag:hover, .lhm-tag:hover { background: var(--lhm-sage); color: var(--lhm-forest-dark); }
.lhm-card-title { font-size: var(--lhm-fs-card); line-height: 1.28; margin: 0 0 8px; }
.lhm-card-link { color: var(--lhm-charcoal); text-decoration: none; }
.lhm-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.lhm-card-link:hover { color: var(--lhm-forest); text-decoration: underline; text-decoration-thickness: 1px; }
.lhm-card-excerpt { color: #3c4540; font-size: .96875rem; margin: 0 0 14px; }
.lhm-card-meta { margin-top: auto; color: var(--lhm-muted); font-size: .8125rem; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.lhm-card-meta .sep { opacity: .6; }

/* ---------- Pagination ---------- */
.pagination .nav-links, .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: var(--lhm-space-6); justify-content: center; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px;
	border-radius: var(--lhm-radius-md); background: #fff; color: var(--lhm-charcoal); border: 1px solid var(--lhm-line);
	font-weight: 600; text-decoration: none;
}
.page-numbers.current, a.page-numbers:hover { background: var(--lhm-forest); color: #fff; border-color: var(--lhm-forest); }
.page-numbers.dots { border: 0; background: transparent; }

/* ---------- Breadcrumb ---------- */
.lhm-breadcrumb { padding: 14px 0 0; }
.lhm-breadcrumb-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 2px 6px; font-size: .8125rem; color: var(--lhm-muted); }
.lhm-breadcrumb-list li { display: inline-flex; align-items: center; gap: 6px; }
.lhm-breadcrumb-list a { color: var(--lhm-muted); }
.lhm-breadcrumb-list a:hover { color: var(--lhm-forest); }
.lhm-breadcrumb-list [aria-current="page"] { color: var(--lhm-charcoal); font-weight: 500; }
.lhm-breadcrumb-sep { opacity: .55; }

/* ---------- Footer ---------- */
.site-footer { background: var(--lhm-forest); color: rgba(255, 255, 255, .86); margin-top: var(--lhm-space-9); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-main { padding: var(--lhm-space-8) 0 var(--lhm-space-6); }
.footer-grid { display: grid; gap: var(--lhm-space-6); grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--lhm-space-7); } }
.footer-brand .site-title-footer { font-family: var(--lhm-font-heading); font-size: 1.6rem; font-weight: 700; color: #fff; display: block; margin-bottom: 10px; }
.footer-brand p { color: rgba(255, 255, 255, .8); font-size: .9375rem; max-width: 36ch; }
.footer-title, .footer-column .widget-title { font-family: var(--lhm-font-body); font-size: .8125rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--lhm-peach); margin: 0 0 14px; }
.footer-list, .footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-list li, .footer-menu li { padding: 5px 0; }
.footer-list a, .footer-menu a { font-size: .9375rem; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.footer-social a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--lhm-radius-md); }
.footer-social a:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .18); padding: var(--lhm-space-5) 0 var(--lhm-space-6); font-size: .8125rem; color: rgba(255, 255, 255, .78); }
.footer-bottom p { margin: 0 0 8px; max-width: 90ch; }
.footer-legal-nav .legal-menu { list-style: none; margin: 0 0 var(--lhm-space-4); padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-legal-nav a { font-size: .875rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
