/* ============================================================
   HEALTH BLOG — Article Stylesheet
   Upload to your WordPress root directory and enqueue via
   functions.php or Appearance > Additional CSS (for quick test).
   
   @import this in your child theme's style.css:
   @import url('/health-blog.css');
   
   Or enqueue in functions.php:
   wp_enqueue_style('health-blog', get_site_url() . '/health-blog.css');
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;500;600&display=swap');

/* ── Design Tokens ── */
:root {
  --color-bg:          #FFFFFF;
  --color-bg-soft:     #F7F3EE;
  --color-bg-sage:     #EEF4F0;
  --color-text:        #1C1C1E;
  --color-text-muted:  #6B7280;
  --color-text-light:  #9CA3AF;
  --color-accent:      #4A7C59;
  --color-accent-dark: #365C42;
  --color-accent-light:#D4E6DA;
  --color-blush:       #E8D5C4;
  --color-blush-light: #F5EDE6;
  --color-warning-bg:  #FFF8E6;
  --color-warning-border: #F4C430;
  --color-danger-bg:   #FEF2F2;
  --color-danger-border: #F87171;
  --color-info-bg:     #EFF6FF;
  --color-info-border: #60A5FA;

  --font-heading: 'Lora', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

   --text-xs:   0.87rem;   /* 14px */
  --text-sm:   0.95rem;       /* 16px */
  --text-base: 1.0rem; 
  --text-lg:   1.25rem;    /* 20px */
  --text-xl:   1.5rem;     /* 24px */
  --text-2xl:  1.875rem;   /* 30px */
  --text-3xl:  2.25rem;    /* 36px */
  --text-4xl:  2.75rem;    /* 44px */

  --line-height-tight:  1.3;
  --line-height-body:   1.8;
  --line-height-loose:  2;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --shadow-sm:  0 1px 4px rgba(0,0,0,0.07);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);

  --max-width:  760px;
  --max-width-wide: 960px;
}

/* ============================================================
   ARTICLE WRAPPER
   Wraps the entire article. Use on the outermost div.
   ============================================================ */
.hb-article {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: var(--color-bg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   ARTICLE HEADER
   ============================================================ */
.hb-header {
  padding: 3rem 0 2rem;
  border-bottom: 2px solid var(--color-accent-light);
  margin-bottom: 2.5rem;
}

.hb-category {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.hb-title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hb-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  font-weight: 400;
}

.hb-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.hb-meta-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--color-text);
}

.hb-meta-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.hb-meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-light);
  display: inline-block;
}

/* ============================================================
   FEATURED IMAGE
   ============================================================ */
.hb-featured-image {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hb-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.hb-featured-image figcaption {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: 0.6rem 1rem;
  background: var(--color-bg-soft);
  font-style: italic;
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.hb-toc {
  background: var(--color-bg-sage);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 2.5rem;
}

.hb-toc-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-accent-dark);
  margin: 0 0 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--text-xs);
}

.hb-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.hb-toc li {
  margin-bottom: 0.45rem;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.hb-toc a {
  color: var(--color-accent-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.hb-toc a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ============================================================
   BODY TEXT & TYPOGRAPHY
   ============================================================ */
.hb-body p {
  font-size: var(--text-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  margin: 0 0 1.5rem;
}

.hb-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-light);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.hb-body a:hover {
  color: var(--color-accent-dark);
  text-decoration-color: var(--color-accent);
}

/* ── Headings ── */
.hb-h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent-light);
  letter-spacing: -0.01em;
}

.hb-h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin: 2.25rem 0 0.75rem;
}

.hb-h4 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-accent-dark);
  margin: 1.75rem 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--text-sm);
}

/* ── Intro / Lead Paragraph ── */
.hb-lead {
  font-size: var(--text-xl);
  line-height: 1.7;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-style: italic;
  margin-bottom: 2rem;
}

/* ── Lists ── */
.hb-list {
  padding-left: 0;
  list-style: none;
  margin: 0 0 1.75rem;
}

.hb-list li {
  font-size: var(--text-base);
  line-height: var(--line-height-body);
  padding: 0.35rem 0 0.35rem 2rem;
  position: relative;
  color: var(--color-text);
}

.hb-list li::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

.hb-list-num {
  padding-left: 0;
  list-style: none;
  counter-reset: hb-counter;
  margin: 0 0 1.75rem;
}

.hb-list-num li {
  counter-increment: hb-counter;
  font-size: var(--text-base);
  line-height: var(--line-height-body);
  padding: 0.5rem 0 0.5rem 3rem;
  position: relative;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-accent-light);
}

.hb-list-num li:last-child {
  border-bottom: none;
}

.hb-list-num li::before {
  counter-increment: none;
  content: counter(hb-counter);
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 2rem;
  height: 2rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-body);
  line-height: 1;
}

/* ── Checklist ── */
.hb-checklist {
  padding-left: 0;
  list-style: none;
  margin: 0 0 1.75rem;
}

.hb-checklist li {
  font-size: var(--text-base);
  line-height: var(--line-height-body);
  padding: 0.4rem 0 0.4rem 2.25rem;
  position: relative;
}

.hb-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5rem;
  text-align: center;
}

/* ============================================================
   CALLOUT / ALERT BOXES
   Signature element — doctor's notepad aesthetic
   ============================================================ */
.hb-callout {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-left: 5px solid;
  font-size: var(--text-base);
  line-height: 1.7;
}

.hb-callout-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.hb-callout p:last-child {
  margin-bottom: 0;
}

/* Tip — green */
.hb-callout-tip {
  background: var(--color-bg-sage);
  border-color: var(--color-accent);
}
.hb-callout-tip .hb-callout-label { color: var(--color-accent-dark); }

/* Warning — amber */
.hb-callout-warning {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
}
.hb-callout-warning .hb-callout-label { color: #92600A; }

/* Danger / Important — red */
.hb-callout-danger {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
}
.hb-callout-danger .hb-callout-label { color: #B91C1C; }

/* Info — blue */
.hb-callout-info {
  background: var(--color-info-bg);
  border-color: var(--color-info-border);
}
.hb-callout-info .hb-callout-label { color: #1D4ED8; }

/* Quote / Research note — warm sand */
.hb-callout-note {
  background: var(--color-blush-light);
  border-color: var(--color-blush);
}
.hb-callout-note .hb-callout-label { color: #7C5C47; }

/* ============================================================
   BLOCKQUOTE / PULL QUOTE
   ============================================================ */
.hb-blockquote {
  margin: 2.5rem 0;
  padding: 2rem 2rem 2rem 2.5rem;
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  position: relative;
}

.hb-blockquote::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: 1.5rem;
  font-family: var(--font-heading);
  font-size: 5rem;
  color: var(--color-accent-light);
  line-height: 1;
  pointer-events: none;
}

.hb-blockquote p {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-style: italic;
  line-height: 1.65;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}

.hb-blockquote cite {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--color-text-muted);
  font-weight: 500;
}

.hb-blockquote cite::before { content: '— '; }

/* ============================================================
   STAT / KEY NUMBER HIGHLIGHT
   ============================================================ */
.hb-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.hb-stat-card {
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  text-align: center;
  border-top: 4px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.hb-stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.hb-stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ============================================================
   PROS / CONS TABLE
   ============================================================ */
.hb-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.hb-pros,
.hb-cons {
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.hb-pros {
  background: var(--color-bg-sage);
  border-top: 4px solid var(--color-accent);
}

.hb-cons {
  background: var(--color-danger-bg);
  border-top: 4px solid var(--color-danger-border);
}

.hb-pros-title,
.hb-cons-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
}

.hb-pros-title { color: var(--color-accent-dark); }
.hb-cons-title { color: #B91C1C; }

.hb-pros ul,
.hb-cons ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hb-pros li,
.hb-cons li {
  font-size: var(--text-sm);
  line-height: 1.6;
  padding: 0.3rem 0 0.3rem 1.75rem;
  position: relative;
}

.hb-pros li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.hb-cons li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: #EF4444;
  font-weight: 700;
}

/* ============================================================
   INFO / DATA TABLE
   ============================================================ */
.hb-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  background: var(--color-bg);
}

.hb-table thead {
  background: var(--color-accent);
  color: black;
}

.hb-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hb-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-accent-light);
  color: var(--color-text);
  vertical-align: top;
  line-height: 1.5;
}

.hb-table tbody tr:last-child td { border-bottom: none; }

.hb-table tbody tr:nth-child(even) { background: var(--color-bg-soft); }

/* ============================================================
   STEP-BY-STEP / HOW-TO SECTION
   ============================================================ */
.hb-steps {
  margin: 2rem 0;
}

.hb-step {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.hb-step-num {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  margin-top: 0.15rem;
}

.hb-step-content {
  flex: 1;
}

.hb-step-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.4rem;
}

.hb-step-content p {
  margin: 0;
  font-size: var(--text-base);
  line-height: var(--line-height-body);
}

/* ============================================================
   HIGHLIGHT / KEY TAKEAWAY BOX
   ============================================================ */
.hb-highlight {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-md);
}

.hb-highlight-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 0.75rem;
  opacity: 0.95;
}

.hb-highlight p {
  font-size: var(--text-base);
  line-height: 1.7;
  margin: 0;
  opacity: 0.92;
}

/* ============================================================
   EXPERT QUOTE / DOCTOR SPEAKS
   ============================================================ */
.hb-expert-quote {
  display: flex;
  gap: 1.5rem;
  background: var(--color-blush-light);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin: 2.5rem 0;
  align-items: flex-start;
  border: 1px solid var(--color-blush);
}

.hb-expert-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-blush);
}

.hb-expert-avatar-placeholder {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.hb-expert-body {}

.hb-expert-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7C5C47;
  margin-bottom: 0.4rem;
  display: block;
}

.hb-expert-text {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-style: italic;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0 0 0.6rem;
}

.hb-expert-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.hb-expert-credentials {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.hb-divider {
  border: none;
  height: 2px;
  background: linear-gradient(to right, var(--color-accent-light), transparent);
  margin: 3rem 0;
  border-radius: 2px;
}

.hb-divider-center {
  border: none;
  height: 2px;
  background: var(--color-accent-light);
  margin: 3rem auto;
  max-width: 120px;
  border-radius: 2px;
}

/* ============================================================
   MEDICAL DISCLAIMER
   ============================================================ */
.hb-disclaimer {
  background: var(--color-bg-soft);
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 3rem 0 2rem;
}

.hb-disclaimer strong {
  display: block;
  color: var(--color-text);
  margin-bottom: 0.35rem;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ============================================================
   REFERENCE / SOURCES SECTION
   ============================================================ */
.hb-sources {
  margin: 2.5rem 0;
  padding: 1.5rem 1.75rem;
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
}

.hb-sources-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
}

.hb-sources ol {
  padding-left: 1.25rem;
  margin: 0;
}

.hb-sources li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.hb-sources a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-light);
  text-underline-offset: 2px;
}

/* ============================================================
   ARTICLE FOOTER / TAGS
   ============================================================ */
.hb-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-accent-light);
}

.hb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hb-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-accent-dark);
  background: var(--color-accent-light);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s;
}

.hb-tag:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  .hb-title        { font-size: var(--text-3xl); }
  .hb-subtitle     { font-size: var(--text-base); }
  .hb-lead         { font-size: var(--text-lg); }
  .hb-h2           { font-size: var(--text-xl); }
  .hb-h3           { font-size: var(--text-lg); }

  .hb-pros-cons    { grid-template-columns: 1fr; }
  .hb-stats        { grid-template-columns: repeat(2, 1fr); }

  .hb-expert-quote { flex-direction: column; gap: 1rem; }
  .hb-expert-avatar,
  .hb-expert-avatar-placeholder { width: 48px; height: 48px; }

  .hb-step-num     { width: 2rem; height: 2rem; font-size: var(--text-sm); }
}

@media (max-width: 400px) {
  .hb-stats        { grid-template-columns: 1fr; }
  .hb-title        { font-size: var(--text-2xl); }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .hb-article      { max-width: 100%; padding: 0; }
  .hb-callout, .hb-highlight, .hb-blockquote { break-inside: avoid; }
  a                { color: inherit; text-decoration: none; }
}