/*
Theme Name: HealthBlog Pro
Theme URI: https://healthblogpro.com
Author: HealthBlog Pro
Author URI: https://healthblogpro.com
Description: A blazing-fast, SEO-optimised, AdSense-ready WordPress theme for health blogs. Mobile-first, Core Web Vitals optimised, Google Discover ready.
Version: 5.4.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: healthblog-pro
Tags: blog, health, seo, adsense, mobile-first, fast
*/

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  --color-primary: #2E7D32;
  --color-primary-light: #4CAF50;
  --color-primary-dark: #1B5E20;
  --color-secondary: #00ACC1;
  --color-accent: #FF7043;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8FAF8;
  --color-bg-card: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-muted: #666666;
  --color-text-light: #999999;
  --color-border: #E8EFE8;
  --color-link: #2E7D32;
  --color-link-hover: #1B5E20;

  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-heading: Georgia, 'Times New Roman', Times, serif;
  --font-mono: 'SFMono-Regular', Consolas, monospace;

  --text-xs: clamp(0.75rem, 1.5vw, 0.8rem);
  --text-sm: clamp(0.875rem, 2vw, 0.9375rem);
  --text-base: clamp(1rem, 2.5vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 3vw, 1.25rem);
  --text-xl: clamp(1.25rem, 3.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 4vw, 2rem);
  --text-3xl: clamp(1.75rem, 5vw, 2.5rem);
  --text-4xl: clamp(2rem, 6vw, 3rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;

  --header-height: 64px;
  --transition: 0.2s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

/* FIX #36: scroll-behavior inside media query so prefers-reduced-motion:reduce disables it */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* FIX #35: overflow-x on body breaks position:sticky; use wrapper instead */
}

/* Prevent horizontal scroll at layout level, not body */
.site-wrapper { overflow-x: hidden; }

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

a { color: var(--color-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-link-hover); }
a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 2px; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  color: var(--color-text);
  font-weight: 700;
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: var(--space-6); margin-bottom: var(--space-4); }
li { margin-bottom: var(--space-2); }

blockquote {
  border-left: 4px solid var(--color-primary);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: var(--text-lg);
}

pre, code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code {
  background: var(--color-bg-alt);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--color-primary-dark);
}
pre { background: #1e1e1e; color: #d4d4d4; padding: var(--space-6); border-radius: var(--radius-md); overflow-x: auto; margin-bottom: var(--space-4); }
pre code { background: none; color: inherit; padding: 0; }

table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-6); }
th, td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-bg-alt); font-weight: 600; }
tr:hover td { background: var(--color-bg-alt); }

hr { border: none; border-top: 1px solid var(--color-border); margin: var(--space-8) 0; }

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (min-width: 768px) { .container { padding: 0 var(--space-8); } }

.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

.content-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding: var(--space-8) 0;
}
@media (min-width: 1024px) {
  .content-area { grid-template-columns: 1fr 320px; }
  .content-area.no-sidebar { grid-template-columns: 1fr; }
  .content-area.full-width { grid-template-columns: 1fr; max-width: 860px; margin: 0 auto; }
}

/* ============================================
   SKIP LINK (Accessibility)
   ============================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: white;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 9999;
  font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; color: white; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  /* CLS prevention */
  contain: layout style;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-branding { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }

.site-logo img {
  height: 40px;
  width: auto;
  /* Explicit dimensions prevent CLS */
}

.site-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.2;
}
.site-title a { color: inherit; }
.site-title a:hover { color: var(--color-primary); }

.site-tagline {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: none;
}
@media (min-width: 768px) { .site-tagline { display: block; } }

/* ============================================
   NAVIGATION
   ============================================ */
.main-navigation { display: flex; align-items: center; }

.nav-menu {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--space-1);
}
@media (min-width: 768px) { .nav-menu { display: flex; } }

.nav-menu li { position: relative; }

.nav-menu a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-menu a:hover, .nav-menu .current-menu-item > a {
  color: var(--color-primary);
  background: var(--color-bg-alt);
}

/* Dropdown */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  padding: var(--space-2) 0;
  z-index: 200;
}
.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu { display: block; }
.nav-menu .sub-menu a { border-radius: 0; padding: var(--space-2) var(--space-4); }

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-2);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
@media (min-width: 768px) { .menu-toggle { display: none; } }

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.5);
}
.mobile-nav.is-open { display: block; }
.mobile-nav-inner {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--color-bg);
  overflow-y: auto;
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
}
.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: var(--space-6);
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-xl);
  color: var(--color-text);
  min-width: 44px;
  min-height: 44px;
}
.mobile-nav ul { list-style: none; padding: 0; }
.mobile-nav ul li { border-bottom: 1px solid var(--color-border); }
.mobile-nav ul a {
  display: block;
  padding: var(--space-3) var(--space-2);
  font-weight: 500;
  color: var(--color-text);
}
.mobile-nav .sub-menu { padding-left: var(--space-4); }

/* Header Search */
.header-search { display: none; }
@media (min-width: 1024px) { .header-search { display: flex; } }
.header-search form {
  display: flex;
  align-items: center;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  padding: 0 var(--space-3);
  gap: var(--space-2);
}
.header-search input {
  border: none;
  background: none;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  width: 180px;
  outline: none;
  color: var(--color-text);
}
.header-search button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}

/* ============================================
   HERO / FEATURED POST
   ============================================ */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  padding: var(--space-12) 0;
  color: white;
}

.hero-post {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 768px) {
  .hero-post { grid-template-columns: 1fr 1fr; }
}

.hero-post-meta { display: flex; gap: var(--space-3); align-items: center; margin-bottom: var(--space-4); flex-wrap: wrap; }
.hero-category-badge {
  background: var(--color-accent);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-date { font-size: var(--text-sm); opacity: 0.85; }

.hero-title {
  font-size: var(--text-3xl);
  color: white;
  margin-bottom: var(--space-4);
  line-height: 1.25;
}
.hero-excerpt { opacity: 0.9; margin-bottom: var(--space-6); font-size: var(--text-lg); }

.hero-post-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16/9;
}
.hero-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition), transform var(--transition);
  text-decoration: none;
  line-height: 1;
  min-height: 44px; /* touch target */
}
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); color: white; }
.btn-outline { border-color: currentColor; color: var(--color-primary); background: transparent; }
.btn-outline:hover { background: var(--color-primary); color: white; }
.btn-white { background: white; color: var(--color-primary-dark); }
.btn-white:hover { background: var(--color-bg-alt); color: var(--color-primary-dark); }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); min-height: 36px; }

/* ============================================
   POST CARDS
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 640px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .posts-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
  contain: layout style;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.post-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.03); }

.post-card-body { padding: var(--space-5); }

.post-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.category-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: rgba(46,125,50,0.1);
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.category-badge:hover { background: var(--color-primary); color: white; }

.post-card-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
  line-height: 1.35;
}
.post-card-title a { color: var(--color-text); }
.post-card-title a:hover { color: var(--color-primary); }

.post-card-excerpt {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  gap: var(--space-2);
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.post-card-author { display: flex; align-items: center; gap: var(--space-2); }
.post-card-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.read-time { display: flex; align-items: center; gap: var(--space-1); }

/* List style card */
.post-card-list {
  display: flex;
  flex-direction: row;
  gap: var(--space-4);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  transition: box-shadow var(--transition);
}
.post-card-list:hover { box-shadow: var(--shadow-sm); }
.post-card-list .post-card-image {
  width: 120px;
  flex-shrink: 0;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
}
.post-card-list .post-card-body { padding: 0; flex: 1; }

/* ============================================
   CATEGORY SECTION TABS
   ============================================ */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.category-tab {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition), transform var(--transition);
  text-decoration: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.category-tab:hover, .category-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ============================================
   SECTION HEADINGS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
}
.section-title {
  font-size: var(--text-2xl);
  position: relative;
  padding-bottom: var(--space-3);
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* ============================================
   ADSENSE AD UNITS
   ============================================ */
/* ── CLS-Safe Ad Containers ─────────────────────────────────
   Each ad slot reserves space BEFORE the ad loads, preventing
   layout shift. Sizes match standard IAB ad units.
   ──────────────────────────────────────────────────────────── */
.ad-unit {
  width: 100%;
  overflow: hidden;
  text-align: center;
  position: relative;
}
.ad-unit::before {
  content: 'Advertisement';
  display: block;
  font-size: 10px;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

/* Prevent CLS for ads - reserve space */
.ad-unit-728x90  { min-height: 90px;  width: 100%; max-width: 728px; margin: 0 auto; contain: layout size; }
.ad-unit-300x250 { min-height: 250px; width: 100%; max-width: 300px; contain: layout size; }
.ad-unit-320x50  { min-height: 50px;  width: 100%; max-width: 320px; contain: layout size; }
.ad-unit-responsive { min-height: 250px; width: 100%; contain: layout; background: var(--color-bg-alt); }

.ad-slot-header { padding: var(--space-3) 0; background: var(--color-bg-alt); margin-bottom: var(--space-2); }
.ad-slot-in-content {
  margin: var(--space-8) auto;
  max-width: 100%;
  min-height: 280px;        /* reserve space: prevents CLS when ad loads */
  width: 100%;
  contain: layout size;     /* CSS containment: isolates layout recalc */
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}
@media (min-width: 728px) {
  .ad-slot-in-content { min-height: 90px; }  /* leaderboard on desktop */
}
.ad-slot-sidebar {
  margin-bottom: var(--space-6);
  min-height: 250px;        /* 300x250 MPU reserved space */
  contain: layout size;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}
.ad-slot-footer { padding: var(--space-6) 0; border-top: 1px solid var(--color-border); }
.ad-slot-between-posts { padding: var(--space-4) 0; }

/* ============================================
   SINGLE POST / ARTICLE
   ============================================ */
.article-header { margin-bottom: var(--space-8); }

.article-categories { margin-bottom: var(--space-4); display: flex; gap: var(--space-2); flex-wrap: wrap; }

.article-title {
  font-size: var(--text-4xl);
  line-height: 1.2;
  margin-bottom: var(--space-5);
  color: var(--color-text);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
}
.article-author { display: flex; align-items: center; gap: var(--space-3); }
.article-author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.article-author-name { font-weight: 600; color: var(--color-text); }
.article-author-role { font-size: var(--text-xs); color: var(--color-text-muted); }

.article-featured-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-8);
  background: var(--color-bg-alt);
}
.article-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* Article Content */
.article-content {
  font-size: var(--text-base);
  line-height: 1.85;
  max-width: 720px;
}

.article-content h2 {
  font-size: var(--text-2xl);
  margin: var(--space-10) 0 var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-border);
}
.article-content h3 { font-size: var(--text-xl); margin: var(--space-8) 0 var(--space-4); }
.article-content h4 { font-size: var(--text-lg); margin: var(--space-6) 0 var(--space-3); }

.article-content img {
  border-radius: var(--radius-lg);
  margin: var(--space-6) auto;
  box-shadow: var(--shadow-sm);
}

.article-content ul, .article-content ol { margin: var(--space-4) 0 var(--space-4) var(--space-6); }
.article-content li { margin-bottom: var(--space-2); }

/* Key Takeaways Box */
.key-takeaways {
  background: linear-gradient(135deg, rgba(46,125,50,0.05), rgba(76,175,80,0.08));
  border: 1px solid rgba(46,125,50,0.2);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-8) 0;
}
.key-takeaways h4 { color: var(--color-primary-dark); margin-bottom: var(--space-4); }

/* Warning / Disclaimer Box */
.medical-disclaimer {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: var(--space-8) 0;
  font-size: var(--text-sm);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.medical-disclaimer-icon { font-size: 1.2rem; flex-shrink: 0; }

/* Table of Contents */
.toc-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-8) 0;
}
.toc-title { font-size: var(--text-lg); margin-bottom: var(--space-4); }
.toc-list { list-style: none; padding: 0; counter-reset: toc; }
.toc-list li { counter-increment: toc; padding: var(--space-2) 0; border-bottom: 1px dashed var(--color-border); }
.toc-list li:last-child { border-bottom: none; }
.toc-list a {
  display: flex;
  gap: var(--space-3);
  color: var(--color-text);
  font-size: var(--text-sm);
}
.toc-list a::before { content: counter(toc); color: var(--color-primary); font-weight: 700; flex-shrink: 0; }
.toc-list a:hover { color: var(--color-primary); }
.toc-sub { padding-left: var(--space-6); }

/* Post Tags */
.article-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-8) 0; align-items: center; }
.tags-label { font-weight: 600; font-size: var(--text-sm); color: var(--color-text-muted); }
.tag-pill {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition), transform var(--transition);
}
.tag-pill:hover { background: var(--color-primary); border-color: var(--color-primary); color: white; }

/* Share Buttons */
.article-share { margin: var(--space-8) 0; }
.share-title { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-3); color: var(--color-text-muted); }
.share-buttons { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  min-height: 40px;
  text-decoration: none;
  color: white;
}
.share-btn-facebook { background: #1877F2; }
.share-btn-twitter { background: #1DA1F2; }
.share-btn-whatsapp { background: #25D366; }
.share-btn-copy { background: var(--color-text-muted); cursor: pointer; border: none; }
.share-btn:hover { opacity: 0.9; color: white; transform: translateY(-1px); }

/* Author Bio Box */
.author-box {
  display: flex;
  gap: var(--space-6);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin: var(--space-10) 0;
  flex-wrap: wrap;
}
.author-box-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box-name { font-size: var(--text-xl); margin-bottom: var(--space-1); }
.author-box-credentials { color: var(--color-primary); font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-3); }
.author-box-bio { color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: var(--space-3); }

/* Related Posts */
.related-posts { margin: var(--space-10) 0; }
.related-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) { .related-posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .related-posts-grid { grid-template-columns: repeat(3, 1fr); } }

/* Post Navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin: var(--space-10) 0;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-border);
}
.nav-post {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition), transform var(--transition);
}
.nav-post:hover { border-color: var(--color-primary); box-shadow: var(--shadow-sm); }
.nav-post-label { font-size: var(--text-xs); text-transform: uppercase; color: var(--color-text-light); font-weight: 600; margin-bottom: var(--space-2); display: block; }
.nav-post-title { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); line-height: 1.4; }
.nav-post.next { text-align: right; }

/* ============================================
   COMMENTS
   ============================================ */
.comments-area { margin-top: var(--space-10); }
.comments-title { font-size: var(--text-2xl); margin-bottom: var(--space-6); }

.comment-list { list-style: none; padding: 0; }
.comment-body {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.comment-meta { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.comment-author img { width: 36px; height: 36px; border-radius: 50%; }
.comment-author-name { font-weight: 600; }
.comment-date { font-size: var(--text-xs); color: var(--color-text-light); }
.comment-content { font-size: var(--text-sm); }

.children { list-style: none; padding-left: var(--space-8); }

.comment-reply-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
}

/* Comment Form */
.comment-form-wrapper { margin-top: var(--space-8); }
.comment-form label { display: block; font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition);
  outline: none;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(46,125,50,0.1); }
.comment-form textarea { resize: vertical; min-height: 140px; }
.form-row { margin-bottom: var(--space-4); }
.form-row-group { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

/* ============================================
   SIDEBAR
   ============================================ */
.widget {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  overflow: hidden;
}
.widget-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
  position: relative;
}
.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--color-primary);
}

/* Widget: Recent Posts */
.widget-recent-post { display: flex; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.widget-recent-post:last-child { border-bottom: none; padding-bottom: 0; }
.widget-recent-post-image { width: 68px; height: 68px; flex-shrink: 0; border-radius: var(--radius-md); overflow: hidden; }
.widget-recent-post-image img { width: 100%; height: 100%; object-fit: cover; }
.widget-recent-post-title { font-size: var(--text-sm); font-weight: 600; line-height: 1.4; margin-bottom: var(--space-1); }
.widget-recent-post-date { font-size: var(--text-xs); color: var(--color-text-light); }

/* Widget: Categories */
.widget-category-list { list-style: none; padding: 0; }
.widget-category-list li { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) 0; border-bottom: 1px dashed var(--color-border); }
.widget-category-list li:last-child { border-bottom: none; }
.widget-category-list a { color: var(--color-text); font-size: var(--text-sm); }
.widget-category-list a:hover { color: var(--color-primary); }
.category-count { background: var(--color-bg-alt); padding: 2px 8px; border-radius: var(--radius-full); font-size: var(--text-xs); color: var(--color-text-muted); }

/* Widget: Newsletter */
.newsletter-widget { background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary)); color: white; }
.newsletter-widget .widget-title { color: white; border-color: rgba(255,255,255,0.2); }
.newsletter-widget .widget-title::after { background: white; }
.newsletter-widget p { color: rgba(255,255,255,0.85); font-size: var(--text-sm); margin-bottom: var(--space-4); }
.newsletter-form input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.newsletter-form button { width: 100%; }

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  padding: var(--space-3) 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumb-sep { color: var(--color-text-light); }
.breadcrumb-current { color: var(--color-text); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  padding: var(--space-8) 0;
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition), transform var(--transition);
  text-decoration: none;
}
.page-numbers:hover, .page-numbers.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
.page-numbers.dots { border: none; background: none; }

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-header { padding: var(--space-8) 0; }
.search-form-large {
  display: flex;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-full);
  overflow: hidden;
  max-width: 640px;
}
.search-form-large input {
  flex: 1;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-lg);
  border: none;
  outline: none;
  color: var(--color-text);
  font-family: inherit;
}
.search-form-large button {
  padding: var(--space-4) var(--space-6);
  background: var(--color-primary);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-base);
  transition: background var(--transition);
}
.search-form-large button:hover { background: var(--color-primary-dark); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-footer-bg, #1a2a1a);
  color: var(--color-footer-text, rgba(255,255,255,0.75));
  margin-top: auto;
}

.footer-main { padding: var(--space-16) 0 var(--space-10); }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand .site-title { color: white; font-size: var(--text-xl); margin-bottom: var(--space-3); }
.footer-description { font-size: var(--text-sm); line-height: 1.7; margin-bottom: var(--space-5); }

.footer-social { display: flex; gap: var(--space-3); }
.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition), transform var(--transition);
  text-decoration: none;
}
.social-link:hover { background: var(--color-primary); border-color: var(--color-primary); color: white; }

.footer-heading { color: white; font-size: var(--text-base); font-family: var(--font-primary); font-weight: 700; margin-bottom: var(--space-4); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: var(--space-2); }
.footer-links a { color: rgba(255,255,255,0.6); font-size: var(--text-sm); transition: color var(--transition); }
.footer-links a:hover { color: var(--color-primary-light); }

.footer-bottom {
  padding: var(--space-4) 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
}
.footer-bottom-links { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.footer-bottom-links a { color: inherit; }
.footer-bottom-links a:hover { color: var(--color-primary-light); }

/* Medical disclaimer footer */
.medical-disclaimer-footer {
  background: #0f1f0f;
  padding: var(--space-4);
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 50;
  opacity: 0;
  transform: translateY(16px);
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition), transform var(--transition);
  pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--color-primary-dark); }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-8 { margin-top: var(--space-8); }

/* ============================================
   WORDPRESS CORE CLASSES
   ============================================ */
.alignnone { margin: var(--space-4) 0; }
.aligncenter { display: block; margin: var(--space-6) auto; text-align: center; }
.alignright { float: right; margin: 0 0 var(--space-4) var(--space-4); }
.alignleft { float: left; margin: 0 var(--space-4) var(--space-4) 0; }
.alignwide { max-width: 900px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100%; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--text-xs); text-align: center; color: var(--color-text-muted); margin-top: var(--space-2); }

.wp-block-image figcaption { font-size: var(--text-xs); text-align: center; color: var(--color-text-muted); }

.sticky { background: var(--color-bg-alt); border-left: 4px solid var(--color-primary); padding-left: var(--space-4); }

/* ============================================
   DARK MODE (auto via prefers-color-scheme)
   ============================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f1a0f;
    --color-bg-alt: #162016;
    --color-bg-card: #1a271a;
    --color-text: #E8F5E9;
    --color-text-muted: #A5C8A5;
    --color-text-light: #6A9A6A;
    --color-border: #2A3F2A;
    --color-link: #81C784;
    --color-link-hover: #A5D6A7;
  }
  .site-header { background: var(--color-bg); }
  .ad-unit::before { color: var(--color-text-light); }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .site-header, .site-footer, .sidebar, .ad-unit, .back-to-top,
  .share-buttons, .article-tags, .related-posts, .comments-area,
  .post-navigation, .menu-toggle, .mobile-nav { display: none !important; }
  body { font-size: 12pt; color: black; }
  .article-content { max-width: 100%; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* ============================================
   ANNOUNCEMENT BAR
   ============================================ */
.announcement-bar {
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  text-align: center;
  position: relative;
  z-index: 110;
}
.announcement-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}
.announcement-bar-text, .announcement-bar a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  margin: 0;
}
.announcement-bar-text:hover { text-decoration: underline; }
.announcement-bar-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
}
.announcement-bar-close:hover { color: #fff; }

/* ============================================
   HEADER CTA BUTTON
   ============================================ */
.header-cta {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================
   AJAX LIVE SEARCH DROPDOWN
   ============================================ */
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  max-height: 480px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: background var(--transition);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--color-bg-alt); }
.search-result-item img { border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.search-result-text { flex: 1; min-width: 0; }
.search-result-title { display: block; font-weight: 600; font-size: var(--text-sm); margin-bottom: 2px; }
.search-result-cat { display: inline-block; font-size: var(--text-xs); color: var(--color-primary); font-weight: 600; margin-bottom: 2px; }
.search-result-excerpt { display: block; font-size: var(--text-xs); color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-no-results { padding: var(--space-4); text-align: center; color: var(--color-text-muted); font-size: var(--text-sm); }

/* ============================================
   AFFILIATE DISCLOSURE
   ============================================ */
.affiliate-disclosure {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-left: 4px solid #FFC107;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-4);
  margin: var(--space-6) 0;
  font-size: var(--text-sm);
}
.affiliate-disclosure-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 2px; }
.affiliate-disclosure p { margin: 0; color: #5D4037; }
[data-color-scheme="dark"] .affiliate-disclosure {
  background: rgba(255,193,7,.08);
  border-color: rgba(255,193,7,.3);
}
[data-color-scheme="dark"] .affiliate-disclosure p { color: var(--color-text-muted); }

/* ============================================
   SPONSORED POST LABEL
   ============================================ */
.sponsored-post-label {
  text-align: center;
  margin-bottom: var(--space-6);
}
.sponsored-post-label span {
  display: inline-block;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
}

/* ============================================
   FLOATING SHARE BAR
   ============================================ */
.floating-share {
  display: none;
  position: fixed;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
  gap: var(--space-2);
  z-index: 100;
}
@media (min-width: 1400px) {
  .floating-share { display: flex; }
}
.floating-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: #fff;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.floating-share-btn:hover { transform: scale(1.1); box-shadow: var(--shadow-lg); color: #fff; }
.floating-share-btn.fb { background: #1877F2; }
.floating-share-btn.tw { background: #000; }
.floating-share-btn.pt { background: #E60023; }
.floating-share-btn.li { background: #0A66C2; }

/* ============================================
   POPULAR POSTS WIDGET
   ============================================ */
.popular-posts-list { list-style: none; padding: 0; margin: 0; }
.popular-post-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.popular-post-item:last-child { border-bottom: none; }
.popular-post-thumb { flex-shrink: 0; width: 56px; height: 56px; overflow: hidden; border-radius: var(--radius-sm); }
.popular-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.popular-post-item a { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); display: block; margin-bottom: var(--space-1); }
.popular-post-item a:hover { color: var(--color-primary); }
.popular-post-views { font-size: var(--text-xs); color: var(--color-text-muted); display: block; }

/* ============================================
   SOCIAL ICONS WIDGET
   ============================================ */
.social-icons-widget {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  transition: background var(--transition), color var(--transition);
}
.social-icon-link:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .animate-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
  .animate-on-scroll.is-visible { opacity: 1; transform: none; }
  .animate-on-scroll.delay-1 { transition-delay: .1s; }
  .animate-on-scroll.delay-2 { transition-delay: .2s; }
  .animate-on-scroll.delay-3 { transition-delay: .3s; }
}

/* ============================================
   WOOCOMMERCE BASIC STYLES
   ============================================ */
.woocommerce-page .woocommerce { padding: var(--space-8) 0; }
.woocommerce ul.products { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-6); }
.woocommerce ul.products li.product { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow var(--transition); }
.woocommerce ul.products li.product:hover { box-shadow: var(--shadow-md); }
.woocommerce ul.products li.product a img { width: 100%; height: 200px; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: var(--text-base); font-weight: 600; padding: var(--space-3) var(--space-4) 0; }
.woocommerce ul.products li.product .price { color: var(--color-primary); font-weight: 700; padding: var(--space-2) var(--space-4); display: block; }
.woocommerce .button, .woocommerce button.button { background: var(--color-primary); color: #fff; border: none; padding: var(--space-3) var(--space-6); border-radius: var(--radius-md); font-weight: 600; cursor: pointer; transition: background var(--transition); }
.woocommerce .button:hover, .woocommerce button.button:hover { background: var(--color-primary-dark); color: #fff; }
.woocommerce-message, .woocommerce-info { background: var(--color-bg-alt); border-top: 3px solid var(--color-primary); padding: var(--space-4); margin: var(--space-4) 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.woocommerce-error { background: #FFF5F5; border-top-color: #EF5350; }
.woocommerce form .form-row label { font-weight: 600; display: block; margin-bottom: var(--space-1); }
.woocommerce form .form-row input { width: 100%; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); }

/* ============================================
   PLACEHOLDER IMAGE
   ============================================ */
.placeholder-img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-md); }

/* ============================================
   POST FORMATS
   ============================================ */
.format-quote blockquote { font-size: var(--text-2xl); border-left-width: 6px; padding: var(--space-6) var(--space-8); }
.format-link .article-content a:first-of-type { font-size: var(--text-xl); font-weight: 700; color: var(--color-primary); }
.format-video .article-featured-image { aspect-ratio: 16/9; overflow: hidden; }
.format-gallery .wp-block-gallery { margin: var(--space-6) 0; }

/* ============================================
   SECONDARY / UTILITY NAV
   ============================================ */
.secondary-nav {
  display: none;
}
@media (min-width: 1200px) {
  .secondary-nav {
    display: flex;
    align-items: center;
  }
}
.secondary-menu {
  list-style: none;
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}
.secondary-menu li a {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.secondary-menu li a:hover {
  color: var(--color-primary);
  background: var(--color-bg-alt);
}

/* ============================================
   WOOCOMMERCE CART ICON IN HEADER
   ============================================ */
.hb-cart-link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text);
  position: relative;
  padding: var(--space-2);
}
.hb-cart-link:hover { color: var(--color-primary); }
.hb-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-full);
  line-height: 1;
}

/* ============================================
   VIEW COUNTER DISPLAY
   ============================================ */
.post-views {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ============================================
   DARK MODE: New elements
   ============================================ */
[data-color-scheme="dark"] .search-dropdown { background: var(--color-bg-card); border-color: var(--color-border); }
[data-color-scheme="dark"] .search-result-item:hover { background: var(--color-bg-alt); }
[data-color-scheme="dark"] .announcement-bar-close { color: rgba(255,255,255,.6); }
[data-color-scheme="dark"] .hb-cart-link { color: var(--color-text); }
[data-color-scheme="dark"] .social-icon-link { background: var(--color-bg-alt); border-color: var(--color-border); }

/* ============================================
   v3.0.0 — REPLACING INLINE STYLES WITH CLASSES
   All inline style="" attributes removed from templates.
   These classes provide equivalent presentation.
   ============================================ */

/* ── 404 page ── */
.page-404-container {
  text-align: center;
  padding: var(--space-20) 0;
}
.page-404-icon {
  font-size: 5rem;
  margin-bottom: var(--space-4);
}
.page-404-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}
.page-404-desc {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}

/* ── No posts / search empty ── */
.no-posts-found,
.no-results-full {
  text-align: center;
  padding: var(--space-16) 0;
}
.no-posts-icon { display: block; margin: 0 auto var(--space-4); }
.no-posts-text,
.no-results-text { color: var(--color-text-muted); }
.no-posts-cta  { margin-top: var(--space-4); }
.no-results { text-align: center; padding: var(--space-16) 0; }
.no-results-emoji { font-size: 3rem; }

/* ── Archive description ── */
.archive-description {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* ── Article meta bar (single.php) ── */
.article-meta-dates {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.article-meta-icon   { vertical-align: middle; }
.article-meta-updated {
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
}
.article-meta-readtime {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.article-meta-wordcount {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.article-meta-reviewed {
  background: rgba(46,125,50,0.1);
  border: 1px solid rgba(46,125,50,0.2);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* ── Article figcaption ── */
.article-featured-caption {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* ── Medical disclaimer ── */
.medical-disclaimer-text { margin: 0; font-size: var(--text-xs); }

/* ── Post card dates (related posts, search) ── */
.post-card-date,
.post-card-readtime {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── Footer ── */
.footer-ad-container { text-align: center; }
.newsletter-tagline  { font-size: var(--text-sm); color: rgba(255,255,255,0.6); margin-bottom: var(--space-4); }
.btn-full            { width: 100%; }
.footer-bottom-bar   { border-top: 1px solid rgba(255,255,255,0.08); }

/* ── Header ── */
.header-ad-container  { text-align: center; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.mobile-nav-search-form { margin-top: 1.5rem; }
.mobile-nav-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--color-bg);
  color: var(--color-text);
}

/* ── Sidebar ── */
.sidebar-search-wrap {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sidebar-search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  font-size: 0.875rem;
  outline: none;
  background: transparent;
  color: var(--color-text);
}
.sidebar-search-btn {
  background: var(--color-primary);
  border: none;
  padding: 0 0.75rem;
  cursor: pointer;
  color: #fff;
}
.sidebar-tags-cloud  { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sidebar-ad-sticky   { position: sticky; top: calc(var(--header-height, 64px) + 1rem); }

/* ── Search results ── */
.search-results-header { margin: var(--space-4) 0; }
.search-results-desc   { color: var(--color-text-muted); margin-bottom: var(--space-6); }

/* ── GDPR comment form ── */
.comment-form-gdpr {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.gdpr-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}
.gdpr-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}
.required-star { color: var(--color-accent); }

/* ── Review meta box ── */
.review-stars-display { color: #FFB300; font-size: 1.5rem; letter-spacing: 0.1em; }
.review-product-name  { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ── HB meta box labels ── */
.hb-metabox-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.hb-metabox-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.hb-metabox-checkbox-text { font-weight: 600; }

/* ── Posts-grid ad full-width ── */
.posts-grid-ad { grid-column: 1 / -1; }

/* ── Dark mode overrides for new classes ── */
[data-color-scheme="dark"] .sidebar-search-input   { background: transparent; color: var(--color-text); }
[data-color-scheme="dark"] .mobile-nav-search-input { background: var(--color-bg-alt); color: var(--color-text); border-color: var(--color-border); }

/* ============================================
   FRONT PAGE (front-page.php) STYLES
   ============================================ */

/* Hero */
.fp-hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  color: #fff;
  padding: var(--space-20) 0 var(--space-16);
  overflow: hidden;
}
.fp-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}
@media (min-width: 1024px) {
  .fp-hero-inner { grid-template-columns: 1fr 1fr; }
}
.fp-hero-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 var(--space-4);
}
.fp-hero-subtext {
  font-size: var(--text-lg);
  color: rgba(255,255,255,.85);
  margin: 0 0 var(--space-6);
  max-width: 520px;
}
.fp-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}
.fp-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.fp-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  color: #fff;
  font-weight: 500;
}
.fp-hero-image {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.fp-hero-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}
.fp-hero-image-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  padding: var(--space-6) var(--space-4) var(--space-4);
}
.fp-hero-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
}
.fp-hero-post-title {
  display: block;
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
}
.fp-hero-post-title:hover { text-decoration: underline; }

/* Blog home header */
.blog-home-header {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-10) 0 var(--space-8);
}

/* Categories showcase */
.fp-categories-section {
  padding: var(--space-16) 0;
  background: var(--color-bg-alt);
}
.fp-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-8);
}
@media (min-width: 768px)  { .fp-categories-grid { grid-template-columns: repeat(4, 1fr); } }
.fp-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-4);
  text-decoration: none;
  color: var(--color-text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.fp-category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
  color: var(--color-text);
}
.fp-category-icon { font-size: 2.5rem; margin-bottom: var(--space-3); }
.fp-category-name { font-size: var(--text-base); font-weight: 700; margin: 0 0 var(--space-1); color: var(--color-text); }
.fp-category-count { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-2); }
.fp-category-desc { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; }

/* Latest section */
.fp-latest-section { padding: var(--space-16) 0; }

/* Newsletter CTA */
.fp-newsletter-section {
  background: var(--color-primary-dark);
  padding: var(--space-16) 0;
}
.fp-newsletter-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 768px) { .fp-newsletter-box { grid-template-columns: 1fr 1fr; } }
.fp-newsletter-title {
  color: #fff;
  font-size: var(--text-2xl);
  margin: 0 0 var(--space-2);
}
.fp-newsletter-desc { color: rgba(255,255,255,.8); margin: 0; }
.fp-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
@media (min-width: 480px) { .fp-newsletter-form { flex-direction: row; } }
.fp-newsletter-form input[type="email"] {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: var(--text-base);
  outline: none;
}
.fp-newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,.6); }
.fp-newsletter-form input[type="email"]:focus { border-color: #fff; }
.fp-newsletter-setup-note { color: rgba(255,255,255,.6); font-size: var(--text-sm); }

/* page.php - page-article */
.page-article .article-header { margin-bottom: var(--space-6); }
.page-content.wp-link-pages { margin-top: var(--space-8); }
.page-links { margin: var(--space-6) 0; display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.page-links .page-links-title { font-weight: 600; margin-right: var(--space-2); }
.page-links span a, .page-links a { padding: var(--space-1) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-sm); text-decoration: none; }
.page-links .post-page-numbers.current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.entry-footer { margin-top: var(--space-6); }
.edit-link a { font-size: var(--text-sm); color: var(--color-text-muted); }

/* Section more link */
.section-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); }
.section-more-link { font-size: var(--text-sm); color: var(--color-primary); font-weight: 600; text-decoration: none; }
.section-more-link:hover { text-decoration: underline; }
.section-subtitle { color: var(--color-text-muted); margin-top: var(--space-2); max-width: 640px; }

/* full-width-content */
.full-width-content { max-width: 100%; }

/* ============================================
   PRINT ENHANCEMENTS (health articles)
   ============================================ */
@media print {
  /* Existing rules are in the PRINT STYLES section above.
     These extend them for health content: */
  .medical-disclaimer { border: 1px solid #ccc; padding: 8pt; margin: 12pt 0; }
  .breadcrumbs { display: none !important; }
  .article-featured-image { max-width: 100%; }
  .article-featured-image img { max-width: 100%; height: auto; }
  h1 { font-size: 20pt; }
  h2 { font-size: 16pt; }
  h3 { font-size: 13pt; }
  .author-box { border: 1px solid #ccc; padding: 8pt; margin-top: 12pt; }
  .author-box-avatar { width: 40px !important; height: 40px !important; }
}

/* ============================================
   DARK MODE: Front page
   ============================================ */
[data-color-scheme="dark"] .fp-categories-section { background: var(--color-bg-alt); }
[data-color-scheme="dark"] .fp-category-card { background: var(--color-bg-card); border-color: var(--color-border); }
[data-color-scheme="dark"] .blog-home-header { background: var(--color-bg-alt); border-color: var(--color-border); }

/* ============================================
   ARCHIVE — moved from archive.php inline block
   FIX A-02: Archive CSS now in style.css
   ============================================ */
.archive-hero{position:relative;padding:var(--space-12) 0;background:linear-gradient(135deg,var(--archive-color,var(--color-primary-dark)),var(--archive-color,var(--color-primary)));color:#fff;overflow:hidden;}
.archive-hero-bg{position:absolute;inset:0;z-index:0;}
.archive-hero-bg img{width:100%;height:100%;object-fit:cover;opacity:.25;}
.archive-hero-overlay{position:absolute;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.6),rgba(0,0,0,.3));z-index:1;}
.archive-hero-content{position:relative;z-index:2;}
.archive-type-label{display:inline-flex;align-items:center;gap:.4rem;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.25);padding:.2rem .75rem;border-radius:var(--radius-full);font-size:var(--text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;margin-bottom:var(--space-4);}
.archive-hero-title{font-size:var(--text-3xl);color:#fff;margin-bottom:var(--space-3);}
.archive-hero-desc{color:rgba(255,255,255,.85);max-width:600px;margin-bottom:var(--space-4);}
.archive-hero-stats{font-size:var(--text-sm);color:rgba(255,255,255,.75);}
.archive-subcats{background:var(--color-bg-alt);border-bottom:1px solid var(--color-border);padding:var(--space-4) 0;}
.subcats-label{font-size:var(--text-xs);font-weight:700;text-transform:uppercase;color:var(--color-text-muted);margin-bottom:.5rem;}
.subcats-grid{display:flex;flex-wrap:wrap;gap:.5rem;}
.subcat-card{display:inline-flex;align-items:center;gap:.4rem;padding:.3rem .85rem;background:var(--color-bg);border:1px solid var(--color-border);border-radius:var(--radius-full);font-size:var(--text-sm);color:var(--color-text);transition:all var(--transition);}
.subcat-card:hover{background:var(--color-primary);border-color:var(--color-primary);color:#fff;}
.subcat-count{background:var(--color-bg-alt);padding:.1rem .4rem;border-radius:var(--radius-full);font-size:10px;color:var(--color-text-muted);}
.subcat-card:hover .subcat-count{background:rgba(255,255,255,.2);color:#fff;}
.archive-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-5);padding-bottom:var(--space-4);border-bottom:1px solid var(--color-border);gap:var(--space-3);flex-wrap:wrap;}
.archive-found-text{font-size:var(--text-sm);color:var(--color-text-muted);margin:0;}
.archive-view-toggle{display:flex;gap:.25rem;background:var(--color-bg-alt);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:3px;}
.view-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:none;background:none;border-radius:var(--radius-sm);cursor:pointer;color:var(--color-text-muted);transition:all var(--transition);}
.view-btn.is-active{background:var(--color-primary);color:#fff;}
.archive-posts-container.list-view{grid-template-columns:1fr;}
.archive-posts-container.list-view .post-card{flex-direction:row;}
.archive-posts-container.list-view .post-card-image{width:200px;flex-shrink:0;aspect-ratio:16/9;}

/* ============================================
   HEALTHCARE COMPONENTS (class-healthcare.php)
   ============================================ */
/* Freshness Banner */
.hb-freshness-banner{display:flex;gap:.75rem;align-items:flex-start;padding:.875rem 1.25rem;border-radius:var(--radius-md);margin-bottom:var(--space-6);font-size:var(--text-sm);border-left:4px solid;}
.hb-freshness-current{background:#e8f5e9;border-color:#2e7d32;color:#1b5e20;}
.hb-freshness-outdated{background:#fff8e1;border-color:#f59e0b;color:#78350f;}
.hb-freshness-icon{font-size:1.25rem;flex-shrink:0;line-height:1.4;}
.hb-freshness-text a{color:inherit;font-weight:600;}

/* References */
.hb-references{margin-top:var(--space-10);padding-top:var(--space-8);border-top:2px solid var(--color-border);}
.hb-references-title{font-size:var(--text-xl);margin-bottom:var(--space-4);}
.hb-references-list{padding-left:1.5rem;}
.hb-references-list li{font-size:var(--text-sm);color:var(--color-text-muted);margin-bottom:.5rem;line-height:1.6;}
.hb-references-list a{color:var(--color-primary);}

/* Product Card */
.hb-product-card{position:relative;border:2px solid var(--color-border);border-radius:var(--radius-lg);overflow:hidden;background:var(--color-bg-card);margin:var(--space-6) 0;}
.hb-product-badge{position:absolute;top:var(--space-3);right:var(--space-3);background:var(--color-primary);color:#fff;padding:.2rem .75rem;border-radius:var(--radius-full);font-size:var(--text-xs);font-weight:700;z-index:1;}
.hb-product-image img{width:100%;height:200px;object-fit:contain;padding:var(--space-4);background:var(--color-bg-alt);}
.hb-product-body{padding:var(--space-5);}
.hb-product-name{font-size:var(--text-xl);font-weight:700;margin-bottom:.25rem;}
.hb-product-subtitle{color:var(--color-text-muted);font-size:var(--text-sm);margin-bottom:var(--space-3);}
.hb-product-rating{display:flex;align-items:center;gap:.5rem;margin-bottom:var(--space-3);}
.hb-product-specs{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:var(--space-3);}
.hb-spec{background:var(--color-bg-alt);padding:.2rem .6rem;border-radius:var(--radius-sm);font-size:var(--text-xs);}
.hb-product-pros-cons{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-4);margin:var(--space-4) 0;}
@media(max-width:600px){.hb-product-pros-cons{grid-template-columns:1fr;}}
.hb-pros-heading,.hb-cons-heading{font-size:var(--text-sm);font-weight:700;margin-bottom:.5rem;}
.hb-pros ul,.hb-cons ul{list-style:none;padding:0;margin:0;}
.hb-pros li::before{content:"✅ ";}
.hb-cons li::before{content:"❌ ";}
.hb-pros li,.hb-cons li{font-size:var(--text-sm);margin-bottom:.25rem;}
.hb-product-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding-top:var(--space-4);border-top:1px solid var(--color-border);}
.hb-product-price{font-size:var(--text-xl);font-weight:700;color:var(--color-primary);}
.hb-product-cta{flex-shrink:0;}

/* Clinical Callout */
.hb-clinical-callout{display:flex;gap:.75rem;align-items:center;padding:.875rem 1.25rem;border-radius:var(--radius-md);margin:var(--space-4) 0;border-left:4px solid;}
.hb-clinical-normal{background:#e8f5e9;border-color:#4caf50;}
.hb-clinical-warning{background:#fff8e1;border-color:#f59e0b;}
.hb-clinical-danger{background:#ffebee;border-color:#ef5350;}
.hb-clinical-info{background:#e3f2fd;border-color:#2196f3;}
.hb-clinical-icon{font-size:1.25rem;flex-shrink:0;}
.hb-clinical-body{display:flex;flex-wrap:wrap;gap:.5rem;align-items:baseline;}
.hb-clinical-label{font-weight:700;font-size:var(--text-sm);}
.hb-clinical-value{font-size:var(--text-xl);font-weight:700;color:inherit;}
.hb-clinical-context{font-size:var(--text-sm);color:var(--color-text-muted);}

/* Stat Highlight */
.hb-stat-highlight{text-align:center;padding:var(--space-6);background:linear-gradient(135deg,var(--color-primary),var(--color-primary-dark));color:#fff;border-radius:var(--radius-lg);margin:var(--space-6) 0;}
.hb-stat-number{font-size:clamp(2.5rem,5vw,4rem);font-weight:800;line-height:1;margin-bottom:.25rem;}
.hb-stat-label{font-size:var(--text-lg);opacity:.9;margin-bottom:.5rem;}
.hb-stat-source{font-size:var(--text-xs);opacity:.7;}

/* Study Callout */
.hb-study-callout{background:var(--color-bg-alt);border:1px solid var(--color-border);border-left:4px solid var(--color-primary);border-radius:var(--radius-md);padding:var(--space-4);margin:var(--space-4) 0;}
.hb-study-header{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem;}
.hb-study-icon{font-size:1.25rem;}
.hb-study-title{font-size:var(--text-base);font-weight:700;}
.hb-study-meta{display:flex;flex-wrap:wrap;gap:.5rem;font-size:var(--text-xs);color:var(--color-text-muted);margin-bottom:.5rem;}
.hb-study-meta span{background:var(--color-bg);padding:.1rem .5rem;border-radius:var(--radius-sm);}
.hb-study-finding{font-size:var(--text-sm);color:var(--color-text);}

/* Warning Box */
.hb-warning-box{border-radius:var(--radius-md);margin:var(--space-5) 0;overflow:hidden;}
.hb-warning-header{display:flex;align-items:center;gap:.5rem;padding:.75rem 1.25rem;font-weight:700;font-size:var(--text-sm);}
.hb-warning-body{padding:.75rem 1.25rem 1rem;font-size:var(--text-sm);}
.hb-warning-warning .hb-warning-header{background:#fff8e1;color:#78350f;}
.hb-warning-warning .hb-warning-body{background:#fffbeb;}
.hb-warning-danger .hb-warning-header{background:#ffebee;color:#b91c1c;}
.hb-warning-danger .hb-warning-body{background:#fff5f5;}
.hb-warning-note .hb-warning-header{background:#e3f2fd;color:#1e40af;}
.hb-warning-note .hb-warning-body{background:#eff6ff;}
.hb-warning-success .hb-warning-header{background:#e8f5e9;color:#166534;}
.hb-warning-success .hb-warning-body{background:#f0fdf4;}

/* Expert Tip */
.hb-expert-tip{background:var(--color-bg-alt);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:var(--space-5);margin:var(--space-5) 0;}
.hb-expert-header{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-3);}
.hb-expert-photo{width:52px;height:52px;border-radius:50%;object-fit:cover;flex-shrink:0;}
.hb-expert-id{display:flex;flex-direction:column;}
.hb-expert-name{font-weight:700;font-size:var(--text-base);}
.hb-expert-creds{font-size:var(--text-xs);color:var(--color-text-muted);}
.hb-expert-body{font-size:var(--text-sm);}

/* Dosage/Comparison Table */
.hb-dosage-table-wrap{overflow-x:auto;margin:var(--space-5) 0;}
.hb-dosage-table{width:100%;border-collapse:collapse;font-size:var(--text-sm);}
.hb-dosage-table caption{font-weight:700;margin-bottom:.5rem;text-align:left;}
.hb-dosage-table th,.hb-dosage-table td{padding:.6rem .75rem;border:1px solid var(--color-border);text-align:left;}
.hb-dosage-table thead th{background:var(--color-primary);color:#fff;font-weight:700;}
.hb-dosage-table tbody tr:nth-child(even){background:var(--color-bg-alt);}
.hb-dosage-note{font-size:var(--text-xs);color:var(--color-text-muted);margin-top:.5rem;font-style:italic;}

/* Citation superscript */
.hb-citation-ref{font-size:.7em;vertical-align:super;font-weight:700;}
.hb-citation-ref a{color:var(--color-primary);text-decoration:none;}
.hb-citation-ref a:hover{text-decoration:underline;}

/* ============================================
   CUSTOMIZER COLOR VARIABLES → ELEMENTS
   FIX Critical Problem 2: Custom colours now applied to all elements
   ============================================ */
body { color: var(--color-text); background-color: var(--color-bg); }
a { color: var(--color-link); }
a:hover { color: var(--color-link-hover); }
.site-header { background-color: var(--color-header-bg); border-bottom-color: var(--color-header-border); }
.nav-menu a,.site-nav a { color: var(--color-header-text); }
.site-footer { background-color: var(--color-footer-bg); color: var(--color-footer-text); }
.site-footer a { color: var(--color-footer-text); opacity: .8; }
.post-card, .card-post { background-color: var(--color-bg-card); border-color: var(--color-border); }
.sidebar .widget { background-color: var(--color-bg-alt); border-color: var(--color-border); }
p, li, blockquote, td { color: var(--color-text); }
.text-muted, .post-meta, .entry-meta, .article-meta { color: var(--color-text-muted); }
hr { border-color: var(--color-border); }
input, textarea, select { background-color: var(--color-bg); border-color: var(--color-border); color: var(--color-text); }
code, pre { background-color: var(--color-bg-alt); }
.btn-primary, .button-primary { background-color: var(--color-primary); }
.btn-primary:hover, .button-primary:hover { background-color: var(--color-primary-dark); }

/* ==============================================
   v5.1.0 FIXES — Minor & Polish
   ============================================== */

/* MINOR FIX: viewport-fit=cover safe area support for iPhone notch/home bar */
.site-header {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-footer {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.mobile-nav {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Canonical page-1 link for SEO (rel=prev/next handled in PHP) */
/* Announcement bar min-height prevents CLS on dismiss */
.announcement-bar {
  min-height: 40px;
}

/* Placeholder image responsive */
.placeholder-img {
  width: 100%;
  height: auto;
  display: block;
}
