/* 變量定義 */
:root {
  --primary: #00f5ff;
  --secondary: #7b66ff;
  --accent: #ff3366;
  --dark: #0a0a1f;
  --light: #f0f0f5;
  --text-dark: #1a202c;
  --text-gray: #718096;
  --border-color: #e2e8f0;
  --glass: rgba(255, 255, 255, 0.1);
  --gradient: linear-gradient(135deg, #00f5ff, #7b66ff);
}

/* 基礎重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans TC", sans-serif;
  background: var(--dark);
  color: var(--light);
  overflow-x: hidden;
  line-height: 1.6;
}

/* 粒子背景 */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

.container {
  position: relative;
  z-index: 2;
}

/* 導航欄 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  background: rgba(10, 10, 31, 0.8); /* 半透明背景 */
  backdrop-filter: blur(10px); /* 模糊效果 */
  z-index: 1000;
  transition: transform 0.3s ease;
}

.navbar-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex; /* 讓 logo 文字和圖示在同一行 */
  align-items: center; /* 垂直居中 */
  gap: 0.5rem; /* 圖示和文字之間的間距 */
}

/* 導航欄中的 Logo 圖片樣式 */
.navbar-logo {
  height: 40px; /* 固定 Logo 的高度，您可以根據需要調整數值 */
  width: auto; /* 保持圖片的原始寬高比例，防止變形 */
  max-height: 50px; /* 防止 Logo 在不同螢幕尺寸下過大 */
  margin-right: 10px; /* Logo 與文字之間的間距 */
  vertical-align: middle; /* 垂直對齊，讓 Logo 與文字在同一水平線上 */
}


.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--light);
  text-decoration: none;
  padding: 0.5rem 1rem;
  position: relative;
  transition: 0.3s ease;
}

.nav-links a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: 0.3s ease;
}

.nav-links a:hover::before {
  width: 100%;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1001;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: var(--light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(10, 10, 31, 0.95);
  backdrop-filter: blur(10px);
  z-index: 999;
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 2rem;
}

.mobile-nav-link {
  color: var(--light);
  text-decoration: none;
  font-size: 1.5rem;
  padding: 1rem;
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--primary);
}

/* Hero 區塊 */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-left {
  flex: 1;
  min-width: 0;
}

.hero-right {
  flex: 0 0 640px;
  display: flex;
  justify-content: flex-end;
}

.hero-achievements-image img {
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  opacity: 0;
  animation: fadeInUp 1.2s ease forwards 1s;
}

/* Eyebrow label above headline */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 0.3s;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary), 0 0 20px rgba(0, 245, 255, 0.4);
  flex-shrink: 0;
  animation: eyebrowPulse 2.4s ease-in-out infinite;
}

@keyframes eyebrowPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.eyebrow-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
}

/* Three-part hero headline */
.hero h1 {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards 0.5s;
}

.hero h1.hero-headline {
  display: flex;
  flex-direction: column;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.75rem;
  gap: 0.1em;
}

.headline-context {
  font-size: 0.48em;
  font-weight: 400;
  color: rgba(240, 240, 245, 0.48);
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.headline-action {
  font-size: 1em;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
}

.headline-impact {
  font-size: 1em;
  font-weight: 900;
  line-height: 1.15;
  background: linear-gradient(135deg, #00f5ff 0%, #7b66ff 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(0.88rem, 1.3vw, 1.05rem);
  max-width: 560px;
  margin-bottom: 2rem;
  color: rgba(240, 240, 245, 0.75);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards 0.8s;
}

/* 區塊通用樣式 */
.section-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.section {
  padding: 8rem 0;
  position: relative;
  width: 100%;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 4rem;
  width: 100%;
  position: relative;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 願景區塊 - 重新設計 */
/* 移除 .vision-content 的背景和邊框，使其不再是毛玻璃效果的容器 */
.vision-content {
  background: none;
  padding: 0;
  border-radius: 0;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  position: static; /* 確保它不影響佈局 */
  overflow: visible; /* 確保內容不會被隱藏 */
  display: block; /* 恢復為塊級元素，不再是 flex 容器 */
  flex-direction: unset;
  gap: unset;
  align-items: unset;
}

.vision-content::before,
.vision-content::after {
  content: none; /* 移除偽元素 */
}

/* 新增的願景內容佈局容器 */
.vision-content-layout {
  display: flex; /* 使用 Flexbox 佈局 */
  flex-wrap: wrap; /* 允許換行 */
  gap: 3rem; /* 左右欄之間的間距 */
  align-items: flex-start; /* 頂部對齊 */
}

.vision-text-column {
  flex: 1; /* 佔據可用空間 */
  min-width: 300px; /* 最小寬度，防止在小螢幕上過窄 */
  max-width: 60%; /* 限制文字欄位最大寬度 */
  text-align: left; /* 文字置左 */
}

/* 新增的文字內容容器樣式 */
.vision-text-area {
  margin: 0; /* 移除自動外邊距，由下方 .vision-sub-text 的 margin-top 控制 */
  padding: 0; /* 移除內邊距 */
}

/* 打字特效相關樣式 */
.revealable-text {
  position: relative;
  display: block; /* 讓容器佔據整行 */
  width: 100%; /* 確保佔滿父容器寬度 */
  margin: 0; /* 移除自動外邊距 */
}

.revealable-text__text-holder {
  position: relative;
  display: block; /* 確保 holder 也能佔據整行 */
  width: 100%;
}

.revealable-text__text {
  white-space: pre-wrap; /* 保持換行和空格 */
  line-height: 1.1; /* 調整行高，使其更緊湊 */
  font-size: 3.5rem; /* 確保字體大小與 vision-main-text 一致 */
  font-weight: 700; /* 確保字重與 vision-main-text 一致 */
  color: var(--light); /* 確保顏色與 vision-main-text 一致 */
  text-align: left; /* 文字置左 */
}

.revealable-text__text--animated {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden; /* 隱藏超出 clip-path 的部分 */
  width: 100%; /* 確保動畫文字佔據與 ghost text 相同的寬度 */
}

.revealable-text__text--ghost {
  visibility: hidden; /* 隱藏 ghost text 但保留其佔位 */
  opacity: 0; /* 確保完全透明 */
  position: static; /* 讓它佔據正常文檔流空間 */
}

.revealable-text__letter {
  display: inline-block; /* 讓每個字母獨立控制 */
  clip-path: inset(0% 100% 0% 0%); /* 初始狀態：完全隱藏 */
  /* transition: clip-path 0.3s ease-out; /* GSAP 會處理動畫，這裡可以移除 */
}


.vision-main-text { /* 這個類別現在主要用於字體大小、字重和顏色 */
  font-size: 3.5rem; /* 大標題字體大小 */
  font-weight: 700; /* 加粗 */
  line-height: 1.1; /* 調整行高，使其更緊湊 */
  margin-bottom: 0; /* 移除下方間距 */
  color: var(--light); /* 保持亮色 */
}

.vision-sub-text {
  font-size: 1.1rem; /* 小內文字體大小 */
  line-height: 1.6;
  color: var(--light); /* 改為白色 */
  max-width: 800px; /* 限制內文最大寬度 */
  margin-top: 1rem; /* 調整這裡：設定與上方標題的間距為 1rem */
  margin-left: 0; /* 確保置左 */
}


.vision-highlights-column {
  flex: 1; /* 佔據剩餘可用空間 */
  min-width: 300px; /* 最小寬度，防止在小螢幕上過窄 */
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 兩行兩列 */
  gap: 1.5rem; /* 卡片間距 */
  margin-top: 0; /* 移除與上方文字區塊的間距，由父容器的 gap 控制 */
}

.highlight-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem; /* 調整內邊距 */
  border-radius: 15px;
  border: 1px solid rgba(0, 245, 255, 0.1);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.highlight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.highlight-card:hover::before {
  left: 100%;
}

.highlight-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 245, 255, 0.2);
}

.highlight-icon {
  width: 50px; /* 調整圖標大小 */
  height: 50px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.8rem; /* 調整間距 */
  font-size: 1.5rem; /* 調整圖標字體大小 */
  color: white;
}

.highlight-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem; /* 調整間距 */
  font-size: 1.2rem; /* 調整字體大小 */
}

.highlight-card p {
  font-size: 0.95rem; /* 調整字體大小 */
  line-height: 1.6;
  color: var(--light);
}

/* Hero 應用領域卡片 */
.hero-domains {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 420px;
}

.domain-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.domain-card:hover {
  border-color: rgba(0, 245, 255, 0.35);
  transform: translateX(4px);
}

.domain-card--main {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.08), rgba(123, 102, 255, 0.1));
  border-color: rgba(0, 245, 255, 0.2);
}

.domain-card .domain-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  flex-shrink: 0;
}

.domain-card .domain-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--light);
}

.domain-card .domain-desc {
  font-size: 0.8rem;
  color: rgba(240, 240, 245, 0.55);
  margin-top: 0.2rem;
}

.domain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.domain-card--sm {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
}

.domain-card--sm .domain-icon {
  width: 36px;
  height: 36px;
  font-size: 1rem;
  border-radius: 10px;
}

.domain-card--sm .domain-name {
  font-size: 0.88rem;
}


.vision-bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.3fr;
  gap: 1rem;
}

.bento-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 245, 255, 0.35);
  box-shadow: 0 8px 30px rgba(0, 245, 255, 0.12);
}

.bento-card--headline {
  grid-column: 4;
  grid-row: 1 / span 2;
  background: linear-gradient(145deg, rgba(0, 245, 255, 0.09), rgba(123, 102, 255, 0.12));
  border-color: rgba(0, 245, 255, 0.22);
  display: flex;
  flex-direction: column;
  padding: 2.5rem;
}

.bento-card--hospital {
  grid-column: span 3;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.bento-hospital-content {
  flex: 1;
}

.bento-card--hospital .bento-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.bento-card--hospital h3 {
  margin-bottom: 0.4rem;
}

.bento-cta-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid rgba(0, 245, 255, 0.4);
  border-radius: 8px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.bento-cta-link:hover {
  background: rgba(0, 245, 255, 0.08);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.2);
}

.bento-card--headline .revealable-text__text,
.bento-card--headline .vision-main-text {
  font-size: 1.6rem;
  line-height: 1.3;
}

.bento-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.bento-sub-text {
  font-size: 0.88rem;
  color: rgba(240, 240, 245, 0.6);
  line-height: 1.7;
  margin-top: auto;
  padding-top: 1.5rem;
}

.bento-card--headline h3 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.bento-card--headline .bento-sub-text {
  margin-top: 0;
  padding-top: 0;
}

.bento-card--headline .bento-cta-link {
  margin-top: auto;
  align-self: flex-start;
}

.bento-card--stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento-card--stat .stat-number {
  display: block;
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.bento-card--stat .stat-label {
  display: block;
  font-size: 0.88rem;
  color: rgba(240, 240, 245, 0.82);
  line-height: 1.45;
}

.bento-card--stat .stat-context {
  display: block;
  font-size: 0.7rem;
  color: rgba(240, 240, 245, 0.38);
  margin-top: 0.3rem;
}

.bento-card--wide {
  grid-column: span 2;
}

.stat-secondary {
  display: block;
  font-size: 1rem;
  color: rgba(240, 240, 245, 0.7);
  margin-top: 0.6rem;
  line-height: 1.4;
}

.stat-secondary strong {
  color: var(--primary);
  font-weight: 700;
}

.bento-card--accent {
  background: rgba(0, 245, 255, 0.07);
  border-color: rgba(0, 245, 255, 0.22);
}

.bento-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
  margin-bottom: 1.2rem;
  flex-shrink: 0;
}

.bento-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.bento-card > p {
  font-size: 0.88rem;
  color: rgba(240, 240, 245, 0.75);
  line-height: 1.65;
}

/* 產品介紹區塊 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.product-card {
  background: var(--glass);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center; /* 確保卡片內容水平居中 */
  text-align: center; /* 確保卡片內文本居中 */
  padding: 2rem;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 245, 255, 0.2);
}

.product-icon {
  width: 70px;
  height: 70px;
  background: var(--gradient);
  border-radius: 50%;
  /* 確保 icon 內容完美居中 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  margin-bottom: 1.5rem;
}

.product-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.product-card p {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* 新增的按鈕樣式 */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: 1.5rem; /* 確保按鈕與上方內容有足夠間距 */
}

.btn-primary {
  background: var(--gradient);
  color: var(--dark);
  border: none;
}

.btn-primary:hover {
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 245, 255, 0.5);
  transform: translateY(-2px);
}


/* 專案展示 */
.project-carousel {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  padding: 4rem 0;
}

.project-grid {
  display: flex;
  gap: 2rem;
  padding: 2rem 10%;
  cursor: grab;
  user-select: none;
  transition: transform 0.3s ease;
  align-items: center;
  min-height: 200px;
}

.project-grid:active {
  cursor: grabbing;
}

.project-card {
  flex: 0 0 350px;
  height: 440px;
  background: var(--glass);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform-style: preserve-3d;
  transition: 0.5s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px) rotateX(10deg) rotateY(10deg);
  box-shadow: 0 15px 30px rgba(0, 245, 255, 0.2);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center; /* 確保內容水平居中 */
  text-align: center; /* 確保文本居中 */
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.project-card p {
  font-size: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.9;
}

.project-link-hint {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-link-hint {
  opacity: 1;
}

.project-link-hint i {
  font-size: 0.8rem;
}

/* 團隊成就區塊 - 跑馬燈樣式 (三層次) */
.achievements-marquee-wrapper {
  overflow: hidden; /* 隱藏超出部分的內容 */
  padding: 2rem 0; /* 留出一些垂直空間 */
  display: flex;
  flex-direction: column; /* 讓三層垂直堆疊 */
  gap: 1.5rem; /* 每層之間的間距 */

  /* 新增兩側漸變透明效果 */
  mask-image: linear-gradient(to right,
              transparent 0%,
              white 10%,
              white 90%,
              transparent 100%);
  -webkit-mask-image: linear-gradient(to right,
                      transparent 0%,
                      white 10%,
                      white 90%,
                      transparent 100%);
}

.achievements-marquee-layer {
  display: flex; /* 確保軌道內容在同一行 */
  width: fit-content; /* 讓內容寬度自適應 */
}

.achievements-marquee-track {
  display: flex;
  flex-shrink: 0; /* 防止軌道內的內容縮小 */
  gap: 2rem; /* 卡片間距 */
  animation: marquee-animation 60s linear infinite; /* 基礎動畫 */
  white-space: nowrap; /* 防止內容換行 */
}

/* 讓不同層的速度和方向不同 */
.achievements-marquee-layer:nth-child(1) .achievements-marquee-track {
  animation-duration: 60s; /* 較慢 */
  animation-direction: normal;
}

.achievements-marquee-layer:nth-child(2) .achievements-marquee-track {
  animation-duration: 75s; /* 中速 */
  animation-direction: reverse; /* 反向滾動 */
}

.achievements-marquee-layer:nth-child(3) .achievements-marquee-track {
  animation-duration: 90s; /* 較快 */
  animation-direction: normal;
}


.achievement-card {
  flex-shrink: 0; /* 防止卡片縮小 */
  min-width: 250px; /* 最小寬度 */
  max-width: 400px; /* 最大寬度，防止過長 */
  background: var(--glass); /* 保留卡片本身的玻璃效果 */
  border-radius: 15px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1); /* 保留卡片本身的邊框 */
  transition: all 0.3s ease;
  white-space: normal; /* 允許卡片內容換行 */
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 245, 255, 0.1);
}

.achievement-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.achievement-content {
  flex: 1;
}

.achievement-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--light);
}

.award-type {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
}

/* 跑馬燈動畫 */
@keyframes marquee-animation {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%); /* 滾動一半的內容寬度，實現無縫循環 */
  }
}


/* 最新資訊區塊 */
#blog {
  background: rgba(255, 255, 255, 0.02);
  padding: 5rem 0;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
}

.blog-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-intro p {
  font-size: 1.2rem;
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.blog-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  color: var(--light);
  transition: all 0.3s;
}

.blog-link-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-post-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  outline: none;
}

/* 封面圖 */
.blog-post-cover {
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.blog-post-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.35) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.blog-post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.blog-post-card:hover .blog-post-cover img {
  transform: scale(1.07);
}

.blog-post-card:hover .blog-post-cover::after {
  opacity: 1;
}

/* 有封面圖時，文字內容加 padding */
.blog-post-cover + .blog-post-content {
  padding: 1.5rem 2rem 2rem;
}

/* 無封面圖時仍維持原始 padding */
.blog-post-content {
  padding: 2rem;
  flex: 1;
}

.blog-post-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 245, 255, 0.2);
}

.blog-post-card:focus-visible {
  border-color: rgba(0, 245, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.2), 0 10px 30px rgba(0, 0, 0, 0.2);
}

.blog-post-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-date {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 1rem;
}

.blog-post-excerpt {
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-post-actions {
  margin-top: auto;
  padding-top: 0.8rem;
}

.blog-post-actions .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s ease, color 0.25s ease;
}

.blog-post-card:hover .read-more {
  transform: translateX(4px);
  color: #00f5ff;
}

.blog-post-tag {
  background: rgba(0, 245, 255, 0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
}

/* Loading skeleton */
.loading-card .post-skeleton {
  animation: pulse 1.5s ease-in-out infinite;
  padding: 2rem;
}

.skeleton-image {
  height: 180px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 16px;
}

.skeleton-title {
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 12px;
}

.skeleton-date {
  height: 16px;
  width: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 16px;
}

.skeleton-content {
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}


/* FAQ 常見問題區塊 */
#faq {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

#faq::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 245, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(123, 102, 255, 0.06) 0%, transparent 40%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, rgba(0, 0, 0, 0.02) 100%);
  z-index: 1;
}

.faq-container {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem 0;
}

.faq-item {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.faq-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.05), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.faq-item:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 245, 255, 0.3);
  box-shadow: 
    0 15px 40px rgba(0, 245, 255, 0.1),
    0 5px 15px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.faq-item:hover::before {
  left: 100%;
}

.faq-item.active {
  border-color: rgba(0, 245, 255, 0.4);
  box-shadow: 
    0 12px 35px rgba(0, 245, 255, 0.15),
    0 3px 10px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.faq-question {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq-question h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--light);
  margin: 0;
  line-height: 1.4;
  padding-right: 1rem;
  transition: color 0.3s ease;
}

.faq-item:hover .faq-question h3 {
  color: rgba(0, 245, 255, 0.9);
}

.faq-item.active .faq-question h3 {
  color: var(--primary);
}

.faq-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--light);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.faq-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.faq-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 14px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.faq-item:hover .faq-toggle {
  background: rgba(0, 245, 255, 0.15);
  color: var(--primary);
  transform: scale(1.1);
}

.faq-item.active .faq-toggle {
  background: rgba(0, 245, 255, 0.2);
  color: var(--primary);
}

.faq-item.active .faq-toggle::before {
  transform: translate(-50%, -50%);
}

.faq-item.active .faq-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-answer {
  position: relative;
  z-index: 2;
  padding: 0 2rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.faq-item.active .faq-answer {
  padding: 0 2rem 2rem 2rem;
  max-height: 300px;
  opacity: 1;
}

.faq-answer p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--light);
  margin: 0;
  transform: translateY(-10px);
  transition: transform 0.3s ease 0.1s;
}

.faq-item.active .faq-answer p {
  transform: translateY(0);
}


/* 響應式設計 - FAQ */
@media (max-width: 768px) {
  .faq-container {
    padding: 1rem;
    gap: 1rem;
  }
  
  .faq-question {
    padding: 1.5rem;
  }
  
  .faq-question h3 {
    font-size: 1.1rem;
    padding-right: 0.8rem;
  }
  
  .faq-toggle {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }
  
  .faq-toggle::before {
    width: 12px;
  }
  
  .faq-toggle::after {
    height: 12px;
  }
  
  .faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    max-height: 400px;
  }
  
  .faq-answer p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .faq-question {
    padding: 1.2rem;
  }
  
  .faq-question h3 {
    font-size: 1rem;
    line-height: 1.3;
  }
  
  .faq-toggle {
    width: 32px;
    height: 32px;
  }
  
  .faq-answer p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* 聯絡區塊 */
.contact-section {
  background: rgba(255, 255, 255, 0.02);
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.contact-info {
  padding: 2rem;
}

.contact-details {
  margin-top: 2rem;
}

.contact-details p {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-form {
  background: var(--glass);
  padding: 2rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--light);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.submit-btn {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 245, 255, 0.3);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* 模態框樣式 */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal.active {
  opacity: 1;
}

.modal-content {
  position: relative;
  background: var(--dark);
  margin: 2% auto;
  padding: 0;
  width: 95%;
  max-width: 1200px;
  max-height: 90vh;
  border-radius: 20px;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  border: 1px solid rgba(0, 245, 255, 0.2);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-close::before {
  content: "×";
}

.modal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 80vh;
}

.modal-media-section {
  background: #000;
  display: flex;
  flex-direction: column;
}

.media-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image,
.modal-video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-video {
  width: 100%;
  height: 100%;
}

.media-thumbnails {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
}

.media-thumbnail {
  width: 60px;
  height: 60px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.media-thumbnail.active {
  opacity: 1;
  border: 2px solid var(--primary);
}

.video-thumbnail {
  background: rgba(0, 245, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.modal-info-section {
  padding: 2rem;
  overflow-y: auto;
  background: var(--glass);
  backdrop-filter: blur(10px);
}

.project-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.project-category,
.project-date {
  background: rgba(0, 245, 255, 0.2);
  color: var(--primary);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.project-description {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.project-features h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.project-features ul {
  list-style: none;
  padding: 0;
}

.project-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  padding-left: 1.5rem;
}

.project-features li::before {
  content: "→";
  color: var(--primary);
  position: absolute;
  left: 0;
}

/* 頁尾 */
footer {
  background: rgba(255, 255, 255, 0.02);
  padding: 4rem 2rem;
  margin-top: 4rem;
  position: relative;
  z-index: 10;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-section h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section ul li a {
  color: var(--light);
  text-decoration: none;
  transition: 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary);
}

/* 社交媒體連結 - 修復版本 */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  position: relative;
  z-index: 100;
}

.social-links a {
  color: var(--light);
  font-size: 1.5rem;
  transition: 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  width: 50px;
  height: 50px;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1000;
}

.social-links a:hover {
  color: var(--primary);
  transform: translateY(-3px);
  background: rgba(0, 245, 255, 0.2);
}

.social-links a:active {
  transform: translateY(-1px);
}

/* 特殊的 Threads 圖標樣式 */
.threads-icon {
  position: relative;
}

.threads-icon::before {
  content: "@";
  font-weight: bold;
  font-size: 1.2rem;
}

.copyright {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  position: relative;
  z-index: 10;
}

/* 動畫效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* 加載動畫 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none;
}

/* 響應式設計 */
@media (max-width: 1024px) {
  .vision-bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento-card--headline {
    grid-column: 1 / span 2;
    grid-row: auto;
    min-height: 200px;
  }

  .bento-card--wide,
  .bento-card--hospital {
    grid-column: 1 / span 2;
  }
}

@media (max-width: 992px) { /* Adjusted breakpoint for vision section */
  .vision-content-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .vision-text-column {
    max-width: 100%;
    text-align: center;
  }

  .vision-main-text,
  .vision-sub-text {
    text-align: center; /* 確保文字在小螢幕上居中 */
  }

  .vision-highlights-column {
    grid-template-columns: repeat(2, 1fr); /* 保持兩列 */
    width: 100%; /* 確保卡片佔滿可用寬度 */
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .revealable-text__text { /* 響應式調整打字特效文字大小 */
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  /* Hero layout: stack on mobile */
  .hero-content {
    flex-direction: column;
    gap: 2rem;
    padding-top: 80px;
  }

  .hero-right {
    flex: 0 0 auto;
    width: 100%;
    justify-content: center;
  }

  .hero-achievements-image img {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .hero h1.hero-headline {
    font-size: 2.4rem;
  }

  .hero p {
    font-size: 1.1rem;
    max-width: 100%;
  }

  .eyebrow-text {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }

  .hero-cta-group {
    flex-direction: column;
    gap: 0.75rem !important;
  }

  .hero-cta-btn {
    text-align: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .navbar {
    padding: 1rem;
  }

  .blog-posts-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-intro p {
    font-size: 1.1rem;
  }
  
  .blog-link-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .blog-post-card {
    padding: 1.5rem;
  }
  
  .blog-post-card h3 {
    font-size: 1.2rem;
  }
  
  .blog-post-date {
    font-size: 0.85rem;
  }
  
  .blog-post-excerpt {
    font-size: 0.95rem;
  }
  
  .blog-post-tag {
    font-size: 0.75rem;
    padding: 0.15rem 0.6rem;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  /* Achievements marquee responsiveness */
  .achievements-marquee-track {
    animation-duration: 40s !important; /* Make it faster on smaller screens */
  }

  .project-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    transform: none;
    overflow-x: hidden;
  }

  .project-card {
    flex: none;
    width: 100%;
    margin-right: 0;
  }

  .modal-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .vision-content {
    padding: 2rem;
  }

  .highlight-card {
    padding: 1.5rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .vision-main-text {
    font-size: 2.2rem; /* 更小的螢幕進一步調整標題大小 */
  }
  .revealable-text__text { /* 更小的螢幕進一步調整打字特效文字大小 */
    font-size: 2.2rem;
  }

  .vision-sub-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 4rem 1rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .social-links {
    gap: 1rem;
  }

  .social-links a {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .vision-highlights-column {
    grid-template-columns: 1fr;
  }

  .vision-bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-card--headline {
    grid-column: 1;
    grid-row: auto;
  }

  /* Adjust marquee card width for very small screens */
  .achievement-card {
    min-width: 200px;
    max-width: 300px;
  }
}

/* 通知樣式 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 2rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

.notification.success {
  background: linear-gradient(135deg, #4caf50, #45a049);
}

.notification.error {
  background: linear-gradient(135deg, #f44336, #d32f2f);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Desktop - ensure mobile menu is hidden */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .mobile-menu {
    display: none !important;
  }
  
  .nav-links {
    display: flex;
  }
}

/* DietMate Demo Custom Styles */
#interactive-demo .demo-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #E5E7EB transparent;
}
#interactive-demo .demo-scrollbar::-webkit-scrollbar {
    width: 4px;
}
#interactive-demo .demo-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
#interactive-demo .demo-scrollbar::-webkit-scrollbar-thumb {
    background-color: #E5E7EB;
    border-radius: 10px;
}
#interactive-demo .demo-scrollbar:hover::-webkit-scrollbar-thumb {
    background-color: #D1D5DB;
}

#interactive-demo .scan-line {
    box-shadow: 0 0 10px 2px rgba(34, 197, 94, 0.5);
}

#interactive-demo .indicator-bar {
    transition: all 0.3s ease;
}

/* ============================================
   CTA Optimizations - HEA-22
   ============================================ */

/* Navbar CTA button */
.nav-cta {
  margin-top: 0 !important;
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Hero CTA button */
.hero-cta-btn {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.9rem 2rem;
  animation: fadeInUp 1s ease forwards 1.1s;
  opacity: 0;
}

/* Mobile menu CTA button */
.mobile-cta-btn {
  margin-top: 1rem !important;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.8rem 2rem;
}

/* Contact section subtitle */
.section-subtitle {
  text-align: center;
  color: var(--primary);
  font-size: 1.1rem;
  margin-top: -1rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Calendly CTA button */
.calendly-btn {
  display: block;
  text-align: center;
  margin-top: 1.5rem !important;
  font-weight: 700;
}

/* Social proof block */
.social-proof {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: rgba(0, 245, 255, 0.07);
  border-left: 3px solid var(--primary);
  border-radius: 0.5rem;
}

.social-proof p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--light);
}

.social-proof p:last-child {
  margin-bottom: 0;
}

.social-proof .fa-check-circle {
  color: var(--primary);
  margin-right: 0.4rem;
}

/* Hide nav-cta on mobile, show in mobile menu instead */
@media (max-width: 768px) {
  .nav-cta {
    display: none;
  }
}

/* =============================================
   HDV — Hero Data Visual
   Research platform stats + animated orb
   ============================================= */
/* ── Product Ecosystem (hero-right) ── */
.hero-ecosystem {
  position: relative;
  width: 100%;
  max-width: 620px;
  height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 1s;
}

/* Central AI hub */
.eco-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.eco-hub-core {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.18), rgba(123, 102, 255, 0.18));
  border: 2px solid rgba(0, 245, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--primary);
  backdrop-filter: blur(16px);
  animation: ecoPulse 3s ease-in-out infinite;
}

.eco-hub-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 245, 255, 0.2);
  animation: ecoRingExpand 3s ease-in-out infinite;
}

.eco-hub-ring--1 {
  width: 154px;
  height: 154px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.eco-hub-ring--2 {
  width: 218px;
  height: 218px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 0.8s;
  border-color: rgba(123, 102, 255, 0.15);
}

.eco-hub-label {
  font-size: 0.82rem;
  color: rgba(0, 245, 255, 0.75);
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-top: 102px;
}

@keyframes ecoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 245, 255, 0.3); }
  50% { box-shadow: 0 0 24px 8px rgba(0, 245, 255, 0.15); }
}

@keyframes ecoRingExpand {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.2; transform: translate(-50%, -50%) scale(1.08); }
}

/* SVG connector lines */
.eco-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.eco-line {
  stroke: rgba(0, 245, 255, 0.25);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  animation: ecoLineDash 3s linear infinite;
}

.eco-line--purple {
  stroke: rgba(123, 102, 255, 0.25);
}

@keyframes ecoLineDash {
  from { stroke-dashoffset: 20; }
  to { stroke-dashoffset: 0; }
}

/* Product cards */
.eco-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 26px;
  padding: 1.8rem 2rem;
  width: 280px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 3;
  animation: ecoFloat 6s ease-in-out infinite;
}

.eco-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.eco-card--dietmate {
  top: 5%;
  left: 0;
  background: rgba(0, 140, 170, 0.50);
  border-color: rgba(0, 245, 255, 1);
  box-shadow: 0 0 0 1px rgba(0, 245, 255, 0.5), 0 12px 48px rgba(0, 245, 255, 0.5), 0 0 120px 30px rgba(0, 245, 255, 0.18), inset 0 0 60px rgba(0, 245, 255, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation-delay: 0s;
}

.eco-card--caremate {
  bottom: 5%;
  right: 0;
  background: rgba(123, 102, 255, 0.14);
  border-color: rgba(123, 102, 255, 0.65);
  box-shadow: 0 0 0 1px rgba(123, 102, 255, 0.2), 0 12px 48px rgba(123, 102, 255, 0.25), 0 0 80px 15px rgba(123, 102, 255, 0.08), inset 0 1px 0 rgba(123, 102, 255, 0.25);
  animation-delay: -3s;
}

@keyframes ecoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.eco-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.eco-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.eco-icon--cyan {
  background: rgba(0, 245, 255, 0.15);
  color: var(--primary);
  border: 1px solid rgba(0, 245, 255, 0.35);
}

.eco-icon--purple {
  background: rgba(123, 102, 255, 0.15);
  color: var(--secondary);
  border: 1px solid rgba(123, 102, 255, 0.35);
}

.eco-status {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 20px;
}

.eco-status--live {
  color: #00e676;
  background: rgba(0, 230, 118, 0.14);
  border: 1px solid rgba(0, 230, 118, 0.35);
}

.eco-status--soon {
  color: var(--secondary);
  background: rgba(123, 102, 255, 0.14);
  border: 1px solid rgba(123, 102, 255, 0.35);
}

.eco-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--light);
  margin-bottom: 5px;
}

.eco-tagline {
  font-size: 0.92rem;
  color: rgba(240, 240, 245, 0.65);
  margin-bottom: 1rem;
}

.eco-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.eco-chips span {
  font-size: 0.72rem;
  color: rgba(240, 240, 245, 0.65);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 4px 10px;
}

/* Floating metric pills */
.eco-metric {
  position: absolute;
  background: rgba(255, 255, 255, 0.09);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 0.65rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  z-index: 4;
  animation: ecoFloat 5s ease-in-out infinite;
}

.eco-metric--1 {
  top: 6%;
  right: 6%;
  animation-delay: -1.5s;
}

.eco-metric--2 {
  bottom: 8%;
  left: 6%;
  animation-delay: -4s;
}

.eco-m-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.eco-m-lbl {
  font-size: 0.75rem;
  color: rgba(240, 240, 245, 0.65);
  white-space: nowrap;
}

/* Mobile */
@media (max-width: 768px) {
  .hero-ecosystem {
    width: 100%;
    height: 300px;
    margin-top: 1rem;
  }

  .eco-card {
    width: 156px;
    padding: 0.9rem 1rem;
  }

  .eco-name { font-size: 1.05rem; }
  .eco-tagline { font-size: 0.72rem; }
  .eco-hub-core { width: 56px; height: 56px; font-size: 1.3rem; }
  .eco-hub-ring--1 { width: 90px; height: 90px; }
  .eco-hub-ring--2 { width: 130px; height: 130px; }
  .eco-hub-label { margin-top: 62px; }
}

@media (max-width: 480px) {
  .eco-metric { display: none; }
  .eco-card--caremate { right: -8px; }
  .eco-card--dietmate { left: -8px; }
}
