/* ============================================ */
/* 全站通用：黑底 header（非首頁）  */
/* ============================================ */

html body header#masthead,
html body header.site-header,
html body #masthead .ast-main-header-wrap,
html body #masthead .main-header-bar,
html body #masthead .main-header-bar-wrap,
html body #masthead .ast-primary-header-bar,
html body #masthead .ast-primary-header,
html body #masthead .ast-mobile-header-wrap,
html body #masthead .ast-mobile-header-content,
html body #masthead .ast-desktop-header-content,
html body #masthead .ast-builder-header-content,
html body #masthead .site-primary-header-wrap,
html body #masthead .ast-builder-grid-row,
html body #masthead .ast-builder-grid-row-container,
html body #masthead .site-header-section,
html body #masthead .ast-builder-layout-element,
html body #ast-desktop-header,
html body #ast-mobile-header,
html body #ast-desktop-header > *,
html body #ast-mobile-header > *,
html body .ast-above-header-bar,
html body .ast-below-header-bar {
  background-color: #000 !important;
  background: #000 !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* 統一頂部 logo 大小 */
.site-header .custom-logo,
.site-header .custom-logo-link img {
  max-height: 78px !important;
  width: auto !important;
  height: auto !important;
}
.site-header .ast-builder-html-element img,
.site-mobile-header-logo img {
  max-height: 60px !important;
  width: auto !important;
  height: auto !important;
}

/* 選單文字白色 */
.site-header .main-header-menu a,
.site-header .ast-builder-menu a,
.site-header .menu-link,
.site-header .main-header-menu-link,
.site-header .menu-item > a,
.site-header .site-title a,
.site-header .ast-search-menu-icon a,
.site-header .ast-builder-text-html-element,
.site-header .ast-builder-text-html-element a {
  color: #fff !important;
}
.site-header .main-header-menu a:hover,
.site-header .menu-link:hover,
.site-header .menu-item.current-menu-item > a {
  color: #b8b8b8 !important;
}

/* 漢堡選單 (mobile) */
.site-header .ast-mobile-menu-buttons-fill,
.site-header .menu-toggle .ast-mobile-svg {
  fill: #fff !important;
}
.site-header .menu-toggle {
  background: transparent !important;
}

/* 移除 header 下方細線 */
.site-header,
.main-header-bar {
  border-bottom: none !important;
}

/* === 手機選單黑底白字 (sledgehammer: 全 header 子元素強制黑底) === */
@media (max-width: 921px) {
  html body #masthead,
  html body #masthead *:not(img):not(svg):not(path) {
    background-color: #000 !important;
    background-image: none !important;
  }
  html body #masthead a,
  html body #masthead a *,
  html body #masthead .menu-link,
  html body #masthead .menu-item > a,
  html body #masthead .menu li a,
  html body #masthead nav a {
    color: #fff !important;
    background-color: transparent !important;
  }
  html body #masthead a:hover,
  html body #masthead .menu-link:hover {
    color: #b8b8b8 !important;
    background-color: rgba(255,255,255,0.05) !important;
  }
  /* svg / icon 白色 */
  html body #masthead svg,
  html body #masthead svg path,
  html body #masthead .ast-mobile-svg,
  html body #masthead .menu-toggle-close,
  html body #masthead .menu-toggle-close::before {
    fill: #fff !important;
    color: #fff !important;
  }
}

/* ============================================ */
/* Insight 專屬：只套用到 body.six-insight-page  */
/* ============================================ */

/* 所有 ast-separate-container 頁面 (Insight、Photography 等) 強制黑底 */
html body.ast-separate-container,
html body.ast-separate-container #page,
html body.ast-separate-container #content,
html body.ast-separate-container .site-content,
html body.ast-separate-container .ast-container {
  background-color: #000 !important;
}
html body.ast-separate-container .ast-article-single,
html body.ast-separate-container #primary,
html body.ast-separate-container .site-main,
html body.ast-separate-container .ast-row {
  background-color: transparent !important;
  box-shadow: none !important;
}
body.six-insight-page .ast-article-single,
body.six-insight-page #primary {
  padding: 32px 0 !important;
}

/* 文章標題 */
body.six-insight-page .entry-title {
  color: #fff !important;
  font-weight: 300 !important;
  letter-spacing: 0.02em;
}

/* 列表頁：藍塊摘要 → 左側細線 + 灰白字 */
body.six-insight-page .entry-content .wp-block-preformatted.has-vivid-cyan-blue-background-color,
body.six-insight-page .entry-content .wp-block-preformatted.has-background {
  background: transparent !important;
  color: #c8c8c8 !important;
  padding: 4px 0 4px 20px !important;
  margin: 8px 0 48px !important;
  border-left: 2px solid rgba(255,255,255,.18) !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  line-height: 1.85 !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  border-radius: 0 !important;
}

/* 列表頁：文章卡片標題 */
body.six-insight-page .entry-content > h2.wp-block-heading {
  color: #fff !important;
  font-size: 1.7rem !important;
  font-weight: 500 !important;
  margin: 64px 0 18px !important;
  line-height: 1.4 !important;
  letter-spacing: 0.02em;
}
body.six-insight-page .entry-content > h2.wp-block-heading:first-of-type {
  margin-top: 32px !important;
}
body.six-insight-page .entry-content > h2.wp-block-heading strong {
  font-weight: 500 !important;
  color: #fff !important;
}

/* 連結色 */
body.six-insight-page .entry-content a {
  color: #8ec5ff !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(142,197,255,0.35) !important;
  transition: border-color .2s ease, color .2s ease !important;
  padding-bottom: 1px;
}
body.six-insight-page .entry-content a:hover {
  color: #b8d8ff !important;
  border-bottom-color: #b8d8ff !important;
}

/* 文章內頁：pre 區塊去掉 code-block 外觀 */
body.six-insight-page .entry-content > .wp-block-preformatted:not(.has-background) {
  background: transparent !important;
  color: #d8d8d8 !important;
  font-family: inherit !important;
  font-size: 1.05rem !important;
  line-height: 1.95 !important;
  white-space: pre-wrap !important;
  padding: 0 !important;
  margin: 0 0 28px !important;
  border: none !important;
}

/* 段落 + strong */
body.six-insight-page .entry-content p {
  color: #d8d8d8 !important;
  line-height: 1.85 !important;
  margin-bottom: 1.5em !important;
}
body.six-insight-page .entry-content strong {
  color: #fff !important;
  font-weight: 600;
}

/* 閱讀寬度 + 置中（只在 Insight 頁面套用）*/
body.six-insight-page .ast-article-single .entry-content {
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
}
body.six-insight-page .ast-article-single .entry-header {
  max-width: 760px !important;
  margin: 56px auto 24px !important;
  padding: 0 24px !important;
}

/* 文章內子標題 */
body.six-insight-page .entry-content h2:not(.wp-block-heading),
body.six-insight-page .entry-content h3,
body.six-insight-page .entry-content h4 {
  color: #fff !important;
  margin-top: 2em !important;
  margin-bottom: .7em !important;
  font-weight: 500 !important;
}
body.six-insight-page .entry-content h2:not(.wp-block-heading) { font-size: 1.5rem !important; }
body.six-insight-page .entry-content h3 { font-size: 1.25rem !important; }
body.six-insight-page .entry-content h4 { font-size: 1.1rem !important; }

/* list */
body.six-insight-page .entry-content ul,
body.six-insight-page .entry-content ol {
  color: #d8d8d8 !important;
  padding-left: 1.6em !important;
  margin-bottom: 1.6em !important;
}
body.six-insight-page .entry-content li {
  margin-bottom: .5em !important;
  line-height: 1.85;
}

/* WP page-links pagination */
body.six-insight-page .entry-content .page-links {
  text-align: center;
  margin: 48px 0;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #888;
  font-size: 0.9rem;
}
body.six-insight-page .entry-content .page-links a,
body.six-insight-page .entry-content .page-links > span:not(.page-links-title) {
  display: inline-block;
  min-width: 32px;
  padding: 6px 12px;
  margin: 0 4px;
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 3px;
  color: #ccc !important;
  background: transparent;
  text-decoration: none !important;
}
body.six-insight-page .entry-content .page-links > span:not(.page-links-title) {
  background: rgba(142,197,255,0.15);
  border-color: #8ec5ff !important;
  color: #fff !important;
}
body.six-insight-page .entry-content .page-links a:hover {
  background: rgba(255,255,255,0.05);
  border-color: #8ec5ff !important;
  color: #fff !important;
}

/* WP Table */
body.six-insight-page .entry-content .wp-block-table {
  margin: 24px 0 !important;
  overflow-x: auto;
}
body.six-insight-page .entry-content table {
  width: 100% !important;
  border-collapse: collapse !important;
  background: transparent !important;
  color: #d8d8d8;
  font-size: 0.95rem;
}
body.six-insight-page .entry-content table th,
body.six-insight-page .entry-content table td {
  border: 1px solid rgba(255,255,255,0.15) !important;
  padding: 10px 14px !important;
  text-align: left;
  background: transparent !important;
}
body.six-insight-page .entry-content table thead th,
body.six-insight-page .entry-content table tr:first-child td {
  background: rgba(255,255,255,0.05) !important;
  color: #fff !important;
  font-weight: 500;
}

/* WP Separator */
body.six-insight-page .entry-content hr.wp-block-separator,
body.six-insight-page .entry-content hr {
  border: 0 !important;
  height: 1px !important;
  background: rgba(255,255,255,0.15) !important;
  margin: 48px 0 !important;
  max-width: 200px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* RWD */
@media (max-width: 768px) {
  body.six-insight-page .ast-article-single .entry-content,
  body.six-insight-page .ast-article-single .entry-header {
    padding: 0 20px !important;
  }
  body.six-insight-page .entry-content > h2.wp-block-heading { font-size: 1.4rem !important; }
  body.six-insight-page .entry-title { font-size: 1.6rem !important; }
}
