/* 重置樣式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 基本樣式 */
body {
  font-family: "Roboto", "Arial", sans-serif;
  line-height: 1.7;
  color: #1a1a1a;
  overflow-x: hidden; /* 防止水平捲軸 */
}

/* 容器 */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%; /* 確保容器寬度不超出視窗 */
}

/* 導航欄 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(8, 8, 8, 0.1);
  backdrop-filter: blur(12px);
  z-index: 1000;
  padding: 10px 0;
  border-bottom:1px solid #fff;
  
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.65);
  border-width:0px;
  padding: 10px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: #00aaff;
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-menu a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #00aaff;
}

/* 手機選單 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 30px;
  height: 4px;
  background: #ffffff;
  margin: 3px 0;
  transition: all 0.3s ease;
}

/* 手機選單展開時 */
.nav-menu.active .mobile-menu-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-menu.active .mobile-menu-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* 主要內容區域 */
/* .main-content { */
  /* margin-top: 100px; */
/* } */

/* Hero 區域 */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  z-index: -1;
}

.hero-content
{
	width:100%;
	padding:10px;
}
.hero-content h1 {
  font-size: 4rem;
  font-weight: 300;
  margin-bottom: 24px;
  line-height: 1.2;
  text-transform: uppercase;
  color: #ffffff;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 40px;
  color: #ffffff;
  opacity: 0.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* 按鈕樣式 */
.btn {
  display: inline-block;
  padding: 14px 32px;
  margin:5px 0;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 16px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #00aaff;
  border: 2px solid #00aaff;
  color: #ffffff;
}

.btn-primary:hover {
  background: transparent;
  color: #00aaff;
}

.btn-secondary {
  background: transparent;
  border: 2px solid #00aaff;
  color: #00aaff;
}

.btn-secondary:hover {
  background: #00aaff;
  color: #fff;
}

/* 內容區塊 */
.content-section {
  padding: 80px 0;
}

.about-section {
  background: #0a0a0a;
  color: #ffffff;
}

.products-section {
  background: #f5f6f5;
  color: #1a1a1a;
}

.news-section {
  background: #ffffff;
  color: #1a1a1a;
}

.cta-section {
  background: #0a0a0a;
  color: #ffffff;
}

/* 標題與副標題 */
.section-title {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 15px;
  font-weight: 300;
  text-transform: uppercase;
}

.section-subtitle {
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 60px;
  opacity: 0.85;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* 卡片樣式 */
.card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 360px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 300px;
  max-width: 100%;
}

.about-section .card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 針對 CTA Section 的卡片進行強化 */
.cta-section .card {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 針對 CTA Section 的回答文字設定多行截斷 */
.cta-section .card p {
  margin-bottom: 20px;
  color: #000000;
  max-height: 3.6rem; /* 兩行高度 */
  position: relative;
  flex-grow: 1; /* 讓文字區塊佔據剩餘空間 */
}

/* 為了在結尾增加省略號 */
.cta-section .card p::after {
  position: absolute;
  right: 0;
  bottom: 0;
  background: #fff; /* 使用卡片背景色遮蓋多餘文字 */
  padding-left: 5px;
}

.card h3 {
  font-size: 1.4rem;
  margin-top: 10px;
  margin-bottom: 16px;
  color: #00aaff;
  font-weight: 500;
  text-align: center;
}

.card p {
  opacity: 0.9;
  line-height: 1.8;
  font-size: 1.1rem;
  display: -webkit-box;
  flex-grow: 1;
  text-align: center;
}

.card_line-clamp {
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 6.6rem; /* 兩行高度 */
  text-overflow: ellipsis;
}

.card small {
  display: block;
  margin-top: 16px;
  opacity: 0.7;
  font-size: 0.9rem;
  text-align: left;
}

/* News Preview Section 文字與按鈕位置及兩行限制 */
.news-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* 新增此屬性，確保按鈕在底部 */
}

.news-card p {
  margin-bottom: 20px;
  color: #1a1a1a;
}

.news-card .btn-primary {
  margin-top: 20px;
  align-self: flex-end;
}

.cta-section .card .btn-primary {
  margin-top: 20px;
  align-self: flex-end;
}

/* 產品價格樣式 */
.product-price {
  font-size: 1.1rem;
  font-weight: 500;
  color: #00aaff;
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* 圖片樣式修正，避免跑版 */
.card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* 網格佈局 */
.grid {
  display: grid;
  gap: 32px;
  justify-content: center; /* 確保單筆資料居中 */
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.grid-2 .card {
    flex: 0 0 calc(50% - 30px); /* 每列佔 50% 寬度，減去左右間距 */
    margin: 15px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .grid.grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
	.grid.grid-2 {
        grid-template-columns: 1fr;
    }
	
    .grid-2 .card {
        flex: 0 0 calc(100% - 30px); /* 小屏幕上每列佔 100% */
    }
}

/* 三列佈局 */
.grid.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.grid-3 .card {
    flex: 0 0 calc(33.333% - 20px); /* 每列佔 33.333% 寬度，減去間距 */
    margin: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 確保內容從頂部開始對齊 */
}

@media (max-width: 1024px) {
    .grid.grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .grid.grid-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-3 .card {
        flex: 0 0 calc(100% - 20px); /* 小屏幕上每列佔 100% */
        margin: 10px auto;
    }
}

/* 單筆資料樣式，確保與三列布局寬度一致 */
.single-card {
  width: 300px;
  margin: 0 auto;
}

.grid-3 .single-card {
    width: calc(100% - 20px);
    flex: 0 0 calc(100% - 20px); /* 單卡片時佔滿整行 */
    margin-left: auto;
    margin-right: auto;
}

/* 頁尾 */
.footer {
  background: #000000;
  padding: 60px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  margin-bottom: 40px;
}

.footer h4 {
  font-size: 1.3rem;
  margin-bottom: 24px;
  color: #00aaff;
  font-weight: 500;
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  line-height: 1.9;
  font-size: 0.95rem;
}

.footer a:hover {
  color: #00aaff;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* 頁碼樣式 */
.pagination-container {
  width: 100%;
  overflow-x: hidden; /* 防止分頁容器產生水平捲軸 */
}

.pagination {
  display: flex;
  gap: 4px;
  padding: 10px 0;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* 允許分頁按鈕換行 */
}

.pagination a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 30px;
  height: 30px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 6px;
  transition: all 0.3s ease;
  background-color: #fff;
  white-space: nowrap;
  margin: 0;
}

.pagination a:hover {
  background-color: #00aaff;
  color: #fff;
  border-color: #00aaff;
}

.pagination a.active {
  background-color: #00aaff;
  color: #fff;
  border-color: #00aaff;
  cursor: default;
}

.pagination a.disabled {
  color: #999;
  border-color: #ddd;
  background-color: #f5f5f5;
  pointer-events: none;
}

/* 響應式設計 */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 3rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

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

  .section-subtitle {
    font-size: 1.1rem;
  }

  .container {
    padding: 0 16px; /* 減少內邊距以適應較小螢幕 */
  }

  .pagination a {
    min-width: 28px;
    height: 28px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.85);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
  }

  .nav-menu.active {
    display: flex;
  }

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

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

  .hero-content p {
    font-size: 1rem;
  }

  .content-section {
    padding: 40px 0;
  }

  .card {
    padding: 24px;
    min-height: 300px;
    padding-bottom: 60px;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
  }

  .pagination a {
    min-width: 26px;
    height: 26px;
    font-size: 12px;
    padding: 0 4px;
  }

  .container {
    padding: 0 12px; /* 進一步減少內邊距 */
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 60vh;
    padding: 80px 0;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .container {
    padding: 0 8px; /* 最小螢幕尺寸下再減少內邊距 */
  }

  .btn {
    padding: 10px 18px;
    font-size: 0.8rem;
  }

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

  .product-price {
    font-size: 1rem;
  }

  .pagination a {
    min-width: 24px;
    height: 24px;
    font-size: 11px;
    padding: 0 3px;
  }

  /* 移除 Q&A Section 在行動裝置上的兩行限制，使用新類別 qa-full-answer */
  .qa-list-item {
    max-height: none;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
  }

  .qa-full-answer {
    max-height: none;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
  }

  .qa-full-answer::after {
    content: none;
  }

  .cta-section .card small {
    margin-top: 24px; /* 增加與 answer 的間距 */
  }  
}

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 載入動畫 */
.loading {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #00aaff;
  animation: spin 1s ease-in-out infinite;
}

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

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.faq-question {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #1a1a1a;
    background: #f8f9fa;
}

.faq-question h3 {
    margin: 0;
    font-weight: 500;
}

.faq-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 15px;
    background: #fff;
    color: #333;
    line-height: 1.6;
    border-top: 1px solid #ddd;
}

.faq-answer p {
    margin: 0;
}

/*).faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

@media (max-width: 768px) {
    .faq-accordion {
        max-width: 100%;
    }
    .faq-question {
        font-size: 1rem;
    }
}

.content-text img, .grid img, .grid div {
    max-width: 100% !important;
}