body.home {
  position: relative;
}

body.home::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 590px;
  background: linear-gradient(180deg, #FFF 43.64%, rgba(255, 255, 255, 0.00) 100%);
  pointer-events: none;
  z-index: 1;
}

body.home .container-top-a {
  background: url("/images/template/container-top-a-bg.png") lightgray 50% / cover no-repeat;
  padding: 0 0 177px;
  position: relative;
  overflow: hidden;
}

body.home .container-top-a::before,
body.home .container-top-a::after {
  content: "";
  position: absolute;
  width: 394px;
  height: 310px;
  background: url("/images/template/container-top-a-bg-deco.png") center / cover no-repeat;
  z-index: 2;
  pointer-events: none;

}
body.home .container-top-a::before {
  left: calc(50% + 30px);
  top: 30px;
}
body.home .container-top-a::after {
  left: -179px;
  bottom: 134px;
}

/* 首頁 top-a 垂直堆疊（H1 + 模組依序排列） */
body.home .container-top-a > .grid-child {
  position: relative;
  z-index: 3;
  flex-direction: column;
  max-width: 1020px;
}

body.home .container-top-a > .grid-child > * {
  flex: 0 auto;
}

body.home .container-top-a > .grid-child > .site-h1-title {
  font-size: var(--htsprout-fs-56);
  font-weight: var(--htsprout-fw-bold);
  line-height: var(--htsprout-lh-150);
  color: var(--htsprout-green-800);
  text-align: center;
  margin: 2.5rem 0;
}

@media (max-width: 991.98px) {
  body.home .container-top-a {
    padding: 0 0 169px;
  }

  body.home .container-top-a::before {
    left: unset;
    bottom: unset;
    top: 0;
    right: -252px;
  }

  body.home .container-top-a > .grid-child > .site-h1-title {
    margin: 1.25rem 0 3.75rem;
  }
}

@media (max-width: 767.98px) {
  body.home .container-top-a {
    padding: 0 0 196px;
  }

  body.home::before {
    height: 450px;
  }

  body.home .container-top-a > .grid-child > .site-h1-title {
    font-size: var(--htsprout-fs-40);
    margin: 2.5rem 0 1.25rem;
  }
}

/* 首頁 top-a 卡片：對齊 Figma 設計稿（僅首頁） */
body.home .container-top-a .top-a.card {
  --card-border-width: 0;
  --card-border-radius: 12px;
  --card-box-shadow: 0px 4px 17px rgba(0, 0, 0, 0.15);
  --card-spacer-y: 42px;
  --card-spacer-x: 42px;
  --card-bg: var(--htsprout-text-50);
  box-shadow: var(--card-box-shadow);
}

/* 首頁 top-b「前言」區塊 */
body.home .container-top-b {
  position: relative;
  background-color: var(--htsprout-text-50);
}

body.home .container-top-b:before {
  position: absolute;
  content: "";
  width: 100%;
  height: 154px;
  background: url(/images/template/container-top-b-shape.svg) no-repeat;
  background-size: cover;
  transform: translateY(-100%);
}

@media (max-width: 991.98px) {
  body.home .container-top-b:before {
    height: 136px;
    background: url(/images/template/container-top-b-shape-tablet.svg) no-repeat;
    background-size: cover;
  }
}

@media (max-width: 767.98px) {
  body.home .container-top-b:before {
    height: 136px;
    width: 100%;
    background-size: 768px auto;
  }
}

body.home .container-top-b .grid-child{
  max-width: 1583px;
  padding: 0 40px 0 0;
  overflow: hidden;
}

body.home .container-top-b .top-b {
  display: grid;
  grid-template-columns: 390px 1fr;
  grid-template-rows: 92px 1fr;
  align-items: start;
  margin: 0;
  max-width: 1193px;
}

body.home .container-top-b .top-b h3 {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--htsprout-fs-40);
  font-weight: var(--htsprout-fw-bold);
  line-height: var(--htsprout-lh-150);
  color: var(--htsprout-green-500);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--htsprout-green-200);
  margin-bottom: 0;
}

@media (max-width: 991.98px) {
  body.home .container-top-b .grid-child{

  }
}

@media (max-width: 767.98px) {
  body.home .container-top-b .grid-child{
    padding: 0 40px;
  }
}

body.home .container-top-b .top-b .mod-custom {
  display: contents;
}

/* 裝飾圖：左側欄，跨所有行 */
body.home .container-top-b .top-b .mod-custom p:first-child {
  grid-column: 1;
  grid-row: 1 / 3;
  margin: 0;
}

body.home .container-top-b .top-b .mod-custom p:first-child img {
  width: 100%;
  height: auto;
  display: block;
}

/* 內文：右側欄第 2 行 */
body.home .container-top-b .top-b .mod-custom p:last-child {
  grid-column: 2;
  grid-row: 2;
  margin: 32px 0 0;
  font-size: var(--htsprout-fs-18);
  font-weight: var(--htsprout-fw-regular);
  line-height: var(--htsprout-lh-150);
  color: var(--htsprout-text-800);
  text-align: justify;
}

/* 平板版 */
@media (max-width: 991.98px) {
  body.home .container-top-b .top-b {
    grid-template-columns: 300px 1fr;
  }

  body.home .container-top-b .top-b h3 {
    grid-column: 1 / 3;
    margin-left: 40px;
  }

  body.home .container-top-b .top-b .mod-custom p:first-child {
    grid-column: 1;
    grid-row: auto;
    margin: 85px 0 0 -11px;
  }

  body.home .container-top-b .top-b .mod-custom p:last-child {
    grid-column: 2;
    grid-row: auto;
    letter-spacing: -1px;
  }
}

/* 手機版 */
@media (max-width: 767.98px) {
  body.home .container-top-b .top-b {
    grid-template-columns: 1fr;
  }

  body.home .container-top-b .top-b h3 {
    grid-column: 1;
    grid-row: 1;
    margin-left: 0;
  }

  body.home .container-top-b .top-b .mod-custom p:first-child {
    grid-column: 1;
    grid-row: 3;
    margin: 0;
    text-align: right;
  }

  body.home .container-top-b .top-b .mod-custom p:first-child img {
    width: calc(240 / 334 * 100%);
    max-width: 390px;
    display: inline-block;
    transform: translate(31.666%, -6px);
  }

  body.home .container-top-b .top-b .mod-custom p:last-child {
    grid-column: 1;
    grid-row: 2;
    letter-spacing: 0;
  }
}

/* 首頁「查看更多」按鈕覆寫 */
body.home .mod-articles-more {
  margin-top: 0;
}

/* ============================================
   首頁 top-c「最新消息」區塊
   ============================================ */

/* 區塊背景 */
body.home .container-top-c {
  background-color: var(--htsprout-blue-75);
  padding: 60px 0;
}

body.home .container-top-c .grid-child {
  padding: 0 20px;
}
body.home .container-top-c .top-c {
  margin: 0;
}

/* 標題 */
body.home .container-top-c .top-c > h3 {
  font-size: var(--htsprout-fs-40);
  font-weight: var(--htsprout-fw-bold);
  line-height: var(--htsprout-lh-150);
  color: var(--htsprout-green-500);
  text-align: center;
  margin: 0 0 36px;
  position: relative;
}

body.home .container-top-c .top-c > h3::after {
  content: '';
  display: block;
  width: 79px;
  height: 56px;
  background: url('/images/template/container-top-c-decoration.svg') no-repeat center / cover ;
  position: absolute;
  right: 40px;
  top: 5px;
}

@media (max-width: 991.98px) {
  body.home .container-top-c .top-c > h3::after {
    right: 62px;
  }
}

@media (max-width: 767.98px) {
  body.home .container-top-c .top-c > h3::after {
    right: 14.96px;
    top: -30px;
  }
}

/* 取消 container query，改用 media query 控制響應式 */
body.home .container-top-c .top-c {
  container-type: normal;
}

/* Grid 間距覆寫 + 桌面版 4 欄（取消 container query 後需明確指定） */
body.home .container-top-c .mod-articles-latest-news {
  --grid-layout-gap: 20px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
}

/* 卡片外觀 */
body.home .container-top-c .mod-articles-item {
  background: var(--htsprout-text-50);
  border-radius: 10px;
  padding: 20px;
  height: 266px;
  transition: box-shadow var(--htsprout-transition-base);
}

body.home .container-top-c .mod-articles-item:hover {
  box-shadow: 0px 4px 24px 0px rgba(121, 172, 207, 0.5);
}

/* 卡片內容 flex 容器 */
body.home .container-top-c .mod-articles-item-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

/* Tag 膠囊 */
body.home .container-top-c .mod-articles-tags .btn {
  background-color: var(--htsprout-blue-500);
  color: var(--htsprout-text-50);
  font-size: var(--htsprout-fs-14);
  font-weight: var(--htsprout-fw-regular);
  line-height: var(--htsprout-lh-150);
  border-radius: 35px;
  padding: 4px 12px;
  height: 30px;
  border: none;
}

/* 標籤連結關閉時，span.btn 非互動元素，取消觸控目標 min-height */
body.home .container-top-c .mod-articles-tags span.btn {
  min-height: auto;
  min-width: auto;
  cursor: default;
}

/* 內容區（標題+分隔線+日期）flex 容器 */
body.home .container-top-c .mod-articles-item-content > dl {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 標題 */
body.home .container-top-c .mod-articles-title {
  font-size: var(--htsprout-fs-20);
  font-weight: var(--htsprout-fw-medium);
  line-height: var(--htsprout-lh-150);
  flex: 1;
  margin: 0;
}

body.home .container-top-c .mod-articles-link {
  color: var(--htsprout-text-800);
  text-decoration: none;
}

body.home .container-top-c .mod-articles-link:hover {
  color: var(--htsprout-green-500);
}

/* 卡片模式：hover 卡片時標題變色 */
body.home .container-top-c .mod-articles-item--card .mod-articles-title {
  transition: color var(--htsprout-transition-base);
}

body.home .container-top-c .mod-articles-item--card:hover .mod-articles-title {
  color: var(--htsprout-green-500);
}

/* 分隔線（用 dl 的 border-top） */
body.home .container-top-c .mod-articles-item .list-unstyled {
  border-top: 1px solid var(--htsprout-green-200);
  padding-top: 16px;
  margin: 0;
}

/* 日期 */
body.home .container-top-c .mod-articles-date {
  font-size: var(--htsprout-fs-16);
  font-weight: var(--htsprout-fw-regular);
  line-height: var(--htsprout-lh-150);
  color: var(--htsprout-text-600);
  margin: 0;
}

/* 隱藏 dt.article-info-term */
body.home .container-top-c .article-info-term {
  display: none;
}

/* 卡片模式：stretched-link */
body.home .container-top-c .mod-articles-item--card {
  position: relative;
  cursor: pointer;
}

body.home .container-top-c .mod-articles-card-link {
  color: inherit;
  text-decoration: none;
}

body.home .container-top-c .mod-articles-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* 標籤在 stretched-link 之上可點擊 */
body.home .container-top-c .mod-articles-tags--above {
  position: relative;
  z-index: 2;
}

/* 響應式：平板以下（≤991.98px）單欄 */
@media (max-width: 991.98px) {
  body.home .container-top-c .mod-articles-latest-news {
    grid-template-columns: 1fr;
  }

  body.home .container-top-c .mod-articles-item {
    height: auto;
  }
}

/* 響應式：手機（≤767.98px） */
@media (max-width: 767.98px) {
  body.home .container-top-c .top-c > h3 {
    font-size: var(--htsprout-fs-32);
    margin-bottom: 24px;
  }
}

/* =============================================
   首頁 bottom-a「檔案下載」區塊
   ============================================= */

body.home .container-bottom-a {
  position: relative;
  padding: 87px 0 114px;
  overflow: hidden;
  background-color: var(--htsprout-text-50);
}

body.home .container-bottom-a::after {
  content: "";
  position: absolute;
  left: calc(50% - 1rem);
  bottom: 0;
  width: 892px;
  max-width: 100%;
  aspect-ratio: 892 / 464;
  background: url("/images/template/container-bottom-a-clip-art.png") no-repeat center / cover;
  pointer-events: none;
  z-index: 1;
}

@media(max-width: 991.98px) {
  body.home .container-bottom-a::after {
    width: calc(640 / 768 * 100%);
    min-width: 640px;
    left: calc(193 / 768 * 100%);
    position: relative;
    display: block;
  }
}

@media(max-width: 767.98px) {
  body.home .container-bottom-a::after {
    width: calc(380 / 414 * 100%);
    min-width: 380px;
    left: calc(72 / 414 * 100%);
  }
}

body.home .container-bottom-a .grid-child {
  max-width: 1328px;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

body.home .container-bottom-a .bottom-a {
  margin: 0;
}

/* 區塊標題 */
body.home .container-bottom-a h3 {
  font-size: var(--htsprout-fs-40);
  font-weight: var(--htsprout-fw-bold);
  line-height: var(--htsprout-lh-150);
  color: var(--htsprout-green-500);
  margin: 0 0 36px;
}

/* Grid 覆寫：桌面 3 欄、平板/手機 1 欄 */
body.home .container-bottom-a .mod-articles-file-download {
  --grid-layout-gap: 16px;
  row-gap: 20px;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: 980px;
}

@media (max-width: 991.98px) {
  body.home .container-bottom-a .mod-articles-file-download {
    grid-template-columns: 1fr;
    max-width: unset;
  }
}

/* 卡片外觀 */
body.home .container-bottom-a .mod-articles-item {
  background: var(--htsprout-blue-65);
  border: 5px solid var(--htsprout-text-50);
  border-radius: 10px;
  padding: 24px;
  padding-top: 32px;
  padding-bottom: 32px;
  height: 226px;
  transition: border-color 0.2s ease;
}

/* 卡片 hover */
body.home .container-bottom-a .mod-articles-item:hover {
  border-color: var(--htsprout-blue-100);
}

/* 卡片內容 flex 佈局 */
body.home .container-bottom-a .mod-articles-item-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

@media (max-width: 991.98px) {
  body.home .container-bottom-a .mod-articles-item-content {
    gap: 16px;
  }
}

/* 日期文字 */
body.home .container-bottom-a .mod-articles-date {
  font-size: var(--htsprout-fs-16);
  font-weight: var(--htsprout-fw-regular);
  color: var(--htsprout-text-600);
  margin-bottom: 0;
}

/* 日期 dl 容器 reset */
body.home .container-bottom-a .mod-articles-item .list-unstyled {
  margin: 0;
}

/* 標題文字 */
body.home .container-bottom-a .mod-articles-title {
  font-size: var(--htsprout-fs-20);
  font-weight: var(--htsprout-fw-medium);
  line-height: var(--htsprout-lh-150);
  color: var(--htsprout-text-800);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 下載按鈕：白底 pill */
body.home .container-bottom-a .mod-articles-download-btn {
  margin: 0;
  text-align: center;
}

body.home .container-bottom-a .mod-articles-download-btn .btn {
  background: var(--htsprout-text-50);
  color: var(--htsprout-green-500);
  border: none;
  border-radius: 80px;
  padding: 8px 20px;
  font-size: var(--htsprout-fs-16);
  font-weight: var(--htsprout-fw-medium);
  line-height: var(--htsprout-lh-150);
  display: inline-flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
}

body.home .container-bottom-a .mod-articles-download-btn .btn:hover,
body.home .container-bottom-a .mod-articles-download-btn .btn:focus {
  text-decoration: none;
}

/* 響應式：手機（≤767.98px） */
@media (max-width: 767.98px) {
  body.home .container-bottom-a h3 {
    font-size: var(--htsprout-fs-32);
    margin-bottom: 24px;
  }

  body.home .container-bottom-a .mod-articles-item {
    height: auto;
  }
}

/* =============================================
   mod_menu 格狀選單 (grid-links)
   ============================================= */

body.home .container-bottom-b {
  padding: 76px 0 174px;
  background-color: var(--htsprout-text-50);
}

@media (max-width: 991.98px) {
  body.home .container-bottom-b {
    padding: 70px 0 128px;
  }
}
@media (max-width: 767.98px) {
  body.home .container-bottom-b {
    padding: 50px 0 128px;
  }
}

body.home .container-bottom-b .bottom-b {
  margin: 0;
  padding: 0 20px;
}

body.home .container-bottom-b h3 {
  font-size: var(--htsprout-fs-40);
  font-weight: var(--htsprout-fw-bold);
  line-height: var(--htsprout-lh-150);
  color: var(--htsprout-green-500);
  margin: 0 0 36px;
}

.mod-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mod-menu-grid__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: var(--htsprout-text-50, #fff);
  border: 1px solid var(--htsprout-green-100, #def4ef);
  border-radius: 4px;
  box-shadow: 0px 9px 20px rgba(62, 112, 115, 0.1);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.mod-menu-grid__text {
  flex: 1;
  font-size: var(--htsprout-fs-16);
  font-weight: var(--htsprout-fw-semibold);
  line-height: 28px;
  color: var(--htsprout-text-800, #303949);
}

.mod-menu-grid__arrow {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: var(--htsprout-text-800, #303949);
}

/* Hover / Focus */
.mod-menu-grid__link:hover,
.mod-menu-grid__link:focus {
  border-color: var(--htsprout-green-200, #badad5);
  text-decoration: none;
}

.mod-menu-grid__link:hover .mod-menu-grid__text,
.mod-menu-grid__link:focus .mod-menu-grid__text {
  color: var(--htsprout-green-500, #135b71);
}

.mod-menu-grid__link:hover .mod-menu-grid__arrow,
.mod-menu-grid__link:focus .mod-menu-grid__arrow {
  fill: var(--htsprout-green-500, #135b71);
}

/* 響應式：平板/手機 1 欄 */
@media (max-width: 767.98px) {
  .mod-menu-grid {
    grid-template-columns: 1fr;
  }
}
