/* ===== Reset ===== */
* {
  box-sizing: border-box;
}

:root {
  --primary: #0C1E33;
  --gold: #C3A768;
  --gold-light: #E5D2A3;
  --danger: #e53935;
  --success: #00c853;

  --z-header: 1200;
  --z-menu: 1100;
  --z-hamburger: 1300;
  --z-cta: 900;
}

body {
  margin: 0;
  font-family: arial, 'Noto Serif TC', serif;
  background: var(--primary);
  color: #fff;
}

body,
html {
  height: auto;
  overflow-x: visible;
  overflow-y: auto;
}

.for-mobile {
  display: none;
}

.for-pc {
  display: block;
}

input,
select,
textarea {
  font-size: 16px;
}

a,
a:visited,
a:hover,
a:active {
  text-decoration: none;
  font-weight: 700;
}

a {
  color: #fff;
  transition: all 0.3s ease;
}

a:hover {
  color: #0e0e0e;
  transform: translateY(-2px);
}

.contents {
  padding: 0 10% 3em 10%;
}

.ms-auto {
  margin-left: auto;
}

/* ===== Header ===== */
header {
  background: rgba(8, 18, 31, 0.65);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;
  background: #072339;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  z-index: 9999;
}

/* 左右 */
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

/* LOGO */
.logo {
  color: #fff;
  font-weight: bold;
  font-size: 20px;
  white-space: nowrap;
}

/* ===== MENU（桌機）===== */
.menu {
  display: flex;
  gap: 0;
  right: 0;
}

.menu a {
  white-space: nowrap;
  position: relative;
  display: block;
  padding: 4px 20px;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* ===== 滑過效果（桌機） ===== */
.menu a::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: -4px;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #C3A768, #E5D2A3);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.menu a:hover::after {
  width: calc(100% - 40px);
}

/* ===== Hover 背景光感 ===== */
.menu a:hover {
  background: rgba(195, 167, 104, 0.08);
}

/* ===== 手機點擊效果 ===== */
.menu a:active {
  background: rgba(195, 167, 104, 0.2);
  transform: scale(0.97);
}

/* ===== 點擊瞬間金色閃光 ===== */
.menu a:active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(229, 210, 163, 0.4) 0%, transparent 70%);
  animation: clickFlash 0.4s ease;
}

/* ===== 動畫 ===== */
@keyframes clickFlash {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* ===== 漢堡 ===== */
.hamburger {
  display: none;
  position: relative;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: white;
  transition: 0.3s;
}

/* 三條線位置 */
.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
  bottom: 0;
}

/* 變 X */
.hamburger.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 140px 20px;
  text-align: center;
  z-index: 1;
  overflow: hidden;
  background:
    linear-gradient(rgba(7, 35, 57, .92), rgba(7, 35, 57, .75)),
    url('../images/hero-bg.png') top/cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(circle, rgba(195, 167, 104, .3), transparent 70%);
  filter: blur(40px);

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

/* canvas層 */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

#bgCanvas {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}

/* 內容 */
.hero-content {
  position: relative;
  z-index: 2;
}

.container {
  width: 100%;
  overflow: hidden;
}

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

/* ===== text ===== */
.text-gold {
  color: #C3A768;
}

.text-white {
  color: #fff;
}

.text-center {
  text-align: center;
}

/* ===== Buttons ===== */
.btn {
  padding: 12px 24px;
  border-radius: 6px;
  margin: 5px;
}

.btn-red {
  background: var(--danger);
}

.btn-green {
  background: var(--success);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
}

/* ===== flex ===== */
.d-flex-center {
  display: flex !important;
  justify-content: center;
}

.flex-rwd {
  flex-direction: row;
}

.flex-rwd div {
  padding: 20px;
}

/* ===== Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(195, 167, 104, 0.2);
  padding: 25px;
  border-radius: 12px;
  text-align: center;
}


/* ===== 流程 ===== */
.flow {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  text-align: center;
  white-space: nowrap;
}

.flow div {
  flex: 1;
}

.flow span {
  color: #C3A768;
  font-weight: bold;
}

/* ===== 影片 ===== */
.video {
  text-align: center;
  margin-top: 40px;
}

.video iframe {
  width: 100%;
  max-width: 100%;
  height: 450px;
}

/* ===== 浮動按鈕容器 ===== */
.floating-cta {
  position: fixed;
  right: 16px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

/* ===== 按鈕共用 ===== */
.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.floating-btn span {
  position: absolute;
  right: 70px;
  background: rgba(0, 0, 0, 0.8);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  opacity: 0;
  transition: 0.2s;
}

.floating-btn:hover span {
  opacity: 1;
}

/* ===== LINE ===== */
.btn-line {
  background: #06C755;
  animation: pulseLine 2s infinite;
}

@keyframes pulseLine {
  0% {
    box-shadow: 0 0 0 0 rgba(6, 199, 85, 0.6);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(6, 199, 85, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(6, 199, 85, 0);
  }
}

/* ===== 電話 ===== */
.btn-call {
  background: #E53935;
  font-size: x-large;
}

/* ===== hover（桌機） ===== */
.floating-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

/* ===== 點擊（手機） ===== */
.floating-btn:active {
  transform: scale(0.95);
}

/* ===== 光暈效果 ===== */
.floating-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.floating-btn:hover::after {
  opacity: 1;
}

/* ===== icon ===== */
.floating-btn i {
  font-size: 24px;
}

/* ===== 手機、平板 ===== */
@media(max-width:992px) {

  .for-mobile {
    display: block;
  }

  .for-pc {
    display: none;
  }

  .contents {
    padding: 0 1em 3em 1em;
  }

  .flex-rwd {
    flex-direction: column;
  }

  .flex-rwd div {
    padding: 5px 20px;
  }

  .flex-rwd div:first-child {
    padding: 15px 20px 5px 20px;
  }

  /* 漢堡出現 */
  .hamburger {
    display: flex;
  }

  /* MENU 改成側滑 */
  .menu {
    position: fixed;
    top: 60px;
    right: -100%;
    width: 260px;
    height: calc(100vh - 60px);
    background: #072339;

    flex-direction: column;
    padding: 20px;
    gap: 16px;

    transition: right 0.3s ease;
    z-index: 9999;
  }

  .menu a {
    padding: 14px 20px;
    font-size: 1.2em;
  }

  /* 開啟 */
  .menu.active {
    right: 0;
  }

  body.menu-open {
    overflow: hidden;
  }
}

@media (max-width:390px) {

  html,
  body {
    overflow-x: hidden;
    min-width: 340px;
  }

  .for-mobile {
    display: block;
  }

  .for-pc {
    display: none;
  }

  /* ===== Header ===== */
  nav {
    height: 60px;
    padding: 0 15px;
  }

  .logo {
    font-size: 16px;
  }

  /* ===== 內容區 ===== */
  .contents {
    padding: 0 15px 3em 15px !important;
  }

  /* ===== Hero ===== */
  .hero {
    overflow: hidden;
    padding: 100px 15px;
  }

  .hero .d-flex-center,
  .hero .flex-rwd {
    flex-direction: column !important;
    align-items: center;
    gap: 12px;
  }

  .hero .btn {
    width: 80%;
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
  }

  /* 防止按鈕亂飄 */
  .hero button {
    position: relative !important;
    transform: none !important;
    margin: 0;
  }

  /* ===== 文字 ===== */
  h1 {
    font-size: 22px;
    line-height: 1.4;
  }

  h2 {
    font-size: 18px;
  }

  p {
    font-size: 14px;
    line-height: 1.6;
  }

  /* ===== 按鈕（全域） ===== */
  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  /* ===== 卡片 ===== */
  .card {
    padding: 18px;
  }

  /* ===== Grid ===== */
  .grid {
    gap: 15px;
  }

  /* ===== 流程 ===== */
  .flow {
    gap: 0;
    font-size: small;
  }

  /* ===== 影片 ===== */
  .video iframe {
    height: 220px;
  }

  /* ===== 浮動按鈕 ===== */
  .floating-cta {
    right: 10px;
    bottom: 80px;
  }

  .floating-btn {
    width: 50px;
    height: 50px;
  }

  .floating-btn i {
    font-size: 20px;
  }

}

@media (max-width: 340px) {
  body {
    zoom: 0.9;
    /* 或 0.85 */
  }
}