/*
Theme Name: HealthHealths
Theme URI: https://healthhealths.com/
Author: HealthHealths
Description: A minimalist, responsive blogging theme for health content. News-style homepage, blog index, About and Contact pages, and a three-column single post layout with a table of contents on the left and a lead generation form on the right.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: healthhealths
Tags: blog, news, two-columns, three-columns, custom-logo, custom-menu, featured-images, translation-ready, threaded-comments
*/

/* ---------- Fonts (self-hosted Plus Jakarta Sans, variable 200-800, SIL OFL) ---------- */
@font-face {
	font-family: "Plus Jakarta Sans";
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	src: url("assets/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
	font-family: "Plus Jakarta Sans";
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	src: url("assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
	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;
}

/* ---------- Tokens ---------- */
:root {
	--ink: #16202a;
	--muted: #5d6975;
	--line: #e4e8ec;
	--soft: #f5f7f8;
	--accent: #0b6b5e;
	--accent-ink: #084f45;
	--radius: 6px;
	--wrap: 1240px;
	--wrap-wide: 1360px;
	--sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--serif: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.65 var(--sans); color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 800; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; color: #fff; }
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.container--wide { max-width: var(--wrap-wide); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 18px; }
.brand a { display: inline-block; }
.brand .site-title { font: 800 clamp(1.6rem, 3vw, 2.2rem)/1 var(--serif); letter-spacing: -.02em; margin: 0; }
.brand .site-tagline { margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.brand img { max-height: 56px; width: auto; }
.masthead-actions { display: flex; align-items: center; gap: 8px; }
.masthead-date { font-size: .85rem; color: var(--muted); margin-right: 12px; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; color: var(--ink); padding: 0; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle { display: none; }

.primary-nav { border-top: 1px solid var(--line); }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 28px; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 13px 0; font-size: .95rem; font-weight: 600; border-bottom: 2px solid transparent; }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.primary-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 200px; background: #fff; border: 1px solid var(--line); padding: 6px 16px; z-index: 20; flex-direction: column; gap: 0; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: flex; }
.primary-nav .sub-menu a { padding: 8px 0; border: 0; }

.search-panel { border-top: 1px solid var(--line); background: var(--soft); padding: 14px 0; }
.search-panel[hidden] { display: none; }

/* ---------- Forms & buttons ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="url"], textarea, select {
	width: 100%; padding: 10px 12px; border: 1px solid #cfd6dc; border-radius: 4px; font: inherit; color: var(--ink); background: #fff;
}
textarea { resize: vertical; min-height: 110px; }
label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 4px; }
.btn, button[type="submit"], input[type="submit"] {
	display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 4px; padding: 11px 20px; font: 700 .95rem var(--sans); cursor: pointer; text-align: center;
}
.btn:hover, button[type="submit"]:hover, input[type="submit"]:hover { background: var(--accent-ink); color: #fff; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; margin: 0; }
.search-form .btn { width: auto; }

/* ---------- Shared content pieces ---------- */
.thumb { display: block; aspect-ratio: 16 / 10; background: var(--soft); overflow: hidden; border-radius: 3px; }
.thumb img, .thumb .hf-ph { width: 100%; height: 100%; object-fit: cover; }
.hf-ph { display: block; background: linear-gradient(135deg, #eef2f3, #e3e9eb); }
.hf-cat { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--muted); margin: 0; }
.meta span + span { padding-left: 14px; border-left: 1px solid var(--line); }
.excerpt { color: var(--muted); margin: 0 0 10px; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink); padding-top: 10px; margin: 44px 0 22px; }
.section-head h2 { font-size: 1.35rem; margin: 0; }
.section-head a { font-size: .85rem; font-weight: 500; color: var(--muted); }

.card h3, .card h2 { font-size: 1.15rem; margin: 0 0 8px; }
.card .thumb { margin-bottom: 12px; }
.card .excerpt { font-size: .93rem; }

.row-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
.row-card h3 { font-size: 1.02rem; line-height: 1.3; margin: 0 0 6px; }
.row-card .thumb { aspect-ratio: 4 / 3; }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; padding: 30px 0 4px; }
.lead .thumb { aspect-ratio: 16 / 9; margin-bottom: 16px; }
.lead h2 { font-size: clamp(1.7rem, 3.2vw, 2.55rem); line-height: 1.12; margin-bottom: 12px; }
.lead .excerpt { font-size: 1.05rem; }
.top-stories { display: grid; gap: 22px; align-content: start; border-left: 1px solid var(--line); padding-left: 32px; }
.top-stories .row-card { grid-template-columns: 1fr; }
.top-stories .row-card .thumb { aspect-ratio: 16 / 10; }
.top-stories .row-card + .row-card { border-top: 1px solid var(--line); padding-top: 22px; }

.latest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.latest .row-card { padding: 18px 0; border-top: 1px solid var(--line); }

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }

.trending { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: rank; }
.trending li { counter-increment: rank; border-top: 1px solid var(--line); padding-top: 14px; }
.trending li::before { content: counter(rank); display: block; font: 800 1.6rem/1 var(--serif); color: var(--accent); margin-bottom: 8px; }
.trending h3 { font-size: 1.02rem; line-height: 1.3; margin: 0 0 6px; }

/* ---------- Listing / archive ---------- */
.page-head { padding: 40px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 8px; }
.page-head p { color: var(--muted); max-width: 640px; margin: 0; font-size: 1.05rem; }
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.cat-pills a { display: inline-block; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; color: var(--muted); }
.cat-pills a:hover, .cat-pills .is-current a { border-color: var(--accent); color: var(--accent); }
.listing { padding-bottom: 56px; }
.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .page-numbers { padding: 7px 14px; border: 1px solid var(--line); border-radius: 4px; font-size: .9rem; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.empty { padding: 48px 0; color: var(--muted); }

/* ---------- Single post (3 columns) ---------- */
.post-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: 40px; padding: 40px 0 56px; align-items: start; }
.post-layout > aside { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; }
.side-title { font: 700 .9rem var(--sans); margin: 0 0 10px; }

.toc summary { list-style: none; cursor: pointer; font: 700 .9rem var(--sans); margin-bottom: 10px; }
.toc summary::-webkit-details-marker { display: none; }
.toc-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc-list a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: .9rem; line-height: 1.4; color: var(--muted); }
.toc-list .l3 a { padding-left: 28px; font-size: .85rem; }
.toc-list a:hover { color: var(--ink); }
.toc-list a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.side-links { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.side-links li { padding: 6px 0; border-bottom: 1px solid var(--line); }

.entry-header h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.14; margin: 4px 0 14px; }
.entry-header .meta { margin-bottom: 22px; }
.entry-thumb { margin: 0 0 28px; }
.entry-thumb img { width: 100%; border-radius: 3px; }

.entry-content { font-size: 1.06rem; line-height: 1.8; overflow-wrap: break-word; }
.entry-content h2 { font-size: 1.6rem; margin: 2em 0 .6em; scroll-margin-top: 24px; }
.entry-content h3 { font-size: 1.28rem; margin: 1.7em 0 .5em; scroll-margin-top: 24px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.entry-content img { border-radius: 3px; }
.entry-content pre { overflow-x: auto; background: var(--soft); padding: 14px; border-radius: 4px; font-size: .9rem; }
.entry-footer { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.tag-list a { display: inline-block; margin: 0 6px 6px 0; padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.post-nav a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); font-size: .93rem; }
.post-nav .nav-next { text-align: right; }
.post-nav small { display: block; color: var(--muted); font-size: .78rem; }
.related { margin-top: 56px; }
.related .grid-3 { gap: 28px 24px; }

/* Lead form */
.lead-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--soft); }
.lead-box h2 { font-size: 1.25rem; margin-bottom: 6px; }
.lead-box > p { font-size: .92rem; color: var(--muted); }
.lead-box .field { margin-bottom: 12px; }
.lead-box .btn { width: 100%; }
.lead-box .fine { font-size: .78rem; color: var(--muted); margin: 10px 0 0; }
.hf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 10px 12px; border-radius: 4px; font-size: .9rem; margin-bottom: 14px; }
.notice.ok { background: #e6f4f1; color: var(--accent-ink); }
.notice.err { background: #fdecea; color: #8a1f17; }

/* ---------- Pages ---------- */
.page-wrap { padding: 8px 0 64px; }
.page-narrow { max-width: 760px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.about-aside { border-left: 1px solid var(--line); padding-left: 32px; }
.about-aside ul { margin: 0; padding: 0; list-style: none; }
.about-aside li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }

/* ---------- Comments ---------- */
.comments-area { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.comments-area h2 { font-size: 1.3rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.comment-meta { font-size: .82rem; color: var(--muted); }
.comment-respond label { margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 24px; border-top: 2px solid var(--ink); background: var(--soft); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding: 44px 0 32px; }
.footer-grid h2 { font: 700 .95rem var(--sans); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { padding: 4px 0; }
.footer-grid p { color: var(--muted); max-width: 420px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 0 24px; font-size: .82rem; color: var(--muted); }
.footer-bottom p { margin: 0 0 6px; }

/* ---------- WordPress core ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; display: block; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption, figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.sticky, .bypostauthor { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1179px) {
	.post-layout { grid-template-columns: minmax(0, 1fr); max-width: 780px; margin: 0 auto; gap: 28px; }
	.post-layout > aside { position: static; max-height: none; overflow: visible; }
	.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--soft); }
	.toc summary { margin: 0; }
	.toc[open] summary { margin-bottom: 10px; }
	.toc summary::after { content: "+"; float: right; font-weight: 400; }
	.toc[open] summary::after { content: "\2212"; }
}
@media (max-width: 1023px) {
	.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.trending { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
	.masthead-date { display: none; }
	.nav-toggle { display: inline-flex; }
	.primary-nav { display: none; }
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; gap: 0; }
	.primary-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
	.primary-nav .sub-menu { display: block; position: static; border: 0; padding: 0 0 0 16px; }
	.hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.top-stories { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 22px; }
	.top-stories .row-card { grid-template-columns: 112px minmax(0, 1fr); }
	.latest { grid-template-columns: minmax(0, 1fr); }
	.contact-grid, .about-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.about-aside { border-left: 0; padding-left: 0; }
}
@media (max-width: 599px) {
	body { font-size: 15.5px; }
	.container { padding: 0 16px; }
	.grid-4, .grid-3, .trending { grid-template-columns: minmax(0, 1fr); }
	.row-card { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
	.footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.post-nav { grid-template-columns: minmax(0, 1fr); }
	.search-form { flex-direction: column; }
	.search-form .btn { width: 100%; }
	.entry-content { font-size: 1rem; }
	.alignleft, .alignright { float: none; margin: 0 0 1em; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}


