:root {
  /* Match blog index theme variables */
  --primary-purple-dark: #123d35;
  --primary-purple: #2f6f60;
  --primary-purple-light: #8aa99b;
  --primary-purple-lighter: #dce8df;

  --rose-gold-dark: #8a3f34;
  --rose-gold: #b24a3f;
  --rose-gold-light: #d8a75b;
  --rose-gold-lighter: #f3ead9;

  --white: #ffffff;
  --offwhite: #fffaf1;
  --cream: #f6f0e4;

  --text-dark: #2d2a24;
  --text-medium: #62594c;
  --text-light: #8d8170;
  --text-white: #ffffff;

  --bg-gradient-start: #f7f0e4;
  --bg-gradient-end: #efe3d0;

  --accent-purple: #2f6f60;
  --accent-rose: #b24a3f;

  --element-wood: #A8E6CF;
  --element-fire: #FFB6C1;
  --element-earth: #F5E6D3;
  --element-metal: #F4D03F;
  --element-water: #B8D4E3;

  /* Compatibility variables */
  --qinghua-blue-dark: #123d35;
  --qinghua-blue: #2f6f60;
  --qinghua-blue-light: #8aa99b;
  --qinghua-blue-lighter: #dce8df;
  --porcelain-white: #ffffff;
  --porcelain-offwhite: #fffaf1;
  --porcelain-cream: #f6f0e4;
  --ink-black: #2d2a24;
  --ink-dark: #62594c;
  --ink-gray: #8d8170;
  --gold: #d8a75b;
  --gold-light: #f3ead9;
  --text-primary: #2d2a24;
  --text-secondary: #62594c;
  --text-light: #8d8170;
  --accent-blue: #2f6f60;
  --accent-gold: #d8a75b;
}

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

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(216, 167, 91, 0.22), transparent 26%),
    linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  min-height: 100vh;
  padding: 0;
  color: var(--text-primary);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  background: #fffaf1;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(54, 39, 20, 0.18);
  overflow: hidden;
}

@media (max-width: 1400px) {
  .container {
    max-width: 1100px;
  }
}

@media (max-width: 1280px) {
  .container {
    max-width: 1000px;
  }
}

@media (max-width: 1024px) {
  .container {
    max-width: 95%;
  }

  body {
    padding: 0;
  }
}

@media (max-width: 768px) {
  .container {
    max-width: 100%;
    border-radius: 0;
  }

  body {
    padding: 0;
  }
}

/* Navbar styles handled by navbar.js */

.article-header {
  background:
    linear-gradient(135deg, rgba(18,61,53,0.96) 0%, rgba(35,43,34,0.96) 58%, rgba(117,61,46,0.92) 100%);
  color: #fff;
  padding: 50px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-header::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -60px;
  width: 300px;
  height: 300px;
  opacity: 0.12;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: url("../assets/bagua-hero.webp");
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.95em;
  opacity: 0.9;
  flex-wrap: wrap;
}

.article-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 250, 241, 0.18);
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
}

h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.article-content {
  padding: 50px 40px;
  line-height: 1.8;
  color: #4a4035;
}

.article-content h2 {
  color: #221f1a;
  font-size: 1.8em;
  margin: 40px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e1d2b9;
}

.article-content h3 {
  color: #221f1a;
  font-size: 1.4em;
  margin: 30px 0 15px 0;
}

.article-content h4 {
  color: #221f1a;
  font-size: 1.2em;
  margin: 25px 0 12px 0;
}

.article-content p {
  margin-bottom: 20px;
  font-size: 1.05em;
}

.article-content ul,
.article-content ol {
  margin: 20px 0 20px 30px;
  line-height: 1.9;
}

.article-content li {
  margin-bottom: 12px;
}

.article-content strong {
  color: #221f1a;
  font-weight: 600;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 30px;
  transition: gap 0.2s;
}

.back-link:hover {
  gap: 12px;
}

.article-hero {
  margin: 20px 0 30px 0;
}

.article-hero img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  display: block;
}

.content-callout {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #e1d2b9;
  border-radius: 12px;
  background: #f7efe1;
}

.content-callout h2 {
  margin-top: 0;
}

.article-toc {
  margin: 24px 0 30px;
  padding: 22px 24px;
  border: 1px solid #e1d2b9;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(246, 240, 228, 0.86) 0%, rgba(255, 250, 241, 0.96) 100%);
}

.article-toc h2 {
  margin: 0 0 12px 0;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 1.35em;
}

.article-toc p {
  margin-bottom: 14px;
  font-size: 0.98em;
}

.article-toc ul {
  margin: 0;
  padding-left: 20px;
}

.article-toc li {
  margin-bottom: 8px;
}

.article-toc a {
  color: var(--accent-blue);
  font-weight: 600;
  text-decoration: none;
}

.article-toc a:hover {
  text-decoration: underline;
}

.pillar-table-wrap {
  margin: 26px 0 30px;
  overflow-x: auto;
}

.pillar-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(54, 39, 20, 0.08);
}

.pillar-table th,
.pillar-table td {
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.pillar-table th {
  background: #f3ead9;
  color: #221f1a;
  font-weight: 700;
}

.pillar-table td strong {
  display: inline-block;
  margin-bottom: 4px;
}

.related-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-links li {
  margin: 0;
}

.related-links a {
  color: var(--accent-blue);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.8em;
  }

  .article-content {
    padding: 30px 20px;
  }

  .article-header {
    padding: 40px 20px;
  }
}
