/* ==========================================================================
   style.css - 全球人壽｜以客為尊．待客如己
   主要視覺樣式（Desktop 基準，RWD 覆寫請見 responsive.css）
   ========================================================================== */

:root {
  /* 品牌色（取自 logo.svg / kv-maintxt.svg / 裝飾圓形） */
  --c-navy: #142979;
  --c-blue-deep: #0f4587;
  --c-blue-mid: #1876c4;
  --c-blue: #3d89c2;
  --c-blue-soft: #eaf4fc;
  --c-blue-bg: #f4f9fd;
  --c-yellow: #f7d336;
  --c-yellow-light: #fbf27c;
  --c-orange: #f7a542;
  --c-white: #ffffff;
  --c-green: #56c0c5;

  /* 組織架構／原則區塊 漸層藍（取自看樣稿） */
  --c-org-grad-start: #0077a6;
  --c-org-grad-end: #5ca2d6;
  --c-teal: #4eafbf;

  /* 內文色 */
  --c-text: #333;
  --c-text-soft: #444444;
  --c-text-invert: #ffffff;

  /* 五大服務主色：01 已由看樣稿確認為 #e8455a；02-05 取自 p-color.jpg 樣本順位，如與正式稿不同請告知 */
  --s1: #ff5981;
  --s2: #4c963d;
  --s3: #397ace;
  --s4: #f28230;
  --s5: #5756a2;

  /* 積極行動 統計數字色 */
  --stat-1: #e8455a;
  --stat-2: #f2914c;
  --stat-3: #1c7d8c;

  /* 陰影 / 間距 */
  --shadow-soft: 0 8px 15px rgba(30, 70, 120, 0.12);
  --shadow-card: 0 5px 12px rgba(20, 40, 121, 0.288);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

html,
body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: hidden;
  letter-spacing: 0.15em;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

section {
  position: relative;
  scroll-margin-top: 92px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Skip Link
   ========================================================================== */

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 9999;
  background: var(--c-navy);
  color: var(--c-white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ==========================================================================
   Focus Visible（全站鍵盤可視化）
   ========================================================================== */

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--c-yellow);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 500;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(20, 41, 121, 0.06);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.site-logo img {
  height: 36px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-pill {
  position: relative;
  display: inline-flex;
  height: 35px;
  align-items: center;
  gap: 10px;
  padding: 0px 20px 0px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--c-blue-mid) 0%, var(--c-navy) 100%);
  box-shadow: 0 6px 16px rgba(20, 41, 121, 0.25);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-white);
  isolation: isolate;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.nav-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(315deg, var(--c-blue-mid) 0%, var(--c-navy) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.nav-pill:hover,
.nav-pill:focus-visible,
.nav-pill.is-active {
  background: linear-gradient(315deg, var(--c-blue-mid) 0%, var(--c-navy) 100%);
}

.nav-pill .nav-pill-icon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--c-white);
  border: 2px solid var(--c-blue-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  top: -10px;
}

.nav-pill .nav-pill-icon img {
  width: 25px;
  height: 25px;
  filter: none;
}

.nav-pill:hover,
.nav-pill:focus-visible,
.nav-pill.is-active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* ------------------------------------------------------------------------
   Mobile 固定底部 Tabbar（理念／落實／行動）
   ------------------------------------------------------------------------ */
.mobile-tabbar {
  display: none;
}

/* ==========================================================================
   Icon Arrow（圖檔箭頭，取代文字符號 ›／‹）
   以 mask 套用 arrow-blue.svg，顏色沿用各處既有 color／currentColor，
   維持原本 hover 換色的效果不變。
   ========================================================================== */

.icon-arrow {
  display: inline-block;
  height: 0.5em;
  aspect-ratio: 15.39 / 25.12;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15.39 25.12'%3E%3Cpolygon points='2.83 25.12 0 22.29 9.73 12.56 0 2.83 2.83 0 15.39 12.56 2.83 25.12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15.39 25.12'%3E%3Cpolygon points='2.83 25.12 0 22.29 9.73 12.56 0 2.83 2.83 0 15.39 12.56 2.83 25.12'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  flex-shrink: 0;
}

.icon-arrow--prev {
  transform: scaleX(-1);
}


/* ==========================================================================
   Decorative elements（圓形／花瓣／蝴蝶）
   ========================================================================== */

.deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.floating-deco {
  will-change: transform;
}

.deco-philosophy-smile {
  top: 10%;
  left: 24%;
  width: 80px;
}

.deco-philosophy-yellow {
  top: 4%;
  left: 27%;
  width: 60px;
}

.deco-philosophy-yellow2 {
  top: 6%;
  left: 17%;
  width: 110px;
}

.deco-philosophy-blue {
  top: -5%;
  left: -3%;
  width: 120px;

}

.deco-team-darkblue {
  top: 35%;
  left: -8%;
  width: 380px;
}

.deco-team-yellow-sm {
  top: 70%;
  left: 10%;
  width: 75px;
}

.deco-team-blue {
  bottom: 60%;
  right: 12%;
  width: 125px;
}

.deco-team-blue2 {
  bottom: 20%;
  right: 4%;
  width: 230px;
}

.deco-team-yellow-xs {
  top: 50%;
  right: 0%;
  width: 75px;
}

.deco-action-1 {
  top: 30%;
  left: 0%;
  width: 250px;
}

.deco-action-2 {
  top: 30%;
  right: 10%;
  width: 110px;
}

.deco-action-3 {
  top: 70%;
  left: 12%;
  width: 100px;
}

.deco-action-4 {
  bottom: 15%;
  right: -2%;
  width: 280px;
}

.deco-action-5 {
  top: 10%;
  right: -5%;
  width: 180px;
}

.deco-news-yellow {
  top: 0;
  left: 3%;
  width: 320px;
}

.deco-news-lightblue-1 {
  top: 45%;
  left: -3%;
  width: 180px;
}

.deco-news-gary {
  bottom: 9%;
  left: 13%;
  width: 180px;
}

.deco-news-darkblue {
  top: 25%;
  right: 2%;
  width: 320px;
}

.deco-news-lightblue-2 {
  bottom: 18%;
  right: 16%;
  width: 90px;
}

.deco-history-blue {
  top: 12%;
  left: 12%;
  width: 220px;
  z-index: 0;
}

.deco-history-yellow {
  bottom: 30%;
  right: 0%;
  width: 160px;
}

.deco-history-gary {
  top: 20%;
  right: 5%;
  width: 110px;
}

/* ==========================================================================
   KV Hero
   ========================================================================== */

.kv-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #eaf6ff 0%, #d9edfb 55%, #ffffff 100%);
}

.kv-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1974 / 791;
  overflow: hidden;
}

.kv-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.kv-bg-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.kv-building-layer {
  position: absolute;
  left: 62%;
  top: 42%;
  transform: translateX(-50%);
  width: clamp(150px, 17vw, 300px);
  z-index: 1;
}

.kv-sparkle {
  position: absolute;
  top: 42%;
  left: 78%;
  width: 40%;
  transform: translate(-50%, -50%);
  z-index: 2;
  mix-blend-mode: screen;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .kv-sparkle {
    animation: kvSparkleGlow 1s ease-in-out infinite;
  }
}

@keyframes kvSparkleGlow {

  0%,
  100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.85);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

.kv-butterfly {
  position: absolute;
  top: 26%;
  left: 16%;
  width: clamp(36px, 3.6vw, 56px);
  z-index: 2;
}

.kv-flower-layer {
  position: absolute;
  left: 50%;
  right: 0;
  bottom: 2%;
  z-index: 3;
  width: 100%;
  transform: translateX(-50%);
}

.kv-people-layer {
  position: absolute;
  left: 54%;
  bottom: 4%;
  transform: translateX(-50%);
  width: min(1400px, 65%);
  z-index: 100;
}

.kv-content {
  position: absolute;
  top: 6%;
  left: 0;
  right: 0;
  z-index: 5;
  width: 100%;
  text-align: center;
}

.kv-title {
  width: min(760px, 60%);
  margin-inline: auto;
  margin-top: 80px;
}

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

.kv-title-mobile {
  display: none;
}

/* ==========================================================================
   Section Title（通用）
   ========================================================================== */

.section-head {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: clamp(40px, 5vw, 70px);
}

/* 各屏統一標題樣式（icon + 文字，單行，字級一致） */
.block-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: clamp(30px, 2.8vw, 36px);
  font-weight: 800;
  color: #222;
  margin-bottom: clamp(28px, 4vw, 44px);
  text-align: center;
  letter-spacing: 0.2em;
}

.block-title img,
.block-title svg {
  width: clamp(36px, 2.5vw, 50px);
  height: clamp(36px, 2.5vw, auto);
  flex-shrink: 0;
}

.block-title--white {
  color: var(--c-white);
}

.block-title--mirror-icon {
  gap: 12px;
}

.block-title .icon-mirror {
  transform: scaleX(-1);
}

.section-desc {
  margin-top: 16px;
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--c-text-soft);
  line-height: 1.9;
}

.hl-blue {
  color: var(--c-blue-mid);
  font-size: 1.375em;
  font-weight: 500;
}

.copy-todo {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: #7a4d16;
  background: #fff6e0;
  border: 1px dashed #e3b969;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ==========================================================================
   理念／影片 Section
   ========================================================================== */

.philosophy-section {
  background: #ffffff;
  padding-block: clamp(56px, 12vw, 200px);
  padding-bottom: clamp(60px, 10vw, 150px);

}

.philosophy-lead {
  max-width: 760px;
  margin: 0 auto clamp(56px, 7vw, 96px);
  text-align: center;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 700;
  color: var(--c-text);
  line-height: 2.2;

}

.philosophy-lead .hl-blue {
  color: var(--c-blue);
}

.philosophy-butterflies {
  position: absolute;
  top: 6%;
  right: 16%;
  width: clamp(120px, 12vw, 400px);
  z-index: 1;
}

.philosophy-butterflies img:first-child {
  width: 100%;
}

.philosophy-butterflies img:last-child {
  width: 20%;
  top: 10%;
}

.team-video-block {
  position: relative;
  max-width: 1100px;
  margin-inline: auto;
  text-align: center;
  z-index: 100;
}

.team-caption {
  margin-top: 24px;
  max-width: 1100px;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 600;
  color: var(--c-text-soft);
  line-height: 2;
}

.team-caption .hl-blue {
  color: var(--c-blue-mid);
  font-weight: 700;
  font-size: 1em;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  background: #000;
  border: 4px solid var(--c-blue-mid);
}

/* 影片無法內嵌播放時（如頻道限制特定網域、或環境無法連線 YouTube）
   提供保底的外部連結，確保使用者仍能觀看影片 */
.video-fallback-link {
  margin-top: 14px;
  font-size: 14px;
  text-align: center;
}

.video-fallback-link a {
  color: var(--c-blue-mid);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-fallback-link .icon-arrow {
  font-size: 1.1em;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   組織架構 + 十大原則 Section（共用漸層藍底）
   ========================================================================== */

.principle-section {
  background: linear-gradient(90deg, #0077a6 0%, #5ca2d6 65%);
  padding-block: clamp(56px, 8vw, 120px);
  color: var(--c-white);
}

.principle-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3%;
  transform: translateX(-50%);

  width: 101%;
  height: 100px;

  background: url("../images/decorations/bg-wave-top.png") no-repeat center top;
  background-size: cover;

  z-index: 1;
  pointer-events: none;
}

.principle-section::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4.5%;
  transform: translateX(-50%);

  width: 101%;
  height: 135px;

  background: url("../images/decorations/bg-wave-btm.png") no-repeat center top;
  background-size: cover;

  z-index: 1;
  pointer-events: none;
}

.principle-section .section-desc {
  color: rgba(255, 255, 255, 0.85);
}

/* ---- 組織架構 ---- */
.org-block {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 0;
  align-items: center;
  margin-bottom: clamp(64px, 8vw, 110px);
}

.org-copy {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 2.1;
  color: rgba(255, 255, 255, 0.92);
  text-align: justify;
  /* a11y: 漸層右側較淺，加上輕微陰影確保文字對比度達 WCAG AA */
  text-shadow: 0 1px 3px rgba(0, 30, 60, 0.35);
}

.org-chart {
  display: flex;
  align-items: center;
  justify-content: center;
}

.org-chart img {
  width: 100%;
  max-width: 680px;
  height: auto;
}

.org-icon-hierarchy {
  display: block;
}

/* ---- 十大原則 ---- */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.principle-grid .principle-card:nth-child(9),
.principle-grid .principle-card:nth-child(10) {
  grid-column: span 2;
  max-width: 340px;
  margin-inline: auto;
  width: 100%;
}

.principle-card {
  --hover-rotate: -6deg;
  position: relative;
  background: var(--c-white);
  border-radius: var(--radius-md);
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
  transform-origin: center center;
}

.principle-card:nth-child(odd) {
  --hover-rotate: -6deg;
}

.principle-card:nth-child(even) {
  --hover-rotate: 6deg;
}

.principle-card:hover,
.principle-card:focus-within {
  transform: rotate(var(--hover-rotate));
  box-shadow: 0 20px 45px rgba(20, 41, 121, 0.28);
  z-index: 2;
}

.principle-card .principle-index {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 30px;
  font-weight: 500;
  color: var(--c-blue);
}

.principle-card:hover .principle-index {
  color: var(--c-green);
}

.principle-card figure {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  overflow: visible;
}

.principle-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s var(--ease-out);
}

.principle-card:hover img,
.principle-card:focus-within img {
  transform: scale(1.22);
}

.principle-card h3 {
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 700;
  letter-spacing: normal;
  color: var(--c-navy);
  margin-bottom: 6px;
}

.principle-card p {
  font-size: 16px;
  color: var(--c-text-soft);
  line-height: 1.6;
}

/* ---- 十大原則：小裝置左右滑動頁碼點（僅行動版顯示，見 responsive.css） ---- */
.principle-dots {
  display: none;
}

/* ==========================================================================
   積極行動 Section（Counter）
   ========================================================================== */

.action-section {
  background: var(--c-white);
  padding: clamp(56px, 12vw, 230px) clamp(56px, 8vw, 180px) clamp(56px, 8vw, 180px);
  overflow: hidden;
  position: relative;
}

.action-section .section-desc {
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 600;
}

.action-section .section-desc .hl-blue {
  font-size: clamp(18px, 1.8vw, 30px);
  color: var(--c-blue-mid);
}

.counter-list {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin-inline: auto;
  justify-content: center;
}

.counter-item {
  text-align: center;
  padding: 44px 30px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f5f5f6;
}

.counter-label {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 700;
  color: var(--c-text-soft);
  line-height: 1.2;
}

.counter-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  font-weight: 800;
  font-size: clamp(40px, 5vw, 90px);
  font-variant-numeric: tabular-nums;
}

.counter-unit {
  font-size: 0.42em;
  font-weight: 800;
}

.counter-note {
  margin-top: 8px;
  font-size: clamp(18px, 1.5vw, 22px);
  color: var(--c-text-soft);
}

.counter-item--1 .counter-number {
  color: var(--stat-1);
}

.counter-item--2 .counter-number {
  color: var(--stat-2);
}

.counter-item--3 .counter-number {
  color: var(--stat-3);
}

/* ==========================================================================
   最新消息 Section
   ========================================================================== */

.news-section {
  background: var(--c-white);
  padding-block: clamp(48px, 6vw, 88px);
  position: relative;
  overflow: hidden;

}

.news-card {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin-inline: auto;
  background: transparent url('../images/decorations/news-bg.svg') no-repeat center bottom;
  padding: clamp(34px, 6vw, 60px) clamp(28px, 4vw, 48px);
  z-index: 100;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.news-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-radius: 999px;
  background: var(--c-white);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.news-item:nth-child(even) {
  background: #ececf3;
}

.news-item:hover,
.news-item:focus-within {
  box-shadow: var(--shadow-card);
}

.news-item:hover .news-arrow,
.news-item:focus-within .news-arrow {
  background: var(--c-navy);
  transform: translateX(5px);
}

.news-date {
  font-weight: 700;
  font-size: clamp(16px, 1.2vw, 18px);
  flex-shrink: 0;
  min-width: 92px;
  letter-spacing: normal;
}

.news-title {
  flex: 1;
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 700;
  color: var(--c-text-soft);
  line-height: 1.8;
}

.news-item a.news-link-wrap {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  cursor: pointer;
}

.news-item {
  position: relative;
}

.news-arrow {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-white);
  font-size: 40px;
  background: linear-gradient(135deg, var(--c-blue-mid), var(--c-teal));
  transition: background 0.3s ease, transform 0.3s var(--ease-out);
}

.news-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.news-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--c-navy);
  color: var(--c-white);
  font-weight: 500;
  font-size: clamp(20px, 1.6vw, 24px);
  transition: transform 0.3s var(--ease-out), background 0.3s ease;
}

.news-more-btn:hover,
.news-more-btn:focus-visible {
  background: var(--c-blue-mid);
  transform: translateY(-2px);
}

/* ==========================================================================
   榮耀歷程 Section
   ========================================================================== */

.history-section {
  background: var(--c-white);
  padding: 0 clamp(48px, 6vw, 96px) clamp(48px, 6vw, 96px);
  position: relative;
  overflow: hidden;
}

.history-cta {
  display: flex;
  justify-content: center;
  margin: 18px 0 32px;
}

.history-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--c-navy);
  color: var(--c-white);
  font-weight: 500;
  font-size: clamp(20px, 1.6vw, 24px);
  transition: transform 0.3s var(--ease-out), background 0.3s ease;
}

.history-cta-btn:hover,
.history-cta-btn:focus-visible {
  background: var(--c-blue-mid);
  transform: translateY(-2px);
}

.history-banner {
  position: relative;
  z-index: 2;
}

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


/* ==========================================================================
   五大服務 Section（分類頁籤 + 詳情面板）
   ========================================================================== */

.service-section {
  background: linear-gradient(180deg, #b8d3ec 0%, var(--c-blue-soft) 18%, var(--c-blue-bg) 100%);
  padding-block: clamp(56px, 8vw, 120px);
}

.service-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3%;
  transform: translateX(-50%);

  width: 101%;
  height: 100px;

  background: url("../images/decorations/bg-wave-top2.png") no-repeat center top;
  background-size: cover;

  z-index: 1;
  pointer-events: none;
}

.service-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.4vw, 18px);
  max-width: 1200px;
  margin-inline: auto;
}

.service-tabs-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  flex: 1;
}

.service-tab {
  --service-color: var(--s1);
  position: relative;
  background: var(--c-white);
  border-radius: var(--radius-md);
  padding: 18px 10px 20px;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), background 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
}

.service-tab:hover {
  transform: translateY(-4px);
}

.service-tab h3 {
  position: relative;
  z-index: 2;
  font-size: clamp(20px, 1.6vw, 24px);
  font-weight: 800;
  color: var(--c-navy);
  margin-bottom: 30px;
}

.service-tab .tab-visual {
  position: relative;
  width: 100%;
  height: 66px;
  margin-top: 4px;
}

.service-tab .tab-num {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translate(-50%, -46%);
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 900;
  color: rgba(20, 41, 121, 0.1);
  line-height: 1;
  z-index: 1;
  white-space: nowrap;
}

.service-tab figure {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: auto;
}

.service-tab figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-tab[aria-selected="true"] {
  background: var(--service-color);
  box-shadow: var(--shadow-soft);
}

.service-tab[aria-selected="true"] h3 {
  color: var(--c-white);
}

.service-tab[aria-selected="true"] .tab-num {
  color: rgba(255, 255, 255, 0.4);
}

.service-tab-1 {
  --service-color: linear-gradient(0deg, #ff5981 0%, #fe7b9d 37%);
}

.service-tab-2 {
  --service-color: linear-gradient(0deg, #4c963d 0%, #76c764 37%);
  ;
}

.service-tab-3 {
  --service-color: linear-gradient(0deg, #397ace 0%, #6ca4ee 37%);
  ;
}

.service-tab-4 {
  --service-color: linear-gradient(0deg, #f28131 0%, #f59d5e 37%);
  ;
}

.service-tab-5 {
  --service-color: linear-gradient(0deg, #5756a2 0%, #807ddb 37%);
  ;
}

.service-tab-arrow {
  width: 50px;
  height: 50px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--c-white);
  box-shadow: var(--shadow-card);
  color: var(--c-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 800;
  flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.service-tab-arrow:hover,
.service-tab-arrow:focus-visible {
  background: var(--c-navy);
  color: var(--c-white);
}

.service-panels {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.service-panel {
  --service-color: var(--s1);
  display: none;
  margin-top: 50px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--service-color) 14%, white) 0%, color-mix(in srgb, var(--service-color) 4%, white) 100%);
  border: 2px solid color-mix(in srgb, var(--service-color), white);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  position: relative;
}

.service-panel.is-active::before {
  content: "";
  position: absolute;
  margin: -20px auto 0;
  inset: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 25px 20px 25px;
  border-color: transparent transparent var(--service-color) transparent;
}

.service-panel.is-active {
  display: block;
  animation: panelFadeIn 0.4s var(--ease-out);
}

@keyframes panelFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-panel h3 {
  text-align: center;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 800;
  color: var(--service-color);
  margin-bottom: 24px;
}

.service-panel-1 {
  --service-color: var(--s1);
}

.service-panel-2 {
  --service-color: var(--s2);
}

.service-panel-3 {
  --service-color: var(--s3);
}

.service-panel-4 {
  --service-color: var(--s4);
}

.service-panel-5 {
  --service-color: var(--s5);
}

.service-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.service-links .service-link-item:nth-child(5) {
  grid-column: 1 / -1;
  max-width: calc(50% - 8px);
  margin-inline: auto;
}

.service-link-item {
  display: block;
  background: var(--c-white);
  border: 1.5px solid color-mix(in srgb, var(--service-color) 35%, white);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.service-link-item:hover,
.service-link-item:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.service-link-item.is-static {
  cursor: default;
}

.service-link-item.is-static:hover {
  transform: none;
  box-shadow: none;
}

.service-link-item.is-static .link-title {
  color: var(--c-text);
}

.service-link-item .link-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: clamp(18px, 1.5vw, 22px);
  color: var(--service-color);
  margin-bottom: 8px;
}

.service-link-item .link-title .link-chevron {
  transition: transform 0.3s var(--ease-out);
  font-size: 40px;
  font-weight: 400;
}

.service-link-item:hover .link-chevron,
.service-link-item:focus-visible .link-chevron {
  transform: translateX(4px);
}

.service-link-item p {
  font-size: 16px;
  color: var(--c-text-soft);
  line-height: 1.2;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--c-navy);
  color: white;
  padding-top: clamp(48px, 6vw, 72px);
}

.footer-top {
  padding-bottom: 24px;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-logo img {
  height: 30px;
  filter: brightness(0) invert(1);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  font-size: 16px;
  color: white;
  margin-bottom: 16px;
}

.footer-nav a {
  padding-inline: 12px;
  transition: color 0.25s ease;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.footer-nav li:last-child a {
  border-right: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--c-yellow);
}

.footer-address {
  font-size: 16px;
  color: white;
}

.footer-middle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 24px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  transform: translateY(-3px);
}

.footer-social img {
  width: 40px;
  height: 40px;
}

.footer-badge img {
  height: 50px;
  border-radius: 4px;
}

.footer-bottom {
  text-align: center;
  padding-block: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   回頂部按鈕（Go Top）
   捲動過半後於右下角顯示：藍色圓形按鈕，中間為白色三角形
   ========================================================================== */

.go-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 600;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--c-blue-mid) 0%, var(--c-navy) 100%);
  box-shadow: 0 6px 18px rgba(20, 41, 121, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0.3s, box-shadow 0.25s ease;
}

.go-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.go-top-btn:hover,
.go-top-btn:focus-visible {
  box-shadow: 0 8px 22px rgba(20, 41, 121, 0.45);
  transform: translateY(-3px) scale(1.04);
}

.go-top-btn .go-top-triangle {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 12px solid var(--c-white);
}