:root {
  --bg-body: #eef3f8;
  --green-primary: #2ecc71;
  --green-hover: #27ae60;
  --yellow-primary: #ffc107;
  --yellow-border: #fdcb3f;
  --yellow-hover: #f6be00;
  --text-dark: #333333;
  --text-gray: #666666;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("../fonts/NotoSansTC-Thin.woff2") format("woff2");
  font-weight: 100;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("../fonts/NotoSansTC-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("../fonts/NotoSansTC-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("../fonts/NotoSansTC-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("../fonts/NotoSansTC-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("../fonts/NotoSansTC-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("../fonts/NotoSansTC-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("../fonts/NotoSansTC-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("../fonts/NotoSansTC-Black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

body {
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 400;
  /* Regular */
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  color: var(--text-dark);
}

h1 {
  font-weight: 900;
  /* Black */
}

h2 {
  font-weight: 700;
  /* Bold */
}

h3 {
  font-weight: 600;
  /* Bold */
}

p {
  font-weight: 300;
  /* DemiLight */
}

small {
  font-weight: 100;
  /* Thin */
}

.link-icon {
  width: 24px;
  margin-right: 0.25rem;
}

.fs-12 {
  font-size: 12px;
}

.fs-13 {
  font-size: 13px;
}

.fs-14 {
  font-size: 14px;
}

.fs-25 {
  font-size: 25px;
}

/* Header */
header {
  background: #fff;
  padding: 15px 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo-area {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 20px;
}

.logo-icon {
  background-color: var(--yellow-primary);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 20px;
}

.login-btn {
  background-color: var(--green-primary);
  color: #fff;
  border: 1px solid var(--green-primary);
  padding: 6px 24px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 20px;
  transition: background-color 0.2s;
  /* 簡單的變色過渡 */
}

.login-btn:hover {
  background-color: var(--green-hover);
  border-color: var(--green-hover);
  color: #fff;
}

/* Content */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 35px 20px;
}

.hero-title {
  text-align: center;
  margin-bottom: 30px;
}

.hero-title h1 {
  color: var(--green-primary);
  font-size: 44px;
  margin-bottom: 5px;
  margin-top: 10px;
}

.hero-title p {
  color: var(--text-gray);
  font-size: 18px;
  margin: 0;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  margin-top: 35px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
}

.grid-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 35px;
}

@media (max-width: 1200px) {
  .grid-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-row {
    grid-template-columns: 1fr;
  }
}

/* --- 卡片核心樣式 --- */
.card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  position: relative;
  border-top: 6px solid var(--yellow-border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  min-height: 350px;
  transition: transform 0.2s;
  overflow: hidden;
  /* 確保圖片不超出圓角 */
  z-index: 1;
}

.card:hover {
  transform: translateY(-5px);
  background-color: #fef8e5;
}

/* --- 關鍵修改：強制內容浮在圖片上方 (z-index) --- */
.card-header,
.btn-group,
.feature-list,
.desc {
  position: relative;
  z-index: 2;
  /* 讓內容層級比圖片高，這樣就算圖片不透明也不會遮住文字 */
}

.card-header h3 {
  font-size: 26px;
  margin: 0 0 4px 0;
  color: var(--text-dark);
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.card-memo {
  font-size: 12px;
  color: #999;
  height: 14px;
}

.eng-title {
  display: block;
  font-size: 13px;
  color: #999;
  margin-bottom: 12px;
  font-weight: 500;
}

.desc {
  font-size: 15px;
  color: var(--text-dark);
  /*line-height: 1.5;
  margin-bottom: 20px;
  min-height: 45px;*/
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
}

.feature-item::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: var(--green-primary);
  margin-right: 6px;
  border-radius: 0 12px 0 0;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 70%;
  /* 限制寬度，讓右邊留給圖片 */
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 35px;
  padding: 0 16px;
  border-radius: 35px;
  text-decoration: none;
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  width: fit-content;
  min-width: 85px;
  transition: 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn i {
  margin-right: 8px;
}

.btn-green {
  background-color: var(--green-primary);
}

.btn-green:hover {
  background-color: var(--yellow-hover);
}

.btn-yellow {
  background-color: var(--yellow-primary);
  color: #333;
}

.btn-yellow:hover {
  background-color: #ffb300;
}

/* --- 插圖樣式 (完全參考設計圖 C 版) --- */
.illustration {
  position: absolute;
  bottom: 0;
  /* 緊貼底部 */
  right: 0;
  /* 緊貼右邊 */

  /* 依據設計圖比例，圖片約佔卡片 1/2 ~ 2/3 大小 */
  /* 300px 太大會填滿整張卡，220px 比較符合設計圖的「角落插圖」感 */
  width: 380px;
  height: 380px;

  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 0;

  opacity: 1;
  /* 【不透明】完全還原圖片原色 */
  z-index: 0;
  /* 【底層】放在最下面，被按鈕蓋住是正常的 */
}

.illustration img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Footer */
footer {
  background-color: var(--green-primary);
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 13px;
  margin-top: 60px;
  position: relative;
}

.copyright-link {
  position: absolute;
  right: 20px;
  bottom: 20px;
  cursor: pointer;
  font-weight: bold;
  opacity: 0.85;
  user-select: none;
  color: #fff;
}

.copyright-link:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 768px) {
  footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .copyright-link {
    position: static;
    display: inline-block;
    margin-top: 5px;
  }

  .footer-company,
  .footer-copy {
    display: block;
  }
}

.footer-company {
  margin-right: 8px;
}

/* --- Modal 通用樣式 --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 30px;
  width: 80%;
  max-width: 700px;
  border-radius: 15px;
  max-height: 80vh;
  overflow-y: auto;
  animation: fadeIn 0.3s;
  position: relative;
}

.close-btn {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 32px;
  cursor: pointer;
  color: #aaa;
}

.close-btn:hover {
  color: #000;
}

.modal-title {
  color: var(--green-primary);
  font-size: 24px;
  border-bottom: 2px solid var(--yellow-border);
  padding-bottom: 10px;
  text-align: center;
  margin-top: 0;
}

.modal-text {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  text-align: justify;
}

/* --- 平板下載視窗專用樣式 --- */
.tablet-modal-style {
  max-width: 450px;
  /* 視窗窄一點 */
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* 2欄：左右各一 */
  gap: 20px;
  margin-top: 25px;
}

.dl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 2px solid var(--green-primary);
  border-radius: 15px;
  text-decoration: none;
  color: var(--green-primary);
  transition: all 0.3s;
  background: #fff;
}

.dl-btn i {
  font-size: 48px;
  /* LOGO 大小 */
  margin-bottom: 10px;
}

.dl-btn span {
  font-size: 16px;
  font-weight: bold;
}

.dl-btn:hover {
  background-color: var(--green-primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}