/*
Theme Name: Healthgetor Affiliate
Theme URI: https://healthgetor.com
Description: A lightweight, accessible WordPress theme for health guides, reviews, and affiliate content.
Version: 1.0.2
Author: Healthgetor
Author URI: https://healthgetor.com
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: healthgetor-affiliate
Requires at least: 6.0
Requires PHP: 7.4
Tags: blog, news, health, affiliate-marketing, custom-logo, featured-images, translation-ready
*/

:root {
  --hg-ink: #122c26;
  --hg-ink-soft: #35544d;
  --hg-green: #187a5d;
  --hg-green-dark: #0e5a43;
  --hg-mint: #e8f6ef;
  --hg-canvas: #f8fbf9;
  --hg-line: #d8e5de;
  --hg-white: #ffffff;
  --hg-orange: #d96828;
  --hg-shadow: 0 18px 48px rgba(18, 44, 38, .10);
  --hg-radius: 18px;
  --hg-content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--hg-ink);
  background: var(--hg-canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--hg-green-dark); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--hg-orange); }
button, input, textarea, select { font: inherit; }
button, input[type="submit"] { cursor: pointer; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto; width: auto; height: auto; margin: 10px; padding: 10px 14px;
  background: var(--hg-white); color: var(--hg-ink); z-index: 1000;
}
.site-main:focus { outline: none; }
.container { width: min(calc(100% - 40px), var(--hg-content)); margin-inline: auto; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 46px; padding: .65rem 1.05rem; border: 1px solid transparent; border-radius: 999px;
  background: var(--hg-green); color: var(--hg-white); font-weight: 750; line-height: 1.2;
  text-decoration: none; transition: transform .16s ease, background .16s ease;
}
.button:hover, .button:focus { background: var(--hg-green-dark); color: var(--hg-white); transform: translateY(-1px); }
.button--secondary { background: var(--hg-white); color: var(--hg-green-dark); border-color: var(--hg-line); }
.button--secondary:hover, .button--secondary:focus { background: var(--hg-mint); color: var(--hg-green-dark); }

.site-notice { background: var(--hg-ink); color: #d9eee5; font-size: .81rem; }
.site-notice p { margin: 0; padding: .38rem 0; }
.site-header { background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--hg-line); }
.header-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.site-branding { display: flex; align-items: center; flex-shrink: 0; }
.site-branding .custom-logo-link { display: flex; align-items: center; }
.site-branding .custom-logo { max-height: 48px; width: auto; }
.brand-name { color: var(--hg-ink); font-size: 1.36rem; font-weight: 850; letter-spacing: -.055em; text-decoration: none; }
.brand-name::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: .38rem; border-radius: 50%; background: #35bf85; color: var(--hg-white); font-size: 1.05rem; line-height: 1; }
.site-branding .custom-logo-link + .brand-name::before { display: none; }
.site-branding .custom-logo-link + .brand-name { margin-left: .55rem; }
.primary-navigation { margin-left: auto; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--hg-ink); font-weight: 750; }
.primary-menu, .primary-navigation > div > ul, .footer-menu { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 0; padding: 0; list-style: none; }
.primary-menu a, .primary-navigation > div > ul a { color: var(--hg-ink); font-size: .94rem; font-weight: 720; text-decoration: none; }
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-navigation > div > ul a:hover, .primary-navigation > div > ul .current_page_item > a { color: var(--hg-green); }
.header-search { display: flex; align-items: center; width: min(270px, 22vw); overflow: hidden; border: 1px solid var(--hg-line); border-radius: 999px; background: var(--hg-white); }
.header-search:focus-within { border-color: var(--hg-green); box-shadow: 0 0 0 3px rgba(24, 122, 93, .12); }
.header-search__field { width: 100%; min-width: 0; padding: .5rem .25rem .5rem .85rem; border: 0; outline: 0; background: transparent; color: var(--hg-ink); font-size: .84rem; }
.header-search__field::placeholder { color: #6b837c; }
.header-search__submit { flex: 0 0 auto; padding: .5rem .7rem; border: 0; background: transparent; color: var(--hg-green-dark); font-size: .78rem; font-weight: 800; }
.header-search__submit:hover, .header-search__submit:focus { color: var(--hg-orange); }

.hero { padding: clamp(3.5rem, 7vw, 7.5rem) 0 3rem; background: radial-gradient(circle at 87% 5%, #bce9d3 0, #e9f7f0 26%, transparent 48%), var(--hg-mint); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr); align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.eyebrow { display: inline-block; margin-bottom: .85rem; color: var(--hg-green); font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.hero h1, .archive-header h1, .entry-title { margin: 0; color: var(--hg-ink); font-weight: 850; letter-spacing: -.052em; line-height: 1.05; }
.hero h1 { max-width: 720px; font-size: clamp(2.7rem, 6vw, 5.25rem); }
.hero-copy { max-width: 650px; margin: 1.2rem 0 1.65rem; color: var(--hg-ink-soft); font-size: clamp(1.05rem, 2vw, 1.22rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-card { position: relative; padding: 1.5rem; border: 1px solid rgba(24, 122, 93, .14); border-radius: var(--hg-radius); background: var(--hg-white); box-shadow: var(--hg-shadow); }
.hero-card::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 90px; height: 6px; border-radius: 18px 0; background: var(--hg-orange); }
.hero-card h2 { margin: .2rem 0 .75rem; font-size: 1.35rem; letter-spacing: -.03em; }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding: .38rem 0 .38rem 1.55rem; color: var(--hg-ink-soft); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--hg-green); font-weight: 900; }

.section { padding: clamp(3.5rem, 6vw, 5.6rem) 0; }
.section--white { background: var(--hg-white); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.55rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -.045em; line-height: 1.1; }
.section-heading p { max-width: 560px; margin: 0; color: var(--hg-ink-soft); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--hg-line); border-radius: var(--hg-radius); background: var(--hg-white); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--hg-shadow); }
.post-card__image { display: block; aspect-ratio: 16 / 10; background: var(--hg-mint); overflow: hidden; }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.post-card:hover .post-card__image img { transform: scale(1.025); }
.post-card__body { display: flex; flex: 1; flex-direction: column; padding: 1.25rem; }
.post-card__category { margin-bottom: .55rem; color: var(--hg-green); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.post-card h3 { margin: 0 0 .6rem; font-size: 1.28rem; line-height: 1.2; letter-spacing: -.035em; }
.post-card h3 a { color: var(--hg-ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--hg-green); }
.post-card p { margin: 0; color: var(--hg-ink-soft); font-size: .94rem; }
.post-meta { margin-top: auto; padding-top: 1.05rem; color: #5d7770; font-size: .79rem; }
.post-meta a { color: inherit; }

.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.trust-card { padding: 1.35rem; border-radius: var(--hg-radius); background: var(--hg-mint); }
.trust-card__number { display: block; color: var(--hg-green); font-size: 1.9rem; font-weight: 850; line-height: 1; }
.trust-card h3 { margin: .6rem 0 .35rem; font-size: 1.1rem; }
.trust-card p { margin: 0; color: var(--hg-ink-soft); font-size: .92rem; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: clamp(2rem, 6vw, 5rem); padding: clamp(2.5rem, 5vw, 5rem) 0; }
.content-layout--single { max-width: 1060px; grid-template-columns: minmax(0, 1fr) 280px; }
.archive-header { padding: 3.2rem 0 2.3rem; background: var(--hg-mint); }
.archive-header h1 { font-size: clamp(2.3rem, 5vw, 4.25rem); }
.archive-header p { max-width: 710px; color: var(--hg-ink-soft); }
.entry-header { margin-bottom: 1.5rem; }
.entry-title { font-size: clamp(2rem, 4.7vw, 4.25rem); }
.entry-summary { max-width: 780px; margin: 1rem 0 0; color: var(--hg-ink-soft); font-size: 1.1rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-top: 1rem; color: #59736c; font-size: .87rem; }
.entry-meta > * + *::before { content: "•"; margin-right: .8rem; color: #8ca69e; }
.featured-image { overflow: hidden; margin: 1.7rem 0 2rem; border-radius: var(--hg-radius); background: var(--hg-mint); }
.featured-image img { display: block; width: 100%; }
.entry-content { color: #233c36; font-size: 1.07rem; }
.entry-content > * { max-width: 760px; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--hg-ink); line-height: 1.15; letter-spacing: -.035em; }
.entry-content h2 { margin-top: 2.2rem; font-size: 1.7rem; }
.entry-content h3 { margin-top: 1.9rem; font-size: 1.35rem; }
.entry-content a { font-weight: 700; }
.entry-content blockquote { margin: 1.8rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--hg-green); background: var(--hg-mint); color: var(--hg-ink); font-weight: 650; }
.entry-content table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .65rem; border: 1px solid var(--hg-line); text-align: left; }
.entry-content th { background: var(--hg-mint); }
.entry-footer { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--hg-line); color: var(--hg-ink-soft); font-size: .9rem; }

.affiliate-box { margin: 1.5rem 0 2rem; padding: 1.25rem; border: 1px solid #b9e4ce; border-radius: var(--hg-radius); background: #f1faf5; }
.affiliate-box h2 { margin: 0 0 .45rem; font-size: 1.25rem; }
.affiliate-box p { margin: 0 0 .95rem; color: var(--hg-ink-soft); font-size: .9rem; }
.affiliate-box .affiliate-disclosure { color: #5d7770; font-size: .78rem; }
.sidebar { align-self: start; }
.sidebar .widget { margin-bottom: 1.25rem; padding: 1.25rem; border: 1px solid var(--hg-line); border-radius: var(--hg-radius); background: var(--hg-white); }
.sidebar .widget-title { margin: 0 0 .8rem; font-size: 1.1rem; letter-spacing: -.025em; }
.sidebar ul { padding-left: 1.1rem; }
.sidebar li + li { margin-top: .35rem; }
.review-note { padding: 1.25rem; border-radius: var(--hg-radius); background: var(--hg-ink); color: #dcefe6; }
.review-note h2 { margin: 0 0 .5rem; color: var(--hg-white); font-size: 1.25rem; }
.review-note p { margin: 0; font-size: .9rem; }

.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 2rem; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 38px; min-height: 38px; padding: .3rem; border: 1px solid var(--hg-line); border-radius: 50%; background: var(--hg-white); text-decoration: none; }
.pagination .current { background: var(--hg-green); border-color: var(--hg-green); color: var(--hg-white); }
.no-results { padding: 2rem; border-radius: var(--hg-radius); background: var(--hg-mint); }
.search-form { display: flex; max-width: 520px; gap: .5rem; }
.search-field { min-width: 0; flex: 1; padding: .72rem .85rem; border: 1px solid var(--hg-line); border-radius: 9px; }
.search-submit { padding: .72rem 1rem; border: 0; border-radius: 9px; background: var(--hg-green); color: var(--hg-white); font-weight: 750; }
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--hg-line); }
.comment-list { padding-left: 1.1rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--hg-line); }

.site-footer { margin-top: 3rem; background: var(--hg-ink); color: #d3e8de; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; padding: 3.25rem 0 2rem; }
.footer-brand { color: var(--hg-white); font-size: 1.25rem; font-weight: 850; letter-spacing: -.04em; }
.footer-brand::before { content: "+"; margin-right: .35rem; color: #67d6a6; }
.site-footer p { max-width: 560px; margin: .65rem 0 0; color: #b9d5c9; font-size: .88rem; }
.footer-menu { justify-content: flex-end; }
.footer-menu a { color: #dcefe6; font-size: .9rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0 1.5rem; border-top: 1px solid rgba(255,255,255,.14); color: #a9c8ba; font-size: .78rem; }
.footer-bottom p { margin: 0; }

@media (max-width: 820px) {
  .header-row { min-height: 68px; flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .primary-navigation { order: 3; width: 100%; margin: 0; }
  .primary-navigation:not(.is-open) { display: none; }
  .primary-menu, .primary-navigation > div > ul { display: block; padding: .2rem 0 .9rem; }
  .primary-menu li + li, .primary-navigation > div > ul li + li { margin-top: .65rem; }
  .header-search { order: 4; width: 100%; margin-bottom: .85rem; }
  .hero-grid, .content-layout, .content-layout--single, .footer-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .sidebar .widget { margin: 0; }
  .footer-menu { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .container { width: min(calc(100% - 28px), var(--hg-content)); }
  .hero { padding-top: 3.3rem; }
  .post-grid, .trust-grid, .sidebar { grid-template-columns: 1fr; }
  .section-heading, .footer-bottom { display: block; }
  .section-heading p { margin-top: .75rem; }
  .footer-bottom p + p { margin-top: .6rem; }
}
