/**
 * 組件樣式
 * @package mytheme
 */

/* ==================== Swei Fist Sans CJK TC（透過 jsDelivr CDN 載入；保留 SC 字族名以相容既有引用） ==================== */
@font-face {
  font-family: "Swei Fist Sans CJK SC";
  src: url("https://cdn.jsdelivr.net/gh/max32002/swei-fist-sans@2.0/WebFont/CJK%20TC/SweiFistSansCJKtc-Thin.woff2")
    format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Swei Fist Sans CJK SC";
  src: url("https://cdn.jsdelivr.net/gh/max32002/swei-fist-sans@2.0/WebFont/CJK%20TC/SweiFistSansCJKtc-Light.woff2")
    format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Swei Fist Sans CJK SC";
  src: url("https://cdn.jsdelivr.net/gh/max32002/swei-fist-sans@2.0/WebFont/CJK%20TC/SweiFistSansCJKtc-DemiLight.woff2")
    format("woff2");
  font-weight: 350;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Swei Fist Sans CJK SC";
  src: url("https://cdn.jsdelivr.net/gh/max32002/swei-fist-sans@2.0/WebFont/CJK%20TC/SweiFistSansCJKtc-Regular.woff2")
    format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Swei Fist Sans CJK SC";
  src: url("https://cdn.jsdelivr.net/gh/max32002/swei-fist-sans@2.0/WebFont/CJK%20TC/SweiFistSansCJKtc-Medium.woff2")
    format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Swei Fist Sans CJK SC";
  src: url("https://cdn.jsdelivr.net/gh/max32002/swei-fist-sans@2.0/WebFont/CJK%20TC/SweiFistSansCJKtc-Bold.woff2")
    format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Swei Fist Sans CJK SC";
  src: url("https://cdn.jsdelivr.net/gh/max32002/swei-fist-sans@2.0/WebFont/CJK%20TC/SweiFistSansCJKtc-Black.woff2")
    format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ==================== Arial Rounded MT Bold ==================== */
@font-face {
  font-family: "Arial Rounded MT Bold";
  src: url("../fonts/arial-rounded-mt-bold/arialroundedmtbold.ttf")
    format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Section 基本樣式 */
section {
  padding: 0;
}

.desktop-only {
  display: block;
}
.mobile-only {
  display: none;
}

/* 分頁HERO區 */
.page-hero {
  width: 100%;
  height: 265px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: var(--hero-bg-desktop);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top;
}

/* 手機版：自動切換為 -mobile 背景圖 */
@media (max-width: 480px) {
  .page-hero {
    background-image: var(--hero-bg-mobile, var(--hero-bg-desktop));
  }
}
.page-hero-title-wrap {
  height: 104px;
  position: relative;
}
.page-hero-title {
  font-size: 56px;
  color: #fff;
  font-family: "Swei Fist Sans CJK SC";
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}
.page-hero-subtitle {
  position: absolute;
  top: 74px;
  right: -30px;
  font-size: 36px;
  display: inline-block;
  font-family: "The Nautigal";
  color: #ffc340;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  transform: rotate(-4.5deg);
  transform-origin: 0 0;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .page-hero-title-wrap {
    top: -16px;
    height: auto;
  }
  .page-hero {
    height: 140px;
  }
  .page-hero-title {
    font-size: 24px;
  }
  .page-hero-subtitle {
    font-size: 20px;
    top: 35px;
    right: 50%;
    transform: rotate(-4.5deg) translateX(50%);
  }
}

/* 分頁區塊標題與描述 */

.section-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 837px;
  gap: 31px;
}
.section-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-heading {
  height: 44px;
  margin-bottom: -22px;
  z-index: 1;
  position: relative;
}

.section-heading-deco {
  width: 19px;
  height: 14px;
  position: relative;
  top: -1px;
  left: 10%;
}

.section-title {
  color: var(--color-white);
  background-color: var(--color-primary);
  border: 1px solid var(--color-white);
  position: relative;
  font-weight: 500;
  padding: 7px 20px;
  text-align: center;
  min-width: 201px;
}
.section-text-wrap {
  width: 100%;
  max-width: 590px;
  padding-top: 32px;
  padding-bottom: 16px;
  padding: 32px 16px 16px;
  background-color: #fff;
  border: 1px solid #0b2f53;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  text-align: center;
}
.section-text {
  display: inline-block;
  color: var(--color-primary);
}

/* 分頁介紹區 */
.page-heading {
  width: 100%;
  max-width: 1024px;
  height: 132px;
  position: relative;
  margin: -51px auto 48px;
  box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.25);
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.page-heading-wrap {
  max-width: 980px;
  width: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}
.page-heading-title {
  font-weight: 500;
  color: var(--color-primary);
  font-size: 1.5rem;
}

.page-heading-desc {
  font-size: var(--font-size-xl);
  text-align: center;
  max-width: 975px;
  min-width: 800px;
  border-top: 1px solid #0b2f53;
  padding-top: 15px;
}

/* ============================================
   分頁按鈕區
   ============================================ */

.page-btn-wrap {
  display: flex;
  transition: filter 0.3s ease;
}

.page-btn-wrap:hover {
  filter: brightness(0.92);
}
.page-btn-text {
  position: relative;
  font-weight: 500;
  top: 2px;
  left: 10px;
  font-size: var(--font-size-xl);
}

.page-btn-text-wrap {
  width: 40px;
  height: 40px;
  margin-left: -8px;
  background-size: contain;
  background-repeat: no-repeat;
  display: flex;
  transition: transform 0.3s ease;
}

/* 立 */
.text-li-wrap {
  background-image: url("../images/page-btn-01.svg");
  z-index: 1;
  transform: rotate(-3deg);
}

.text-li {
  color: var(--color-white);
}

/* 即 */
.text-ji-wrap {
  background-image: url("../images/page-btn-03.svg");
  transform: rotate(25deg);
  margin-top: 8px;
}
.text-ji {
  color: var(--color-primary);
  transform: rotate(-25deg);
}

/* 諮 */
.text-zi-wrap {
  background-image: url("../images/page-btn-02.svg");
  z-index: 1;
  margin: -2px 0 0 -10px;
}
.text-zi {
  color: var(--color-white);
}

/* 詢 */
.text-xun-wrap {
  background-image: url("../images/page-btn-03.svg");
  transform: rotate(17deg);
  margin-top: 3px;
  margin-left: -5px;
  z-index: 2;
}
.text-xun {
  color: var(--color-primary);
  transform: rotate(-17deg);
}

.page-btn-arrow {
  display: block;
  width: auto;
  height: auto;
  flex-shrink: 0;
  align-self: center;
  object-fit: contain;
  position: relative;
  top: -15px;
  left: -5px;
}

/* ============================================
   全站通用字體更換
   ============================================ */

.global-text-primary {
  color: var(--color-primary);
}

.global-text-white {
  color: #fff;
}

/* ============================================
   通用圖片與換行切換（電腦版）
   ============================================ */

.mobile-br {
  display: none;
}
.desktop-br {
  display: block;
}

@media (max-width: 992px) {
  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: block;
  }

  /* ============================================
   通用圖片與換行切換（手機版）
   ============================================ */

  .mobile-br {
    display: block;
  }
  .desktop-br {
    display: none;
  }

  .section-text {
    font-size: 13px;
    line-height: normal;
  }

  .page-btn-text-wrap {
    width: 31px;
    height: 31px;
    margin-left: -7px;
  }

  .page-btn-text.text-ji {
    left: 10px;
  }

  .page-btn-text {
    top: 3px;
    left: 8px;
    font-size: 13px;
  }

  /* 分頁介紹區 */
  .page-heading {
    max-width: 280px;
    padding: 26px 19px;
    margin: -22px auto 28px;
    height: auto;
  }
  .page-heading-wrap {
  }
  .page-heading-title {
    font-size: 14px;
    max-width: 212px;
    text-align: center;
  }

  .page-heading-desc {
    font-size: 13px;
    min-width: auto;
  }

  .section-heading-deco {
    left: 23%;
  }

  .section-header {
    margin-bottom: var(--spacing-xl);
  }

  .section-title {
    align-content: center;
    min-height: 36px;
    min-width: 124px;
    max-width: 100%;
    background-size: contain;
    background-position: center;
  }

  .section-title::after {
    top: 0;
    right: -1rem;
    width: 1.9375rem;
    height: 2.1875rem;
  }

  .section-text-wrap {
    max-width: 302px;
    padding: 32px 10px 16px;
  }
}
