/* =====================================================
   社團法人高雄市家庭照顧者關懷協會 — 共用樣式系統
   ===================================================== */

/* ===== 設計變數 ===== */
:root {
  --c-primary: #4A7C6F;
  --c-primary-dark: #355C53;
  --c-primary-light: #6FA092;
  --c-bg: #FAF6EF;
  --c-bg-alt: #F2EBDD;
  --c-accent: #E89B7B;
  --c-accent-dark: #D4825F;
  --c-divider: #E8E2D5;
  --c-text: #2C3E36;
  --c-text-soft: #5C655F;   /* 由 #6B7570 加深，通過 WCAG AA 4.5:1（含 #F2EBDD 深奶油底）— 對年長者更清楚 */
  --c-text-on-light: #3D6A5B; /* 淺底上的品牌綠小字（eyebrow / 外框按鈕）專用，較 --c-primary 深、達 4.5:1 */
  --c-white: #ffffff;

  --shadow-sm: 0 2px 8px rgba(44, 62, 54, 0.06);
  --shadow-md: 0 8px 24px rgba(44, 62, 54, 0.10);
  --shadow-lg: 0 20px 50px rgba(44, 62, 54, 0.14);

  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;

  --ease: cubic-bezier(.22,.61,.36,1);

  --maxw: 1200px;
}

/* ===== 重置 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .3s var(--ease); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { font-family: 'Noto Serif TC', serif; line-height: 1.4; color: var(--c-text); }

/* ===== 公用 ===== */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x, 24px); }
.section { padding: 100px 0; }
.section-head { text-align: center; margin-bottom: 64px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  letter-spacing: .3em;
  color: var(--c-primary);
  font-weight: 500;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}
/* === 識別系統：標題手繪波浪線（會在進場時「畫」出來） === */
.section-title::after {
  content: '';
  display: block;
  width: 88px;
  height: 10px;
  margin: 22px auto 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none' fill='none'><path d='M2,5 Q 14,1 26,5 T 50,5 T 74,5 T 98,5' stroke='%23E89B7B' stroke-width='2.6' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--ease) .15s;
}
.section-title.left { text-align: left; }
.section-title.left::after { margin-left: 0; margin-right: auto; }
.section-title.in-view::after { clip-path: inset(0 0 0 0); }
.reveal.in .section-title::after { clip-path: inset(0 0 0 0); }
.section-sub {
  color: var(--c-text-soft);
  max-width: 640px;
  margin: 0 auto;
}

/* ===== 按鈕 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: .05em;
  transition: all .35s var(--ease);
  cursor: pointer;
}
.btn-primary { background: var(--c-primary); color: var(--c-white); box-shadow: 0 8px 20px rgba(74, 124, 111, .35); }
.btn-primary:hover { background: var(--c-primary-dark); transform: translateY(-3px); box-shadow: 0 14px 28px rgba(74, 124, 111, .45); }
.btn-accent { background: var(--c-accent); color: var(--c-white); box-shadow: 0 8px 20px rgba(232, 155, 123, .4); }
.btn-accent:hover { background: var(--c-accent-dark); transform: translateY(-3px); }
.btn-outline { border: 2px solid var(--c-primary); color: var(--c-primary); background: transparent; }
.btn-outline:hover { background: var(--c-primary); color: var(--c-white); transform: translateY(-3px); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ===== Header / Nav ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 246, 239, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(250, 246, 239, .96);
  border-bottom-color: var(--c-divider);
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 108px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x, 24px);
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform .35s var(--ease);
}
.brand:hover { transform: translateY(-1px); }
.brand img {
  height: 84px;
  width: auto;
  max-width: 400px;
  object-fit: contain;
  transition: height .35s var(--ease);
}
.header.scrolled .nav { height: 88px; }
.header.scrolled .brand img { height: 66px; }

.nav-links { display: flex; list-style: none; gap: 2px; align-items: center; }
.nav-links > li { position: relative; }
.nav-links a {
  display: block;
  padding: 9px 12px;
  font-size: 18px;
  font-weight: 500;
  color: var(--c-text);
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: all .25s var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--c-primary);
  background: rgba(74, 124, 111, .08);
}
.nav-cta {
  background: var(--c-accent) !important;
  color: var(--c-white) !important;
  padding: 9px 16px !important;
  margin-left: 4px;
}

/* ===== 下拉子選單 ===== */
.has-dropdown { position: relative; }
/* 隱形 hover 橋接區：滑鼠從父選項移到子選單時不會中斷 hover 狀態 */
.has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -8px;
  right: -8px;
  height: 14px;
  background: transparent;
}
.has-dropdown > a {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
}
.has-dropdown > a .caret {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .3s var(--ease);
  opacity: .7;
}
.has-dropdown:hover > a .caret,
.has-dropdown.open > a .caret {
  transform: rotate(-135deg) translate(-2px, -2px);
  opacity: 1;
}

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 200px;
  background: var(--c-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-divider);
  list-style: none;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  z-index: 200;
}
.dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: var(--c-white);
  border-left: 1px solid var(--c-divider);
  border-top: 1px solid var(--c-divider);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown li { width: 100%; }
.dropdown a {
  display: block !important;
  padding: 10px 14px !important;
  font-size: 14.5px;
  white-space: nowrap;
  border-radius: var(--r-sm);
  color: var(--c-text);
  text-align: left;
}
.dropdown a:hover {
  background: rgba(74, 124, 111, .08);
  color: var(--c-primary);
  padding-left: 18px !important;
}
.nav-cta:hover { background: var(--c-accent-dark) !important; color: var(--c-white) !important; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
}
.menu-toggle span { position: relative; width: 24px; height: 2px; background: var(--c-text); transition: all .3s var(--ease); }
.menu-toggle span::before, .menu-toggle span::after {
  content: ''; position: absolute; left: 0; width: 24px; height: 2px; background: var(--c-text); transition: all .3s var(--ease);
}
.menu-toggle span::before { top: -8px; }
.menu-toggle span::after  { top: 8px; }
.menu-toggle.active span { background: transparent; }
.menu-toggle.active span::before { transform: rotate(45deg); top: 0; }
.menu-toggle.active span::after  { transform: rotate(-45deg); top: 0; }

/* ===== 子頁 Hero（共用） ===== */
.page-hero {
  position: relative;
  padding: 180px 0 100px;
  background: linear-gradient(135deg, var(--c-bg) 0%, var(--c-bg-alt) 100%);
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.page-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(2px) saturate(.9);
  transform: scale(1.05);
  animation: kenburns 24s ease-in-out infinite alternate;
}
.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(250, 246, 239, .92) 0%,
    rgba(250, 246, 239, .85) 50%,
    rgba(242, 235, 221, .9) 100%);
}
@keyframes kenburns {
  0%   { transform: scale(1.05) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1%, -1%); }
}
.page-hero::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 124, 111, .18), transparent 70%);
  top: -200px; right: -100px;
  animation: float 14s ease-in-out infinite;
  z-index: 1;
}
.page-hero::after {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 155, 123, .18), transparent 70%);
  bottom: -160px; left: -120px;
  animation: float 16s ease-in-out infinite reverse;
  z-index: 1;
}
.page-hero .container { position: relative; z-index: 2; text-align: center; }

/* ===== 通用照片區塊（多頁共用） ===== */
.feature-img {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.feature-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.feature-img:hover img { transform: scale(1.05); }
.feature-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, rgba(74, 124, 111, .12), transparent 50%);
  pointer-events: none;
}
.feature-img-deco {
  position: absolute;
  width: 120px; height: 120px;
  background: var(--c-accent);
  border-radius: var(--r-md);
  z-index: -1;
  opacity: .3;
}
.feature-img-deco.bottom-right { bottom: -30px; right: -30px; }
.feature-img-deco.top-left { top: -30px; left: -30px; }

.split-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split-block.reverse > .feature-img { order: 2; }
.split-block .section-title { text-align: left; }
.split-block .section-title::after { margin-left: 0; }
@media (max-width: 1024px) {
  .split-block { grid-template-columns: 1fr; gap: 40px; }
  .split-block.reverse > .feature-img { order: 0; }
}
.page-hero .breadcrumb {
  display: inline-flex;
  gap: 8px;
  color: var(--c-text-soft);
  font-size: 14px;
  margin-bottom: 16px;
}
.page-hero .breadcrumb a:hover { color: var(--c-primary); }
.page-hero .breadcrumb .sep { color: var(--c-divider); }
.page-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -.01em;
}
.page-hero h1 .accent { color: var(--c-accent); }
.page-hero p {
  color: var(--c-text-soft);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(20px, -30px); }
}

/* ===== Footer ===== */
.footer { background: #1F2C26; color: rgba(255, 255, 255, .7); padding: 64px 0 24px; position: relative; }
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--c-primary-light) 25%,
    var(--c-accent) 50%,
    var(--c-primary-light) 75%,
    transparent 100%);
  opacity: .6;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer h4 { color: var(--c-white); font-size: 16px; margin-bottom: 18px; font-weight: 700; }
/* === Footer 品牌區：彩色 logo + 白色圓角底襯，提升識別度 === */
.footer-brand img {
  height: 80px;
  width: auto;
  max-width: 300px;
  margin-bottom: 22px;
  padding: 16px 24px;
  background: var(--c-white);
  border-radius: 16px;
  filter: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .26);
  display: inline-block;
  object-fit: contain;
  transition: all .35s var(--ease);
}
@media (max-width: 600px) {
  .footer-brand img { height: 68px; padding: 14px 20px; max-width: 260px; }
}
.footer-brand img:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(232, 155, 123, .25);
}
.footer-brand p { font-size: 13.5px; line-height: 1.85; color: rgba(255, 255, 255, .58); }
.footer-brand p::first-line {
  font-family: 'Noto Serif TC', serif;
  color: rgba(255, 255, 255, .96);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: .02em;
}
.footer-list { list-style: none; }
.footer-list li { margin-bottom: 10px; font-size: 14px; }
.footer-list a:hover { color: var(--c-accent); }
.footer-social { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.social-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .3s var(--ease);
}
.social-icon { display: inline-flex; align-items: center; justify-content: center; transition: all .35s var(--ease); color: rgba(255,255,255,.9); }
.social-icon:hover { transform: translateY(-3px); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(0,0,0,.25); }
/* 各平台官方品牌色（hover 時） */
.social-icon.social-fb:hover   { background: #1877F2; }
.social-icon.social-line:hover { background: #06C755; }
.social-icon.social-ig:hover   { background: linear-gradient(45deg, #F09433 0%, #E6683C 25%, #DC2743 50%, #CC2366 75%, #BC1888 100%); }
.social-icon.social-yt:hover   { background: #FF0000; }
.social-icon svg { width: 19px; height: 19px; display: block; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 22px; text-align: center; font-size: 13px;
  color: rgba(255, 255, 255, .55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer-bottom .footer-copyright { letter-spacing: .03em; }
.footer-bottom .footer-designer {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .42);
  letter-spacing: .05em;
}
.footer-bottom .footer-designer a {
  color: rgba(255, 255, 255, .72);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  padding-bottom: 1px;
  transition: color .25s, border-color .25s;
}
.footer-bottom .footer-designer a:hover {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

/* ===== 跳過導覽（鍵盤無障礙）===== */
.skip-link {
  position: absolute;
  top: -100px; left: 16px;
  background: var(--c-primary);
  color: var(--c-white);
  padding: 12px 20px;
  border-radius: var(--r-sm);
  font-weight: 700;
  z-index: 9999;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 16px; outline: 3px solid var(--c-accent); }

/* ===== 字級切換工具 =====
   採用 zoom 縮放主內容區（main + footer），不影響 header / 浮動工具，
   nav 排版不會跑掉。zoom 已是各家瀏覽器標準支援屬性。 */
main, .footer { zoom: 1; transition: none; }
html[data-fontsize="lg"] main,
html[data-fontsize="lg"] .footer { zoom: 1.14; }
html[data-fontsize="xl"] main,
html[data-fontsize="xl"] .footer { zoom: 1.28; }

.a11y-tools {
  position: fixed;
  left: 24px; bottom: 24px;
  z-index: 50;
  display: flex;
  gap: 8px;
  background: var(--c-white);
  padding: 8px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-divider);
  font-size: 13px;
}
.a11y-tools button {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--c-text);
  font-weight: 700;
  cursor: pointer;
  transition: all .25s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.a11y-tools button:hover { background: rgba(74, 124, 111, .1); color: var(--c-primary); }
.a11y-tools button.active { background: var(--c-primary); color: var(--c-white); }
.a11y-tools .label {
  font-size: 11px;
  color: var(--c-text-soft);
  align-self: center;
  padding-left: 6px;
  padding-right: 4px;
  letter-spacing: .1em;
}
@media (max-width: 600px) {
  .a11y-tools { left: 12px; bottom: 12px; padding: 6px; }
  .a11y-tools .label { display: none; }
  .a11y-tools button { width: 32px; height: 32px; font-size: 12px; }
}

/* ===== 回頂按鈕 ===== */
.scroll-top {
  position: fixed;
  right: 24px; bottom: 90px;
  z-index: 49;
  width: 44px; height: 44px;
  background: var(--c-white);
  border-radius: 50%;
  border: 1px solid var(--c-divider);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all .3s var(--ease);
}
.scroll-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--c-primary); color: var(--c-white); transform: translateY(-3px); }
.scroll-top svg { width: 20px; height: 20px; }

/* ===== Tooltip ===== */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--c-text);
  color: var(--c-white);
  font-size: 12px;
  font-weight: 400;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all .2s var(--ease);
  z-index: 100;
}
[data-tooltip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Modal Lightbox（共用）===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 26, .94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  animation: mFadeIn .3s var(--ease);
}
.modal.open { display: flex; }
.modal-content {
  background: var(--c-white);
  border-radius: var(--r-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: mZoomIn .35s var(--ease);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all .25s var(--ease);
}
.modal-close:hover { background: var(--c-white); transform: rotate(90deg); }
.modal-close svg { width: 20px; height: 20px; color: var(--c-text); }
@keyframes mZoomIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes mFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== 浮動求助按鈕 ===== */
.float-help {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 50;
  background: var(--c-accent);
  color: var(--c-white);
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(232, 155, 123, .55);
  display: inline-flex; align-items: center; gap: 10px;
  transition: all .3s var(--ease);
  animation: floatBtn 3s ease-in-out infinite;
}
.float-help:hover {
  background: var(--c-accent-dark);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(232, 155, 123, .65);
}
.float-help svg { width: 20px; height: 20px; }
@keyframes floatBtn {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ===== 滾動進場 ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ===== 微互動：頂端滾動進度條 ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  z-index: 9998;
  pointer-events: none;
  transition: width .1s linear;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(232, 155, 123, .5);
}

/* ===== 微互動：Hero 主標題逐字浮現 ===== */
.hero h1.split-ready { animation: none !important; opacity: 1 !important; }
.hero h1 .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  animation: wordIn .9s var(--ease) forwards;
}
@keyframes wordIn {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ===== 微互動：按鈕點擊漣漪 ===== */
.btn, .heart-code {
  position: relative;
  overflow: hidden;
}
.service-card { overflow: hidden; }
/* .quick-card 已有 position:relative & overflow:hidden */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  transform: scale(0);
  animation: rippleOut .65s var(--ease) forwards;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.btn-outline .ripple,
.quick-card .ripple,
.service-card .ripple { background: rgba(74, 124, 111, .18); mix-blend-mode: normal; }
.heart-code .ripple { background: rgba(232, 155, 123, .35); mix-blend-mode: normal; }
@keyframes rippleOut {
  to { transform: scale(4); opacity: 0; }
}

/* ===== 微互動：卡片光澤掃過 ===== */
.card, .value-item { position: relative; overflow: hidden; }
.quick-card::after,
.service-card::after,
.card::after,
.value-item::after {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, .5) 50%,
    rgba(255, 255, 255, 0) 70%,
    transparent 100%);
  transform: skewX(-20deg);
  transition: left .9s var(--ease);
  pointer-events: none;
  z-index: 1;
}
.quick-card:hover::after,
.service-card:hover::after,
.card:hover::after,
.value-item:hover::after { left: 125%; }
.quick-card > *,
.service-card > *,
.value-item > * { position: relative; z-index: 2; }

/* ===== 微互動：Hero 游標柔光 ===== */
.hero { --mx: 50%; --my: 50%; }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx) var(--my),
    rgba(232, 155, 123, .22),
    transparent 65%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.hero:hover::after { opacity: 1; }

/* ===== 微互動：浮動求助按鈕呼吸環 ===== */
.float-help::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid var(--c-accent);
  opacity: 0;
  animation: helpRing 2.6s var(--ease) infinite;
  pointer-events: none;
}
.float-help::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid var(--c-accent);
  opacity: 0;
  animation: helpRing 2.6s var(--ease) infinite 1.3s;
  pointer-events: none;
}
@keyframes helpRing {
  0%   { transform: scale(.95); opacity: .6; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* ===== 微互動：愛心碼可點擊 ===== */
.heart-code {
  cursor: pointer;
  user-select: all;
  transition: all .3s var(--ease);
}
.heart-code:hover {
  background: var(--c-bg) !important;
  border-color: var(--c-accent-dark) !important;
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(232, 155, 123, .25);
}
.heart-code:active { transform: scale(.99); }
.heart-code.copied {
  background: rgba(74, 124, 111, .08) !important;
  border-color: var(--c-primary) !important;
  color: var(--c-primary) !important;
}

/* ===== 微互動：Toast 通知 ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--c-text);
  color: var(--c-white);
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .05em;
  box-shadow: 0 12px 32px rgba(44, 62, 54, .25);
  opacity: 0;
  pointer-events: none;
  transition: all .35s var(--ease);
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast svg { width: 18px; height: 18px; color: var(--c-accent); }

/* ===== 識別系統：紙質微雜訊（全站覆蓋，極淡） ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .85 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .04;
  mix-blend-mode: multiply;
}

/* ===== 識別系統：照片暖色統一分級 ===== */
.hero-bg img,
.feature-img img,
.about-img img,
.page-hero-bg img,
.news-card-img img {
  filter: saturate(.92) contrast(1.04) brightness(1.02) sepia(.06);
  transition: filter .8s var(--ease), transform .8s var(--ease);
}
.feature-img:hover img,
.about-img:hover img,
.news-card:hover .news-card-img img {
  filter: saturate(1) contrast(1.04) brightness(1.04) sepia(.04);
}

/* ===== 識別系統：Hero 主標題 .accent 手繪波浪底線（取代矩形底色） ===== */
.hero h1 .accent::after,
.page-hero h1 .accent::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%;
  bottom: -10px;
  height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 14' preserveAspectRatio='none' fill='none'><path d='M2,9 Q 14,2 28,8 T 56,8 T 84,8 T 98,8' stroke='%234A7C6F' stroke-width='3' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
  z-index: -1;
  border-radius: 0;
  opacity: 0;
  transform: translateX(-12px);
  animation: accentDraw 1.4s var(--ease) 1.2s forwards;
}
.page-hero h1 .accent::after {
  bottom: -6px;
  animation-delay: .9s;
}
@keyframes accentDraw {
  0%   { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateX(-12px); }
  100% { opacity: 1; clip-path: inset(0 0 0 0); transform: translateX(0); }
}
.page-hero h1 .accent {
  color: var(--c-accent);
  position: relative;
  display: inline-block;
}

/* ===== 連結底線優雅滑入（非 .btn / nav 的純文字連結） ===== */
main p a:not(.btn) {
  position: relative;
  color: var(--c-primary);
  background-image: linear-gradient(var(--c-primary), var(--c-primary));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .35s var(--ease);
}
main p a:not(.btn):hover { background-size: 100% 2px; }

/* ===== 卡片區塊（多頁共用） ===== */
.card {
  background: var(--c-white);
  border-radius: var(--r-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-divider);
  transition: all .4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* ===== 最新資訊卡片（共用） ===== */
.latest-news { background: var(--c-bg-alt); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}
.news-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-divider);
  transition: all .45s var(--ease);
  display: flex;
  flex-direction: column;
  position: relative;
}
.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-primary-light);
}
.news-card-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--c-bg-alt);
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-card:hover .news-card-img img { transform: scale(1.06); }
.news-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--c-accent);
  color: var(--c-white);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: .08em;
  box-shadow: 0 4px 12px rgba(232, 155, 123, .35);
  z-index: 2;
}
.news-card:nth-child(2) .news-tag { background: var(--c-primary); box-shadow: 0 4px 12px rgba(74, 124, 111, .35); }
.news-card:nth-child(3) .news-tag { background: var(--c-primary-light); box-shadow: 0 4px 12px rgba(111, 160, 146, .35); }
.news-card-body {
  padding: 24px 26px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-meta {
  font-size: 12.5px;
  color: var(--c-text-soft);
  letter-spacing: .08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.news-card h3 {
  font-size: 19px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--c-text);
  transition: color .3s var(--ease);
}
.news-card:hover h3 { color: var(--c-primary); }
.news-card p {
  font-size: 14.5px;
  color: var(--c-text-soft);
  line-height: 1.75;
  margin-bottom: 18px;
  flex: 1;
}
.news-link {
  color: var(--c-primary);
  font-weight: 500;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .3s var(--ease);
}
.news-card:hover .news-link {
  color: var(--c-accent-dark);
  gap: 10px;
}
.news-more { text-align: center; }
@media (max-width: 1024px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-card:nth-child(3) { grid-column: span 2; }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; gap: 20px; }
  .news-card:nth-child(3) { grid-column: auto; }
}

/* ===== RWD ===== */
@media (max-width: 1180px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 80px; left: 0; right: 0;
    flex-direction: column;
    background: var(--c-white);
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
    align-items: stretch;
  }
  .nav-links.open a { padding: 14px 16px; border-radius: var(--r-sm); white-space: normal; }
  .nav-cta { margin-left: 0 !important; margin-top: 8px; }

  /* 手機版下拉選單：點擊展開、靜態定位 */
  .has-dropdown > a { width: 100%; justify-content: space-between; }
  .dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--c-divider);
    border-radius: 0;
    margin: 4px 0 4px 16px;
    padding: 4px 0 4px 8px;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: max-height .35s var(--ease);
  }
  .dropdown::before { display: none; }
  .has-dropdown.open .dropdown { max-height: 500px; }
  /* 手機端鎖死 transform，避免桌面 hover/open 規則把選單推到螢幕外 */
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown,
  .has-dropdown.open .dropdown { transform: none !important; }
  /* 手機端不需要 hover 橋接區，避免遮住下面選項 */
  .has-dropdown::after { display: none; }
  .dropdown a { padding: 10px 14px !important; font-size: 14px; }
  .dropdown a:hover { padding-left: 18px !important; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .section { padding: 72px 0; }
  .page-hero { padding: 130px 0 70px; }
  .footer-grid { grid-template-columns: 1fr; }
  .float-help { padding: 12px 18px; font-size: 14px; }
  .nav { height: 82px; }
  .brand img { height: 64px; max-width: 300px; }
  .header.scrolled .brand img { height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ====== 影片嵌入區塊（video_embed helper 輸出） ====== */
.video-embed {
  margin: 32px auto;
  max-width: 880px;
}
.video-embed-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 響應式比例 */
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.video-embed-frame iframe,
.video-embed-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-embed-caption {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--c-soft, #6B7570);
  font-style: italic;
}

/* 區塊型影片（在 section 內使用） */
.video-section {
  padding: 80px 0;
  background: linear-gradient(180deg, rgba(74,124,111,0.04) 0%, transparent 100%);
}
.video-section .container {
  max-width: 980px;
}
.video-section .eyebrow {
  color: var(--c-accent, #E89B7B);
}

/* ====== 主內容與 footer 之間的安全距離 ======
   1. <main> 內最後一個 section/區塊與 footer 必須有呼吸空間
   2. 若內容沒走 .section 包覆（例如 rich() 後僅剩 div/p），也強制留白
*/
main { padding-bottom: 0; }
main > section:last-child,
main > .section:last-child,
main > div.section:last-child {
  padding-bottom: clamp(80px, 10vw, 110px);
}
main > *:last-child:not(section):not(.section):not(.footer-section) {
  margin-bottom: clamp(60px, 8vw, 90px);
}
/* footer 上緣留一條呼吸帶（再加一層保險） */
.footer { margin-top: 0; }
@media (max-width: 600px) {
  main > section:last-child,
  main > .section:last-child { padding-bottom: 72px; }
}

/* =====================================================================
 * 聯絡表單溫度感特效
 * （送出按鈕、Loading、成功動畫、Toast）
 * ===================================================================== */

/* --- 按鈕 Loading 狀態 --- */
.cm-form button.is-loading {
  background: linear-gradient(90deg, var(--c-primary-light), var(--c-primary));
  cursor: wait;
}
.cm-form button.is-loading::before { opacity: 0 !important; }
.cf-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  margin-right: 8px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cf-spin .8s linear infinite;
  vertical-align: -3px;
}
@keyframes cf-spin { to { transform: rotate(360deg); } }

/* --- 表單欄位 focus 時的暖光 --- */
.cm-form .field input:focus,
.cm-form .field textarea:focus,
.cm-form .field select:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(232, 155, 123, .18), 0 8px 22px rgba(232, 155, 123, .08);
  transform: translateY(-1px);
}
.cm-form .field {
  transition: transform .3s ease;
}

/* --- 成功卡片：從表單位置長出來 --- */
.cf-success {
  background: linear-gradient(160deg, #FFFFFF 0%, #FBF6EE 100%);
  border: 1px solid rgba(74, 124, 111, .15);
  border-radius: 24px;
  padding: 56px 40px 44px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(74, 124, 111, .18), 0 4px 16px rgba(0,0,0,.04);
  opacity: 0;
  transform: translateY(20px) scale(.96);
  transition: opacity .55s cubic-bezier(.22,.61,.36,1),
              transform .55s cubic-bezier(.22,.61,.36,1);
  position: relative;
  overflow: hidden;
}
.cf-success.cf-success-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* 卡片背景柔光（呼應希望感） */
.cf-success::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,155,123,.18), transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}
.cf-success::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 50%;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,124,111,.12), transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}
.cf-success > * { position: relative; z-index: 1; }

/* --- 大勾選圖示（SVG 描繪動畫） --- */
.cf-check {
  width: 110px; height: 110px;
  margin: 0 auto 26px;
  position: relative;
}
.cf-check svg {
  width: 100%; height: 100%;
  overflow: visible;
}
.cf-check-bg {
  fill: rgba(74, 124, 111, .08);
  transform-origin: center;
  animation: cf-bg-pop .6s cubic-bezier(.34, 1.56, .64, 1) both;
}
.cf-check-stroke {
  fill: none;
  stroke: var(--c-primary);
  stroke-width: 3;
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  animation: cf-circle-draw .8s .2s ease-out forwards;
}
.cf-check-tick {
  fill: none;
  stroke: var(--c-primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: cf-tick-draw .45s .9s cubic-bezier(.65,0,.45,1) forwards;
}
@keyframes cf-bg-pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes cf-circle-draw { to { stroke-dashoffset: 0; } }
@keyframes cf-tick-draw   { to { stroke-dashoffset: 0; } }

/* --- 飄上來的愛心 --- */
.cf-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cf-hearts span {
  position: absolute;
  bottom: 20%;
  font-size: 22px;
  color: var(--c-accent);
  opacity: 0;
  animation: cf-heart-up 2.4s 1.3s ease-out infinite;
}
.cf-hearts span:nth-child(1) { left: 14%; animation-delay: 1.3s; }
.cf-hearts span:nth-child(2) { left: 50%; animation-delay: 1.8s; font-size: 26px; color: var(--c-accent-dark); }
.cf-hearts span:nth-child(3) { left: 80%; animation-delay: 2.4s; font-size: 18px; }
@keyframes cf-heart-up {
  0%   { transform: translateY(0) scale(.5); opacity: 0; }
  20%  { opacity: .9; transform: translateY(-10px) scale(1); }
  100% { transform: translateY(-90px) scale(.6); opacity: 0; }
}

/* --- 文字 --- */
.cf-success h3 {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--c-primary-dark);
  margin: 0 0 14px;
  letter-spacing: .02em;
  animation: cf-fade-up .6s .5s both;
}
.cf-success-msg {
  font-size: 16px;
  color: var(--c-text);
  line-height: 1.85;
  margin: 0 auto 8px;
  max-width: 420px;
  animation: cf-fade-up .6s .7s both;
}
.cf-success-sub {
  font-size: 14px;
  color: var(--c-text-soft, #6B7570);
  line-height: 1.9;
  margin: 0 auto 30px;
  max-width: 420px;
  animation: cf-fade-up .6s .9s both;
}
.cf-success-sub strong { color: var(--c-accent-dark); }
.cf-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: cf-fade-up .6s 1.1s both;
}
@keyframes cf-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Toast（錯誤訊息） --- */
.cf-toast {
  position: fixed;
  left: 50%; bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: var(--c-primary-dark);
  color: #fff;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  opacity: 0;
  transition: opacity .35s, transform .35s;
  z-index: 9999;
  max-width: 90vw;
  text-align: center;
}
.cf-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cf-toast-err {
  background: #B23A3A;
}
.cf-toast-ok {
  background: var(--c-primary);
}

@media (prefers-reduced-motion: reduce) {
  .cf-success, .cf-check-bg, .cf-check-stroke, .cf-check-tick,
  .cf-success h3, .cf-success-msg, .cf-success-sub, .cf-success-actions,
  .cf-hearts span {
    animation: none !important;
    transition: opacity .2s !important;
  }
  .cf-success { opacity: 1; transform: none; }
}

/* =====================================================================
   ✦ 精緻化升級層 v2 — 純視覺 / RWD（甫東科技）
   全部為 additive 覆蓋；不改任何 HTML 結構或欄位，安全無副作用。
   目標：① 流體 RWD 整體感 ② 品牌記憶細節 ③ 互動觸感
   ===================================================================== */
:root{
  --space-section: clamp(58px, 8vw, 104px);   /* 區塊上下留白，隨螢幕流體縮放 */
  --pad-x:        clamp(20px, 5vw, 28px);      /* 容器左右留白 */
  --focus-ring:   0 0 0 3px rgba(74,124,111,.20), 0 0 0 1.5px var(--c-primary);
  --grad-brand:   linear-gradient(120deg, var(--c-primary), var(--c-primary-light));
}

/* —— ① 流體基礎：讓所有斷點之間「平滑縮放」而非跳動 —— */
body{ font-size: clamp(15.5px, 0.5vw + 14.4px, 17px); }
.section{ padding: var(--space-section) 0; }
.container{ padding-left: var(--pad-x); padding-right: var(--pad-x); }
.section-head{ margin-bottom: clamp(34px, 6vw, 64px); }
.page-hero{ padding: clamp(120px, 17vw, 180px) 0 clamp(54px, 8vw, 100px); }
/* 固定表頭：點錨點時不被表頭蓋住（含選單 #donate 等） */
html{ scroll-padding-top: 112px; }
@media (max-width: 600px){ html{ scroll-padding-top: 82px; } }

/* —— ② 品牌記憶細節 —— */
::selection{ background: var(--c-primary); color:#fff; }
::-moz-selection{ background: var(--c-primary); color:#fff; }
/* 精緻捲軸（僅桌機，行動裝置維持系統原生） */
@media (min-width: 861px){
  * { scrollbar-color: var(--c-primary-light) transparent; scrollbar-width: thin; }
  ::-webkit-scrollbar{ width:11px; height:11px; }
  ::-webkit-scrollbar-track{ background: transparent; }
  ::-webkit-scrollbar-thumb{ background: var(--c-primary-light); border-radius:999px; border:3px solid var(--c-bg); }
  ::-webkit-scrollbar-thumb:hover{ background: var(--c-primary); }
}
/* 內文連結：品牌色「滑入式底線」動畫（不影響按鈕與選單） */
.blk-prose a:not(.btn){
  color: var(--c-primary-dark); font-weight: 500;
  background-image: linear-gradient(var(--c-accent), var(--c-accent));
  background-size: 0% 2px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .35s var(--ease), color .2s var(--ease);
}
.blk-prose a:not(.btn):hover{ background-size: 100% 2px; }

/* —— ③ 互動觸感 + 無障礙聚焦環（鍵盤操作才顯示，滑鼠點擊不干擾） —— */
a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline: none; box-shadow: var(--focus-ring);
}
.btn{ will-change: transform; }
.btn:active{ transform: translateY(-1px) scale(.985); }
.btn-primary:focus-visible{ box-shadow: var(--focus-ring), 0 8px 20px rgba(74,124,111,.35); }
/* 圖片底色：載入中不會白閃，更柔順 */
.post-card-cover img, .album-wall-cover img, .blk-gallery-item img, .post-detail-cover img{ background: var(--c-bg-alt); }

/* —— 行動版節奏微調（讓窄螢幕更俐落、按鈕好按） —— */
@media (max-width: 600px){
  .btn{ padding: 12px 26px; font-size: 15px; }
  .eyebrow{ font-size: 13px; letter-spacing: .22em; }
}

/* —— 尊重「減少動態」偏好：關閉所有非必要動畫 —— */
@media (prefers-reduced-motion: reduce){
  .blk-prose a:not(.btn){ transition: none; }
  .btn:active{ transform: none; }
  html{ scroll-behavior: auto; }
}

/* =====================================================================
   ✦ 合作夥伴 / 線上資源 — LOGO 輪播（home 的 .partners 與 blocks 的 .blk-partners 共用）
   ===================================================================== */
.blk-partners{ background: var(--c-bg-alt); }
.logo-marquee{
  position: relative; overflow: hidden; margin-top: 8px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.logo-track{
  display: flex; align-items: center; gap: clamp(34px, 6vw, 72px);
  width: max-content; animation: logoMarquee 36s linear infinite;
}
.logo-marquee:hover .logo-track{ animation-play-state: paused; }
.logo-item{
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  height: 72px; opacity: .8; text-decoration: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.logo-item:hover{ opacity: 1; transform: translateY(-3px); }
.logo-item img{ max-height: 60px; width: auto; max-width: 220px; object-fit: contain; }
.logo-item .logo-text{
  font-family: 'Noto Serif TC', serif; color: var(--c-text-soft);
  font-size: clamp(14px, 1.6vw, 16px); font-weight: 500; white-space: nowrap;
  position: relative; padding: 6px 2px; transition: color .3s var(--ease);
}
a.logo-item:hover .logo-text{ color: var(--c-primary); }
@keyframes logoMarquee{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }
@media (max-width: 600px){
  .logo-item{ height: 56px; } .logo-item img{ max-height: 46px; max-width: 156px; }
}
/* 減少動態：停止輪播、改為置中換行、隱藏重複組 */
@media (prefers-reduced-motion: reduce){
  .logo-track{ animation: none; flex-wrap: wrap; justify-content: center; gap: 28px 44px; }
  .logo-dup{ display: none; }
}

/* =====================================================================
   ✦ v3 溫潤精修：分層柔陰影 + 更順的進場（純視覺，全站共用 token）
   ===================================================================== */
:root{
  /* 雙層陰影：貼地接觸陰影 + 柔和環境陰影 → 更有層次、更「精品」 */
  --shadow-sm: 0 1px 2px rgba(44,62,54,.04), 0 2px 10px rgba(44,62,54,.05);
  --shadow-md: 0 2px 6px rgba(44,62,54,.05), 0 14px 30px rgba(44,62,54,.085);
  --shadow-lg: 0 6px 16px rgba(44,62,54,.06), 0 26px 60px rgba(44,62,54,.12);
}
/* 進場更內斂：上移幅度收斂、時間略短 → 不晃、更順 */
.reveal{ transform: translateY(22px); transition-duration: .7s; }
/* 卡片邊框在米色底上更乾淨柔和 */
.service-card, .blk-card, .blk-acc-item{ border-color: rgba(44,62,54,.07); }
/* 卡片 hover 陰影帶一點品牌綠暈，溫度更足（不改結構） */
.service-card:hover, a.blk-card:hover, .post-card:hover, .album-wall-card:hover{
  box-shadow: 0 6px 16px rgba(53,92,83,.07), 0 22px 46px rgba(53,92,83,.14);
}

/* =====================================================================
   ✦ 手機一鍵求助列（照顧者的關鍵時刻：一鍵撥打 / LINE / 留言）
   ===================================================================== */
.mobile-help-bar{ display:none; }
@media (max-width: 760px){
  .mobile-help-bar{
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:120;
    background:rgba(255,255,255,.97); backdrop-filter:blur(8px);
    box-shadow:0 -4px 20px rgba(44,62,54,.12); border-top:1px solid var(--c-divider);
    padding:8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); gap:8px;
  }
  .mhb-btn{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
    padding:9px 4px; border-radius:12px; font-size:12.5px; font-weight:600; text-decoration:none; line-height:1.2; }
  .mhb-btn span{ font-size:19px; }
  .mhb-call{ background:var(--c-primary); color:#fff; }
  .mhb-line{ background:#06C755; color:#fff; }
  .mhb-form{ background:var(--c-bg-alt); color:var(--c-primary-dark); border:1px solid var(--c-divider); }
  .mhb-btn:active{ transform:scale(.97); }
  /* 有了底部求助列，隱藏右下圓形浮動鈕，避免遮擋與重複 */
  .float-help{ display:none !important; }
  /* 回頂鈕上移，不被求助列蓋住 */
  .scroll-top.show{ bottom:84px !important; }
  /* 內容底部留白，避免被固定列蓋住 */
  body{ padding-bottom:72px; }
  .footer{ margin-bottom:0; }
}

/* 導覽列搜尋圖示 */
.nav-search{ display:inline-flex !important; align-items:center; justify-content:center; width:38px; height:38px; border-radius:50%; color:var(--c-text); padding:0 !important; }
.nav-search:hover{ background:rgba(74,124,111,.1); color:var(--c-primary); }
@media (max-width:1180px){ .nav-search{ width:auto; height:auto; } }

/* =====================================================
   FX v4：溫柔系精修（後台「站台設定 → ✨ 動態效果」總開關）
   body.fx-full 完整｜body.fx-soft 柔和｜body.fx-off 關閉
   ===================================================== */

/* 圖片柔霧淡入：lazy 圖片載入完成時輕輕浮現 */
img.img-fade { opacity: 0; transform: scale(1.015); transition: opacity .8s var(--ease), transform 1.2s var(--ease); }
img.img-fade.img-in { opacity: 1; transform: none; }

/* Hero 呼吸光暈：11 秒極慢的晨光感，只在「完整」模式（.hero-bg / .blk-hero-bg 皆為 absolute 容器） */
.fx-full .hero-bg::after,
.fx-full .blk-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 28% 30%, rgba(255, 246, 230, .32) 0%, transparent 55%);
  animation: heroBreath 11s ease-in-out infinite alternate;
}
@keyframes heroBreath {
  from { opacity: .08; }
  to   { opacity: .38; }
}

/* 手機求助列「撥打專線」溫柔呼吸：每 7 秒一次極輕的提醒（完整模式限定） */
.fx-full .mhb-call { animation: mhbBreath 7s ease-in-out infinite; }
@keyframes mhbBreath {
  0%, 88%, 100% { transform: none; }
  92%           { transform: scale(1.04); }
  96%           { transform: scale(1); }
}

/* 燈箱照片柔和浮現（開燈箱時照片微縮放進場） */
.lightbox.open .lb-stage img { animation: lbImgIn .38s var(--ease); }
@keyframes lbImgIn {
  from { opacity: 0; transform: scale(.965); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---- 柔和模式（fx-soft）：保留淡入，關閉活潑效果 ---- */
.fx-soft .page-hero-bg img,
.fx-soft .page-hero-bg { animation: none; }                    /* Ken Burns 停 */
.fx-soft .float-help,
.fx-soft .float-help::before,
.fx-soft .float-help::after { animation: none; }               /* 浮動＋光圈停 */
.fx-soft .hero-deco, .fx-soft [class*="hero-blob"] { animation: none; }

/* ---- 關閉模式（fx-off）：內容直接呈現，畫面完全靜止 ---- */
.fx-off .reveal, .fx-off .soft-in { opacity: 1 !important; transform: none !important; transition: none !important; }
.fx-off .scroll-progress { display: none; }
.fx-off .page-hero-bg img, .fx-off .page-hero-bg { animation: none !important; }
.fx-off .float-help, .fx-off .float-help::before, .fx-off .float-help::after { animation: none !important; }
.fx-off .logo-track { animation: none !important; }            /* LOGO 牆改為靜態列 */
.fx-off .hero-deco, .fx-off [class*="hero-blob"] { animation: none !important; }
.fx-off .intro-loader { display: none !important; }            /* 首訪動畫也一併關閉 */
.fx-off .section-title::after { clip-path: inset(0 0 0 0) !important; }


/* =====================================================
   RWD 標準強化（實機量測後修正，2026-07）
   ===================================================== */

/* 1. 手機表單防 iOS 聚焦自動縮放：控制元件字級一律 ≥16px */
@media (max-width: 600px) {
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="search"], input[type="number"], input[type="date"],
  textarea, select {
    font-size: 16px !important;
  }
}

/* 2. 觸控目標達標（WCAG 2.5.8 / 行動裝置 44px 建議） */
@media (max-width: 1180px) {
  /* 導覽列搜尋圖示：原本縮成 18×18，補足點擊範圍 */
  .nav-search { min-width: 44px !important; min-height: 44px !important; }
  .menu-toggle { min-width: 44px; }
}
@media (max-width: 600px) {
  /* 頁尾連結：原 20px 高 → 加大垂直觸控範圍 */
  .footer-list a { display: inline-block; padding: 8px 0; margin: -4px 0; }
  .footer-list li { margin-bottom: 4px; }
  /* 字級切換鈕 32 → 40px */
  .a11y-tools button { width: 40px; height: 40px; }
}

/* 3. 手機選單：項目變多或橫向持機時可捲動，不會爆出畫面 */
@media (max-width: 1180px) {
  .nav-links.open {
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 4. 手機求助列（含 safe-area 實高約 77px+）完整避讓：頁尾最後一行不被蓋住 */
@media (max-width: 760px) {
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}

/* 5. 富文字內容防溢出：編輯器貼入的表格/長字串/嵌入內容 */
.blk-rich table, .post-body table, .rich-content table {
  display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
}
.blk-rich, .post-body, .rich-content { overflow-wrap: break-word; word-break: break-word; }
.blk-rich iframe, .post-body iframe { max-width: 100%; }

/* 6. 文案易讀性（受眾多為年長者）：手機內文行長與行高最佳化 */
@media (max-width: 600px) {
  .blk-rich p, .post-body p { line-height: 1.9; letter-spacing: .01em; }
}

/* 7. 無障礙對比強化（WCAG 2.1 AA）：淺底上的品牌綠小字加深至 4.5:1
   —— 只改「淺底上的小字前景色」，不動按鈕底色的品牌綠，外觀幾乎無感 */
.eyebrow,
.btn-outline,
.news-link,
.blk-card .blk-card-link,
.post-card .read-more,
a.text-link { color: var(--c-text-on-light); }
.btn-outline { border-color: var(--c-text-on-light); }
.btn-outline:hover { color: var(--c-white); }  /* hover 為綠底白字，維持原樣 */

/* 8. 文章內文最佳閱讀寬度：中文約 40 字/行（原 48 字偏寬），對年長讀者更好讀
   —— 只限文章內頁 .post-detail-body，不影響圖文並排/富文字區塊 */
.post-detail-body .blk-prose { max-width: 42em; margin-inline: auto; }
