/* ==========================================================================
   企業學習觀察室｜樣式
   版面格線使用 Bootstrap 5（.container / .row / .col-*），本檔只放視覺樣式。
   所有規則限定在 .insights 範圍內，避免影響其他頁面。

   目錄
     1. 基礎與設計變數
     2. 共用元件：標籤、中繼資訊、文字連結、無障礙
     3. 頁首
     4. 首屏（標題＋目錄）
     5. 區塊標題
     6. 文章顯圖
     7. 橫式卡片（企業案例、延伸閱讀）
     8. 調查洞察
     9. 專家觀點與延伸閱讀
    10. 學習地圖導流
    11. 關於觀察室
    12. Footer（與「企業學習地圖」頁相同）
    13. 響應式：≤ 960px、≤ 767.98px、≤ 380px
    14. 動態偏好與列印
   ========================================================================== */


/* ───── 1. 基礎與設計變數 ───── */

/* 頁首固定在上方：scroll-padding-top 要與頁首高度一致（桌機 88px、手機 72px），錨點才不會被頁首遮住 */
html { scroll-behavior: smooth; background: #faf6ef; scroll-padding-top: 88px; }
body { margin: 0; }

.insights {
  --ink: #2a221a;
  --paper: #faf6ef;
  --accent: #b84b00;   /* 文字用橘（對比足夠） */
  --brand: #fa7314;    /* 底線、裝飾用品牌橘 */
  --muted: #6e6357;
  --line: #d8cfc0;
  --gutter: 48px;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Noto Sans TC', sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
.insights *, .insights *::before, .insights *::after { box-sizing: border-box; }
.insights a { color: inherit; text-decoration: none; }
.insights a:hover { color: var(--accent); }
.insights :focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
.insights img { display: block; max-width: 100%; height: auto; }
.insights h1, .insights h2, .insights h3, .insights p, .insights figure { margin: 0; }
.insights h1, .insights h2, .insights h3 { font-family: 'Noto Serif TC', serif; overflow-wrap: break-word; font-weight: 700; }
.insights .ih-wrap { margin-inline: auto; padding-inline: var(--gutter); }


/* ───── 2. 共用元件 ───── */

.insights .ih-label { font-size: 12px; letter-spacing: .1em; font-weight: 700; color: var(--accent); }
.insights .ih-en { font-family: 'Oswald', 'Noto Sans TC', sans-serif; letter-spacing: .12em; }

.insights .ih-meta { font-size: 13px; color: var(--muted); line-height: 1.7; }
.insights .ih-meta time { white-space: nowrap; }

.insights .ih-textlink {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; width: fit-content;
  border-bottom: 2px solid var(--brand);
  font-size: 14px; font-weight: 700;
}
.insights .ih-textlink span[aria-hidden] { transition: transform .15s ease; }
.insights .ih-textlink:hover span[aria-hidden] { transform: translateX(3px); }

/* 僅供螢幕閱讀器 */
.insights .ih-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.insights .ih-skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 12px 20px; background: var(--ink); color: var(--paper);
  transform: translateY(-200%);
}
.insights .ih-skip:focus { transform: none; }


/* ───── 3. 頁首 ───── */

.insights .ih-top { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.insights .ih-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 22px; }
.insights .ih-brand { display: block; max-width: 335px; width: 30%; min-width: 220px; }
.insights .ih-brand img { width: 100%; height: auto; }
.insights .ih-top-links { display: flex; gap: 24px; align-items: center; font-size: 13px; color: var(--muted); }
.insights .ih-top-links a { display: flex; align-items: center; min-height: 44px; }


/* ───── 4. 首屏（標題＋目錄） ───── */

.insights .ih-hero { padding-block: 46px 48px; border-bottom: 2px solid var(--ink); }
.insights .ih-hero-copy { padding-right: 64px; }
.insights .ih-hero h1 {
  font-size: clamp(34px, 4.3vw, 58px); line-height: 1.4; font-weight: 900;
  letter-spacing: -.02em; margin-top: 14px;
}
.insights .ih-hero-desc { font-size: 16px; color: var(--muted); max-width: 39em; line-height: 1.95; margin-top: 22px; }
.insights .ih-hero .ih-textlink { margin-top: 22px; }

.insights .ih-toc { align-self: center; border-left: 1px solid var(--line); padding-left: 32px; }
.insights .ih-toc-title { font-size: 12px; color: var(--muted); letter-spacing: .1em; margin-bottom: 8px; }
.insights .ih-toc a {
  display: flex; gap: 18px; align-items: center; min-height: 56px; padding-block: 10px;
  border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700;
}
.insights .ih-toc a:last-child { border-bottom: 0; }
.insights .ih-toc-number { font-family: 'Oswald', sans-serif; color: var(--accent); font-size: 13px; }
.insights .ih-toc-arrow { margin-left: auto; color: var(--muted); }


/* ───── 5. 區塊標題 ───── */

.insights .ih-section { padding-block: 60px; scroll-margin-top: 24px; }
.insights .ih-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.insights .ih-section-head h2 { font-size: 30px; line-height: 1.5; margin-top: 5px; font-weight: 900; }
.insights .ih-section-head > p { font-size: 14px; color: var(--muted); max-width: 30em; }


/* ───── 6. 文章顯圖（16:9；圖片載入失敗時改顯示文字底卡） ───── */

.insights .ih-photo { display: block; position: relative; overflow: hidden; background: #e8e1d6; aspect-ratio: 900 / 506; border-radius: 2px; }
.insights .ih-photo img { width: 100%; height: 100%; object-fit: cover; }
.insights .ih-photo-fallback {
  display: none; width: 100%; height: 100%; padding: 28px; gap: 8px;
  align-items: center; justify-content: center; flex-direction: column;
  color: var(--muted); text-align: center;
}
.insights .ih-photo-fallback b { color: var(--ink); font-family: 'Noto Serif TC', serif; font-size: 24px; }
.insights .ih-photo.ih-image-failed .ih-photo-fallback { display: flex; }
.insights .ih-photo.ih-image-failed img { display: none; }


/* ───── 7. 橫式卡片：左圖 3／中文字 6／右連結 3 ───── */

.insights .ih-card {
  align-items: center; row-gap: 16px;
  padding-block: 28px; border-top: 1px solid var(--line);
}
.insights .ih-section-head + .ih-card { border-top: 0; padding-top: 0; }   /* 第一張卡片貼齊標題 */
.insights .ih-section > .ih-card:last-child { padding-bottom: 0; }          /* 最後一張不留底 */

.insights .ih-card-media { padding-right: 24px; }
.insights .ih-card-media .ih-photo-fallback { padding: 12px; }
.insights .ih-card-media .ih-photo-fallback b { font-size: 15px; }
.insights .ih-card-copy { padding-right: 24px; }
.insights .ih-card-copy h3 { font-size: 20px; line-height: 1.6; margin-top: 4px; }
.insights .ih-card-summary { font-size: 14px; color: var(--muted); margin-top: 7px; }
.insights .ih-card .ih-meta { font-size: 12px; margin-top: 8px; }
.insights .ih-card-link { display: flex; justify-content: flex-end; padding-left: 24px; }


/* ───── 8. 調查洞察 ───── */

.insights .ih-research { border-block: 1px solid var(--line); background: #f3eee5; }
.insights .ih-research .row { align-items: center; }
.insights .ih-research-copy { padding-right: 28px; }
.insights .ih-research-findings { padding-left: 28px; }
.insights .ih-research-photo { width: 100%; margin-bottom: 26px; }
.insights .ih-research .ih-photo-fallback { padding: 28px; }
.insights .ih-research .ih-photo-fallback b { font-size: 24px; }
.insights .ih-research h2 { font-size: 30px; line-height: 1.65; margin-top: 12px; }
.insights .ih-research-intro { font-size: 15px; color: var(--muted); line-height: 1.95; margin-top: 18px; }
.insights .ih-research .ih-textlink { margin-top: 20px; }

.insights .ih-findings { list-style: none; padding: 0; margin: 0; }
.insights .ih-findings li { padding: 20px 0; border-bottom: 1px solid #d6ccbd; }
.insights .ih-findings li:first-child { padding-top: 0; }
.insights .ih-findings li:last-child { padding-bottom: 0; border-bottom: 0; }
.insights .ih-findings strong { display: block; font-size: 18px; line-height: 1.7; font-weight: 700; }
.insights .ih-findings p { font-size: 14px; color: #62584b; margin-top: 7px; line-height: 1.9; }
.insights .ih-number { font-family: 'Oswald', sans-serif; font-size: 28px; font-weight: 500; color: var(--accent); white-space: nowrap; }


/* ───── 9. 專家觀點與延伸閱讀 ───── */

.insights .ih-experts { padding-block: 56px 64px; }
.insights .ih-expert-grid { row-gap: 40px; }
.insights .ih-expert-col:nth-child(odd) { padding-right: 20px; }
.insights .ih-expert-col:nth-child(even) { padding-left: 20px; }

.insights .ih-expert {
  display: flex; flex-direction: column; align-items: start; height: 100%;
  border-top: 2px solid var(--ink); padding-top: 24px;
}
.insights .ih-expert h3 { font-size: 24px; line-height: 1.7; margin-top: 12px; }
.insights .ih-expert-summary { font-size: 15px; color: var(--muted); line-height: 1.95; margin: 16px 0 20px; }
.insights .ih-expert .ih-meta { margin-top: auto; }
.insights .ih-expert .ih-textlink { margin-top: 14px; }

/* 延伸閱讀：虛線框，與白皮書內容區隔 */
.insights .ih-extended { margin-top: 56px; padding: 26px 28px 24px; background: #f3eee5; border: 1px dashed #cdc2b0; border-radius: 2px; }
.insights .ih-extended .ih-card { border-top: 0; padding-top: 22px; }


/* ───── 10. 學習地圖導流 ───── */

.insights .ih-next { padding-block: 38px; border-top: 1px solid var(--line); background: #efe9de; }
.insights .ih-next-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.insights .ih-next h2 { font-size: 25px; line-height: 1.6; }
.insights .ih-next p { font-size: 14px; color: var(--muted); margin-top: 10px; }
.insights .ih-next .ih-textlink { flex-shrink: 0; }


/* ───── 11. 關於觀察室 ───── */

.insights .ih-about { padding-block: 44px; scroll-margin-top: 24px; }
.insights .ih-about h2 { font-size: 19px; line-height: 1.6; }
.insights .ih-about p { max-width: 36em; margin-top: 8px; font-size: 14px; line-height: 1.9; color: var(--muted); }


/* ───── 12. Footer：與「企業學習地圖」頁逐項相同 ─────
   參考頁使用 Tailwind；這裡把它的數值原樣換算：
   字體 Overpass、全站字距 1px、行高 1.5、容器 1300px／左右 26px、
   斷點 768px（md）與 1024px（lg）。 */

.insights .ih-footer {
  background: #fff; color: #000;
  font-family: 'Overpass', 'Roboto Condensed', 'Noto Sans TC', 'Microsoft JhengHei', PingFangTC, Nunito, Arial, Helvetica, sans-serif;
  font-size: 16px; font-weight: 400; line-height: 1.5; letter-spacing: 1px;
}
.insights .ih-footer a, .insights .ih-footer a:hover { color: inherit; }   /* 參考頁連結無 hover 變色 */
.insights .ih-footer ul { list-style: none; margin: 0; padding: 0; }
.insights .ih-footer p { margin: 0; }
.insights .ih-footer img { max-width: 100%; height: auto; }
.insights .ih-ft-container { width: 100%; max-width: 1300px; margin-inline: auto; padding-inline: 26px; }

/* 第一層：Logo ＋ 連結 */
.insights .ih-ft-top { display: flex; flex-direction: column; width: 100%; padding-block: 48px; }
.insights .ih-ft-brand { width: 100%; margin-bottom: 32px; }
.insights .ih-ft-brand a { display: inline-block; }
.insights .ih-ft-brand img { width: 100%; max-width: 215px; }
.insights .ih-ft-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; width: 100%; }
.insights .ih-ft-nav ul { grid-column: span 2; padding-bottom: 16px; }   /* 參考頁每欄底部多 16px（空的錨點元素造成） */
.insights .ih-ft-nav li + li { margin-top: 16px; }
.insights .ih-ft-heading { color: #ff7a35; font-weight: 600; }

/* 第二層：媒體群 */
.insights .ih-ft-media { background: #f6f6f6; }
.insights .ih-ft-media ul { display: flex; flex-wrap: wrap; align-items: center; padding-block: 24px; }
.insights .ih-ft-media li { padding-block: 8px; }
.insights .ih-ft-media li + li:not(.ih-ft-media-title) { padding-left: 20px; }
.insights .ih-ft-media ul .ih-ft-media-title + li { padding-left: 0; }
.insights .ih-ft-media .ih-ft-media-title { width: 100%; padding-right: 20px; }
.insights .ih-ft-media li a { display: block; }
.insights .ih-ft-media img { display: block; height: 45px; width: auto; max-width: none; }

/* 第三層：版權與法務 */
.insights .ih-ft-legal { background: #222; color: #fff; font-size: 14px; }
.insights .ih-ft-legal :focus-visible { outline-color: #fff; }
.insights .ih-ft-legal-inner { display: flex; flex-direction: column; padding-block: 24px; }
.insights .ih-ft-legal-links { display: flex; flex-direction: column; flex-shrink: 0; }
.insights .ih-ft-legal-links p { padding-inline: 8px; }
.insights .ih-ft-legal-links p:first-child { margin-bottom: 16px; }
.insights .ih-ft-legal-links p:last-child { margin-bottom: 24px; }
.insights .ih-ft-legal-copy { display: flex; flex-direction: column; gap: 16px; }
.insights .ih-ft-legal-company { display: flex; flex-direction: column; }


/* ───── 13. 響應式 ───── */

@media (min-width: 768px) {
  /* Footer 電腦版：Logo 與連結並排；版權在左、連結在右 */
  .insights .ih-ft-top { flex-direction: row; }
  .insights .ih-ft-brand, .insights .ih-ft-nav { width: 50%; }
  .insights .ih-ft-media .ih-ft-media-title { width: auto; }
  .insights .ih-ft-legal-inner { flex-direction: row; justify-content: space-between; }
  .insights .ih-ft-legal-links { display: block; order: 2; white-space: nowrap; }
  .insights .ih-ft-legal-links p { display: inline; }
  .insights .ih-ft-legal-links p:first-child, .insights .ih-ft-legal-links p:last-child { margin-bottom: 0; }
  .insights .ih-ft-legal-links p + p { border-left: 2px solid rgba(0, 0, 0, .3); }
  .insights .ih-ft-legal-copy { gap: 0; }
  .insights .ih-ft-legal-company { flex-direction: row; gap: 24px; }
}
@media (min-width: 1024px) {
  .insights .ih-ft-brand { width: 66.666667%; }
  .insights .ih-ft-nav { width: 33.333333%; }
}
@media (min-width: 1440px) {
  .insights .ih-hero h1 { font-size: 60px; }
}

@media (max-width: 960px) {
  .insights { --gutter: 28px; }
  .insights .ih-hero-copy { padding-right: 32px; }
  .insights .ih-toc { padding-left: 24px; }
  .insights .ih-section-head { align-items: start; }
  .insights .ih-section-head > p { max-width: 23em; }
}

@media (max-width: 767.98px) {
  html { scroll-padding-top: 72px; }
  .insights { --gutter: 24px; }

  /* 頁首 */
  .insights .ih-top-inner { padding-block: 14px; gap: 14px; }
  .insights .ih-brand { width: 230px; min-width: 0; }
  .insights .ih-top-links { gap: 0; font-size: 12px; flex-shrink: 0; }
  .insights .ih-top-links .ih-about-link { display: none; }

  /* 首屏：目錄改為三欄橫排 */
  .insights .ih-hero { row-gap: 26px; padding-block: 32px; }
  .insights .ih-hero-copy { padding-right: 0; }
  .insights .ih-hero h1 { font-size: clamp(32px, 6.2vw, 44px); line-height: 1.45; margin-top: 10px; }
  .insights .ih-hero-desc { font-size: 15px; margin-top: 16px; }
  .insights .ih-hero .ih-textlink { margin-top: 16px; }
  .insights .ih-toc { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
  .insights .ih-toc-title { margin-bottom: 6px; }
  .insights .ih-toc-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .insights .ih-toc a { gap: 8px; min-height: 44px; padding-block: 5px; border-bottom: 0; font-size: 14px; white-space: nowrap; }
  .insights .ih-toc-arrow { display: none; }

  /* 區塊 */
  .insights .ih-section { padding-block: 40px; }
  .insights .ih-section-head { display: block; margin-bottom: 24px; }
  .insights .ih-section-head h2 { font-size: 26px; }
  .insights .ih-section-head > p { max-width: none; margin-top: 10px; }

  /* 卡片：圖、文、連結直向排列 */
  .insights .ih-card { padding-top: 24px; }
  .insights .ih-card-media, .insights .ih-card-copy { padding: 0; }
  .insights .ih-card-copy h3 { font-size: 19px; }
  .insights .ih-card-link { justify-content: flex-start; padding: 0; }

  /* 調查洞察 */
  .insights .ih-research h2 { font-size: 26px; }
  .insights .ih-research-copy, .insights .ih-research-findings { padding: 0; }
  .insights .ih-research-findings { margin-top: 28px; }
  .insights .ih-findings { border-top: 1px solid #d6ccbd; padding-top: 24px; }
  .insights .ih-findings strong { font-size: 17px; }

  /* 專家觀點 */
  .insights .ih-experts { padding-block: 40px; }
  .insights .ih-expert-col:nth-child(odd), .insights .ih-expert-col:nth-child(even) { padding: 0; }
  .insights .ih-expert h3 { font-size: 23px; }
  .insights .ih-extended { margin-top: 40px; padding: 22px 20px; }

  /* 學習地圖導流 */
  .insights .ih-next { padding-block: 30px; }
  .insights .ih-next-inner { display: block; }
  .insights .ih-next h2 { font-size: 22px; }
  .insights .ih-next .ih-textlink { margin-top: 18px; }

  .insights .ih-about { padding-block: 32px; }
}

@media (max-width: 380px) {
  .insights { --gutter: 20px; }
  .insights .ih-brand { width: 180px; }
  .insights .ih-top-links { font-size: 11px; }
  .insights .ih-toc a { font-size: 13px; gap: 6px; }
  .insights .ih-hero h1 { font-size: 31px; }
}


/* ───── 14. 動態偏好與列印 ───── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .insights * { transition: none !important; }
}

@media print {
  html, .insights { background: #fff; color: #000; }
  .insights .ih-top { position: static; }
  .insights .ih-toc, .insights .ih-top-links, .insights .ih-next { display: none; }
  .insights .ih-card, .insights .ih-expert { break-inside: avoid; }
  .insights .ih-ft-legal { background: #fff; color: #000; border-top: 1px solid #aaa; }
  .insights .ih-ft-legal a { color: #000; }
}
