/* ====================================
   全站變數
==================================== */
:root {
  --color-bg: #050b18;
  --color-text: #ffffff;
  --color-muted: #c0c5d6;
  --color-accent: #ffa02c;
  --color-brend: #0e3264;
  --glass-dark: rgba(6, 12, 24, 0.36);
  --content-width: 1120px;
  --header-height: 72px;

  /* Hero（首頁或主宣言用） */
  --fs-hero-title: clamp(1.8rem, 4vw + 0.5rem, 3rem);
  --fs-hero-subtitle: clamp(1.05rem, 1.4vw, 1.2rem);
  --fs-page-title: clamp(1.9rem, 3vw, 2.4rem);
  --fs-section-title: clamp(1.5rem, 2.1vw, 2rem);
  --fs-section-subtitle: clamp(0.95rem, 1.15vw, 1rem);
  --fs-eyebrow: clamp(0.7rem, 0.9vw, 0.8rem);
  --fs-card-title: clamp(1.05rem, 1.2vw, 1.15rem);
  --fs-body: clamp(0.95rem, 1.1vw, 1rem);

  /* 內文 / 條列 */
  --fs-body: 0.95rem;
  --fs-small: 0.82rem;

  /* 行高（一起統一） */
  --lh-tight: 1.25;
  --lh-base: 1.65;
  --lh-list: 1.55;

  /* 字距（可選） */
  --ls-title: 0.02em;
  --ls-eyebrow: 0.22em;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Inter",
    "Noto Sans", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei",
    "Helvetica Neue", Arial, sans-serif;

  --eyebroe-margin-bottom: clamp(8px, 1.2vw, 12px);
  --section-title-margin-bottom: clamp(16px, 2.5vw, 24px);
  --section-margin-bottom: clamp(32px, 4.5vw, 48px);
  --footer-margin-bottom: clamp(48px, 6vw, 72px);
}
/* ====================================
   Reset
==================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: #050b18;
}

/* 包裹內容的 max width */
.page-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}
/* ====================================
   全域設定
==================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
}

img {
  max-width: 100%;
  display: block;
}

/* ====================================
   🔒 全站統一左右邊界的容器
==================================== */

.container {
  width: 100%;
  max-width: var(--content-width); /* 1120px */
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ====================================
   Header（左｜中｜右）
==================================== */

.site-header {
  width: 100%;
  height: var(--header-height);
  position: fixed;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

.site-header-inner {
  width: 100%;
  display: flex;
  align-items: center;
}

.header-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo 大小可依需求調整 */
.brand-logo {
  height: 55px;
  width: auto;
}

/* 公司名稱（水平） */
.brand-name {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap; /* 避免換行 */
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* ========== Header nav dropdown ========== */

/* nav-links 預期是 flex，若你本來就有可以不用這行 */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
/* 讓「關於我們」這個 button 長得像 nav link */
.nav-link--parent {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.nav-item--has-dropdown {
  position: relative;
}
.nav-item {
  position: relative;
}

/* 關於我們有下拉 */
.nav-item--has-dropdown .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* 小箭頭 */
.nav-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transform: translateY(1px);
  transition: transform 0.16s ease;
}

/* 下拉本體 */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.4rem;
  min-width: 180px;
  padding: 0.5rem 0;
  border-radius: 10px;

  background: rgba(5, 11, 24, 0.96); /* 深色毛玻璃感 */
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);

  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 1000;
}

/* hover 時展開 */
.nav-item--has-dropdown:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item--has-dropdown:hover .nav-caret {
  transform: translateY(1px) rotate(180deg);
}

/* 下拉裡的連結 */
.nav-dropdown-link {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

/* hover 效果 */
.nav-dropdown-link:hover {
  background: rgba(255, 160, 44, 0.14);
  color: var(--color-text);
}

/* 子項 active 樣式（目前所在頁面） */
.nav-dropdown-link--active {
  color: var(--color-accent);
  font-weight: 600;
}
.nav-link {
  text-decoration: none;
  color: var(--color-muted);
  font-size: 14px;
  position: relative;
}

.nav-link--active {
  color: #fff;
}

.nav-link--active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
}

.header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
}

.lang-pill {
  padding: 4px 10px;
  font-size: 12px;
  color: var(--color-muted);
  cursor: default;
}

.lang-pill--active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
}

.header-cta {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid transparent;
  transition: 0.25s ease;
  text-decoration: none; /* 移除底線 */
}

.header-cta:hover {
  background: #ffa02c;
  color: #050b18; /* 深藍文字 */
  transform: translateY(-1px);
}

/* 漢堡按鈕：桌機先隱藏 */
.nav-toggle {
  display: none; /* 桌機隱藏，手機在 @media 裡開 */
  position: relative;
  width: 20px;
  height: 18px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

/* 三條線：絕對定位 */
.nav-toggle span {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  height: 2px;
  border-radius: 2px;
  background-color: #ffffff;
  transition: 0.25s ease;
}

/* 上中下三條的位置 */
.nav-toggle span:nth-child(1) {
  top: 0;
}

.nav-toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle span:nth-child(3) {
  bottom: 0;
}
/* ======== 叉叉動畫 ======== */

/* 第一條移到中間 + 旋轉 45° */
.site-header.is-open .nav-toggle span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

/* 中間這條隱藏 */
.site-header.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

/* 第三條也移到中間 + 旋轉 -45° */
.site-header.is-open .nav-toggle span:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}
/* =========================================
   Services Rail Section (FINAL)
   C-curve rail + vertical focus services
   ========================================= */

.services-rail {
  position: relative;
  padding: clamp(3.5rem, 5vw, 5.8rem) 0;
  padding-bottom: 0;
  color: var(--color-text, #eaf0ff);
  overflow: hidden;
  background-image: linear-gradient(rgba(5, 11, 24, 0.2), rgba(5, 11, 24, 0.3)),
    url("assests/images/index.png"); /* ← 換成你的圖片路徑 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: var(--font-sans);
}

/* 深色遮罩（搭配你的城市底圖） */
.services-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 11, 24, 0.94),
    rgba(5, 11, 24, 0.78) 45%,
    rgba(5, 11, 24, 0.92)
  );
  z-index: 0;
  pointer-events: none;
}

.services-rail__inner {
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */

.services-rail__head {
  text-align: center;
  margin-top: 3rem;
  margin-bottom: var(--section-margin-bottom);
  font-family: var(--font-sans);
}

.services-rail__eyebrow {
  margin-bottom: var(--eyebroe-margin-bottom);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(234, 240, 255, 0.65);
}

.services-rail__title {
  margin-bottom: var(--section-title-margin-bottom);
  font-size: var(--fs-section-title);
  letter-spacing: 0.06em;
  font-weight: 700;
}

.services-rail__subtitle {
  margin: 0.7rem auto 0;
  max-width: 62ch;
  font-size: var(--fs-section-subtitle);
  line-height: 1.7;
  color: rgba(234, 240, 255, 0.72);
}
.only-mobile {
  display: none;
}
/* ---------- Layout ---------- */

.services-rail__body {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: clamp(1.4rem, 2.6vw, 2.2rem);
  align-items: stretch;
  max-height: 900px;
}

/* ---------- Left Rail (C curve) ---------- */

/* === Rail 跟著右側卡片總高度伸展（解決 A4 短短的問題） === */
/* 1) 確保容器完全透明 */
.services-rail__track,
.rail-wrap,
.rail {
  background: transparent;
}

.services-rail__track {
  align-self: stretch;
  position: relative;
  pointer-events: none;
}

/* rail-wrap 吃滿左欄高度（= 右側列表高度） */
.rail-wrap {
  height: 100%;
  display: flex;
  justify-content: center;
}

/* SVG 本體吃滿 rail-wrap 高度 */
.rail {
  width: 120px;
  height: 100%;
  display: block;
  overflow: visible;
}

/* C 弧線本體 */
.rail__path {
  stroke: var(--color-text);
  stroke-width: 2;
  stroke-dasharray: 6 9;
  stroke-linecap: round;
  fill: none;
  z-index: 1;
}

/* 節點 */
/* 你的 dot（白色小圈） */
.rail__dot {
  opacity: 0.45;
  transition: opacity 0.18s ease, filter 0.18s ease;
}

/* hover/active 的 dot 本體變亮（不會跑位） */
.rail__dot.is-active,
.rail__dot.is-hover {
  opacity: 1;
}

/* halo（橘色外圈）只做「r + opacity」變化 */
.rail__halo {
  fill: none;
  stroke: rgba(255, 160, 44, 0.9);
  stroke-width: 2.5;
  opacity: 0.85;
  r: 8;
  transition: r 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}
.rail__halo.is-hover {
  r: 12;
  opacity: 1;
  filter: drop-shadow(0 0 14px rgba(255, 160, 44, 0.65));
}
/* halo 在 hover 時放大，但不改 cx/cy */
.rail__halo.is-boost {
  opacity: 1;
}
/* ---------- Right Content List ---------- */
/* ========= Card：深玻璃底 + 漸層橘邊框（不靠 mask） ========= */
.svc-item__card {
  --glass-inactive: rgba(6, 12, 24, 0.3);
  --glass-active: rgba(6, 12, 24, 0.62);
  --stroke: rgba(255, 160, 44, 0.18);
  --stroke-hover: rgba(255, 160, 44, 0.42);
  --glow: rgba(255, 160, 44, 0.16);

  position: relative; /* 你有 ::after 需要這個 */
  border-radius: 20px;
  border: 1px solid var(--color-accent);

  background: linear-gradient(var(--glass-inactive), var(--glass-inactive));

  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);

  opacity: 1; /* ✅ base 先給 1 */
  transform: translateY(0) scale(1);

  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease,
    background 0.25s ease, border-color 0.25s ease;

  padding-left: 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin: 1.5rem;
}

/* 角落淡光（跟你截圖的氛圍很像） */
.svc-item__card::after {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;

  background: radial-gradient(
      380px 220px at 22% 25%,
      rgba(255, 160, 44, 0.12),
      transparent 60%
    ),
    radial-gradient(
      420px 280px at 78% 20%,
      rgba(255, 160, 44, 0.1),
      transparent 65%
    );
  opacity: 0.65;
  filter: blur(6px);
  transition: opacity 0.22s ease;
}

/* Hover：上浮 + 外圈 glow + 邊框更亮 */
.svc-item__card:hover {
  opacity: 1;
  transform: translateY(-4px);
}

.svc-item__card:hover::after {
  opacity: 0.9;
}

/* is-active 跟 hover 同樣亮一些 */
.svc-item.is-active .svc-item__card {
  opacity: 1 !important; /* ✅ 直接鎖死，避免被其它 rule 咬到 */
  transform: translateY(-2px) scale(1);

  background: linear-gradient(var(--glass-active), var(--glass-active));

  border: 1px solid var(--color-accent); /* ✅ 記得 solid */

  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 160, 44, 0.2),
    0 0 30px rgba(255, 160, 44, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.svc-item__card::before,
.svc-item__card::after {
  border-radius: inherit;
}
/* ===== 2) Inactive：透明（沉下去 = 透明） ===== */
/* 用 :not(:hover) 避免你 hover 時又被拉回透明 */
.svc-item:not(.is-active) .svc-item__card:not(:hover) {
  opacity: 0.72;
  transform: translateY(0) scale(0.985);
  border-color: rgba(255, 160, 44, 0.14);
}

/* ===== 3) Hover：非 active 卡片稍微浮出來 ===== */
.svc-item:not(.is-active) .svc-item__card:hover {
  opacity: 0.95;
  transform: translateY(-4px) scale(1);
  border-color: var(--stroke-hover);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6), 0 0 26px var(--glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
/* =================================================
   Card 本體：強制三欄（覆蓋 svc-item__card--cols-2）
   左：文字｜中：條列｜右：浮水印
   ================================================= */
.svc-item__card.svc-item__card--cols-2 {
  display: grid;
  grid-template-columns:
    minmax(220px, 0.8fr) /* 👈 左邊更窄 */
    minmax(420px, 1.6fr) /* 👈 中間更寬 */
    minmax(140px, 0.6fr);
  grid-template-areas: "head lists wm";
  gap: clamp(1rem, 2.2vw, 1.75rem);
  position: relative;
  align-items: center;
}

/* =========================
   左：標題區
   ========================= */
.svc-item__head {
  grid-area: head;
  position: relative;
  z-index: 2; /* 壓過浮水印 */
  min-width: 0;
}

.svc-item__titles {
  display: grid;
  gap: 0.25rem;
  color: var(--color-accent);
  font-size: var(--fs-card-title);
  font-family: var(--font-sans);
}

.svc-item__title {
  margin: 0;
}

.svc-item__en {
  margin: 0;
  opacity: 0.75;
}

.svc-item__desc {
  margin: 0.75rem 0 0;
  line-height: 1.6;
  opacity: 0.9;
}

/* =========================
   中：條列（2 欄 → 左三右二）
   ========================= */
.svc-item__lists {
  grid-area: lists;
  position: relative;
  z-index: 2;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

/* 每個 ul */
.svc-item__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

/* li 視覺 */
.svc-item__list > li {
  position: relative;
  padding-left: 1.1rem;
  line-height: 1.55;
  opacity: 0.92;
}

/* 空心橘點 */
.svc-item__list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em; /* 垂直對齊文字中線 */
  width: 8px;
  height: 8px;
  background: transparent;
  border: 2px solid var(--color-accent, #ffa02c);
  border-radius: 50%;
}

/* =========================
   右：浮水印
   ========================= */
.svc-item__wm {
  grid-area: wm;
  position: relative;
  z-index: 1;

  display: grid;
  align-items: end;
  justify-items: end;

  pointer-events: none;
  user-select: none;
}

/* SVG 浮水印樣式 */
.svc-item__wm svg {
  width: min(220px, 100%);
  height: auto;
  opacity: 0.12;
  transform: translate(-6%, -6%) scale(1.05);
  color: rgba(255, 255, 255, 0.9);
}

/* 舊的小 icon 直接隱藏 */
.svc-item__icon {
  display: none !important;
}

/* ===== 合作模式 ===== */
.pill-section {
  padding: clamp(3rem, 5vw, 5rem) 0;
  font-family: var(--font-sans);
  margin-bottom: var(--footer-margin-bottom);
}
.pill-head {
  text-align: center;
  margin-top: 3rem;
  margin-bottom: var(--section-margin-bottom);
  padding-bottom: clamp(1.8rem, 3vw, 2.6rem);
}
.pill-head-eyebrow {
  margin-bottom: var(--eyebroe-margin-bottom);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(234, 240, 255, 0.65);
}
.pill-head-title {
  margin-bottom: var(--section-title-margin-bottom);
  font-size: var(--fs-section-title);
  letter-spacing: 0.06em;
  font-weight: 700;
}
.pill-head-subtitle {
  margin: 0.7rem auto 0;
  max-width: 62ch;
  font-size: var(--fs-section-subtitle);
  line-height: 1.7;
  color: rgba(234, 240, 255, 0.72);
}
/* ====== layout ====== */
.pill-title {
  margin: 0 0 1.5rem;
  text-align: center;
}

.pill-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(1.25rem, 2vw, 2rem);
  flex-wrap: wrap; /* 小螢幕自動換行 */
}

/* 一顆膠囊（文字 + SVG） */
.pill-item {
  width: min(220px, 42vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* SVG 容器：固定高度，避免文字上下跳 */
.pill-svg {
  width: 100%;
  display: grid;
  place-items: center;
  margin: 0.35rem 0;
}

.pill-svg svg {
  width: clamp(120px, 14vw, 176px);
  height: auto;
  display: block;
}

/* ====== 控制膠囊底色 ====== */

.pill-icon {
  --pill-glass: rgba(255, 255, 255, 0.72); /* 白色玻璃主體 */
  --pill-stroke: rgba(255, 255, 255, 0.45); /* 邊緣亮線 */
  --pill-shadow: rgba(0, 0, 0, 0.18); /* 輕陰影 */
  --pill-highlight: rgba(255, 255, 255, 0.65);
}
.pill-row {
  --pill-glass-1: rgba(255, 255, 255, 0.16);
  --pill-glass-2: rgba(255, 255, 255, 0.06);
  --pill-stroke: rgba(255, 255, 255, 0.18);
  --pill-shadow: rgba(0, 0, 0, 0.38);
}
.pill-base {
  fill: url(#pillGlass);
  stroke: var(--pill-stroke);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 10px 20px var(--pill-shadow));
}
.pill-inner {
  fill: none;
  stroke: url(#pillInner);
  stroke-width: 1.2;
  opacity: 0.9;
  vector-effect: non-scaling-stroke;
}
.pill-icon .pill-core {
  fill: rgba(14, 50, 100, 0.95);
}
.pill-icon .pill-glyph {
  fill: rgba(255, 255, 255, 0.92);
}
.pill-icon .pill-shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.6;
  stroke-linecap: round;
  opacity: 0.9;
}
.pill-item:hover .pill-icon {
  --pill-glass: rgba(255, 255, 255, 0.82);
  --pill-stroke: rgba(255, 255, 255, 0.6);
  --pill-shadow: rgba(0, 0, 0, 0.26);
}

/* ====== labels ====== */
.pill-label {
  width: 100%;
  text-align: center;
  max-width: 18rem;
}

.pill-label h3 {
  margin: 0 0 0.25rem;
  letter-spacing: 0.01em;
  color: var(--color-accent);
  font-size: var(--fs-card-title);
}

.pill-label p {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.5;
  opacity: 0.85;
}

/* 預設：上下都先顯示（等等用 odd/even 控制） */
.pill-label--top,
.pill-label--bottom {
  display: block;
}

/* ====== 核心：奇數上字、偶數下字 ====== */
.pill-item:nth-child(odd) .pill-label--bottom {
  display: none;
}
.pill-item:nth-child(even) .pill-label--top {
  display: none;
}

/* ====== RWD：手機版改成統一「文字在上」更好讀（可拿掉） ====== */
@media (max-width: 720px) {
  .pill-item .pill-label--bottom {
    display: none !important;
  }
  .pill-item .pill-label--top {
    display: block !important;
  }
}

/* =========================
   RWD：手機改上下堆疊
   ========================= */
@media (max-width: 900px) {
  .svc-item__card.svc-item__card--cols-2 {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "lists";
  }

  .svc-item__lists {
    grid-template-columns: 1fr;
  }

  .svc-item__wm {
    display: none;
  }
}

/* 你原本的小 icon 不要干擾 */
.svc-item__icon {
  display: none !important;
}
/* ====================================
   footer
==================================== */

/* ===== Footer：玻璃感版本 ===== */
.site-footer {
  background: rgba(14, 50, 100, 0.35); /* 半透明藍色玻璃 */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 3rem 1.5rem 2rem;
  font-family: var(--font-sans);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* 內層，用在 <div class="page-shell footer-inner"> */
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}

/* 左邊品牌區 */
.footer-logo {
  width: 48px;
  height: auto;
  margin-bottom: 0;
}

.footer-brand-name {
  font-size: 1.1rem;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  margin-left: 0.2rem;
  letter-spacing: 0.06em;
}

.footer-desc {
  margin-top: 1rem;
  line-height: 1.7;
  opacity: 0.8;
  font-size: 0.9rem;
  max-width: 320px;
  text-align: justify;
}

/* 區塊標題（導覽 / 聯絡資訊） */
.footer-title {
  font-size: 1rem;
  font-family: var(--font-serif);
  margin-bottom: 1rem;
  color: #ffa02c;
  letter-spacing: 0.05em;
}

/* 中間導覽區 */
.footer-nav ul,
.footer-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li,
.footer-contact li {
  margin-bottom: 0.6rem;
}

.footer-nav a {
  color: #ffffff;
  text-decoration: none;
  transition: 0.2s ease;
  opacity: 0.9;
}

.footer-nav a:hover {
  color: #ffa02c;
  opacity: 1;
}

/* 右側聯絡資訊與按鈕 */
.footer_list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.footer_item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.25;
}

/* 共同的 icon 盒子：統一尺寸，解決 PNG/SVG 對齊 */
.footer_icon-wrap {
  width: 23px;
  height: 23px;
  flex: 0 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* mail 需要白底（不然白色信封會吃掉背景） */
.footer_icon-wrap--white {
  background: #fff;
  border-radius: 6px;
}

/* LINE PNG 放進盒子 */
.footer_line-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  /* 如果你覺得還是偏下，解開這行 */
  /* transform: translateY(-1px); */
}

/* mail SVG 尺寸 */
.footer_mail-icon {
  width: 28px;
  height: 28px;
  display: block;
}

/* 你要的：白底藍線 */
.footer_mail-icon rect {
  fill: #fff;
}
.footer_mail-icon line {
  stroke: var(--color-brend);
  stroke-width: 1.6;
  stroke-linecap: round;
}
/* 地圖 icon 尺寸 */
.footer_map-icon {
  width: 18px;
  height: 18px;
  display: block;
}

/* 地圖 icon 顏色 → 品牌藍 */
.footer_map-icon path {
  fill: var(--color-accent);
}
.footer_map-icon circle {
  fill: #ffffff;
}
.footer_text--nowrap {
  white-space: nowrap; /* 🚫 不換行 */
}

/* 最底下版權列 */
.footer-bottom {
  margin-top: 3rem;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0.75;
  font-size: 0.85rem;
}
/* =========================
   Global Button System
   - 統一形狀：膠囊 pill
   - 統一手感：高度、字重、hover
   - 層級：primary / ghost + md / lg
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  text-decoration: none; /* ✅ 去掉連結底線 */
  color: inherit; /* ✅ 避免變藍 / visited 變色 */
  -webkit-tap-highlight-color: transparent;

  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;

  border-radius: 999px; /* ✅ 統一形狀 */
  border: 1px solid rgba(255, 255, 255, 0.14);

  cursor: pointer;
  user-select: none;
  white-space: nowrap;

  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

/* 尺寸層級 */
.btn--md {
  height: 30px;
  padding: 0 1.05rem;
  font-size: 0.95rem;
}

.btn--lg {
  height: 36px;
  padding: 0 1.45rem;
  font-size: 1rem;
}

/* 主 CTA：橘色（Hero / 重要入口） */
.btn--primary {
  position: relative;
  overflow: hidden;

  background: rgba(255, 160, 44, 0.92); /* 橘色實心 */
  color: #081020;

  border: 1px solid rgba(255, 160, 44, 0.55);

  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);

  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, transform 0.2s ease;
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.25) 45%,
    rgba(255, 200, 140, 0.45) 50%,
    /* 橘色高光 */ rgba(255, 255, 255, 0.25) 55%,
    rgba(255, 255, 255, 0) 70%
  );

  opacity: 0;
  transform: translateX(-120%);
  transition: opacity 0.3s ease, transform 0.45s ease;

  pointer-events: none;
}
.btn--primary:hover {
  background: rgba(255, 160, 44, 0.16); /* 橘色透明 */
  color: #fff; /* 白字在透明橘上更乾淨 */

  border-color: rgba(255, 200, 140, 0.75); /* 亮橘邊框 */

  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 18px 38px rgba(0, 0, 0, 0.55);

  transform: translateY(-1px);
}

.btn--primary:hover::before {
  opacity: 1;
  transform: translateX(120%);
}

.btn--primary:active {
  transform: translateY(0);
}
.btn--primary-R {
  position: relative;
  overflow: hidden;

  /* 常態：透白 */
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-text);

  border: 1px solid rgba(255, 255, 255, 0.45);

  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.35);

  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, transform 0.2s ease;
}
.btn--primary-R::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.22) 45%,
    rgba(255, 230, 200, 0.28) 50%,
    rgba(255, 255, 255, 0.22) 55%,
    rgba(255, 255, 255, 0) 70%
  );

  opacity: 0;
  transform: translateX(-120%);
  transition: opacity 0.3s ease, transform 0.45s ease;
  pointer-events: none;
}
.btn--primary-R:hover {
  background: rgba(255, 245, 235, 0.22); /* 🔑 微暖白（不是橘） */
  color: var(--color-text);

  border-color: rgba(255, 180, 90, 0.55); /* 橘色邊緣提示 */

  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 16px 34px rgba(0, 0, 0, 0.45);

  transform: translateY(-1px);
}
.btn--primary-R:hover::before {
  opacity: 1;
  transform: translateX(120%);
}

/* 次 CTA：玻璃 / 線框（header 或 footer 低調入口） */
.btn--ghost {
  background: rgba(8, 16, 32, 0.35);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.btn--ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 160, 44, 0.35);
}

/* 鍵盤可用性（超重要） */
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 160, 44, 0.25),
    0 14px 32px rgba(0, 0, 0, 0.45);
}
/* =========================
   RWD：窄版改成上下堆疊
   ========================= */
/* ====================================
   @media
==================================== */
@media (max-width: 768px) {
  .site-header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }

  .site-header-inner > * {
    min-width: 0; /* 防止任何子元素撐爆 */
  }
  /* =================================
     左側：Logo
     ================================= */

  .brand-logo {
    width: 60px;
    height: auto;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
  }
  /* =================================
     中間：公司名稱（絕對置中）
     ================================= */

  .brand-name {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    /* 60px logo + 56px 漢堡 + 緩衝 */
    max-width: calc(100% - 60px - 56px - 1rem);
    pointer-events: none;
  }

  /* =================================
     右側：漢堡按鈕
     ================================= */

  .header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
  }

  .lang-toggle,
  .btn--header {
    display: none; /* 手機先隱藏 */
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    z-index: 2000;
  }

  /* =================================
     手機版導覽面板（fixed，下拉）
     ================================= */

  .header-center {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;

    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;

    background: rgba(5, 11, 24, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;

    z-index: 900;
  }

  /* 開啟狀態 */
  .site-header.is-open .header-center {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .header-center .nav-links .btn--header {
    display: inline-flex; /* 在面板內要顯示回來 */
    width: 100%;
    max-width: 200px;
    justify-content: center;
    margin-top: 0.5rem;
  }

  /* =================================
     Nav 結構（垂直清單）
     ================================= */

  .header-center .nav,
  .header-center .nav-links {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .header-center .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem 1.75rem;
  }

  .header-center .nav-item {
    width: 100%;
  }

  .header-center .nav-link,
  .header-center .nav-dropdown-link {
    display: block;
    width: 100%;
    padding: 0.25rem 0;
    text-align: left;

    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* =================================
     手機版「關於我們」子選單：預設展開
     ================================= */

  .nav-item--about .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;

    background: transparent;
    box-shadow: none;
    padding-left: 0.75rem;
    margin-top: 0.25rem;
  }

  .nav-dropdown-link {
    font-size: 0.9rem;
    opacity: 0.85;
  }

  /* =================================
     內容區左右內距
     ================================= */

  .page-shell {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .only-mobile {
    display: inline;
  }
  .svc-item__card {
    grid-template-columns: 1fr;
  }

  .svc-item__lists {
    grid-template-columns: 1fr; /* 清單改一欄 */
  }

  .svc-item__wm {
    display: none; /* 手機通常不放浮水印避免擠 */
  }
  .services-rail__track {
    display: none ;
  }

  .services-rail__body {
    grid-template-columns: 1fr ; /* 取消左欄 */
    max-height: 1500px;
  }
   /* 整個 footer 內容區 */
  .site-footer .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }
  .svc-item__card {
    padding: 2rem;
  }

  /* ====================================
   @footer
  ==================================== */
  /* 整個 footer 內容區 */
  .site-footer .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }
  /* 三個欄位本身 */
  .footer-brand,
  .footer-nav,
  .footer-contact {
    align-items: center;
    text-align: center;
  }

  /* Logo + 公司名 */
  .footer-brand .brand {
    justify-content: center;
  }

  /* 導覽 ul */
  .footer-nav ul {
    padding: 0;
  }

  .footer-nav li {
    list-style: none;
  }
  /* 地址不要硬換行偏左 */

  /* ① 整塊 footer-contact 置中 */
  .footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center; /* 關鍵：整塊置中 */
    max-width: 220px; /* ⭐ 關鍵：限制盒子寬度 */
  }

  /* ② 隱形盒子：限制寬度，讓 li 對齊 */
  .footer_list {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    list-style: none;
  }

  /* ③ 每一行 icon + 文字 對齊 */
  .footer_item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
  }

  /* ④ 文字對齊（讓地址多行好看） */
  .footer_text {
    line-height: 1.6;
    text-align: left;
  }

  /* 最底下 copyright */
  .footer-bottom {
    text-align: center;
    padding: 1.25rem 1rem;
  }
  .only-mobile {
    display: inline;
  }
  .only-computer {
    display: none;
  }
  .no-wrap {
    white-space: nowrap;
  }
}

