/* ==========================================================================
   明安堂 專題知識專欄與經驗談文章頁樣式 (Article & Editorial Styles)
   遵循思源宋體、墨色與硃砂紅文化視覺，適配桌面與行動響應式版面
   ========================================================================== */

html {
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.article-page {
  font-family: 'Noto Serif TC', Georgia, 'Times New Roman', serif;
  color: #26211e;
  background-color: transparent;
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
}

.article-container {
  max-width: 860px;
  width: 92%;
  margin: 36px auto 60px auto;
  box-sizing: border-box;
}

/* 麵包屑導航 */
.article-breadcrumb {
  font-size: 0.88em;
  color: #7a6e5d;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.article-breadcrumb a {
  color: #7b6636;
  text-decoration: none;
  transition: color 0.2s ease;
}
.article-breadcrumb a:hover {
  color: #7f0000;
  text-decoration: underline;
}
.article-breadcrumb .separator {
  color: #bfae95;
  user-select: none;
}
.article-breadcrumb .current {
  color: #55493b;
  font-weight: 500;
}

/* 文章頁首 Header */
.article-header {
  margin-bottom: 32px;
  border-bottom: 1px solid #dfd6c7;
  padding-bottom: 24px;
}
.article-category-badge {
  display: inline-block;
  background-color: #f4ede1;
  color: #7f0000;
  font-size: 0.82em;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 3px;
  border: 1px solid #dcd1be;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.article-title {
  font-size: 2.15em;
  font-weight: 700;
  line-height: 1.42;
  color: #201a16;
  margin: 0 0 14px 0;
  letter-spacing: 0.02em;
}
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  font-size: 0.88em;
  color: #736758;
}
.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.article-meta-item svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  opacity: 0.8;
}

/* 核心摘要速讀盒 (Key Takeaways) - 加強 AI Citation 與訪客理解 */
.article-summary-box {
  background: #fdfcf9;
  border: 1px solid #e5dcce;
  border-left: 4px solid #7f0000;
  border-radius: 0;
  padding: 24px 28px;
  margin: 28px 0 36px 0;
  box-shadow: 0 2px 10px rgba(56, 47, 37, 0.04);
}
.article-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.12em;
  font-weight: 700;
  color: #7f0000;
  margin-bottom: 14px;
  letter-spacing: 0.03em;
}
.article-summary-list {
  margin: 0;
  padding-left: 20px;
  color: #382f25;
  font-size: 0.96em;
  line-height: 1.85;
}
.article-summary-list li {
  margin-bottom: 9px;
}
.article-summary-list li:last-child {
  margin-bottom: 0;
}
.article-summary-list strong {
  color: #201a16;
}

/* 正文內容排版 */
/* 正文內容排版：對齊全站 17.5px 桌面端黃金閱讀標準 */
.article-body {
  font-size: 1.094rem;
  line-height: 1.95;
  color: #2b231d;
  letter-spacing: 0.015em;
  text-align: left;
}
.article-body p {
  margin: 0 0 1.7em 0;
}
.article-body h2 {
  font-size: 1.48em;
  font-weight: 700;
  color: #7f0000;
  margin: 48px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #ded5c5;
  letter-spacing: 0.03em;
  position: relative;
}
.article-body h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 2px;
  background-color: #7f0000;
}
.article-body h3 {
  font-size: 1.22em;
  font-weight: 600;
  color: #614c27;
  margin: 32px 0 14px 0;
  letter-spacing: 0.02em;
}

/* 圖文插圖區塊 */
.article-figure {
  margin: 36px 0;
  text-align: center;
}
.article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
  border: 1px solid #dcd3c3;
  display: block;
  margin: 0 auto;
}
.article-figure figcaption {
  font-size: 0.88em;
  color: #6e6354;
  margin-top: 12px;
  line-height: 1.6;
  font-style: normal;
  padding: 0 10px;
}
.article-figure figcaption strong {
  color: #443729;
}

/* 古籍註解與通書古訓引用卡片 */
.article-callout-quote {
  background: #fbf9f4;
  border: 1px dashed #bba888;
  border-radius: 4px;
  padding: 22px 26px;
  margin: 32px 0;
  color: #3b3024;
  box-shadow: inset 0 0 10px rgba(187, 168, 136, 0.05);
}
.article-callout-title {
  font-size: 1.05em;
  font-weight: 700;
  color: #7f0000;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-callout-content {
  font-size: 0.96em;
  line-height: 1.9;
  margin: 0;
}

/* 真實故事 / 案例解析邊框卡片 */
.article-story-card {
  background: #fcfbfa;
  border-left: 3px solid #b6a280;
  border-radius: 0 4px 4px 0;
  padding: 20px 24px;
  margin: 26px 0;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.03);
}
.article-story-card h4 {
  font-size: 1.1em;
  font-weight: 700;
  color: #614c27;
  margin: 0 0 10px 0;
}
.article-story-card p:last-child {
  margin-bottom: 0;
}

/* 作者簡介卡片 (強化 E-E-A-T 權威信賴) */
.article-author-card {
  display: flex;
  align-items: center;
  gap: 22px;
  background: #f8f4ec;
  border: 1px solid #dfd6c7;
  border-radius: 6px;
  padding: 24px 28px;
  margin: 48px 0 36px 0;
}
.article-author-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid #b6a280;
  flex-shrink: 0;
  background-color: #fff;
  object-fit: cover;
  display: block;
  box-sizing: border-box;
}
.article-author-info {
  flex: 1;
}
.article-author-name {
  font-size: 1.15em;
  font-weight: 700;
  color: #201a16;
  margin-bottom: 4px;
}
.article-author-desc {
  font-size: 0.9em;
  color: #5c4e3e;
  line-height: 1.65;
  margin: 0;
}

/* 預約與業務導流 CTA 區塊 */
.article-cta-box {
  background: linear-gradient(135deg, #fdfbf7 0%, #f4ede1 100%);
  border: 2px solid #b6a280;
  border-radius: 8px;
  padding: 36px 32px;
  text-align: center;
  margin: 48px 0 40px 0;
  box-shadow: 0 6px 24px rgba(123, 102, 54, 0.08);
}
.article-cta-title {
  font-size: 1.45em;
  font-weight: 700;
  color: #7f0000;
  margin: 0 0 12px 0;
}
.article-cta-desc {
  font-size: 0.98em;
  color: #4a3e30;
  max-width: 620px;
  margin: 0 auto 26px auto;
  line-height: 1.75;
}
.article-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-article-service {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #7f0000;
  color: #ffffff !important;
  font-size: 1.02em;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(127, 0, 0, 0.25);
  transition: all 0.2s ease;
}
.btn-article-service:hover {
  background-color: #9e1a1a;
  transform: translateY(-1px);
}
.btn-article-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #06c755;
  color: #ffffff !important;
  font-size: 1.02em;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(6, 199, 85, 0.25);
  transition: all 0.2s ease;
}
.btn-article-line:hover {
  background-color: #05b04b;
  transform: translateY(-1px);
}
.btn-article-line svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

/* 相關文章與全站服務延伸引導 */
.article-related-section {
  border-top: 1px solid #dfd6c7;
  padding-top: 36px;
  margin-top: 40px;
}
.article-related-title {
  font-size: 1.25em;
  font-weight: 700;
  color: #614c27;
  margin-bottom: 20px;
}
.article-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.article-related-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e2dacd;
  border-radius: 6px;
  padding: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.article-related-card:hover {
  border-color: #b6a280;
  box-shadow: 0 6px 16px rgba(123, 102, 54, 0.12);
  transform: translateY(-2px);
}
.article-related-card-category {
  font-size: 0.78em;
  color: #7f0000;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.article-related-card-title {
  font-size: 1.02em;
  font-weight: 700;
  color: #201a16;
  line-height: 1.45;
  margin: 0 0 8px 0;
}
.article-related-card-desc {
  font-size: 0.85em;
  color: #665b4c;
  line-height: 1.6;
  margin: 0;
}

/* 回到專區或上頁連結 */
.article-back-nav {
  margin-top: 36px;
  text-align: center;
}
.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7b6636;
  text-decoration: none;
  font-size: 0.95em;
  font-weight: 600;
  padding: 8px 18px;
  border: 1px solid #d4c8b4;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.article-back-link:hover {
  background-color: #f7f3ec;
  color: #7f0000;
  border-color: #b6a280;
}

/* 行動版 RWD 調適 */
@media screen and (max-width: 768px) {
  .article-container {
    width: 92%;
    margin-top: 20px;
  }
  .article-title {
    font-size: 1.6em;
    line-height: 1.4;
  }
  .article-meta-bar {
    gap: 10px 14px;
    font-size: 0.82em;
  }
  .article-summary-box {
    padding: 18px 20px;
  }
  .article-body {
    font-size: 1.02rem;
    line-height: 1.95;
  }
  .article-body h2 {
    font-size: 1.3em;
    margin-top: 36px;
  }
  .article-author-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .article-cta-box {
    padding: 26px 18px;
  }
  .article-cta-buttons {
    flex-direction: column;
    gap: 12px;
  }
  .btn-article-service, .btn-article-line {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ==========================================================================
   風水子站統一配色變數 (Feng Shui Subsite Palette Variables)
   ========================================================================== */
:root {
  --color-red: #b81c1c;
  --color-red2: #df3b3b;
  --color-text: #aa8158;
  --color-text2: #9a6a4a;
  --color-text3: #81593f;
  --color-text-dark: #2a2a2a;
  --color-text-content: #606060;
  --color-text-content2: #363636;
  --color-text-content3: #5d5d5d;
  --color-text-content4: #444;
  --color-text-content5: #eaeaea;
  --color-text-content6: #ededed;
  --color-tabs: #c7a078;
}

/* ==========================================================================
   統一風水子站頁尾 (Feng Shui Subsite Unified Footer)
   ========================================================================== */
footer#contact {
  width: 100%;
  clear: both;
  font-family: 'Noto Serif TC', serif;
  margin-top: 60px;
  background-color: #26211e;
}
footer#contact .container {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}
footer#contact .container > div {
  flex: 1;
}
footer#contact iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: 0;
}
footer#contact .left_side {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  aspect-ratio: 970/607;
  background: url(../fengshui/images/footer/footer_bg.webp) no-repeat top center;
  background-size: cover;
  padding: 44px 28px;
  box-sizing: border-box;
}
footer#contact .left_side .inner {
  max-width: 480px;
  width: 90%;
}
footer#contact .logo {
  width: min(13vw, 240px);
  margin-bottom: 12px;
}
footer#contact .logo img {
  width: 100%;
  height: auto;
  display: block;
}
footer#contact .sns_lists a {
  display: block;
  width: min(3.5vw, 42px);
  transition: transform 0.25s ease;
}
footer#contact .sns_lists a:hover {
  transform: scale(1.1);
}
footer#contact .sns_lists a img {
  width: 100%;
  height: auto;
  display: block;
}
footer#contact .contact_lists {
  font-size: min(1.6vw, 18px);
  margin: 1.4em 0;
}
footer#contact .contact_lists .item {
  display: flex;
  align-items: center;
  margin-bottom: 0.6em;
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.02em;
}
footer#contact .contact_lists .contact_label {
  color: #ffffff;
  font-weight: 600;
  flex-shrink: 0;
}
footer#contact .contact_lists .contact_label::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  background-color: rgba(255, 255, 255, 0.7);
  margin: 0 0.6em;
  vertical-align: middle;
}
footer#contact .contact_lists p {
  color: #ffffff;
  margin: 0;
}

/* 懸浮功能按鈕 (Float Box) */
.float_box {
  position: fixed;
  right: 15px;
  bottom: 20px;
  z-index: 99;
}
.float_box a {
  display: block;
  width: clamp(52px, 8vw, 88px);
  transition: transform 0.25s ease;
}
.float_box a:hover {
  transform: scale(0.96);
}
.float_box a + a {
  margin-top: 10px;
}
.float_box a img {
  width: 100%;
  height: auto;
  display: block;
}

/* 行動版 RWD 調適 */
@media screen and (max-width: 767px) {
  .article-body {
    font-size: 16px !important;
    line-height: 1.8 !important;
  }
  footer#contact .container {
    flex-direction: column-reverse;
  }
  footer#contact .container > div {
    flex: initial;
  }
  footer#contact .left_side {
    aspect-ratio: auto;
    padding: 44px 20px;
  }
  footer#contact .contact_lists {
    font-size: clamp(14px, 3.8vw, 16px) !important;
    line-height: 1.8 !important;
  }
  footer#contact .logo {
    width: 36vw;
    max-width: 180px;
  }
  footer#contact .sns_lists a {
    width: 10vw;
    max-width: 44px;
  }
  footer#contact iframe {
    height: 320px;
    min-height: 320px;
  }
  .float_box {
    right: 10px;
    bottom: 15px;
  }
  .float_box a {
    width: clamp(48px, 12vw, 64px);
  }
}
