* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Arial", sans-serif;
  background-image: url("page-background.png");
  background-size: cover;          /* 圖片覆蓋整個畫面 */
  background-repeat: no-repeat;    /* 不重複 */
  background-attachment: fixed;    /* 背景固定不跟著滾動 */
  background-position: center top; /* 從中上方對齊開始 */
}

.header-banner.sticky-header {
  position: sticky;
  top: 0;
  z-index: 999;
  height: 320px;
  background-image: url('header-background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 60px;
}

.logo-top-left {
  position: absolute;
  top: 20px;
  left: 20px;
  height: calc(100% / 6);   /* 高度為 banner 的 1/6 */
  width: auto;              /* ⭐ 讓寬度自動以保持比例 */
  aspect-ratio: auto;       /* ⭐ 保留比例（部分瀏覽器自動處理） */
  object-fit: contain;      /* ⭐ 保證圖片不被拉扯 */
  min-height: 40px;         /* ⭐ 設定最小高度避免太小 */
  max-height: 60px;         /* ⭐ 設定最大高度避免太大 */
  z-index: 10;
}

.etf-center-logo {
  position: absolute;
  top: 10%; /* ⭐️ 讓它距離 banner 頂部 20% */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;            /* 確保可以置中 */
  z-index: 10;
}

.etf-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.etf-logo {
  max-height: 160px;
  width: auto;
}

.banner-title {
  margin-top: 12px;
  font-size: 24px;
  text-align: center;
  color: white;
  line-height: 1.4;
  font-weight: bold;
}

.nav-container {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 25px;
  height: 4px;
  background-color: white;
  margin: 6px 0;
  transition: 0.3s;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transform-origin: center;
  position: relative;
}

.nav-toggle .x-symbol {
  display: none;
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  line-height: 1;
}

.nav-toggle.active .hamburger {
  display: none;
}

.nav-toggle.active .x-symbol {
  display: block;
}

.container {
  max-width:100%;
  width: 100%;
  margin: 0 auto;
  padding: 5%;
}

.section {
  max-width: 100%;
  scroll-margin-top: 320px; /* 避免被 header 擋住 */  
  background: white;
  padding: 40px;
  margin: 40px auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(89, 178, 255, 0.4);
}

.section:first-of-type {
  margin-top: 0;
}

.small-section {
  padding: 20px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.gradient-button {
  background: linear-gradient(to right, #80F1F5, #59B2FF);
  color: white;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 20px;
  text-align: center;
  margin-bottom: 20px;
}

@media (min-width: 805px) {
.button-group {
  position: absolute;
  bottom: -30px; /* 向下延伸出 banner */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  z-index: 1000;
}

.nav-btn {
  display: inline-flex;         /* 讓 button 寬度自適應文字 */
  justify-content: center;
  align-items: center;
  padding: 10px 20px;           /* 上下10px，左右24px（可調整） */

  font-size: 20px;
  font-family: "Noto Sans TC", "Arial", sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;

  background-color: white;
  color: #55AEFF;

  border: 2px solid #55AEFF;
  border-radius: 999px;         /* 圓角膠囊 */
  white-space: nowrap;          /* 不允許換行 */
  text-decoration: none;
  transition: all 0.3s ease;

  margin: 0 4px;                /* 按鈕間距（可選） */
}

.nav-btn:hover,
.nav-btn.active {
  background-color: #55AEFF;
  color: white;
}

.poster-section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap; 
  width: 100%;
  gap: 2px;
  padding: 10px 0px;
}

.poster-section img {
  width: 90%;
  max-width: 90%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s;
  display: block;
  margin: 0 auto;
}

}

  /* Add overlay background */
  .button-group::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .button-group.active::before {
    opacity: 1;
    visibility: visible;
  }


.sponsor-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  align-items: center;
  gap: 5px;  /* 控制圖形間距 */
  margin-top: 20px;
  padding: 10px 0;
}

.sponsor-logos img {
  max-height: 90px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s;
  padding: 4px 8px; /* 每張圖片四周留白 */
}

.sponsor-logos img:hover {
  transform: scale(1.05);
}

@media (max-width: 805px) {
.button-group {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;             /* 單欄直排 */
  justify-content: flex-start;
  align-items: center;           /* ✅ 將 button 對齊置中 */

  gap: 2px;                     /* ✅ 按鈕間距更明顯（6~10px均可） */
  padding: 16px 12px;

  position: fixed;
  top: 70px;
  right: 10px;
  left: auto;
  transform: none;
  width: auto;                   /* ✅ 容器寬度改為自適應 */
  max-width: 90vw;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 800;
}

.button-group.active {
    opacity: 1;
    visibility: visible;
  }

.nav-toggle {
    display: block !important;
    position: fixed;
    top: 20px;
    right: 20px;
    transform: none;
    z-index: 1002;
    background-color: rgba(85, 174, 255, 0.9);
    border-radius: 5px;
    padding: 15px;
    overflow: visible;
    min-width: 50px;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

.nav-btn {
 display: inline-flex;             /* ✅ 貼近文字 */
  justify-content: center;
  align-items: center;
  text-align: center;

  font-size: 18px;
  padding: 10px 18px;
  white-space: nowrap;             /* ✅ 不換行 */
  
  border-radius: 999px;
  background-color: white;
  color: #55AEFF;
  border: 2px solid #55AEFF;
  transition: all 0.3s ease;
  text-decoration: none;
  margin: 4px 3px;                 /* ✅ 加一點上下/左右間距 */
  }


.poster-section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;         /* 小螢幕可換行 */
  width: 100%;
  gap: 2px;
  padding: 10px 0px;
}

.poster-section img {
  width: 90%;
  max-width: 90%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s;
  display: block;
  margin: 0 auto;
}

}

/* JS 動態切換小螢幕樣式 */
body.force-mobile-menu .nav-toggle {
  display: flex !important;
}
body.force-mobile-menu .button-group {
  position: fixed !important;
  top: 70px !important;
  right: 10px !important;
  left: auto !important;
  flex-direction: column !important;
  width: 90vw !important;
  max-width: 280px !important;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  padding: 16px 12px;
  z-index: 1003;
}
body.force-mobile-menu .button-group.active {
  opacity: 1;
  visibility: visible;
}


.icontext {
	margin-top: 10px;
	margin-bottom: 10px;
	font-size: 16px;
}
.icontext div {
	display: inline-block;
	vertical-align: middle;
	font-weight: bold;
}
.icontext img {
	width: 25px;
	vertical-align: middle;
	margin-right: 5px;
}
.icontext th {
	vertical-align: top;
}
.icontext td {
	vertical-align: middle;
}
.icontext span {
	vertical-align: middle;
	margin-left: -8px;
}
.icontext-btn {
    width: 100%;
}
.icontext-btn .btn {
	display: inline-block;
}
.icontext-btn td {
	vertical-align: middle;
	text-align: center;
}
.mb-25 {
	margin-bottom: 25px;
}
.mt-15 {
	margin-top: 15px;
}
.mt-25 {
	margin-top: 25px;
}
