/* ============================================================
   Aurevix Bioscience — 樣式表 (style.css)
   ------------------------------------------------------------
   這個檔案「只負責長相」：顏色、字體、間距、排版。
   讀法：由上而下 = 全域設定 → 共用元件 → 各區塊。
   ============================================================ */


/* ------------------------------------------------------------
   0. 設計變數 (CSS Variables / 自訂屬性)
   把常用的顏色集中在一個地方，之後要改色只改這裡，
   全站就一起變。這是專業做法，叫「設計代幣 (design tokens)」。
   用法：var(--navy)
   ------------------------------------------------------------ */
:root {
  /* 深藍分三個層次，對應設計稿量到的不同深淺 */
  --navy:        #0d2645;   /* 中深藍：focus 圖示、evidence 右面板、深色按鈕 */
  --navy-deep:   #081a34;   /* 最深藍：導覽列、HALIRA 卡片 */
  --navy-mid:    #233353;   /* 中階藍：partner 合作帶（比較亮） */
  --hero-deep:   #0a1d39;   /* Hero 主視覺底色 */
  --coral:       #dd8a6b;   /* 主色調珊瑚橘：按鈕、重點字 */
  --coral-dark:  #cf7a5b;   /* 按鈕 hover 用的深一階 */

  --bg-light:    #f7f7f9;   /* 淺灰區塊底色（programs） */
  --bg-panel:    #eef1f5;   /* 更淺的面板底（evidence 左欄） */

  --text:        #1c2b3a;   /* 主要文字（深） */
  --text-muted:  #64748b;   /* 次要文字（灰） */
  --line:        #e2e8f0;   /* 分隔線/邊框 */

  --white:       #ffffff;

  /* 內容最大寬度：超過就置中留白，避免在大螢幕上被拉太寬 */
  --maxw: 1200px;
  --radius: 6px;
}


/* ------------------------------------------------------------
   1. 全域重置 (Reset) 與基本排版
   * 選擇器代表「所有元素」。把預設邊界歸零、
   讓 padding 不會把寬度撐大 (box-sizing)。
   ------------------------------------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;   /* 寬度含 padding 與 border，算尺寸最直覺 */
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial,
               "Microsoft JhengHei", "PingFang TC", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* container：每個區塊內容的「置中容器」。
   左右自動留白 (margin auto)，並限制最大寬度。 */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* 區塊共用：上下留白，讓每段之間有呼吸空間 */
.section { padding: 72px 0; }

/* 區塊標題（置中） */
.section-title {
  text-align: center;
  font-size: 30px;
  letter-spacing: 1px;
  color: var(--text);
  font-weight: 700;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 44px;
  font-size: 15px;
}
.section-title.left,
.section-sub.left { text-align: left; }


/* ------------------------------------------------------------
   2. 共用元件：按鈕 (Buttons)
   先做一個 .btn 基底，再用 .btn-xxx 疊上不同顏色。
   這種「基底 + 變體」是最省事的元件寫法。
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 13px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;   /* 讓 hover 變化平滑，不會硬跳 */
  white-space: nowrap;
}
.btn-sm { padding: 10px 18px; font-size: 12px; }

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

.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

.btn-light { background: var(--white); color: var(--text); }
.btn-light:hover { background: #e9edf2; }

.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-deep); }

.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.45); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); }

/* 深色外框按鈕：用在淺底上（例如 evidence 左欄的 VIEW ALL RESEARCH） */
.btn-outline-dark { background: transparent; color: var(--navy); border-color: #c3ccd6; }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }


/* ------------------------------------------------------------
   3. 導覽列 (Header)
   用 Flexbox 讓「Logo — 選單 — 語言」左中右排開。
   justify-content: space-between 是分散對齊的關鍵。
   ------------------------------------------------------------ */
.site-header {
  background: var(--navy-deep);   /* 導覽列用最深的藍 */
  position: sticky;   /* 捲動時吸附在最上方 */
  top: 0;
  z-index: 50;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--white); }
.brand-mark { color: var(--coral); font-size: 22px; }
.brand-text strong { display: block; font-size: 18px; letter-spacing: 3px; line-height: 1; }
.brand-text small { display: block; font-size: 9px; letter-spacing: 4px; color: #9db4cf; }

.main-nav { display: flex; gap: 26px; }
.main-nav a {
  color: #dfe7f0;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover { color: var(--white); border-color: var(--coral); }

.lang-switch { display: flex; align-items: center; gap: 8px; color: #9db4cf; font-size: 13px; }
.lang-switch a.active { color: var(--white); font-weight: 600; }


/* ------------------------------------------------------------
   4. 主視覺 (Hero)
   DNA 主視覺圖直接當整個 Hero 的背景（圖左半本來就是暗色留白，給文字用）。
   ------------------------------------------------------------ */
.hero {
  position: relative;
  /* 多層背景（寫在越前面疊在越上面）：
     ① 左側淡淡的深藍漸層：圖左半本來就暗，只需輕微加強文字對比
     ② DNA 圖：cover 填滿、right center 靠右裁切，保住右側 DNA 主體
     ③ 底色：圖載入前先顯示（沿用 :root 定義的 --hero-deep 變數） */
  background:
    linear-gradient(90deg, rgba(8,20,40,0.55) 0%, rgba(8,20,40,0.25) 40%, rgba(8,20,40,0) 60%),
    url("../images/home-hero-bg.jpg") right center / cover no-repeat,
    var(--hero-deep);
  color: var(--white);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;               /* 文字在圖上面 */
  padding: 96px 32px 110px;
}
.hero-copy { max-width: 560px; }

.hero-title {
  font-size: 62px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 1px;
}
/* 「THE FRONTIER」用漸層文字：先鋪漸層底色，
   再把文字裁成底色的形狀 (background-clip: text)。 */
.hero-title .accent {
  /* 暖→冷漸層：左端暖珊瑚粉 → 右端冷淡藍銀，中間自然過渡成灰紫。
     THE FRONTIER 與 OF LIFE 各自套一個此 span，所以每一行都會
     從左到右完整跑一次「暖→冷」，對齊參考圖。 */
  background: linear-gradient(90deg, #e3a9a2 0%, #d3c4d1 45%, #c3d7ec 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { margin: 26px 0 32px; font-size: 17px; color: #d6e2f0; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ------------------------------------------------------------
   Hero 進場動畫（首頁 / CELLÉVIA / HALIRA 三頁共用）
   用法：在 Hero 文字區的容器加上 class="hero-anim"，
        裡面的子元素（標題、副標、說明、按鈕…）會依序由下往上「彈」進來。
   ------------------------------------------------------------ */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }   /* 起點：透明、往下 28px */
  to   { opacity: 1; transform: none; }               /* 終點：原本的位置 */
}
.hero-anim > * {
  /* cubic-bezier 第二個數字 1.56 > 1 → 會「衝過頭一點再回來」，就是輕微彈跳的感覺
     both → 動畫開始前先停在起點（透明），結束後停在終點 */
  animation: heroFadeUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
/* 依序出場（stagger）：每個子元素晚 0.12 秒
   :nth-child() 的權重比上面那條高，所以這裡的 delay 不會被 animation 簡寫蓋掉 */
.hero-anim > *:nth-child(1) { animation-delay: 0.05s; }
.hero-anim > *:nth-child(2) { animation-delay: 0.17s; }
.hero-anim > *:nth-child(3) { animation-delay: 0.29s; }
.hero-anim > *:nth-child(4) { animation-delay: 0.41s; }
.hero-anim > *:nth-child(5) { animation-delay: 0.53s; }
.hero-anim > *:nth-child(6) { animation-delay: 0.65s; }
/* 使用者在系統開了「減少動態效果」→ 不播動畫，直接顯示 */
@media (prefers-reduced-motion: reduce) {
  .hero-anim > * { animation: none; }
}



/* ------------------------------------------------------------
   5. 核心領域 (Scientific Focus)
   用 CSS Grid 切三欄。Grid 適合「排整齊的格子」。
   repeat(3, 1fr) = 三等分。
   ------------------------------------------------------------ */
.focus { background: var(--white); }
.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.focus-item { display: flex; gap: 16px; }
/* 圖示：圖檔本身就是圓形藍底（四角透明），所以這裡不用再畫圓、上底色 */
.focus-icon {
  flex: 0 0 64px;   /* 固定寬 64px、不縮放 */
  width: 64px; height: 64px;
}
.focus-icon img { display: block; width: 100%; height: 100%; }
.focus-body h3 { font-size: 16px; letter-spacing: 0.5px; margin-bottom: 6px; }
.focus-body > p { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
.focus-body ul li {
  font-size: 13px; color: var(--text-muted);
  padding-left: 14px; position: relative; line-height: 1.9;
}
.focus-body ul li::before {   /* 用 ::before 做小圓點，不用真的 bullet */
  content: "•";
  position: absolute; left: 0;
  color: var(--coral);
}


/* ------------------------------------------------------------
   6. 重點開發計畫 (Programs) — 三張大卡
   ------------------------------------------------------------ */
.programs { background: var(--bg-light); }
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.program-card {
  /* 整張卡片 = 背景圖（各卡的圖與遮罩寫在下面 .program-halira 等）。
     圖上疊一層「遮罩(scrim)」：上方深、往下漸漸透明，
     文字在上半部讀得清楚，下半部露出圖片主體。 */
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 380px;
}
/* 文字直接疊在卡片上：從左上開始，按鈕靠左下（靠 program-desc 撐開把按鈕頂到底部） */
.program-content { padding: 30px 26px; flex: 1; display: flex; flex-direction: column; }
.program-content h3 { font-size: 26px; letter-spacing: 1px; }
.program-content h3 sup { font-size: 12px; }
.program-tag { font-size: 13px; margin: 6px 0 14px; opacity: 0.9; }
.program-desc { font-size: 14px; line-height: 1.7; margin-bottom: 22px; flex: 1; }
.program-content .btn { align-self: flex-start; }

/* 三張卡各自的背景：① 遮罩（顏色沿用原本的品牌色）② 圖片 ③ 底色（圖載入前先顯示）
   180deg = 由上往下；遮罩 0% → 45% 較深、到 78% 幾乎透明
   right center：卡片比圖窄，cover 會裁掉左右，靠右裁才保得住右側的主體 */
.program-halira {
  background:
    linear-gradient(180deg, rgba(8,20,40,0.9) 0%, rgba(8,20,40,0.65) 45%, rgba(8,20,40,0.05) 78%),
    url("../images/program-halira.jpg") right center / cover no-repeat,
    var(--navy-deep);
  color: var(--white);
}
.program-solviva {
  background:
    linear-gradient(180deg, rgba(28,44,22,0.9) 0%, rgba(28,44,22,0.6) 45%, rgba(28,44,22,0.05) 78%),
    url("../images/program-solviva.jpg") right center / cover no-repeat,
    #405536;
  color: var(--white);
}
.program-cellevia {   /* 淺色圖：遮罩用淺紫白、文字維持深色 */
  background:
    linear-gradient(180deg, rgba(248,244,250,0.9) 0%, rgba(248,244,250,0.6) 45%, rgba(248,244,250,0) 78%),
    url("../images/program-cellevia.jpg") right center / cover no-repeat,
    #d8c9dd;
  color: #3a2f42;
}


/* ------------------------------------------------------------
   7. 科學與技術 (Tech) — 四張小卡
   auto-fit + minmax：欄數會依螢幕寬度自動增減，是 RWD 常用技巧。
   ------------------------------------------------------------ */
.tech { background: var(--white); }
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.tech-card {
  /* 整張卡片 = 背景圖。四張卡共用同一組寫法，只有「哪張圖」不同，
     所以把圖抽成 CSS 變數 --tech-img，各卡在下面各自指定。
     ① 左上往右下的白色遮罩：讓左上角的深色文字讀得清楚
     ② 圖片：cover 填滿、right bottom 靠右下（圖的主體都在右下）
     ③ 底色：圖載入前先顯示 */
  --tech-img: none;   /* 預設值：沒指定圖的卡片也不會壞 */
  background:
    linear-gradient(165deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.6) 40%, rgba(255,255,255,0) 72%),
    var(--tech-img) right bottom / cover no-repeat,
    #dde4ed;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 200px;
  padding: 22px 20px;
  overflow: hidden;
}
/* 文字疊在卡片左上角。標題不限寬(維持一行)，只把說明文字限寬，
   讓右下方留給未來的圖案(molecule/細胞) */
.tech-body h3 { font-size: 14px; letter-spacing: 0.5px; margin-bottom: 10px; color: var(--navy); }
.tech-body p { font-size: 13px; color: var(--text-muted); line-height: 1.55; max-width: 80%; }
/* 四張卡各自的背景圖（寫在 .tech-card 後面，同權重時後寫的贏，才能蓋掉預設的 none） */
.tech-molecular     { --tech-img: url("../images/tech-molecular.jpg"); }
.tech-cellular      { --tech-img: url("../images/tech-cellular.jpg"); }
.tech-immunology    { --tech-img: url("../images/tech-immunology.jpg"); }
.tech-translational { --tech-img: url("../images/tech-translational.jpg"); }


/* ------------------------------------------------------------
   8. 研發流程 (Pipeline) — 六步驟 + 箭頭
   用 Flexbox 橫向排，箭頭是清單裡的一個項目。
   ------------------------------------------------------------ */
.pipeline { background: var(--white); }
.pipeline-steps {
  list-style: none;   /* <ol> 預設會自動編號，這裡關掉視覺編號，保留語意順序 */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pipe-step { flex: 1; min-width: 120px; max-width: 160px; text-align: center; }
.pipe-icon {
  width: 70px; height: 70px; margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.pipe-step h4 { font-size: 13px; letter-spacing: 0.5px; margin-bottom: 6px; }
.pipe-step p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.pipe-arrow {
  align-self: center;
  color: #b8c4d2; font-size: 22px;
  padding-bottom: 40px;   /* 讓箭頭對齊圓圈中央高度 */
}


/* ------------------------------------------------------------
   9. 科學・數據・證據 (Evidence) — 深藍三欄
   grid-template-columns 用不同比例：文字欄較窄、圖較寬。
   ------------------------------------------------------------ */
/* 設計稿：左欄白底面板＋顯微鏡照片「黏在一起」成一塊，右邊再接一塊比較寬的深藍面板
   三欄比例 1.15 : 1 : 2（深藍面板最寬，右半邊露出分子圖）
   column-gap 設 0 讓左欄和照片相連，深藍面板再用 margin-left 隔開一點點 */
.evidence { background: var(--bg-panel); color: var(--text); }
.evidence-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 2fr;
  gap: 10px 0;   /* 列距 10px（窄螢幕換行時用）、欄距 0 */
  align-items: stretch;
}
/* 左欄：白底面板，只有左邊兩個角是圓的（右邊接著照片） */
.evidence-left {
  background: var(--white);
  padding: 30px 26px 28px;
  border-radius: var(--radius) 0 0 var(--radius);   /* 左上 右上 右下 左下 */
}
.evidence-left h2 { font-size: 15px; font-weight: 600; letter-spacing: 1px; margin-bottom: 10px; color: var(--navy); }
.evidence-lead { color: var(--text-muted); font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.evidence-list li {
  font-size: 13px; padding: 6px 0 6px 30px;
  position: relative; color: var(--text);
}
/* 清單圖示：::before 變成一個 18×18 的小方塊，用 SVG 圖檔當背景
   （圖示放在 ::before，不放在 li 裡面——因為 lang.js 換語言時會整個重寫 li 的 innerHTML） */
.evidence-list li::before,
.value-list li::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);   /* 垂直置中：先往下 50%，再往上拉回自己高度的一半 */
  background: center / contain no-repeat;
}
.evidence-list li:nth-child(1)::before { background-image: url("../images/icons/ev-publications.svg"); }
.evidence-list li:nth-child(2)::before { background-image: url("../images/icons/ev-preclinical.svg"); }
.evidence-list li:nth-child(3)::before { background-image: url("../images/icons/ev-evidence.svg"); }
.evidence-list li:nth-child(4)::before { background-image: url("../images/icons/ev-patent.svg"); }
.evidence-left .btn { margin-top: 18px; }

/* 中欄：顯微鏡照片（純裝飾、沒有文字，所以不用遮罩）
   只有右邊兩個角是圓的（左邊接著白底面板）
   right center：顯微鏡在照片右半邊，框比照片窄，靠右裁才保得住鏡頭 */
.evidence-media {
  border-radius: 0 var(--radius) var(--radius) 0;
  background:
    url("../images/evidence-microscope.jpg") right center / cover no-repeat,
    #cdd8e4;   /* 圖載入前的底色 */
  min-height: 230px;
}
/* 右欄：較寬的深藍面板＋分子背景圖
   ① 由左往右的深藍遮罩：左邊 95% 給白字，到 70% 的位置完全透明，右半邊露出分子
   ② 分子圖：right center 靠右
   ③ 底色：沿用 --navy */
.evidence-right {
  background:
    linear-gradient(90deg, rgba(13,38,69,0.95) 0%, rgba(13,38,69,0.75) 40%, rgba(13,38,69,0) 70%),
    url("../images/evidence-molecule.jpg") right center / cover no-repeat,
    var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 34px 36px;
  margin-left: 10px;   /* 跟照片之間留一條細縫 */
}
.evidence-right > p, .evidence-right > ul { max-width: 56%; }   /* 說明與清單只佔左半邊，右半邊留給分子圖（標題不限寬，維持一行） */
.evidence-right h3 { font-size: 22px; font-weight: 500; letter-spacing: 2px; margin-bottom: 12px; }
.evidence-right > p { font-size: 13px; line-height: 1.7; color: #cddaea; margin-bottom: 16px; }
.value-list li { font-size: 13px; padding: 7px 0 7px 30px; position: relative; }
.value-list li:nth-child(1)::before { background-image: url("../images/icons/ev-science.svg"); }
.value-list li:nth-child(2)::before { background-image: url("../images/icons/ev-innovation.svg"); }
.value-list li:nth-child(3)::before { background-image: url("../images/icons/ev-integrity.svg"); }
.value-list li:nth-child(4)::before { background-image: url("../images/icons/ev-collab.svg"); }

/* 平板（≤900px）：左欄＋照片一排，深藍面板自己橫跨整排（順便解決原本會空一格的問題） */
@media (max-width: 900px) {
  .evidence-right { grid-column: 1 / -1; margin-left: 0; }   /* 1 / -1 = 從第一條線跨到最後一條線 */
}
/* 手機（≤600px）：全部單欄。左欄圓上面兩角、照片圓下面兩角；深藍面板文字改佔全寬 */
@media (max-width: 600px) {
  .evidence-left  { border-radius: var(--radius) var(--radius) 0 0; }
  .evidence-media { border-radius: 0 0 var(--radius) var(--radius); }
  .evidence-right > p, .evidence-right > ul { max-width: none; }
  .evidence-right {
    background:
      linear-gradient(rgba(13,38,69,0.82), rgba(13,38,69,0.82)),
      url("../images/evidence-molecule.jpg") 80% center / cover no-repeat,
      var(--navy);
  }
}


/* ------------------------------------------------------------
   10. 最新消息 (News) — 五張卡
   ------------------------------------------------------------ */
.news { background: #ffffff; }   /* 設計稿是白底 */
.news-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 34px;
}
.news-head .section-sub { margin-bottom: 0; }
.news-viewall { color: var(--coral); font-size: 13px; font-weight: 600; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.news-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding-bottom: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.news-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.08); transform: translateY(-3px); }
.news-media { height: 110px; background: linear-gradient(135deg, #d3deea, #aec2d8); }
.news-cat {
  display: inline-block; margin: 14px 16px 8px;
  font-size: 10px; letter-spacing: 1px; font-weight: 700;
  color: var(--coral);
}
.news-card h4 { font-size: 13px; line-height: 1.5; margin: 0 16px 10px; font-weight: 600; }
.news-card time { font-size: 12px; color: var(--text-muted); margin: 0 16px; }

/* ---------- 小視窗 (modal)：新聞小視窗與聯絡表單小視窗共用同一組外觀 ----------
   逗號 = 同一組樣式同時套給好幾個選擇器 */
.news-card { cursor: pointer; }                 /* 卡片可點：滑鼠變手指 */
.news-modal, .contact-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.news-modal[hidden], .contact-modal[hidden] { display: none; }          /* 關鍵：hidden 時真的隱藏（覆蓋上面的 display:flex）*/
.news-modal-overlay, .contact-modal-overlay { position: absolute; inset: 0; background: rgba(10,20,40,0.55); }  /* 半透明遮罩 */
.news-modal-box, .contact-modal-box {
  position: relative;
  width: 560px; max-width: 100%;
  max-height: 86vh; overflow-y: auto;           /* 內文太長可捲動 */
  background: #fff; border-radius: 14px;
  padding: 30px 30px 34px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
.news-modal-close, .contact-modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: #f0f2f5; color: #55606f; font-size: 22px; line-height: 1; cursor: pointer;
}
.news-modal-close:hover, .contact-modal-close:hover { background: #e4e7ec; }
.news-modal-cat { font-size: 12px; letter-spacing: 1px; font-weight: 700; color: var(--coral); }
.news-modal-title { font-size: 22px; line-height: 1.4; color: var(--navy); margin: 8px 0 4px; }
.news-modal-date { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.news-modal-media { height: 200px; border-radius: 10px; background: linear-gradient(135deg, #d3deea, #aec2d8); margin-bottom: 18px; }
.news-modal-body { font-size: 15px; line-height: 1.85; color: #3a4657; }
.news-modal-body p { margin: 0 0 14px; }

/* 聯絡表單小視窗專用（js/contact-modal.js）：寫在共用規則「後面」，同權重時後寫的贏 */
.contact-modal-box { width: 640px; }
.contact-modal-box:focus { outline: none; }
.contact-modal-title { font-size: 22px; color: var(--navy); margin: 0 0 6px; padding-right: 40px; }
.contact-modal-sub { font-size: 14px; line-height: 1.7; color: var(--text-muted); margin: 0; }
.contact-modal .contact-form { max-width: none; margin: 20px 0 0; }

/* ---------- 聯絡我們表單 ---------- */
.contact-section { background: #f3f5f8; }
.contact-form { max-width: 640px; margin: 26px auto 0; }
.cf-row { display: flex; gap: 16px; }
.cf-row .cf-field { flex: 1; }
.cf-field { display: block; margin-bottom: 16px; }
.cf-field > span { display: block; font-size: 13px; color: var(--navy); margin-bottom: 6px; font-weight: 600; }
.cf-field input, .cf-field select, .cf-field textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--navy);
  background: #fff; box-sizing: border-box;
}
.cf-field textarea { resize: vertical; }
.cf-field input:focus, .cf-field select:focus, .cf-field textarea:focus { outline: none; border-color: var(--coral); }
.contact-form .btn { margin-top: 4px; }
.cf-result { margin-top: 14px; font-size: 14px; color: #2f7d46; min-height: 20px; line-height: 1.6; }

@media (max-width: 600px) { .cf-row { flex-direction: column; gap: 0; } }


/* ------------------------------------------------------------
   11. 合作邀請 (Partner) — 深藍橫幅
   ------------------------------------------------------------ */
.partner { background: linear-gradient(120deg, #1d2d4a 0%, var(--navy-mid) 100%); color: var(--white); }
.partner-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; flex-wrap: wrap;
}
.partner-copy h2 { font-size: 26px; letter-spacing: 1px; }
.partner-copy p { color: #cddaea; margin-top: 8px; font-size: 15px; }

.partner-options { display: flex; gap: 34px; flex-wrap: wrap; }
.partner-opt { text-align: center; font-size: 12px; color: #dfe7f0; }
.partner-icon {
  width: 46px; height: 46px; margin: 0 auto 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}


/* ------------------------------------------------------------
   12. 頁尾 (Footer)
   ------------------------------------------------------------ */
.site-footer { background: #0a1726; color: #b6c4d6; }   /* 頁尾用最暗、偏黑的深藍 */
.footer-top {
  display: grid;
  grid-template-columns: 1fr 2.4fr;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 40px;
}
.footer-slogan { font-size: 12px; margin: 14px 0 16px; color: #8fa4bd; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #cdd8e6;
}
.footer-social a:hover { background: var(--coral); color: var(--white); }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.footer-col h5 {
  color: var(--white); font-size: 12px; letter-spacing: 1px;
  margin-bottom: 14px;
}
.footer-col a { display: block; font-size: 12px; color: #93a6bd; padding: 4px 0; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 11px; color: #7f92aa; flex-wrap: wrap; gap: 10px;
}
.footer-legal { display: flex; gap: 22px; }
.footer-legal a:hover { color: var(--white); }


/* ------------------------------------------------------------
   13. 響應式 (RWD) — 螢幕變窄時的調整
   @media 是「條件式樣式」：只有當條件成立才套用。
   這裡示範兩個斷點：平板 (≤900px) 與手機 (≤600px)。
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .main-nav { display: none; }          /* 平板以下先把主選單藏起來 */
  /* 窄螢幕：文字橫跨全寬，改成上下方向的遮罩並整體加深；78% 讓 DNA 留在畫面中 */
  .hero {
    background:
      linear-gradient(180deg, rgba(8,20,40,0.8) 0%, rgba(8,20,40,0.6) 60%, rgba(8,20,40,0.85) 100%),
      url("../images/home-hero-bg.jpg") 78% center / cover no-repeat,
      var(--hero-deep);
  }
  .hero-title { font-size: 46px; }

  .focus-grid,
  .programs-grid,
  .tech-grid,
  .news-grid,
  .evidence-grid { grid-template-columns: 1fr 1fr; }  /* 改成兩欄 */

  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .partner-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .section { padding: 48px 0; }
  .hero-title { font-size: 38px; }

  .focus-grid,
  .programs-grid,
  .tech-grid,
  .news-grid,
  .evidence-grid { grid-template-columns: 1fr; }      /* 全部變單欄 */

  .footer-cols { grid-template-columns: 1fr 1fr; }
  .pipeline-steps { flex-direction: column; align-items: center; }
  .pipe-arrow { transform: rotate(90deg); padding: 0; }  /* 箭頭轉成向下 */
}
