/***********************/
/***** 全站字體 Start *****/
/***********************/

/* 英文字體統一使用 Gentium Book Plus（https://fonts.google.com/specimen/Gentium+Book+Plus），
   中日韓文字體依當前語系載入其中一套思源宋體（繁中 Noto Serif TC、簡中 Noto Serif SC、
   日文 Noto Serif JP、韓文 Noto Serif KR，見 config/locale.php 的 font），
   字體堆疊四個名稱一併列出，實際只會用到當頁載入的那一套；四套皆帶 size-adjust: 87.5%，
   兩者的字型檔皆已下載至本地 /backend/plugins/，不連外、離線亦可正常顯示。
   Gentium Book Plus 只涵蓋 latin 與 latin-ext，中文字元會自動落到後方的思源宋體；
   思源宋體（字體名稱為 Noto Serif TC）排在 Georgia 與 Times New Roman 之後、
   -apple-system 之前，這樣英文由 Gentium 呈現，中文才不會被 macOS 系統字體搶先接手。 */
body {
  font-family: "Gentium Book Plus", Georgia, "Times New Roman", "Noto Serif TC", "Noto Serif SC", "Noto Serif JP", "Noto Serif KR", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "PingFang TC", serif;
}

/***********************/
/***** 全站字體 End *****/
/***********************/

/***********************/
/***** 全站色系 Start *****/
/***********************/

/* 全站前台主色為深藍色系，與教學文章頁（article.css 的 --article-primary）同一套色票。
   新增樣式請一律引用以下變數，不要另外寫死色碼。 */
:root {
  --site-primary: #002a80;
  /* 主色（深藍） */
  --site-primary-dark: #001f61;
  /* 主色加深：hover／按下狀態 */
  --site-primary-light: #244fb0;
  /* 主色提亮：漸層與強調 */
  --site-primary-accent: #4a72c9;
  /* 淺藍強調：漸層末端、細線 */
  --site-primary-soft: #e6ecf9;
  /* 淡藍底：hover 背景、標籤底色 */
  --site-primary-soft-2: #f3f6fc;
  /* 更淡的藍底：區塊底色 */
  --site-primary-line: #cfdaf0;
  /* 淡藍邊框 */
  --site-primary-rgb: 0, 42, 128;
  /* 主色 RGB：供 rgba() 調整透明度用 */
}

/* Bootstrap 主色（primary）改為深藍色系，讓 .btn-primary、.text-primary、表單 focus
   等內建元件不再出現預設藍色。僅前台載入 style.css，不影響後台。 */
:root {
  --bs-primary: var(--site-primary);
  --bs-primary-rgb: var(--site-primary-rgb);
  --bs-link-color: var(--site-primary);
  --bs-link-color-rgb: var(--site-primary-rgb);
  --bs-link-hover-color: var(--site-primary-dark);
  --bs-link-hover-color-rgb: 0, 31, 97;
  --bs-focus-ring-color: rgba(var(--site-primary-rgb), 0.25);

  /* Swiper 主題色（輪播圓點、箭頭的預設色） */
  --swiper-theme-color: var(--site-primary);
  --swiper-pagination-color: var(--site-primary);
  --swiper-navigation-color: var(--site-primary);
}

.btn-primary {
  --bs-btn-bg: var(--site-primary);
  --bs-btn-border-color: var(--site-primary);
  --bs-btn-hover-bg: var(--site-primary-dark);
  --bs-btn-hover-border-color: var(--site-primary-dark);
  --bs-btn-active-bg: var(--site-primary-dark);
  --bs-btn-active-border-color: var(--site-primary-dark);
  --bs-btn-disabled-bg: var(--site-primary);
  --bs-btn-disabled-border-color: var(--site-primary);
  --bs-btn-focus-shadow-rgb: var(--site-primary-rgb);
}

.btn-outline-primary {
  --bs-btn-color: var(--site-primary);
  --bs-btn-border-color: var(--site-primary);
  --bs-btn-hover-bg: var(--site-primary);
  --bs-btn-hover-border-color: var(--site-primary);
  --bs-btn-active-bg: var(--site-primary);
  --bs-btn-active-border-color: var(--site-primary);
  --bs-btn-disabled-color: var(--site-primary);
  --bs-btn-disabled-border-color: var(--site-primary);
  --bs-btn-focus-shadow-rgb: var(--site-primary-rgb);
}

.btn-link {
  --bs-btn-color: var(--site-primary);
  --bs-btn-hover-color: var(--site-primary-dark);
  --bs-btn-active-color: var(--site-primary-dark);
}

/* 表單聚焦：外框與光暈改為深藍色 */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--site-primary-light);
  box-shadow: 0 0 0 0.2rem rgba(var(--site-primary-rgb), 0.18);
}

.form-check-input:checked {
  background-color: var(--site-primary);
  border-color: var(--site-primary);
}

/* 分頁、清單群組與進度條 */
.pagination {
  --bs-pagination-color: var(--site-primary);
  --bs-pagination-hover-color: var(--site-primary-dark);
  --bs-pagination-hover-bg: var(--site-primary-soft);
  --bs-pagination-hover-border-color: var(--site-primary-line);
  --bs-pagination-focus-color: var(--site-primary-dark);
  --bs-pagination-focus-bg: var(--site-primary-soft);
  --bs-pagination-focus-box-shadow: 0 0 0 0.2rem rgba(var(--site-primary-rgb), 0.18);
  --bs-pagination-active-bg: var(--site-primary);
  --bs-pagination-active-border-color: var(--site-primary);
  --bs-pagination-border-radius: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

/* 頁碼各自為獨立的方形按鈕，由左至右排列、排滿自動換行 */
.pagination .page-link {
  margin-left: 0;
  min-width: 40px;
  padding: 0.375rem 0.5rem;
  text-align: center;
}

/* 四個角一律圓角：Bootstrap 只給第一顆左兩角、最後一顆右兩角（相連的樣式），
   本站的頁碼是各自獨立的按鈕，故以同等特異性的選擇器一併覆寫 */
.pagination .page-item .page-link,
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
  border-radius: 6px;
}

/* 上一頁／下一頁為文字按鈕，寬度依內容 */
.pagination .page-link-step {
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

@media (max-width: 575.98px) {
  .pagination {
    --bs-pagination-font-size: 0.9rem;
    gap: 4px;
  }

  .pagination .page-link {
    min-width: 34px;
    padding: 0.3rem 0.4rem;
  }

  .pagination .page-link-step {
    padding-right: 0.6rem;
    padding-left: 0.6rem;
  }
}

.list-group {
  --bs-list-group-active-bg: var(--site-primary);
  --bs-list-group-active-border-color: var(--site-primary);
  --bs-list-group-action-hover-bg: var(--site-primary-soft);
}

.progress {
  --bs-progress-bar-bg: var(--site-primary);
}

.nav-pills {
  --bs-nav-pills-link-active-bg: var(--site-primary);
}

.accordion {
  --bs-accordion-active-color: var(--site-primary);
  --bs-accordion-active-bg: var(--site-primary-soft);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(var(--site-primary-rgb), 0.18);
}

/* SweetAlert2 確認鈕（未指定 confirmButtonColor 時的預設色） */
.swal2-styled.swal2-confirm {
  background-color: var(--site-primary);
}

/***********************/
/***** 全站色系 End *****/
/***********************/

/***********************/
/***** Google 廣告 Start *****/
/***********************/

/* 前台各頁共用的廣告區塊（resources/views/front/ad.blade.php），只在正式站輸出 */
.site-ad {
  min-width: 0;
  overflow: hidden;
}

/* 真正的廣告：載入前與沒有廣告可放時都不留空白
   partial 的腳本依 AdSense 寫在 <ins> 的 data-ad-status 加上 is-filled／is-unfilled，
   各頁的間距一律只寫給 .is-filled（與佔位的 .site-ad-preview），未填入時外層高度為 0 */
.site-ad-live {
  margin: 0;
}

.site-ad-live.is-unfilled {
  display: none;
}

/* 非正式站的灰色佔位區塊（.env 的 AD_PREVIEW=true 時輸出，正式站不會出現） */
.site-ad-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  padding: 20px;
  border: 1px dashed #b8bfcb;
  border-radius: 10px;
  background: #e9ecf1;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

.site-ad-preview i {
  font-size: 22px;
}

/***********************/
/***** Google 廣告 End *****/
/***********************/

/***********************/
/***** 版面寬度 Start *****/
/***********************/

/* 全站前台版面最大寬度統一為 1400px（覆寫 Bootstrap .container 的 1320px 上限） */
@media (min-width: 1200px) {

  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    max-width: 1400px;
  }
}

/***********************/
/***** 版面寬度 End *****/
/***********************/

/***********************/
/***** 直角樣式 Start *****/
/***********************/

/* 全站不使用圓角，Bootstrap 元件（按鈕、表單、卡片、彈窗等）一律改為直角 */
:root {
  --bs-border-radius: 0;
  --bs-border-radius-sm: 0;
  --bs-border-radius-lg: 0;
  --bs-border-radius-xl: 0;
  --bs-border-radius-xxl: 0;
  --bs-border-radius-2xl: 0;
  --bs-border-radius-pill: 0;
}

/* Bootstrap 圓角工具類別（未套用 CSS 變數者） */
.rounded-circle,
.rounded-pill {
  border-radius: 0;
}

/* SweetAlert2 彈窗與按鈕（圖示為圓形符號，維持原樣） */
.swal2-popup,
.swal2-styled,
.swal2-input,
.swal2-textarea,
.swal2-select,
.swal2-file {
  border-radius: 0;
}

/* Swiper 分頁圓點與操作鈕 */
.swiper-pagination-bullet,
.swiper-button-next,
.swiper-button-prev {
  border-radius: 0;
}

/* Lightbox 圖片燈箱 */
.lb-outerContainer,
.lb-dataContainer,
.lb-nav a,
.lightbox .lb-image {
  border-radius: 0;
}

/***********************/
/***** 直角樣式 End *****/
/***********************/

a {
  text-decoration: none;
}

.img-responsive {
  width: 100%;
  height: auto;
}

/***********************/
/***** 提示JS Start *****/
/***********************/

.notifyjs-add-to-cart-base {
  white-space: nowrap;
  background-color: #fefefe;
  padding: 25px;
  border-radius: 0;
  border: 1px var(--site-primary) solid;
  font-weight: 900;
  letter-spacing: 0.05;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: 0.05em;
  color: var(--site-primary);
}

.notifyjs-add-to-cart-superblue {
  color: white;
  background-color: blue;
}

/***********************/
/***** 選單 Start *****/
/***********************/

/* 主選單色彩變數：深藍底 + 白字（引用全站色系變數） */
:root {
  --header-height: 66px;
  --header-primary: var(--site-primary);
  --header-primary-dark: var(--site-primary-dark);
  /* 選單列底色（指定色，不引用 --site-primary）與其上的分隔線 */
  --header-bg: #0d297b;
  --header-line: rgba(255, 255, 255, 0.16);
  /* 深藍底上的文字：主要為白色、次要為半透明白 */
  --header-ink: #fff;
  --header-ink-soft: rgba(255, 255, 255, 0.82);
  --header-ink-mute: rgba(255, 255, 255, 0.6);
  /* 桌機版下拉選單維持白底，故另備一組深色文字與線條 */
  --header-menu-ink: #111827;
  --header-menu-ink-soft: #4b5563;
  --header-menu-line: #e2e8f4;
}

header.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  transition: box-shadow 0.25s;
}

/* 捲動後加上陰影，讓選單與內容分層 */
header.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(0, 16, 51, 0.35);
}

.site-header .header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* 品牌區（Logo 圖片） */
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  flex: 0 0 auto;
}

/* Logo 圖片：以高度為基準等比例縮放，避免撐破選單高度
   logo.png 本身即為透明底的白字彩色版本，深色選單上可直接呈現原色，
   故不加任何濾鏡，圓點的藍／青／橘才不會被染成全白 */
.brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 290px;
  object-fit: contain;
  flex: 0 0 auto;
  transition: opacity 0.2s;
}

.site-brand:hover .brand-logo {
  opacity: 0.85;
}

/* 展開區塊：主選單置中、右側為會員操作
   display 交由各斷點設定，行動版才能沿用 Bootstrap collapse 收合 */
.site-header .header-collapse {
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header .main-nav {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-header .main-nav .nav-item {
  position: relative;
}

.site-header .main-nav .nav-link {
  display: block;
  padding: 22px 14px;
  font-size: 19px;
  font-weight: 500;
  color: var(--header-ink-soft);
  white-space: nowrap;
  transition: color 0.2s;
}

.site-header .main-nav .nav-link:hover,
.site-header .main-nav .nav-link:focus {
  color: var(--header-ink);
}

.site-header .main-nav .nav-item.active > .nav-link {
  color: var(--header-ink);
  font-weight: 700;
}

/* 目前頁面：下方白色底線 */
.site-header .main-nav .nav-item.active > .nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  background: #fff;
  border-radius: 3px 3px 0 0;
}

.site-header .nav-caret {
  font-size: 14px;
  margin-left: 4px;
  opacity: 0.65;
}

/* 下拉選單 */
.site-header .dropdown-menu {
  margin-top: 0;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--header-menu-line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.site-header .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 18px;
  color: var(--header-menu-ink-soft);
}

.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus {
  background-color: var(--site-primary-soft);
  color: var(--header-primary);
}

.site-header .dropdown-item i {
  width: 16px;
  font-size: 17px;
  text-align: center;
}

.site-header .dropdown-divider {
  margin: 6px 4px;
  border-top-color: var(--header-menu-line);
}

/* 主選單「模擬測驗」的下拉（考試項目）：目前所在的考試以淡底標示 */
.site-header .header-exam .dropdown-item.active {
  background-color: var(--site-primary-soft);
  color: var(--header-primary);
  font-weight: 700;
}

.dropdown-menu-scroll {
  max-height: 50vh;
  /* 限制高度為視窗高度的 50%，可依需求調整 */
  overflow-y: auto;
  /* 啟用垂直滾動 */
}

/* 右側操作區：會員頭像／登入按鈕 */
.site-header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.site-header .header-user .user-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 500;
  color: var(--header-ink);
  transition: background-color 0.2s;
}

.site-header .header-user .user-toggle:hover,
.site-header .header-user.show .user-toggle {
  background-color: rgba(255, 255, 255, 0.14);
}

.site-header .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: var(--header-primary);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.site-header .header-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  background-color: #fff;
  color: var(--header-primary);
  font-size: 18px;
  font-weight: 600;
  transition: background-color 0.2s;
}

.site-header .header-login:hover,
.site-header .header-login:focus {
  background-color: var(--site-primary-soft);
  color: var(--header-primary-dark);
}

/* 語系選單：位於頁首右側、會員選單之前，樣式與會員選單一致 */
.site-header .header-lang .lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  color: var(--header-ink);
  transition: background-color 0.2s;
}

.site-header .header-lang .lang-toggle:hover,
.site-header .header-lang.show .lang-toggle {
  background-color: rgba(255, 255, 255, 0.14);
}

.site-header .header-lang .lang-toggle > .fa-globe {
  font-size: 18px;
  opacity: 0.9;
}

.site-header .header-lang .dropdown-menu {
  min-width: 150px;
}

/* 目前語系：以主色淺底標示，不用 Bootstrap 預設的整塊藍底 */
.site-header .header-lang .dropdown-item.active {
  background-color: var(--site-primary-soft);
  color: var(--header-primary);
  font-weight: 600;
}

/* 行動版選單按鈕 */
.site-header .header-toggler {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--header-line);
  border-radius: 7px;
  background-color: transparent;
  color: var(--header-ink);
  font-size: 20px;
}

.site-header .header-toggler:focus {
  outline: none;
  box-shadow: none;
}

@media screen and (min-width: 992px) {

  /* 桌機版固定展開，不受 Bootstrap collapse 影響 */
  .site-header .header-collapse,
  .site-header .header-collapse.collapse:not(.show) {
    display: flex !important;
  }
}

@media screen and (max-width: 991.98px) {

  .site-header .header-inner {
    padding: 0 16px;
    min-height: 60px;
    gap: 12px;
  }

  .site-header .header-toggler {
    display: block;
  }

  .site-header .header-collapse {
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 12px;
  }

  /* 展開（或展開動畫進行中）才顯示 */
  .site-header .header-collapse.show,
  .site-header .header-collapse.collapsing {
    display: flex;
  }

  .site-header .main-nav {
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    border-top: 1px solid var(--header-line);
  }

  .site-header .main-nav .nav-link {
    padding: 12px 8px;
  }

  .site-header .main-nav .nav-item.active > .nav-link::after {
    left: 0;
    right: auto;
    top: 8px;
    bottom: 8px;
    width: 3px;
    height: auto;
    border-radius: 0;
  }

  /* 行動版：下拉選單改為在收合選單內順排，不再浮動
     頁首的下拉已改用 Bootstrap 的 static 定位（見版型的 data-bs-display），
     故此處指定 position 後即可隨選單往下推；維持 absolute 的話，選單會飄出
     深藍頁首、以透明底加淺色文字疊在白色的頁面內容上，等於看不見 */
  .site-header .dropdown-menu {
    position: static;
    width: 100%;
    margin: 0;
    padding: 0 0 0 16px;
    border: 0;
    box-shadow: none;
    background-color: transparent;
  }

  /* 行動版展開於深藍底上，故文字改為白色系 */
  .site-header .dropdown-item {
    color: var(--header-ink-soft);
  }

  .site-header .dropdown-item:hover,
  .site-header .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.14);
    color: var(--header-ink);
  }

  .site-header .dropdown-divider {
    border-top-color: var(--header-line);
  }

  /* 語系與會員選單各佔一列：下拉展開後才有整列的寬度可用 */
  .site-header .header-actions {
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--header-line);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  /* 兩個選單按鈕比照主選單各項的內距，展開的下拉才會與其對齊 */
  .site-header .header-lang .lang-toggle,
  .site-header .header-user .user-toggle {
    padding: 12px 8px;
    border-radius: 7px;
  }

  /* 收合箭頭靠右，整列才有「可展開」的樣子 */
  .site-header .header-lang .nav-caret,
  .site-header .header-user .nav-caret {
    margin-left: auto;
  }

  .site-header .header-login {
    justify-content: center;
    margin-top: 4px;
  }

  /* 行動版展開於深藍底上，目前語系與目前考試改以半透明白底標示 */
  .site-header .header-lang .dropdown-item.active,
  .site-header .header-exam .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.18);
    color: var(--header-ink);
  }
}

@media screen and (max-width: 480px) {

  .brand-logo {
    height: 46px;
    max-width: 220px;
  }
}

/***********************/
/***** Footer Start *****/
/***********************/

/* 頁尾色彩變數：白色系，與白底主選單同一套色票 */
:root {
  --footer-bg: #fff;
  --footer-bg-soft: var(--site-primary-soft-2);
  --footer-bottom-bg: #edf1f9;
  --footer-primary: var(--site-primary);
  --footer-primary-dark: var(--site-primary-dark);
  --footer-accent: var(--site-primary-accent);
  --footer-ink: #111827;
  --footer-ink-soft: #4b5563;
  --footer-ink-mute: #9ca3af;
  --footer-line: #e2e8f4;
  --footer-chip: var(--site-primary-soft);
}

.site-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--footer-bg) 0%, var(--footer-bg-soft) 100%);
  color: var(--footer-ink-soft);
  border-top: 1px solid var(--footer-line);
}

/* 頂端漸層細線，與主選單主色呼應 */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--footer-primary) 0%, var(--footer-accent) 100%);
  z-index: 2;
}

/* 裝飾光暈：白底上僅以極淡的藍色暈染，避免搶走內容 */
.site-footer::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  right: -150px;
  top: -200px;
  background: radial-gradient(circle, rgba(var(--site-primary-rgb), 0.1) 0%, rgba(var(--site-primary-rgb), 0) 70%);
  pointer-events: none;
}

.site-footer .container {
  position: relative;
  z-index: 1;
}

.footer-main {
  padding: 54px 0 34px;
}

/* footer-brand Start */

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* 品牌標記：頁尾為白底，故使用深字版 logo（logo_black.png）並且不加任何襯底 */
.footer-brand-mark {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

/* footer-menu Start */

.footer-menu-title {
  position: relative;
  margin: 0 0 18px;
  padding-bottom: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--footer-ink);
  letter-spacing: 0.05em;
}

.footer-menu-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--footer-primary) 0%, var(--footer-accent) 100%);
}

.footer-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-menu li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--footer-ink-soft);
  transition: color 0.2s, transform 0.2s;
}

.footer-menu li a i {
  font-size: 15px;
  color: var(--footer-ink-mute);
  transition: color 0.2s;
}

.footer-menu li a:hover {
  color: var(--footer-primary);
  transform: translateX(4px);
}

.footer-menu li a:hover i {
  color: var(--footer-primary);
}

.footer-menu li.active > a {
  color: var(--footer-primary);
  font-weight: 700;
}

.footer-menu li.active > a i {
  color: var(--footer-primary);
}

/* footer-contact Start */

.footer-contact {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-contact li + li {
  margin-top: 12px;
}

.footer-contact li a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--footer-ink-soft);
  transition: color 0.2s;
}

.footer-contact li a:hover {
  color: var(--footer-primary);
}

.footer-contact .contact-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid var(--footer-line);
  background: var(--footer-chip);
  color: var(--footer-primary);
  font-size: 17px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.footer-contact li a:hover .contact-icon {
  background: linear-gradient(135deg, var(--footer-primary) 0%, var(--footer-primary-dark) 100%);
  border-color: transparent;
  color: #fff;
}

.footer-contact .contact-text {
  padding-top: 4px;
  word-break: break-word;
}

/* footer-social Start */

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.footer-social li a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid var(--footer-line);
  background: #fff;
  color: var(--footer-ink-soft);
  font-size: 20px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.footer-social li a:hover {
  background: linear-gradient(135deg, var(--footer-primary) 0%, var(--footer-primary-dark) 100%);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(var(--site-primary-rgb), 0.25);
}

/* footer-copyright Start */

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--footer-line);
  background: var(--footer-bottom-bg);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0;
}

.footer-copyright {
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--footer-ink-mute);
}

.footer-copyright a {
  color: var(--footer-ink-soft);
  transition: color 0.2s;
}

.footer-copyright a:hover {
  color: var(--footer-primary);
}

.footer-gotop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--footer-line);
  background: #fff;
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--footer-ink-soft);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.footer-gotop:hover {
  background: var(--footer-primary);
  border-color: transparent;
  color: #fff;
}

.footer-gotop i {
  font-size: 16px;
}

/* footer 響應式 Start */

@media screen and (max-width: 991.98px) {

  .footer-main {
    padding: 42px 0 26px;
  }

  .footer-col-brand {
    margin-bottom: 28px;
  }

  .footer-col {
    margin-bottom: 24px;
  }
}

@media screen and (max-width: 767.98px) {

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-social {
    margin-top: 20px;
  }
}

/*************************/
/***** 浮動按鈕 Start *****/
/*************************/

/*
   右下角的浮動按鈕為全站共用的**單一直欄**（版型的 .floating-button），
   由上而下依序為各頁面自行加入的按鈕（版型的 @yield('float_button')，例如文章內頁的
   「回到頁首」與「分享文章」）與社群連結。
   各頁面**不要再以 position: fixed 自行放置右下角按鈕**，否則會與此欄互相遮擋；
   要新增按鈕請於該頁 @section('float_button') 輸出並掛上 .floating-btn。
*/
.floating-button {
  position: fixed;
  right: 0;
  bottom: 20px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

/* 欄內所有按鈕（社群連結與各頁面加入的按鈕）外觀一致 */
.floating-button a,
.floating-button .floating-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: #444;
  color: #eee;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.35);
  transition: background-color 0.2s, color 0.2s;
}

.floating-button a:hover,
.floating-button a:focus-visible,
.floating-button .floating-btn:hover,
.floating-button .floating-btn:focus-visible {
  background-color: var(--site-primary);
  color: #fff;
}

@media screen and (max-width: 767.98px) {

  .floating-button {
    bottom: 16px;
  }

  .floating-button a,
  .floating-button .floating-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/*************************/
/***** 共用元素 Start *****/
/*************************/

/* 區塊標題 */
.block-title {
  width: 100%;
  max-width: 300px;
  padding-bottom: 5px;
  margin: 0 auto;
  font-size: 32px;
  line-height: 22px;
  letter-spacing: 0.05em;
  color: #333;
  text-align: center;
}

.block-title span {
  display: inline-block;
  width: 20px;
  height: 1px;
  position: relative;
  top: -5px;
  margin: 0 12px;
  background-color: #ddd;
}

.block-subtitle {
  display: block;
  text-align: center;
  font-size: 22px;
  color: #aaa;
  letter-spacing: 0;
  margin-bottom: 40px;
}

/* Small Block */

.small-block-title {
  line-height: 36px;
  font-size: 26px;
  color: #555;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  text-shadow: 3px 3px 3px rgba(200, 200, 200, 0.3);
}

.small-block-text {
  font-size: 20px;
  letter-spacing: 0.1em;
  line-height: 26px;
  color: #666;
  margin-bottom: 10px;
}

/* 區塊 More 按鈕 */

.block-more-btn {
  display: block;
  margin: 0 auto;
  padding: 0 10px;
  width: 150px;
  height: 42px;
  line-height: 32px;
  font-size: 18px;
  letter-spacing: 0.05em;
  color: var(--site-primary);
  background: #fff;
  border: 5px var(--site-primary) solid;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0;
}

.block-more-btn:hover {
  color: #fff;
  background: var(--site-primary-dark);
}

.block-more-btn.btn-left {
  margin: 0;
}

.block-more-btn.full-width {
  width: 100%;
}

/* 表單 Inptu */

.form-box label {
  font-size: 20px;
  color: #999;
  margin-bottom: 5px;
  margin-top: 10px;
}

.form-box input,
.form-box textarea {
  border-radius: 0;
}

.form-box input::placeholder,
.form-box textarea::placeholder {
  color: #ccc;
  letter-spacing: 0.05em;
  font-size: 20px;
}

/*************************/
/***** 各頁面 Banner *****/
/*************************/

.page-figure {
  width: 100%;
  height: 300px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
}

.page-figure::after {
  content: ' ';
  display: block;
  background: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  z-index: 2;
  top: 0;
  left: 0;
  position: absolute;
}

.page-figure img {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-position: center;
  object-fit: cover;
}

.page-figure h2 {
  position: relative;
  font-size: 44px;
  color: #fff;
  letter-spacing: 0.05em;
  z-index: 3;
  text-align: center;
}

/*************************/
/***** 側邊選單 Start *****/
/*************************/

/* 內頁左側的分類／等級選單，最新消息與教學文章列表共用 */

.side-menu {
  position: relative;
}

.side-menu aside {
  position: sticky;
  top: 80px;
}

.side-menu aside h2 {
  font-size: 26px;
}

.side-menu aside h2:after {
  content: '';
  display: block;
  width: 30px;
  background: #333;
  height: 3px;
  border-radius: 0;
  margin: 5px 0;
}

.side-menu aside ul {
  padding-left: 0;
  list-style: none;
  margin-top: 20px;
  font-size: 22px;
}

.side-menu aside ul li {
  margin: 10px 0;
}

.side-menu aside ul li a {
  color: #333;
  text-decoration: none;
  display: block;
}

.side-menu aside ul li a:hover,
.side-menu aside ul li a.active {
  color: var(--site-primary);
}

/*****************/
/*****  頁碼  *****/
/*****************/

.page-item.active .page-link,
.page-item .page-link:hover {
  color: #fff;
  background-color: var(--site-primary);
  border-color: var(--site-primary);
}

.page-item.disabled .page-link {
  color: #ccc;
  background-color: #fff;
  border-color: #ccc;
}

.page-item .page-link {
  color: #888;
  background-color: #fff;
  border-color: #888;
}

/***********************/
/***** 麵包屑 Start *****/
/***********************/

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #fff;
  z-index: 4;
  width: 100%;
  font-size: 16px;
  padding: 0 30px;
}

.breadcrumb-item.active {
  color: #ccc;
}

.breadcrumb i {
  display: inline-block;
}

.breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.breadcrumb i.icon {
  margin: 0 5px;
}

/**********************/
/***** 目前沒有文章 *****/
/**********************/

.no-article {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 200px;
  opacity: 0.3;
  border-radius: 0;
  margin-bottom: 10px;
}

/********************/
/***** 響應式設定 *****/
/********************/

.mobile-show {
  display: none;
}

.pc-show {
  display: block;
}

@media screen and (max-width: 992px) {
  .mobile-show {
    display: block;
  }

  .pc-show {
    display: none;
  }
}

/* 編輯器區塊 - 防止超寬內容跑版 */
.editor-block {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 表格響應式容器 - 類似 Bootstrap table-responsive */
.table-responsive-wrapper {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 表格捲軸美化 */
.table-responsive-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-responsive-wrapper::-webkit-scrollbar-track {
  background-color: #f1f1f1;
  border-radius: 0;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 0;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: #aaa;
}

/* 表格滑動提示 - 漸層陰影 */
.table-responsive-wrapper {
  background:
    linear-gradient(to right, white 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to right, rgba(255, 255, 255, 0), white 70%) 100% 0,
    linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)),
    linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1)) 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}

/* 圖片 */
.editor-block img {
  width: 100%;
  max-width: 100%;
}

/* iframe 嵌入內容（如 YouTube 影片） */
.editor-block iframe {
  max-width: 100%;
}

/* 影片元素 */
.editor-block video {
  max-width: 100%;
}