:root {
  --color-orange: #f6a54a;
  --color-blue: #65a5d1;
  --color-deep-blue: #1a365d;
  --color-oliver-green: #b4a90a;
  --color-yellow: #b3ab1a;
  --color-body-text: #4a4a4a;
  --color-dark: #3f4555;
  --color-white: #ffffff;
  --color-grey: #7d7d7d;
  --color-pure: #3e567c;
  --color-red: #422714;
  --color-deep-grey: #005e00;
  --color-prepare: #f49d34;
  --color-cleanse: #5d9bc2;
  --color-renew: #aaa817;
  --transition-speed: 0.4s;
}

body {
  font-family: "Noto Sans TC", sans-serif;

  color: var(--color-dark);
  overflow-x: hidden;

  /* 背景圖設定 */
  background-image: url("../images/bg.jpg");
  background-attachment: fixed; /* 關鍵：固定背景不隨捲動移動 */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover; /* 自動填滿並保持比例 */

  /* 視覺優化：平滑滾動 */
  scroll-behavior: smooth;

  /* 字體渲染優化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

H1 {
  font-weight: 800;
  color: var(--color-deep-blue);
}

H2 {
  font-weight: 700;
  color: var(--color-oliver-green);
}

H3,
H4 {
  color: var(--color-pure);
  font-weight: 700;
}

H5,
H6 {
  color: var(--color-red);
  font-weight: 600;
}

p,
ul {
  color: var(--color-grey);
  letter-spacing: 0.8px;
  line-height: 26px;
}

.sticky-wrapper {
  position: sticky;
  top: 0;
  z-index: 1050;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Header Container */
.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
}

.logo-box h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: 2px;
}

.header-logo {
  background: var(--color-yellow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 15px 0;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1030;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.header-logo h1 {
  margin: 0;
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: 2px;
}

.custom-nav {
  width: 100%;
}

.nav-link {
  color: var(--color-dark) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 15px !important;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-white) !important;
}

.nav-link-01 {
  color: #d3d1d1 !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 15px !important;
}

.navbar-toggler {
  border: 1px solid white !important;
  background-color: var(--color-oliver-green) !important;
  color: white !important;
  padding: 8px 10px !important;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  display: none;
}

.inner-hero {
  width: 100%;
  background: linear-gradient(
    180deg,
    rgba(115, 165, 202, 0.2) 0%,
    rgba(241, 164, 72, 0.1) 100%
  );
  padding: 60px 20px;
  text-align: center;
}

.inner-hero h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 15px;
}

.hero-section {
  width: 100%;
  background: linear-gradient(
    135deg,
    var(--color-blue) 0%,
    #a48ccb 50%,
    var(--color-orange) 100%
  );
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.1"/%3E%3C/svg%3E');
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 500;
  margin-bottom: 30px;
}

.hero-btn {
  background-color: var(--color-yellow);
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 12px 40px;
  border-radius: 50px;
  border: none;
  box-shadow: 0 4px 15px rgba(175, 168, 26, 0.4);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.hero-btn:hover {
  background-color: #968f15;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(175, 168, 26, 0.6);
  color: white;
}

.grid-section {
  padding: 40px 0;
}

.grid-section .container {
  max-width: 1000px !important;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--color-dark);
}

.grid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px 5px;
  padding: 35px 10px;
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  border-radius: 20px;
  text-decoration: none;
  color: var(--color-dark);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}

.grid-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(241, 164, 72, 0.2);
  border-color: rgba(241, 164, 72, 0.3);
  color: var(--color-dark);
}

.icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--color-orange) 0%,
    rgba(241, 164, 72, 0.7) 100%
  );
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.grid-card:nth-child(even) .icon-wrapper {
  background: linear-gradient(
    135deg,
    var(--color-blue) 0%,
    rgba(115, 165, 202, 0.7) 100%
  );
}

.grid-card:nth-child(3n) .icon-wrapper {
  background: linear-gradient(
    135deg,
    var(--color-yellow) 0%,
    rgba(175, 168, 26, 0.7) 100%
  );
}

.grid-card:hover .icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.grid-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 2;
}

.main-container {
  max-width: 1000px !important;
  margin: 40px auto;
  padding: 0 20px;
}

.date-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
}

.date-title::before,
.date-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ddd;
  margin: 0 20px;
}

.download-card {
  background: #fff;
  border-radius: 15px;
  padding: 30px;
  height: 100%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.download-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.download-list li {
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
}

.download-list li::before {
  content: "•";
  color: var(--color-blue);
  position: absolute;
  left: 0;
}

.download-list a {
  text-decoration: none;
  color: var(--color-blue);
  font-weight: 500;
}

.class-card {
  border: none;
  border-radius: 10px;
  background: white;
  height: 100%;
  overflow: hidden;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition-base);
}

.class-img-placeholder {
  background-color: var(--primary-light);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 3rem;
}

.process-step {
  position: relative;
  z-index: 2;
}

.process-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  background: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.process-icon i {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.process-step:hover .process-icon {
  transform: translateY(-5px);
}

#steps {
  background-color: var(--primary-light);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.agenda-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 300px;
}

.path-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.path-line {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 3;
  stroke-dasharray: 10, 10;
  opacity: 0.4;
}

.step-node {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 200px;
}

.node-dot {
  width: 20px;
  height: 20px;
  background: var(--color-yellow);
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 4px solid white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.step-bubble {
  background: white;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.runner {
  position: absolute;
  font-size: 3rem;
  z-index: 10;
  transform: translate(-60%, -220%);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.running-animation {
  display: inline-block;
  animation: run-bounce 0.35s infinite alternate ease-in-out;
  transform-origin: bottom center;
}

@keyframes run-bounce {
  0% {
    transform: translateY(0) scaleY(0.9) skewX(-15deg);
  }

  100% {
    transform: translateY(-15px) scaleY(1.05) skewX(-5deg);
  }
}

.custom-tab-wrapper {
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.custom-tab {
  gap: 15px;
  scroll-snap-type: x mandatory;
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 10px 25px;
  font-weight: 700;
  color: var(--color-grey);
  border-radius: 50px;
  transition: all 0.3s ease;
  position: relative;
  scroll-snap-align: center;
}

.tab-btn:hover {
  color: var(--color-deep-grey);
}

.tab-btn.active {
  background: var(--color-deep-grey);
  color: var(--color-white);
  box-shadow: 0 5px 15px rgba(110, 162, 202, 0.3);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
       Mobile Sticky Bottom CTA（01.css 專用）
    ========================================== */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(246, 165, 74, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 1050;
}

.mobile-sticky-cta.visible {
  transform: translateY(0);
  opacity: 1;
}

.cta-btn {
  display: block;
  width: 200px;
  text-align: center;
  background: var(--color-pure);
  color: white;
  font-weight: 400;
  font-size: 0.85rem;
  padding: 14px;
  border-radius: 24px;
  transition: all 0.3s ease;
}

.cta-btn:hover {
  background: var(--color-blue);
  transform: translateY(-2px);
}

.footer {
  background-color: var(--color-orange);
  color: rgba(255, 255, 255, 0.8);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  margin-top: 80px;
}

hr {
  border: none; /* 隱藏預設橫線 */
  height: auto;
  text-align: center; /* 讓內容居中 */
  margin: 30px 0; /* 上下留白，營造質感 */
}

hr::after {
  content: "★ ★ ★ ★ ★ ★"; /* 你也可以改成 * * * 或 ● ● ● */
  color: #b4a90a; /* 使用元素使用.jpg中的黃綠色 */
  font-size: 18px; /* 調整星號大小 */
  letter-spacing: 0.8em; /* 調整星號之間的間距 */
  font-family: serif; /* 使用襯線體會更有專業醫療感 */
}
/* 讓滑鼠移到圖片上時顯示手指符號，並加入輕微放大效果 */
.preview-img {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.preview-img:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* 卡片基礎樣式 */
.menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  transition: all 0.3s ease; /* 平滑過渡 */
}

/* --- 重點：Hover 效果 (Opacity) --- */
.menu-card:hover {
  opacity: 0.55; /* 懸停時透明度縮減 */
  transform: translateY(-4px); /* 輕微上浮感 */
}
/* 這裡是核心邏輯：針對不同 data-target 在 active 時給予不同顏色 */
.tab-btn[data-target="prepare"].active {
  background-color: var(--color-prepare);
  color: #fff;
  box-shadow: 0 4px 15px rgba(244, 157, 52, 0.4);
}

.tab-btn[data-target="cleanse"].active {
  background-color: var(--color-cleanse);
  color: #fff;
  box-shadow: 0 4px 15px rgba(93, 155, 194, 0.4);
}

.tab-btn[data-target="renew"].active {
  background-color: var(--color-renew);
  color: #fff;
  box-shadow: 0 4px 15px rgba(170, 168, 23, 0.4);
}

.accordion-button.collapsed {
  background-color: #ffffff;
  color: #333;
}

.accordion-button:not(.collapsed) {
  background-color: #f49d34 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.accordion-button:not(.collapsed)::after {
  filter: brightness(0) invert(1);
}
/* ==========================================
       Responsive Media Queries
    ========================================== */

/* ≤ 767px */
@media (max-width: 767px) {
  .path-svg {
    display: none;
  }

  .agenda-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
    min-height: auto;
    padding: 40px 0;
  }

  .step-node {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none;
    margin: 0 auto;
  }
}

/* ≤ 768px */
@media (max-width: 768px) {
  .custom-tab {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .custom-tab::-webkit-scrollbar {
    display: none;
  }
}

/* ≤ 991px */
@media (max-width: 991px) {
  .logo-box {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .header-container {
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 15px;
  }

  .navbar-toggler {
    display: block;
  }

  .navbar-collapse {
    background-color: var(--color-yellow);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 15px;
    z-index: 1000;
  }
  .grid-title {
    font-size: 0.65rem;
    font-weight: 600;
    margin: 0;
    position: relative;
    z-index: 2;
  }
  .custom-tab {
    gap: 5px;
    scroll-snap-type: x mandatory;
  }
  .tab-btn {
    font-size: 0.8rem;
  }
}
