/* reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}


/* === Design Tokens ===
   全站色彩變數：藍 / 白 / 金的尊榮質感
   - brand-blue：品牌主深藍，標題與重點文字
   - bg-deep-blue：深場景背景（hero / 暗區）
   - gold-gradient：金色鑲邊、徽記、強調區塊用
   - text-dark / text-gray：主／次要文字色
   - card-bg：卡片底色（純白） */
:root {
  --brand-blue: #003AA3;
  --bg-deep-blue: #040B16;
  --gold-gradient: linear-gradient(135deg, #F8B500 0%, #FCEABB 50%, #F8B500 100%);
  --text-dark: #333333;
  --text-gray: #757575;
  --card-bg: #FFFFFF;
}

/* === 自訂書法字體：ChenYuluoyan 2.0 ===
   用於 .hero-title「學測金榜 / 會考金榜」大標 */
@font-face {
  font-family: 'ChenYuluoyan';
  src: url('../fonts/ChenYuluoyan2.0.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans TC', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #F8F9FB;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.btn-award-primary{
    border: 1px solid #FDE0A8;
    background: #ffe9be;
    box-shadow: 0 4px 0px 0px #F9D883;
    color: #001F59;
    font-weight: 500;
    transition: .3s;
}

.btn-award-primary:hover{
    border: 1px solid #F9D883;
    background: #F9D883;
    color: #001F59;
}

.btn-award-secondary{
    color: #001F59;
    border: 1px solid #F9D883;
    font-weight: 500;
    box-shadow: 0 4px 0px 0px #F9D883;
    transition: .3s;
}

.btn-award-secondary:hover{
    color: #001F59;
    background: #fff2d9;
    border: 1px solid #F9D883;
    font-weight: 500;
}


/* === Hero CTA Buttons === */
.btn-gradient,
.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background 0.25s ease, border-color 0.25s ease;
}

/* 主要 CTA：低調香檳金 */
.btn-gradient {
  background: linear-gradient(135deg, #BF953F 0%, #E7CB80 50%, #AA771C 100%);
  color: #040B16;
  border: none;
  box-shadow:
    0 4px 14px rgba(191, 149, 63, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-gradient:hover,
.btn-gradient:active,
.btn-gradient:focus {
  color: #040B16;
  background: linear-gradient(135deg, #BF953F 0%, #E7CB80 50%, #AA771C 100%);
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(191, 149, 63, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-gradient img {
  width: 18px;
  height: 18px;
}

/* 次要 CTA：Frosted Glass → Full White
   未 hover：白色霧面玻璃（淡白半透明 + 背後模糊）
   hover：全白底 + 黑字 + 黑色 icon，質感對比強烈 */
.btn-outline-white {
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background 0.25s ease, border-color 0.25s ease,
              color 0.25s ease;
}

.btn-outline-white:hover,
.btn-outline-white:active,
.btn-outline-white:focus {
  background: #ffffff;
  color: #040B16;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.btn-outline-white img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);   /* 預設：強制反白成白色 icon */
  transition: filter 0.25s ease;
}

/* hover 時 icon 強制變黑（brightness(0) 把所有顏色壓成 0 = 純黑）*/
.btn-outline-white:hover img,
.btn-outline-white:active img,
.btn-outline-white:focus img {
  filter: brightness(0);
}

/* === Header Navigation（固定 + 毛玻璃）===
   Hero banner 會延伸到頁面頂端、墊在 header 後方；header 需半透明毛玻璃才能透出底圖 */
html {
  scroll-padding-top: 80px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  padding: 5px 0 !important;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

/* 強制清掉 Bootstrap navbar 自帶的撐高 padding 與 min-height */
.header .navbar {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: auto !important;
}

/* Logo 限制最大高度，避免把 navbar 撐肥 — 桌機 40px / 手機 32px (見 @media) */
.navbar-brand .logo {
  max-height: 40px !important;
  height: auto;
  width: auto;
}

/* 漢堡按鈕：拿掉 Bootstrap 預設邊框與陰影，視覺更俐落 */
.navbar-toggler {
  padding: 4px 8px !important;
  font-size: 1rem !important;
  border: none !important;
  box-shadow: none !important;
}

/* 連結基底：未選中為深灰，hover 變品牌深藍，底部用 ::after 畫底線動畫 */
.navbar-nav .nav-link {
  position: relative;
  color: #4A5568;
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.6rem 0.4rem;
  margin: 0 0.75rem;
  background: none;
  border-radius: 0;
  transition: color 0.25s ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: #003AA3;
  transform: translateX(-50%);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.navbar-nav .nav-link:hover {
  color: #003AA3;
}

.navbar-nav .nav-link:hover::after {
  width: 30%;
}

/* Active：品牌深藍 + 粗底線（推翻舊的藍底白字 pill） */
.navbar-nav .nav-link.active {
  color: #003AA3;
  font-weight: 700;
  background: none;
  border-radius: 0;
}

.navbar-nav .nav-link.active::after {
  width: 70%;
}

/* === Hero Banner（高飽和主視覺，獎盃鎖在右下角）===
   min-height 750px：給足容器高度，cover 模式下背景圖上緣（星空）不會被過度裁切；
   獎盃 background-position: right bottom 鎖右下、不被裁切 */
.hero-banner {
  position: relative;
  min-height: 750px;
  margin-top: 55px !important;
  padding: 120px 1.5rem 100px;        /* top 60 → 120：把標題往下推 60px，遠離 header */
  color: #fff;
  background-color: #0A192F;
  background-image: url('../image/hero-bg-vibrant.jpg');
  background-size: cover;
  background-position: right bottom;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* === Hero 內容容器 ===
   桌機：強制靠左對齊，max-width 600px 限制文字佔比，右半邊讓給背景 3D 獎盃 / 書本
   平板/手機（≤991px）：在後段 RWD 區塊改為置中 + max-width 100% */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 1.25rem;
  max-width: 600px;          /* 文字區塊只佔畫面左半邊 */
  width: 100%;
  margin: 0;                 /* 不 auto-center；改用 margin-left 鎖左 */
  margin-left: clamp(1.5rem, 8vw, 9rem);
  padding-right: 1.5rem;
}

/* 上副標題：「升學王X榜單成果總覽」白字 + 精品字距 */
.hero-subtitle-top {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 2px;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* === 主標題 wrapper：左右桂冠 + 中央金字 === */
.title-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin: 0 0 12px;
  max-width: none;
}

.title-wreath {
  height: 100px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  /* 桂冠也吃一點金色光暈，與標題的光感呼應 */
  filter: drop-shadow(0 4px 8px rgba(230, 157, 0, 0.35));
}

/* 右側桂冠水平鏡像，與左側對稱 */
.wreath-right {
  transform: scaleX(-1);
}

/* === 主標題：圖層反轉法 ===
   解決 background-clip + text-shadow 在 WebKit 的渲染 bug — 陰影會吃掉漸層色。
   解法：
   - 基底 h1：透明文字 + 純 3D text-shadow（深香檳厚度 + 黑色長陰）
   - ::before（最上層 z-index: 10）：金箔貼紙，只負責香檳金漸層、絕對無陰影
   兩層分工明確，瀏覽器不會混淆。 */
.hero-title {
  position: relative;
  display: inline-block;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 5.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.05;
  margin: 0;
  white-space: nowrap;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  background: none !important;
  /* 5 段亮金 → 暖琥珀 漸進厚度 + 黑色長陰，搭配上層白金高光帶形成閃亮立體 3D 字 */
  text-shadow:
    0 1px 0 #E0A800,
    0 2px 0 #CC9500,
    0 3px 0 #B88300,
    0 4px 0 #A47000,
    0 5px 0 #8A5C00,
    0 10px 20px rgba(0, 0, 0, 0.55) !important;
}

/* ::before 是浮在最上層的香檳金箔貼紙
   z-index: 10 確保它在基底陰影之上覆蓋；只負責漸層、絕對無 text-shadow */
.hero-title::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  /* 注意：用 background-image 而非 background 縮寫 —
     background 縮寫會把 background-position 一起重置成 0% 0%，
     再配合 !important 會鎖死 keyframes 想動的 background-position，動畫就停了 */
  /* 90deg 水平方向 — 中段改成超亮白金高光帶，掃過文字時是「閃光反射」而非「暗影帶」 */
  background-image: linear-gradient(90deg,
    #E6A300 0%,
    #FFD93D 35%,
    #FFFBE6 50%,
    #FFD93D 65%,
    #E6A300 100%) !important;
  background-size: 200% auto !important;
  animation: gold-gradient-flow 6s ease-in-out infinite;
  -webkit-background-clip: text !important;
          background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
          color: transparent !important;
  text-shadow: none !important;
  pointer-events: none;
  user-select: none;
}

/* 下副標題：「努力成就榮耀，實力締造佳績！」香檳金 */
.hero-subtitle-main {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #FDE0A8;
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

/* 桌機：兩顆按鈕靠左水平排列；wrap 只有在 viewport 極窄才會作動 */
.hero-buttons {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  margin-top: 1.25rem;
}

.hero-buttons .btn {
  padding: 0.85rem 2.25rem;
}

/* === Hero 標語：書法體溫度感品牌標語 ===
   位於按鈕下方、右側獎盃左側，銜接視覺空白；強制使用 ChenYuluoyan 落雁書法體 */
.hero-slogan {
  font-family: 'ChenYuluoyan', sans-serif !important;
  font-weight: normal !important;
  color: #FFFFFF !important;
  font-size: 2.2rem;
  letter-spacing: 4px;
  opacity: 0.9;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  margin: 30px 0 0;
}

/* 桌機：稍微往右靠近獎盃，產生「橋接按鈕與獎盃」的流動感 */
@media (min-width: 992px) {
  .hero-slogan {
    margin-left: 20px;
  }
}

/* === Statistics（白卡 + 排版錯位，覆蓋 Hero 下緣）===
   padding-bottom 100px 預留底部空間，避免最下方卡片被 fixed 浮動 CTA 永遠蓋住 */
.statistics {
  position: relative;
  z-index: 10;
  margin-top: -120px;       /* 大幅往上浮動，強烈覆蓋 Hero 下緣、填補空白藍區 */
  padding-bottom: 40px;     /* 從 100 → 40，壓縮 stat-card → representatives 區段間距 */
}

/* === 滾動提示：在四大數據下方跳動，引導使用者往下捲動 === */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  width: -moz-fit-content;
  width: fit-content;
  padding: 6px 16px;
  color: var(--brand-blue);
  text-decoration: none;
  cursor: pointer;
  animation: scroll-hint-bounce 1.8s ease-in-out infinite;
  transition: opacity 0.25s ease;
}

.scroll-hint:hover {
  opacity: 0.75;
  color: var(--brand-blue);
}

.scroll-hint-text {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.scroll-hint-en {
  font-family: 'Noto Sans TC', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.scroll-hint-zh {
  font-size: 0.85rem;
  color: var(--text-gray);
}

/* CSS 雙線箭頭（純樣式不需 SVG）*/
.scroll-hint-arrow {
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

/* 上下跳動 — 1.8 秒一輪，提示意味但不過於搶眼 */
@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}

/* 手機版：略縮字級、間距更緊湊 */
@media (max-width: 767px) {
  .scroll-hint {
    margin-top: 24px;
  }
  .scroll-hint-en {
    font-size: 0.9rem;
  }
  .scroll-hint-zh {
    font-size: 0.78rem;
  }
  .scroll-hint-arrow {
    width: 10px;
    height: 10px;
  }
}

/* CSS Grid：桌機 4 欄 / 平板 2×2 / 手機 1 欄 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* 卡片：波浪紋理背景 + 白金細邊框 + 內發光 + 落地陰影，左圖右文
   :nth-child 切不同 background-position，四張卡片連成一卷無縫紋理 */
.stat-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
  background-color: #FFFDF5;                    /* 圖未載入時的後備色 */
  background-image: url('../image/stat-bg.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 230, 180, 0.4);   /* 白金細邊 */
  border-radius: 16px;
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.5),    /* 內發光：通透感 */
    0 10px 30px rgba(0, 0, 0, 0.08);            /* 外陰影：落地感 */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 四張卡片各取紋理不同段，視覺上像一卷連續展開的金沙波紋 */
.stat-card:nth-child(1) { background-position: 0%   center; }
.stat-card:nth-child(2) { background-position: 33%  center; }
.stat-card:nth-child(3) { background-position: 66%  center; }
.stat-card:nth-child(4) { background-position: 100% center; }

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.5),
    0 18px 40px rgba(0, 0, 0, 0.12);
}

/* 左：icon 圖片區，預留 64×64 */
.stat-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}

/* 右：數據區 */
.stat-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  gap: 0.2rem;
}

/* 大數字：品牌深藍 + 800 字重，配淺金沙底自然優雅 */
.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--brand-blue);
  margin: 0;
}

.stat-number span {
  font-size: 1rem;
  font-weight: 500;
  margin-left: 0.25rem;
  color: var(--brand-blue);
}

/* 小標題：深灰 + 白色光暈，壓在波浪紋理上仍清晰銳利 */
.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #3a3f4b;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1.4;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 1),
    0 0 8px rgba(255, 255, 255, 0.8);
}

/* Representatives Section */
.representatives {
  padding: 30px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

/* 區塊標題：沉穩深藍、加重字重與字距，呈現證書般的尊榮感
   保留 inline-flex 是因為其他區塊（會考金榜 / 學測金榜 / 涵蓋高中）仍會在 h2 內保留 .icon emoji */
.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--brand-blue);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title .icon {
  font-size: 2.5rem;
}

/* === 區塊標題 wrapper（古典金色裝飾左右對稱）===
   只用在 .representatives 區塊；其他區塊仍用 .section-header */
.section-title-wrapper {
  display: flex;
  justify-content: center;
  align-items: center !important;     /* 鎖死垂直中心對齊，放大後的框飾與文字齊平 */
  gap: 28px;                          /* 從 20px → 28px，配合放大的框飾留出呼吸 */
  margin-bottom: 20px;                /* 從 40 → 20，壓縮標題與下方卡片距離 */
}

.title-ornament {
  height: 55px !important;            /* 從 35px → 55px，與 2.2rem 標題份量相襯 */
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* 右側裝飾水平鏡像，與左側完美對稱 */
.ornament-right {
  transform: scaleX(-1);
}

.student-pennant-grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* === 尊榮代表跑馬燈（滿級分 / 5A++）===
   純 CSS 動畫驅動：overflow: hidden 鎖死、@keyframes carousel-scroll 自動推進、hover 暫停 */
.student-pennant-carousel {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  overflow: hidden !important;
  padding-top: 30px !important;
  padding-bottom: 40px !important;
  margin-bottom: 30px !important;
}

.carousel-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  width: -moz-max-content !important;
  width: max-content !important;
  position: relative !important;
  left: 0 !important;                   /* 強制起點歸零，初始位置鎖死最左 */
  top: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  /* will-change 提示 GPU 合成層；不能再設定 transform: translateZ(0) !important，
     否則 !important author 規則會在 cascade 中蓋掉 animation 的 transform 值，動畫會被凍結 */
  will-change: transform !important;
  backface-visibility: hidden !important;
  animation: carousel-scroll 60s linear infinite !important;
}

.carousel-track:hover {
  animation-play-state: paused;
}

/* 會考頁 48 張卡片較多，動畫拉長到 220s 讓單卡通過速度與學測一致 */
.student-pennant-carousel[data-pennant-set="index"] .carousel-track {
  animation-duration: 220s !important;
}

@keyframes carousel-scroll {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* === 尊榮代表卡片 (rep-card) — 橫向長方形獎狀 ===
   320×180+ 寬扁比例，可容納「新竹科學園區實驗高中」這種長校名；
   背景圖 card-bg.jpg 內含桂冠紋飾；左右 padding 拉大以避開底圖兩側裝飾 */
.rep-card {
  position: relative !important;
  z-index: 1;
  flex: 0 0 300px !important;      /* 強制 basis 300px、不縮不擴 — 完全鎖死寬度 */
  width: 300px !important;
  min-height: 160px !important;
  margin: 0 15px !important;       /* 固定左右間距，不再依賴 .carousel-track 的 gap */
  padding: 20px 35px;
  background-image: url('../image/card-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: padding-box;             /* 背景不溢出到 border 底下，根除邊緣鋸齒 */
  border: 1px solid #F8B500 !important;     /* 皇家學院風純金邊 */
  border-radius: 12px;
  /* 雙層陰影：深紅落地陰影 + 金色外光暈，紅綠金交織底圖才壓得住 */
  box-shadow:
    0 10px 25px rgba(100, 0, 0, 0.5),
    0 0 15px rgba(248, 181, 0, 0.2) !important;
  overflow: visible !important;             /* 必須 — 否則左上凸出的獎章會被裁掉一半 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  outline: 1px solid transparent;           /* WebKit 圓角抗鋸齒 hack */
  transform: translateZ(0);                 /* 啟用硬體加速合成層 */
  backface-visibility: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* hover 也保留 translateZ(0) — 否則 hover 一瞬間會被踢出合成層、邊緣閃回鋸齒 */
.rep-card:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 14px 32px rgba(163, 115, 75, 0.18);
}

/* 右下角立體獎章 — 放大版，凸出於卡片右下，強調榮耀感
   位置 / 大小四個控制：
     right  → 數字越大越往左移；負值代表凸出卡片外
     bottom → 數字越大越往上移；負值代表凸出卡片外
     width  → 控制獎章大小（高度 auto 等比縮放）
     filter drop-shadow → 落地陰影；offset / blur / 透明度都可調 */
.rep-badge {
  position: absolute;
  right: -2px;        /* ←往左移：把 -5 改 0、5、10、15... 數字越大越往卡片內側 */
  bottom: -20px;      /* ←往上移：把 -20 改 -10、0、10... 數字越大越往卡片內側 */
  width: 90px;        /* ←大小：60 / 75 / 90 / 110 等 */
  height: auto;
  z-index: 10;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

/* 左上角「滿分」金色傾斜印章浮水印 — 純 CSS，與背景桂冠重疊 */
.rep-card::after {
  content: '滿分';
  position: absolute;
  top: -5px;
  left: 10px;
  font-size: 3.5rem;
  font-weight: 900;
  color: #FFD700 !important;       /* 燦金 — 比 #F8B500 更亮黃，紅底上顯眼 */
  opacity: 0.2 !important;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.4) !important;
  transform: rotate(-15deg);
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

/* 姓名：深藍 + 800 字重；position: relative 讓 z-index 生效，壓在「滿分」印章之上 */
.rep-name {
  position: relative;
  z-index: 2;
  font-size: 1.6rem;
  font-weight: 800;
  color: #FFFFFF !important;        /* 純白姓名，配紅綠金底最高對比 */
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  /* 黑色底墊提升立體感 + 金色背光暈，在花俏背景上仍銳利如刻印 */
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(248, 181, 0, 0.5) !important;
}

/* 學校資訊：皇家學院風 — 香檳金字 + 黑陰影
   - 香檳金 #FDE0A8 與紅底 + 翡翠桂冠形成優雅對比
   - 黑色 1px 硬陰確保文字在花俏背景上銳利
   - background transparent：明確清掉舊版半透明白底
   - word-break / overflow-wrap：長校名安全換行 */
.rep-school,
.rep-highschool {
  position: relative;
  z-index: 2;
  font-size: 0.95rem;
  font-weight: 500;
  color: #FDE0A8 !important;
  background: transparent !important;
  padding: 0 !important;
  text-align: center;
  line-height: 1.4;
  margin: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.rep-highschool {
  font-weight: 600;                 /* 重點資訊字重加粗，但維持香檳金色系 */
  margin-top: 2px;
}

/* Honor Roll Section */
.honor-roll {
  padding: 30px 0;
}

/* 學年度 Tabs */
.year-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.year-tab {
  padding: 0.6rem 1.6rem;
  border: 1px solid #FDE0A8;
  background: #FEF5EC;
  color: #001F59;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.year-tab:hover {
  background: #ffe9be;
}

.year-tab.active {
  background: linear-gradient(to bottom, #F9D883, #E7AC47);
  border-color: #E7AC47;
  color: #001F59;
  box-shadow: 0 4px 0 0 #c98d2e;
}

/* 涵蓋高中 Section */
.covered-hs {
  padding: 40px 0 60px;
  background: #FEF8EE;
}

.covered-hs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.covered-hs-item {
  padding: 0.5rem 1.1rem;
  background: #fff;
  border: 1px solid #FDE0A8;
  border-radius: 999px;
  color: #001F59;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 2px 0 0 #F9D883;
}

.student-grid {
  margin-bottom: 3rem;
}

/* === 榜單卡片進場特效 — 淡入 + 微微上浮 + 微縮放，stagger 波浪式翻牌 === */
@keyframes honor-card-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* === 榜單卡片 — 翡翠獎章 + 紙紋背景 ===
   背景圖 card-bg-light.jpg 為淺米色紙質；padding-top 28px 為翡翠獎章預留空間；
   min-height 250px 鎖死最小高度（從 300 → 250，少 ~2 行空白），資料少的卡片仍視覺整齊但不再過度留白 */
.student-item {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 250px;
  background-image: url('../image/card-bg-light.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  padding: 28px 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* 進場特效：每張卡用 --card-delay (JS 注入) 做 stagger */
  animation: honor-card-enter 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  animation-delay: var(--card-delay, 0ms);
}

.student-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

/* 翡翠獎章：絕對定位、微凸出卡片左上角 */
.honor-badge {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 55px;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
  z-index: 3;
}

/* 姓名：深藍 + 800 字重 + 置中 */
.student-item-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-blue);
  text-align: center;
  margin: 0 0 12px;
}

/* 校名 / 系所列：置中 + 安全換行（防長校名爆版） — 字級比原本縮小 2px */
.student-item .card-row {
  font-size: 0.78rem;
  color: #5f6370;
  text-align: center;
  margin: 0 0 6px;
  line-height: 1.5;
  word-wrap: break-word;
  word-break: normal;
  overflow-wrap: break-word;
}

/* 錄取大學 + 系所：深翡翠綠 + 最多 2 行（超出截斷）— 不再吃掉 3 行高度 */
.student-item .card-admission {
  color: #0B6E4F;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
          line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 底部成績區：margin-top: auto 永遠貼底，虛線分隔 */
.student-item .card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
  text-align: center;
}

.student-item .card-footer .score {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--brand-blue);
}


/* Pagination */
.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-top: 3rem;
  text-align: center;
}

/* === 分頁器：精品圓形按鈕（純白 → 香檳金 active）=== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.pagination .page-item {
  list-style: none;
  margin: 0;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  border-radius: 8px !important;     /* 圓角正方矩形（取代之前 50% 圓形）*/
  background: #FFFFFF;
  color: #003AA3;
  border: 1px solid rgba(248, 181, 0, 0.3);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  text-decoration: none;
}

/* 消除 Bootstrap 預設的藍色 focus outline + shadow */
.pagination .page-link:focus,
.pagination .page-link:active {
  outline: none;
  box-shadow: none;
}

/* 圖示（左右箭頭）置中縮放 */
.pagination .page-link img {
  width: 14px;
  height: 14px;
  display: block;
}

/* hover：淡米底 + 金色邊 + 微浮起 */
.pagination .page-link:hover {
  background: #FEF8EE;
  color: #F8B500;
  border-color: #F8B500;
  transform: translateY(-2px);
}

/* Active：燙金漸層 + 金色光暈 */
.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #F8B500 0%, #FCEABB 50%, #F8B500 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(248, 181, 0, 0.4) !important;
  cursor: default;
  transform: none;
}

.pagination .page-item.active .page-link:hover {
  /* active 不需要 hover 變色 */
  transform: none;
}

/* Disabled：淡化、不可點 */
.pagination .page-item.disabled .page-link {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}

/* === 總筆數：品牌深藍 + 粗體 === */
.total-count {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-blue);
  margin: 20px 0 10px;
}

/* === 底部免責聲明：精緻型錄註腳 === */
.disclaimer {
  text-align: center;
  font-size: 0.85rem;
  color: #888DA1;
  letter-spacing: 1px;
  margin-top: 2rem;
}

/* CTA Section */
.cta-section {
  padding: 48px 0;
  /* background: linear-gradient(135deg, #003AA3 0%, #001F59 40%, #003AA3  120%); */
  color: #fff;
  background: url(../image/section-bg.png) center center no-repeat;
  background-size: cover;
}

.cta-content {
  padding: 2rem;
}

.cta-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 2rem;
  line-height: 1.3;
  background: linear-gradient(to bottom, #F5EDB4, #F2CA63);
  background: -webkit-linear-gradient(to bottom, #F5EDB4, #F2CA63);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.cta-features {
  list-style: none;
  padding: 0;
}

.cta-features li {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(to bottom, #F5EDB4, #F2CA63);
  color: #1e3a8a;
  border-radius: 50%;
  font-weight: 900;
  flex-shrink: 0;
}

/* Registration Form */
.registration-form {
  background-color: #fff;
  border-radius: 15px;
  padding: 1.5rem 2rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-header h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #001F59;
  margin-bottom: 0.5rem;
}

.trophy-emoji {
  font-size: 2rem;
}

.form-header p {
  font-size: 0.95rem;
  color: #888DA1;
}

.form-group {
  margin-bottom: 0.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #A36948 !important;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.form-info{
  font-size: 0.95rem;
  color: #888DA1;
}
.form-agree{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.required {
  color: #ef4444;
}

.radio-block:has(input[type="radio"]:checked) {
  background: linear-gradient(to bottom, #F9D883, #E7AC47);

}

.radio-block:has(input[type="radio"]:checked) label {
  color: #001F59 !important;
}

.radio-group {
  border: 1px solid #F9D883;
  background: #FEF5EC;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-left: 1rem;
  width: fit-content;
  overflow: clip;
}

.radio-group input[type="radio"] {
  display: none;
}

.radio-group label {
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
  text-wrap: nowrap;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700; 
}

.radio-block{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: auto;
  min-width: 0;

}

.form-control,
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #FDE0A8;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {

  outline: none;
  border-color: #F9D883;
  box-shadow: 0 0 5px rgba(163, 105, 72, 0.2) ;
}

/* === 發送驗證碼按鈕 — 配合上方「學生/家長」切換鈕的設計語言 ===
   未 hover：淡米底 + 金色邊（等同切換鈕的未選取狀態）
   Hover：燙金漸層（等同切換鈕的選取狀態）*/
.verify-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  font-size: 0.9rem;
  text-decoration: none !important;
  background: #FEF5EC;
  border: 1px solid #F9D883;
  height: 56px;
  padding: 8px 16px;
  white-space: nowrap;
  color: #001F59;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.verify-link:hover,
.verify-link:focus {
  background: linear-gradient(to bottom, #F9D883, #E7AC47);
  border-color: #E7AC47;
  color: #001F59;
  outline: none;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to bottom, #F9D883, #E7AC47);
  color: #001F59;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1.5rem;
}

.btn-submit:hover, 
.btn-submit:active {
  color: #001F59;
  background: linear-gradient(to bottom, #F9D883, #E7AC47);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(163, 105, 72, 0.2) ;
}

.terms{
  cursor: pointer;
  text-decoration: none;
  color:  #FA4F27;
}

  /* === 浮動 CTA：固定在螢幕正下方 ===
     z-index: 9999 鎖在最頂層，永遠浮在所有內容之上；
     底部白霧漸層讓按鈕有視覺基座，與內容之間不再生硬切斷；
     pointer-events: none 在容器、auto 在按鈕，避免大塊背景擋住下方內容 */
  /* === 浮動 CTA — 釘在右下角，不擋畫面內容 ===
     不再是全寬底部 bar；容器收成按鈕本體大小，沿著側邊欄位置漂浮 */
  .lp-fixed-block {
    position: fixed;
    right: 24px;
    bottom: 24px;
    left: auto;
    top: auto;
    width: auto;
    z-index: 9999;
    background: none;
    padding: 0;
    transition: opacity .4s ease, transform .4s ease;
  }

  /* 進入 cta-section 時往右下滑出消失 */
  .lp-fixed-block.is-hidden {
    opacity: 0;
    transform: translate(120%, 50%);
    pointer-events: none;
  }

  .lp-fixed-block a {
    display: inline-block;
    opacity: 1 !important;
    text-decoration: none;
    pointer-events: auto;
  }

  /* @keyframes gold-gradient-flow 已在主標題區塊定義，此處重用 */
  @keyframes gold-gradient-flow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  /* Pill 按鈕：精緻金色 + 反光帶動畫 + 立體浮起陰影 */
  .lp-fixed-block-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    height: 56px;
    padding: 0 30px;
    margin: 0;
    border: 1px solid #e7ac47;
    border-radius: 999px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.18em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 1 !important;

    background: linear-gradient(135deg,
      #8f5735 0%,
      #c47b32 25%,
      #f9d883 45%,
      #e7ac47 60%,
      #a36948 100%);
    background-size: 220% 220%;
    animation: gold-gradient-flow 6s ease-in-out infinite;

    box-shadow:
      0 12px 28px rgba(143, 87, 53, 0.45),
      0 4px 10px rgba(0, 0, 0, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .lp-fixed-block-btn:hover {
    transform: translateY(-2px);
    box-shadow:
      0 16px 32px rgba(143, 87, 53, 0.55),
      0 6px 14px rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }

  /* 手機版小一階，貼近右下、避開瀏覽器底部 UI */
  @media (max-width: 767px) {
    .lp-fixed-block {
      right: 16px;
      bottom: 16px;
    }
    .lp-fixed-block-btn {
      height: 48px;
      padding: 0 20px;
      font-size: 14px;
      letter-spacing: 0.12em;
    }
  }

/* Hero 標題與按鈕已使用 clamp() 自適應，1500/1200 不再需要 scale/translate */
@media (max-width: 1400px) {
  .student-pennant-grid{
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 1200px) {
  .student-pennant-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === 桌機放大：左側文案抗衡右側 3D 獎盃 ===
   只對 >= 992px 生效，手機保持原本能適應小螢幕的尺寸 */
@media (min-width: 992px) {
  /* 放鬆左側文字塊寬度，容納放大後的標題 + 桂冠 */
  .hero-content {
    max-width: 820px;
  }

  /* 上副標：放大 + 加寬字距 + 撐下方距離 */
  .hero-subtitle-top {
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 24px;
  }

  /* 主標題極大化（與右側獎盃量體匹配） */
  .hero-title {
    font-size: 7.5rem;
  }

  /* 桂冠等比放大 */
  .title-wreath {
    height: 130px;
  }

  /* 標題 wrapper 與下方副標的呼吸空間 */
  .title-wrapper {
    margin-bottom: 24px;
  }

  /* 主副標：放大 + 加陰影提高對比；margin-bottom 從 48 → 8 縮小與按鈕距離 */
  .hero-subtitle-main {
    font-size: 2.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 8px;
  }

  /* CTA 按鈕：等比放大、間距加大、膠囊圓角 */
  .hero-buttons {
    gap: 24px;
  }

  .hero-buttons .btn {
    padding: 18px 48px;
    font-size: 1.3rem;
    border-radius: 50px;
  }

  /* === 桌機數據卡片極大化 === */
  .stat-card {
    padding: 32px 24px;
    gap: 1.25rem;
  }

  .stat-card .stat-icon,
  .stat-card img {
    width: 75px;
    height: auto;
    margin-right: 4px;
  }

  .stat-card .stat-number {
    font-size: 3rem;
    line-height: 1.05;
  }

  .stat-card .stat-number span {
    font-size: 1.25rem;
  }

  .stat-card .stat-label {
    font-size: 1.1rem;
  }
}

/* Responsive Design */
/* 平板以下 (992px 以下) */
@media (max-width: 991px) {

  /* 漢堡選單展開時也維持毛玻璃質感 */
  .header .container-fluid{
    border-radius: 0 0 16px 16px;
  }

  /* 手機 Logo 再瘦一階 */
  .navbar-brand .logo {
    max-height: 32px !important;
  }

  /* 手機版 navbar 內元素垂直置中（Logo + 漢堡按鈕） */
  .header .navbar {
    align-items: center;
  }

  /* === 手機下拉選單容器：懸浮毛玻璃 + 不擠下方內容 === */
  .navbar-collapse {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.96) !important;
    -webkit-backdrop-filter: blur(15px) !important;
            backdrop-filter: blur(15px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0 0 16px 16px !important;
    padding: 8px 0 16px !important;
  }

  /* === 清掉桌機繼承的底線 + 偽元素，重塑手機版選單質感 === */
  .navbar-nav .nav-link,
  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link.active {
    border-bottom: none !important;
  }

  .navbar-nav .nav-link::after,
  .navbar-nav .nav-link:hover::after,
  .navbar-nav .nav-link.active::after {
    display: none !important;
  }

  /* === App 級的點擊範圍與排版 === */
  .navbar-nav .nav-link {
    padding: 12px 20px !important;
    margin: 4px 16px !important;
    border-radius: 8px !important;
    text-align: left !important;
    transition: background 0.2s ease, color 0.2s ease;
  }

  /* Hover：淡藍色背景提示 */
  .navbar-nav .nav-link:hover {
    color: #003AA3 !important;
    background: rgba(0, 58, 163, 0.03) !important;
  }

  /* Active：深色背景 + 左側品牌色邊條（App 側欄典型寫法）*/
  .navbar-nav .nav-link.active {
    color: #003AA3 !important;
    font-weight: 800 !important;
    background: rgba(0, 58, 163, 0.06) !important;
    border-left: 4px solid #003AA3 !important;
    border-radius: 0 8px 8px 0 !important;
  }

  /* Hero：手機版上下分離 — 文字鎖在上半部、獎盃沉到底部
     85% bottom 讓獎盃中心點略偏出畫面右側，左半邊保留乾淨的桂冠 + 星空 */
  .hero-banner {
    min-height: 65vh !important;     /* 65vh：首屏壓縮，四大數據卡進入第一螢幕 */
    padding-top: 90px !important;    /* 90 仍大於 header 50，文字穩穩落在 navbar 下方 */
    padding-bottom: 80px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    background-size: cover !important;
    background-position: 72% bottom !important;
  }

  /* Hero：≤991px 文字與按鈕全部置中、釋放 max-width 限制、推到上半部 */
  .hero-content {
    align-items: center;
    text-align: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    justify-content: flex-start !important;       /* 文字鎖在 padding-top 下方，不再 center */
  }

  /* 桂冠 + 標題的 wrapper 在平板以下置中
     align-items: center 確保放大後的桂冠完美對齊 3D 文字的垂直中央
     加一道深藍色環境光暈，避免標題被背景星芒 / 桂冠光暈吃掉對比 */
  .title-wrapper {
    justify-content: center;
    align-items: center !important;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 80, 0.4)) !important;
  }

  .hero-title {
    font-size: 4rem !important;
    letter-spacing: 0.03em;
  }

  /* 桂冠大幅放大，撐起主標題氣勢，與 3D 文字量體匹配 */
  .title-wreath {
    height: 100px !important;
  }

  .hero-buttons {
    justify-content: center;
  }

  /* 手機版標語：縮字級 + 取消桌機的 margin-left 偏移 + 置中 */
  .hero-slogan {
    font-size: 1.6rem;
    letter-spacing: 2px;
    margin-left: 0 !important;
    text-align: center;
  }

  /* Statistics：tablet 改 2×2 */
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta-subtitle {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .student-pennant-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 手機版 (768px 以下) */
@media (max-width: 767px) {

  .navbar {
    padding: 0.75rem 1rem;
  }

  /* 手機版裝飾縮小，避免把標題擠到換行 */
  .section-title-wrapper {
    gap: 16px;
    align-items: center !important;
  }

  .title-ornament {
    height: 45px !important;
  }

  /* 手機版桂冠縮一級防爆版 */
  .title-wreath {
    height: 50px;
  }

  .title-wrapper {
    gap: 10px;
  }

  /* Hero：手機高度縮短、padding 收緊 */
  .hero-banner {
    min-height: 560px;
    padding: 40px 1rem 80px;
  }

  .hero-content {
    gap: 1rem;
  }

  /* 按鈕：完美置中 + 上下排列 + 全寬好點擊 */
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  /* Statistics：覆蓋幅度縮小 */
  /* 手機版四大數據卡片深度上浮，貼進 Hero 下緣，首屏即可見
     padding-bottom 改為 20，消除卡片下方無效空白 */
  .statistics {
    position: relative !important;
    z-index: 10 !important;
    margin-top: -100px !important;
    padding-bottom: 20px !important;
  }

  /* === 手機版 2×2 數據卡片（橫向排列：左 Icon / 右文字 同桌機）=== */
  .stat-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 12px;
  }

  /* 卡片橫向排列，緊湊不佔太多垂直空間 */
  .stat-card {
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: left !important;
    padding: 14px 12px !important;
    min-height: 88px !important;
    border-radius: 16px !important;
    gap: 10px !important;
  }

  /* Icon 左側、固定不縮 */
  .stat-card .stat-icon,
  .stat-card img {
    width: 48px !important;
    height: auto !important;
    margin: 0 !important;
    flex-shrink: 0;
  }

  /* 文字容器靠左、清掉先前居中設定 */
  .stat-card .stat-content {
    align-items: flex-start !important;
    text-align: left !important;
    margin-left: 0 !important;
    min-width: 0;
  }

  /* 大數字 + 白色微發光（橫向窄空間下 1.6rem 剛好）*/
  .stat-card .stat-number {
    font-size: 1.6rem !important;
    line-height: 1.1 !important;
    margin-bottom: 2px !important;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
  }

  /* 小標題：允許自然換行，避免長字串擠爆卡片 */
  .stat-card .stat-label {
    font-size: 0.78rem !important;
    white-space: normal !important;
    transform: none;
    line-height: 1.3 !important;
  }
  
  /* 手機版區段間距大幅壓縮，消除超過 40px 的無效空白 */
  .representatives,
  .honor-roll {
    padding: 20px 0 !important;
  }

  .cta-section {
    padding: 40px 0;
  }

  /* 手機版標題 wrapper 緊貼上方區段與下方卡片 */
  .section-title-wrapper {
    margin-top: 10px !important;
    margin-bottom: 15px !important;
  }

  /* 手機版 Scroll 提示元件貼緊上下兩段 */
  .scroll-hint {
    margin-top: 15px !important;
    margin-bottom: 10px !important;
    padding: 0 !important;
  }

  /* 手機版跑馬燈：保留上下安全區，凸出獎章與陰影才不會被切 */
  .student-pennant-carousel {
    padding-top: 20px !important;
    padding-bottom: 40px !important;
    margin-bottom: 20px !important;
  }

  /* === 手機版主榜單：強制 4 欄微縮排版（4 x 5 = 20 張/頁）=== */
  .student-pennant-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
    padding: 0 4px !important;
  }

  /* 卡片本身：極窄內距 + 小圓角 + 解除最小高度 */
  .student-item {
    padding: 12px 2px 6px !important;
    border-radius: 6px !important;
    min-height: auto !important;
  }

  /* 翡翠獎章：縮小才不會擋整張卡 */
  .honor-badge {
    width: 22px !important;
    top: -6px !important;
    left: -6px !important;
  }

  /* 姓名：微縮但仍要看得到 */
  .student-item-name {
    font-size: 0.65rem !important;
    margin-bottom: 4px !important;
    letter-spacing: 0 !important;
  }

  /* 校名 / 系所列：米粒字級 + 允許中英文逐字斷行 */
  .student-item .card-row,
  .student-item .card-admission {
    font-size: 0.45rem !important;
    line-height: 1.1 !important;
    margin-bottom: 2px !important;
    word-break: break-all !important;
  }

  /* 分數：略大於資料列 */
  .student-item .card-footer .score {
    font-size: 0.6rem !important;
  }

  /* 底部分數區：上方間距收緊 */
  .student-item .card-footer {
    padding-top: 4px !important;
    margin-top: 4px !important;
  }

  .section-title {
    font-size: 1.5rem;
  }
  
  .cta-title {
    font-size: 1.5rem;
  }
  
  .cta-subtitle {
    font-size: 1.75rem;
  }
  
  .cta-features li {
    font-size: 1rem;
  }
  
  .registration-form {
    padding: 1.5rem;
  }
  
  .form-header h3 {
    font-size: 1.5rem;
  }
}

/* 小手機版 (576px 以下) */
@media (max-width: 575px) {

  .hero-banner {
    min-height: 520px;
    padding: 30px 1rem 60px;
  }

  /* Hero 字級再縮一階，避免窄機台擠版 */
  .hero-subtitle-top {
    font-size: 1rem;
    letter-spacing: 1.5px;
  }

  .hero-title {
    font-size: 3.5rem !important;
  }

  /* 小手機桂冠調整，避免文字過大往下擠到獎盃 */
  .title-wreath {
    height: 70px !important;
  }

  .hero-subtitle-main {
    font-size: 1.4rem;
  }

  /* CTA：直向全寬、好點擊 */
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: none;
    gap: 16px;
    padding: 0 20px;
    margin-top: 1rem;
  }

  .hero-buttons a.btn,
  .hero-buttons .btn {
    width: 100%;
  }

  /* Statistics：小手機沿用 767 區塊 !important 設定（margin-top -100 / padding-bottom 80）
     此區塊不再覆寫，保持卡片深度上浮 + 底部緩衝 */


  .student-item {
    padding: 1rem;
  }

  .student-item .name {
    font-size: 1rem;
  }

  .student-item .score {
    font-size: 1.5rem;
  }
  
  .cta-subtitle {
    font-size: 1.5rem;
  }

  .student-pennant-grid{
    grid-template-columns: repeat(1, 1fr);
  }
}
