/* Base typography */
html {
  font-size: 100%; /* 16px */
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem; /* 16px */
  line-height: 1.6; /* Ensure adequate line height */
  background-color: #ffffff;
  color: #1a1a1a;
  min-height: 100vh; /* 讓頁面至少與視口等高 */
  display: flex;
  flex-direction: column;
}

/* Paragraphs inside section */
.section p {
  font-size: 1.1rem; /* Match original statically defined font size */
  margin: 0 0 1rem; /* bottom margin for spacing */
}

/* Header and Footer */
header, footer {
  background: #f8f8f8;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #eee;
}
header { position: relative; }

/* Position language toggle absolutely in header */
header .lang-toggle {
  position: absolute;
  top: 1.2rem;
  right: 2rem;
  font-size: 0.9rem;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.brand a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.brand span {
  margin: 0 0.4rem;
  color: #ccc;
}

/* Language toggle */
.lang-toggle a {
  font-size: 0.9rem;
  color: #333;
  text-decoration: none;
}
/* Better dropdown button styling */
.lang-toggle #lang-menu-button {
  background: #ffffff;
  border: 1px solid transparent;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  min-width: auto;
  box-shadow: none;
  font-size: 1.05rem;
  line-height: 1.3;
}
.lang-toggle #lang-menu {
  position: absolute;
  right: 0;
  top: 2.2rem;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  overflow: hidden;
  z-index: 1000;
  display: none;
  min-width: 160px;
}
.lang-toggle #lang-menu a {
  padding: 0.6rem 0.9rem;
  display: block;
}
.lang-toggle #lang-menu a:hover {
  background: #f7f7f7;
}

/* Main section */
.section {
  padding: 3rem 2rem;
  max-width: 800px;
  margin: auto;
}
.section-wide {
  max-width: 1200px; /* 服務頁需要更寬的容器 */
}

/* Headings */
h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Service card */
.service-card {
  border: 1px solid #e0e0e0;
  padding: 1.5rem;
  margin: 0; /* 在網格中交給 gap 控制間距 */
  border-radius: 10px;
  background: #fafafa;
}
.service-card h3 {
  font-size: 1.3rem;
}
.service-card p {
  font-size: 1rem;
  margin: 0.5rem 0;
}
.service-card .card-link {
  color: inherit;
  text-decoration: none;
  display: block;
  background: transparent; /* 覆蓋 .service-card a 的黑底 */
  padding: 0;              /* 取消按鈕內邊距樣式 */
  border-radius: 0;        /* 取消圓角 */
}
.service-card .card-link:hover h3 {
  text-decoration: underline;
}
.service-card a {
  display: inline-block;
  margin-top: 1rem;
  background-color: #1a1a1a;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  text-decoration: none;
}
.service-card .card-link h3,
.service-card .card-link p {
  color: #1a1a1a; /* 恢復正文顏色 */
}

/* Card actions: buy button + view link */
.card-actions {
  display: flex;
  flex-direction: column; /* 上下兩行排列 */
  gap: 0.6rem;
  align-items: stretch; /* 讓子元素可撐滿 */
  margin-top: 1rem;
}
.card-actions stripe-buy-button {
  display: block;
  width: 100%; /* 購買按鈕占滿一行 */
  --background-color: #1a1a1a;
  --background-color-hover: #000000;
  --text-color: #ffffff;
  --border-radius: 6px;
}

/* Footer links */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: #999;
  border-top: 1px solid #eee;
  margin-top: auto; /* 將頁腳推至底部 */
}
footer nav {
  margin-bottom: 1rem;
}
footer a {
  color: #333 !important;
  text-decoration: none;
  margin: 0 0.3rem;
}
footer a:visited,
footer a:hover,
footer a:active {
  color: #333 !important;
}
footer .footer-copy { margin-top: 1rem; }

/* Lists: ensure number/bullet alignment and tidy spacing */
.section ol,
.section ul {
  list-style-position: outside;
  padding-left: 1.5rem;
  margin: 0 0 1rem 0;
}
.section li {
  margin: 0.5rem 0;
  font-size: 1.1rem; /* unify with paragraph size */
}
.section li p {
  margin: 0.2rem 0;
}

/* Line-by-line lists where numbers are part of content */
.faq-lines p,
.terms-lines p {
  margin: 0 0 1rem; /* match .section p spacing */
  font-size: 1.1rem; /* match .section p font size */
}

/* Responsive adjustments */
@media (max-width: 600px) {
  header, footer {
    padding: 1rem 1rem;
  }
  .lang-toggle a {
    font-size: 0.85rem;
  }
  .section {
    padding: 2rem 1rem;
    max-width: 90vw;
  }
  .section p {
    font-size: 1rem;
  }
  .service-card {
    padding: 1rem;
    margin: 0.8rem 0;
  }
}

/* Hero section extracted from inline index styles */
.hero {
  padding: 4rem 2rem;
  text-align: center;
  background: transparent; /* 與其他頁面一致：展示頁面底色 */
  max-width: 800px; /* 與 .section 一致的寬度 */
  margin: 0 auto; /* 區塊居中 */
  width: 100%;
  flex: 1 0 auto; /* 佔據剩餘高度 */
  display: flex;
  flex-direction: column;
  justify-content: center; /* 垂直置中 */
  align-items: center; /* 水平置中內容 */
}
.hero h2 {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}
.hero p {
  font-size: 1.1rem;
  color: #555;
}

/* Small badge for AI powered */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #f0f0f0;
  color: #555;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Product cards extracted from inline index styles */
.product {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: #fafafa;
}
.product h4 {
  margin: 0 0 0.5rem 0;
}
.product a {
  display: inline-block;
  margin-top: 1rem;
  background-color: #1a1a1a;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  text-decoration: none;
}

/* Products grid for services page */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* CTA buttons reused */
.btn-primary {
  display: inline-block;
  background-color: #1a1a1a;
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: 5px;
  text-decoration: none;
  margin-right: 1rem;
}
.btn-disabled {
  display: inline-block;
  background-color: #666;
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: 5px;
  text-decoration: none;
  opacity: 0.6;
  cursor: not-allowed;
}
.cta-row { margin-top: 1.5rem; }

/* Alerts for trial */
.alert-area { margin: 0 0 1rem; }
.alert { padding: 0.6rem 0.9rem; border-radius: 6px; margin: 0.6rem 0; }
.alert.success { background: #e8f7ee; color: #196d3a; border: 1px solid #b7e4c7; }
.alert.warn { background: #fff8e5; color: #8a6d3b; border: 1px solid #ffe0a3; }
.alert.error { background: #fdecea; color: #b23a48; border: 1px solid #f5b5bd; }
/* Honeypot field */
.hp { display: none; }
