/* 變量定義 */
:root {
  --primary: #00f5ff;
  --secondary: #7b66ff;
  --accent: #ff3366;
  --dark: #0a0a1f;
  --light: #f0f0f5;
  --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%;
}

/* 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;
}

.hero h1 {
  font-size: 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 p {
  font-size: 1.5rem;
  max-width: 600px;
  margin-bottom: 2rem;
  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: rgba(240, 240, 245, 0.9); /* 稍微淡一點的顏色 */
  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: rgba(240, 240, 245, 0.9);
}

/* 產品介紹區塊 */
.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: 380px;
  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);
}

.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;
}

/* 團隊成就區塊 - 跑馬燈樣式 (三層次) */
.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%); /* 滾動一半的內容寬度，實現無縫循環 */
  }
}


/* 聯絡區塊 */
.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: 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 h1 {
    font-size: 3rem;
  }

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

  .nav-links {
    display: none;
  }

  .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; /* 在最小螢幕上單列顯示卡片 */
  }

  /* 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;
  }
}
