/* CycleBalance shared blog styles
 * Used by all evidence-backed blog articles across languages.
 * Mirrors the inline styles in /docs/blog.html and the original 3 posts.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --sage: #627F7A;
  --sage-dark: #4A6460;
  --sage-light: #8FA9A4;
  --sage-pale: #E8EFED;
  --coral: #E77C6A;
  --coral-hover: #D4674F;
  --warm-cream: #FAF7F4;
  --warm-white: #FDFCFA;
  --text-primary: #2D3B39;
  --text-secondary: #5A6B68;
  --text-muted: #8A9895;
  --border: #D4DDD9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--warm-cream);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; }

.page-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(98, 127, 122, 0.2);
}

.header-logo img { width: 100%; height: 100%; object-fit: cover; }

.header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--sage-dark);
  letter-spacing: -0.3px;
}

.site-header a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.site-header a:hover { opacity: 0.8; }

/* Language switcher (top right) */
.lang-switcher {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}

.lang-switcher a {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.lang-switcher a:hover { color: var(--sage-dark); border-color: var(--sage-light); }
.lang-switcher a.active { color: var(--sage-dark); border-color: var(--sage); font-weight: 600; }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sage);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s, gap 0.2s;
}

.back-link:hover { color: var(--sage-dark); gap: 8px; }
.back-link svg { width: 16px; height: 16px; }

/* Article header */
.article-header { margin-bottom: 32px; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-tag {
  background: var(--sage-pale);
  color: var(--sage-dark);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}

.article-date { font-size: 13px; color: var(--text-muted); }
.article-reading-time { font-size: 13px; color: var(--text-muted); }

.article-header h1 {
  font-size: 34px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.4px;
  margin-bottom: 14px;
}

.article-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 18px;
}

.article-author { font-size: 14px; color: var(--text-secondary); }
.article-author strong { color: var(--text-primary); font-weight: 600; }

/* Hero image */
.article-hero {
  margin: 24px 0 32px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(98, 127, 122, 0.1);
  background: var(--sage-pale);
}

.article-hero img { display: block; width: 100%; height: auto; }

/* Body */
.article-body {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.article-body p { margin-bottom: 20px; }

.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 16px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.article-body h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 12px;
}

.article-body a {
  color: var(--coral);
  text-decoration: underline;
  text-decoration-color: rgba(231, 124, 106, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.article-body a:hover { text-decoration-color: var(--coral); }

.article-body ul, .article-body ol {
  margin: 0 0 22px 0;
  padding-left: 24px;
}

.article-body li { margin-bottom: 10px; line-height: 1.7; }

.article-body blockquote {
  border-left: 3px solid var(--sage-light);
  padding: 16px 22px;
  margin: 26px 0;
  background: var(--sage-pale);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-body strong { color: var(--text-primary); font-weight: 600; }

/* Inline content image */
.article-figure {
  margin: 32px 0;
  text-align: center;
}

.article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 6px 18px rgba(98, 127, 122, 0.08);
}

.article-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* Key takeaways callout */
.takeaways {
  background: var(--sage-pale);
  border: 1px solid var(--sage-light);
  border-radius: 16px;
  padding: 22px 26px;
  margin: 28px 0 32px;
}

.takeaways h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--sage-dark);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  margin-top: 0;
}

.takeaways ul { margin: 0; padding-left: 22px; }
.takeaways li { font-size: 15px; color: var(--text-primary); margin-bottom: 8px; line-height: 1.6; }

/* References block */
.references {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.references h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.references ol {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  padding-left: 22px;
}

.references li { margin-bottom: 8px; }
.references a { color: var(--sage); word-break: break-word; }

/* Medical disclaimer */
.disclaimer {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA */
.article-cta {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  text-align: center;
  margin-top: 40px;
}

.article-cta h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.article-cta p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--coral);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: background 0.2s;
}

.cta-btn:hover { background: var(--coral-hover); color: white; }

/* Related articles */
.related-articles {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.related-list a {
  display: block;
  padding: 16px 18px;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s, transform 0.15s;
}

.related-list a:hover { border-color: var(--sage); transform: translateY(-1px); }

/* Footer */
.site-footer {
  text-align: center;
  padding-top: 32px;
  margin-top: 48px;
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--sage-dark); }

.footer-copy { font-size: 13px; color: var(--text-muted); }

/* Blog index page */
.page-heading { text-align: center; margin-bottom: 40px; }

.page-heading h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.page-heading p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

.blog-card {
  background: var(--warm-white);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(98, 127, 122, 0.08);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.15s;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: start;
}

.blog-card.no-thumb { grid-template-columns: 1fr; }

.blog-card:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.06), 0 12px 32px rgba(98, 127, 122, 0.12);
  transform: translateY(-2px);
}

.blog-thumb {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--sage-pale);
}

.blog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.blog-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }

.blog-tag {
  background: var(--sage-pale);
  color: var(--sage-dark);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}

.blog-date { font-size: 13px; color: var(--text-muted); }

.blog-card h2 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-card h2 a { transition: color 0.2s; text-decoration: none; }
.blog-card h2 a:hover { color: var(--sage-dark); }

.blog-author { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.blog-author strong { color: var(--text-secondary); font-weight: 600; }

.blog-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

.read-more {
  font-size: 14px;
  font-weight: 500;
  color: var(--coral);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s, gap 0.2s;
  text-decoration: none;
}

.read-more:hover { color: var(--coral-hover); gap: 8px; }
.read-more svg { width: 16px; height: 16px; }

/* Responsive */
@media (max-width: 600px) {
  .page-wrapper { padding: 28px 16px 48px; }
  .article-header h1 { font-size: 26px; }
  .article-subtitle { font-size: 16px; }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: 21px; }
  .article-cta { padding: 24px 20px; }
  .blog-card { grid-template-columns: 1fr; padding: 22px 20px; }
  .blog-thumb { aspect-ratio: 16 / 9; }
  .page-heading h1 { font-size: 24px; }
  .lang-switcher { display: none; }
}
