:root {
  --orange: #EB6D32; /* 主題橙：navbar、footer、按鈕 */
  --green:  #0D9F6C; /* 華陀營綠：Tab、關卡 */
  --pink:   #EB87AF; /* 報名按鈕粉 */
  --yellow: #FFF100; /* 強調黃：標題、label */
  --brown:  #482900; /* DIY 區深棕文字 */
  --red:    #E8270F; /* Modal 報名紅 */
}

/* ===== BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  font-family: 'Noto Sans TC', 'LINESeedTW', sans-serif;
  overflow-x: hidden;
  margin: 0;
  min-height: 100vh;
  background-image: url('../images/bg.png');
  background-size: 100% 100%;
  background-position: top left;
  background-repeat: no-repeat;
  background-attachment: scroll;
  font-size: 17px;
  line-height: 25px;
  color: #fff;
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: #fff;
}
@media (min-width: 1200px) {
  .container {
    max-width: 1440px !important;
  }
}
.bg-orange {
  background: var(--orange);
}

/* ===== NAVBAR ===== */
#mainNav {
  background: var(--orange) !important;
  transition: transform 0.35s ease;
}
#mainNav.nav-hidden {
  transform: translateY(-100%);
}
.navbar-brand img {
  height: 46px;
  width: auto;
}
.nav-item {
  padding: 0 23px;
  border-left: 1px solid #fff;
  line-height: 1;
}
.nav-item:nth-child(1) {
  border-left: none;
}
@media (max-width: 991px) {
  .nav-item {
    border-left: none;
    padding: 12px 0;
  }
}
.nav-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-social-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333;
  font-size: 0.78rem;
  font-weight: 700;
  transition: opacity 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-social-link i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #fff;
  color: var(--orange);
  font-size: 1rem;
  flex-shrink: 0;
}
.nav-social-link i.fa-facebook-f { padding-left: 2px; }
.nav-social-link i.fa-instagram  { padding-left: 3px; }
.nav-social-link:hover { opacity: 0.7; }

/* ===== HERO ===== */
#hero {
  padding-top: 72px;
}
#hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== F01 活動介紹 ===== */
.section-intro {
  background: url('../images/section01-bg.jpg') no-repeat top left;
  background-size: cover;
  color: #fff;
  padding: 73px 0 39px 0;
}
/* 整個 intro-content 由 GSAP 控制展開動畫 */
.intro-content {
  font-size: 19px;
  line-height: 27px;
  display: flex;
  align-items: stretch;
  gap: 2rem;
  justify-content: center;
}
.intro-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.intro-left.is-expanded {
  text-align: left; /* 右欄展開後由 JS 加上 */
}
.intro-title {
  font-weight: 900;
  color: var(--yellow);
  margin-bottom: 10px;
}
.intro-right {
  width: 740px;
  max-width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  min-height: 300px;
}
.intro-right-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* < 1200px：上下排版（桌機版由 GSAP matchMedia 控制展開） */
@media (max-width: 1199.99px) {
  .intro-content { flex-direction: column; }
  .intro-right   { flex: unset; width: 100%; min-height: 160px; }
}
@media (max-width: 767px) {
  .intro-content { padding: 10px 12px; }
  .intro-right   { min-height: 120px; }
}

/* ===== F02 小小華陀營 ===== */
.section-camp {
  padding: 120px 0 80px;
  position: relative;
}
.camp-inner {
  display: flex;
  gap: 80px;
  align-items: flex-start;
}
.camp-info-col {
  position: relative;
  flex: 0 0 336px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.camp-mascot-img {
  position: absolute;
  left: -153.51px;
  top: -77px;
  width: 137.51px;
}
.camp-info-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.camp-info-text h2 {
  font-weight: 900;
}
.camp-label {
  color: var(--yellow);
}
.camp-desc {
  margin-top: 40px;
  margin-bottom: 40px;
  padding-bottom: 30px;
}
.camp-signup-btn {
  display: inline-block;
  align-self: flex-start;
  background: var(--pink);
  color: #fff;
  font-size: 25px;
  line-height: 36px;
  font-weight: medium;
  padding: 5px 30px 9px;
}
@media (max-width: 767px) {
    .camp-signup-btn {
        padding: 9px 30px 5px;
    }
}
.camp-signup-btn:hover {
  background: var(--pink);
  color: #fff;
}
.camp-main-col {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  position: relative;
}
/* 桌機版：左右欄之間的分隔線 */
@media (min-width: 992px) {
  .camp-main-col::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.5);
  }
}

/* Tab 列 */
.camp-nav-scroller {
  position: relative;
  overflow: hidden;
  border-radius: 40px;
  background: #fff;
  margin-bottom: 30px;
}
.camp-tabs-wrap {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 10px 20px 0px 20px;
  padding-bottom: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--green) transparent;
  -webkit-overflow-scrolling: touch;
}
.camp-tabs-wrap::-webkit-scrollbar       { height: 4px; }
.camp-tabs-wrap::-webkit-scrollbar-track { background: transparent; margin: 0 20px; }
.camp-tabs-wrap::-webkit-scrollbar-thumb { background: var(--green); border-radius: 99px; }
.camp-tab {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 99px;
  padding: 17px 53px;
  margin-bottom: 5px;
  font-size: 18px;
  line-height: 26px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}
.camp-tab:hover,
.camp-tab.active {
  background: var(--green);
  color: #fff;
}

/* 關卡圖面板 */
.camp-gate-panel        { display: none; }
.camp-gate-panel.active { display: block; }
.camp-gate-panel img    { width: 100%; }

/* 右側薑餅裝飾（F02/F03 之間，absolute 於 #diy 容器內） */
.camp-mascot-right {
  position: absolute;
  right: 0;
  top: -155px;
  z-index: 3;
  width: 411px;
  padding: 48px 39px 48px 20px;
  pointer-events: none;
}
.camp-mascot-right img {
  width: 100%;
  transform: rotate(-15deg);
}

@media (max-width: 991px) {
  .camp-inner {
    flex-direction: column;
  }
  .camp-info-col {
    flex: unset;
    width: 100%;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
  }
  .camp-info-text { align-items: flex-start; }
  .camp-desc      { text-align: left; }
}
@media (max-width: 767px) {
  .camp-mascot-img {
    max-width: 80px;
    flex-shrink: 0;
  }
  .camp-tabs-wrap {
    gap: 4px;
    scrollbar-width: none;
  }
  .camp-tabs-wrap::-webkit-scrollbar { display: none; }
  .camp-tab {
    font-size: 0.75rem;
    padding: 0.3em 0.8em;
  }
  .camp-mascot-right { width: 60px; }
}

/* ===== F03 手作DIY課程 ===== */
.section-diy {
  position: relative;
  padding: 150px 0 93px;
  background: url('../images/diy-bg.png') no-repeat top left;
  background-size: cover;
}
.diy-title-img {
  width: 423px;
  max-width: 100%;
  margin: 0 auto 30px;
}
.diy-desc {
  text-align: center;
  color: var(--brown);
  max-width: 1440px;
  margin-bottom: 40px;
}
.diy-hint-btn {
  background-color: #DB9A3B;
  display: inline-block;
  border: 1px solid #fff;
  border-radius: 99px;
  color: #fff;
  font-size: 16px;
  font-weight: 300;
  padding: 0.63em 2em;
  margin-bottom: 27.48px;
}

/* DIY 卡片 */
.diy-card {
  cursor: pointer;
  border: 2px solid #fff;
}
.diy-img-stack {
  position: relative;
  aspect-ratio: 353 / 425;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}
.diy-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease, transform 0.3s ease;
}
.diy-card:hover .diy-photo {
  filter: blur(5px);
  transform: scale(1.08);
}
/* Layer 1: 課程資訊（常態） */
.diy-overlay-info {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}
.diy-card:hover .diy-overlay-info { opacity: 0; }
/* Layer 2: 立即報名（hover） */
.diy-overlay-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s;
}
.diy-card:hover .diy-overlay-hover { opacity: 1; }
/* Layer 3: 名額已滿 — 移除 d-none 即顯示 */
.diy-overlay-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 10;
}
/* 名額已滿啟用時：背景模糊、隱藏其他 overlay */
.diy-img-stack:has(.diy-overlay-full:not(.d-none)) .diy-photo {
  filter: blur(5px);
  transform: scale(1.08);
}
.diy-img-stack:has(.diy-overlay-full:not(.d-none)) .diy-overlay-info,
.diy-card:hover .diy-img-stack:has(.diy-overlay-full:not(.d-none)) .diy-overlay-info,
.diy-img-stack:has(.diy-overlay-full:not(.d-none)) .diy-overlay-hover,
.diy-card:hover .diy-img-stack:has(.diy-overlay-full:not(.d-none)) .diy-overlay-hover {
  opacity: 0 !important;
}
.diy-card:has(.diy-overlay-full:not(.d-none)) { cursor: default; }

.diy-note {
  text-align: center;
  color: var(--brown);
  margin-top: 35px;
  margin-bottom: 0;
}

/* ===== DIY MODAL ===== */
.modal-backdrop.show {
  opacity: 1 !important;
  background-color: rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(8px) brightness(0.7);
  -webkit-backdrop-filter: blur(8px) brightness(0.7);
}
.diy-modal-dialog  { max-width: 850px; }
.diy-modal-content {
  padding: 25px;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  position: relative;
}
.diy-modal-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
  background: #f5a623;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.diy-modal-close:hover { background: #e09010; }
.diy-modal-img-wrap { position: relative; }
.diy-modal-img      { width: 100%; }
.diy-modal-body {
  padding: 40px 1.6rem 1.8rem;
  text-align: center;
}
.diy-modal-signup {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 28px;
  line-height: 37px;
  font-weight: bold;
  padding: 5px 29px 8px;
  border: 1px solid #fff;
  transition: background 0.2s, transform 0.15s;
}
.diy-modal-signup:hover {
  background: var(--red);
  color: #fff;
  transform: scale(1.04);
}
@media (max-width: 767px) {
  .diy-modal-signup {
    padding: 8px 29px 5px;
  }
}

/* ===== F04 中醫醫療體驗 輪播 ===== */
.section-medical {
  position: relative;
  overflow: hidden;
}
.section-medical .carousel,
.section-medical .carousel-inner,
.section-medical .carousel-item {
  height: 100%;
}
.med-slide {
  position: relative;
  min-height: 380px;
}
.medical-02 { padding: 26.5px 0; }
.carousel-item.active.med-slide,
.carousel-item-next.med-slide,
.carousel-item-prev.med-slide {
  display: flex !important;
  align-items: center;
}
.med-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}
.med-slide-content {
  position: relative;
  z-index: 1;
  padding: 93px 0;
  width: 100%;
}
.med-slide-content p { max-width: 500px; margin-bottom: 60px; }
.med-title-img       { max-width: 500px; margin-bottom: 50px; }
.cupping-3-img       { max-width: 520px; }

/* 手機版：背景圖上加黑色遮罩增強文字可讀性（調整 --medical-overlay 0–1） */
@media (max-width: 767px) {
  .med-slide {
    --medical-overlay: 0.45;
    min-height: 260px;
  }
  .med-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--medical-overlay));
    z-index: 1;
    pointer-events: none;
  }
  .med-slide-content {
    z-index: 2;
    padding: 50px 0;
  }
  .med-slide-content p { max-width: 100%; }
  .med-title-img       { max-width: 88%; }
  .med-arrow           { width: 34px; height: 34px; }
}

/* 輪播箭頭位置表
 * ┌──────────────────┬──────────────┬────────────────────┐
 * │ 寬度             │ 垂直位置      │ 水平位置            │
 * ├──────────────────┼──────────────┼────────────────────┤
 * │ > 1700px         │ 垂直置中      │ left / right: 4vw  │
 * │ 1200–1700px      │ bottom: 32px │ left / right: 6px  │
 * │  660–991.99px    │ 垂直置中      │ left / right: 4vw  │
 * │ < 660px          │ bottom: 32px │ left / right: 3vw  │
 * └──────────────────┴──────────────┴────────────────────┘
 */
.med-ctrl-btn {
  width: 52px !important;
  opacity: 1 !important;
  background: none !important;
  border: none;
  z-index: 5;
}
.med-ctrl-btn.carousel-control-prev { left: 4vw; }
.med-ctrl-btn.carousel-control-next { right: 4vw; }

/* 1700px 以下：箭頭移至底部 */
@media (max-width: 1700px) {
  #exhibition .med-ctrl-btn { top: auto; bottom: 32px; transform: none; }
}
/* 1200–1700px：水平貼近兩側 */
@media (min-width: 1200px) and (max-width: 1700px) {
  .med-ctrl-btn.carousel-control-prev { left: 6px; }
  .med-ctrl-btn.carousel-control-next { right: 6px; }
}
/* 660–991.99px：恢復垂直置中（覆蓋上方 max-1700px 的 bottom 規則） */
@media (min-width: 660px) and (max-width: 991.99px) {
  #exhibition .med-ctrl-btn { top: 50%; bottom: auto; transform: translateY(-50%); }
}
/* < 660px：水平縮小邊距 */
@media (max-width: 659.99px) {
  .med-ctrl-btn.carousel-control-prev { left: 3vw; }
  .med-ctrl-btn.carousel-control-next { right: 3vw; }
}

.med-arrow      { width: 44px; height: 44px; display: block; }
.med-arrow-flip { transform: scaleX(-1); }

/* ===== F05 交通資訊 ===== */
.section-transport { padding: 90px 0; }
.transport-logo-img {
  max-width: 220px;
  margin-bottom: 1.2rem;
  display: block;
}
/* 從 index.html 的 inline style 移入 */
.transport-info-text {
  margin-top: 30px;
  margin-bottom: 52px;
}
.map-wrapper {
  overflow: hidden;
  height: 528px;
  border-radius: 120px 15px 120px 15px;
}
.map-wrapper iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 767px) {
  .map-wrapper {
    height: 0;
    padding-bottom: 100%;
    position: relative;
    border-radius: 12px;
  }
  .map-wrapper iframe {
    position: absolute;
    inset: 0;
    height: 100%;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .map-wrapper {
    height: 380px;
    border-radius: 12px;
  }
}

/* ===== FOOTER ===== */
footer { padding: 16.5px 0; }
footer .nav-item {
  font-size: 19px;
  line-height: 27px;
}
