/* ==== 全站共用：導覽列 / footer / 版面外框 ====
   內容區塊(#wsite-content)本身的樣式交給 main_style.css + Weebly 平台框架 CSS，
   這裡只負責 nav.js / footer.js 產生的部分，避免跟原站樣式衝突。 */

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
}

body {
  border-top: 5px solid #71d0c8;
}

/* 自訂 header：完全獨立的 class/id 名稱，不借用 Weebly 的 #header / .logo / .wsite-logo，
   避免 main_style.css 裡一堆針對舊版面寫的規則（table-cell、padding-left、overflow:hidden）互相打架。 */
#site-header {
  background: #ffffff;
  border-bottom: 1px solid #e3e3e3;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

#site-header.scrolled {
  background: #71d0c8;
  border-bottom-color: #71d0c8;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 22px;
  font-weight: 700;
  color: #71d0c8;
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s ease-in-out;
}

#site-header.scrolled .site-logo {
  color: #ffffff;
}

#nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
#nav-toggle span {
  display: block;
  height: 2px;
  background: #248d6c;
  border-radius: 2px;
  transition: background-color 0.3s ease-in-out;
}
#site-header.scrolled #nav-toggle span {
  background: #ffffff;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.site-nav > ul > li {
  position: relative;
}

.site-nav a {
  display: block;
  padding: 8px 14px;
  color: #999999;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

#site-header.scrolled .site-nav > ul > li > a,
#site-header.scrolled .site-nav .nav-label a,
#site-header.scrolled .site-nav .nav-text {
  color: #ffffff;
}

.site-nav > ul > li > a,
.site-nav .nav-label {
  display: flex;
  align-items: center;
}

.site-nav .nav-label a {
  padding-right: 4px;
}

.nav-text {
  display: block;
  padding: 8px 4px 8px 14px;
  color: #999999;
  font-size: 14px;
  font-weight: bold;
}

.site-nav a:hover {
  background: #eaf6f1;
  color: #248d6c;
}

.nav-arrow {
  font-size: 11px;
  color: #999;
  padding: 8px 10px 8px 0;
  cursor: pointer;
}
#site-header.scrolled .nav-arrow {
  color: #eafaf7;
}

/* 桌機：hover 展開下拉 */
@media (min-width: 861px) {
  .has-sub .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    min-width: 200px;
    padding: 6px;
    z-index: 50;
  }
  .has-sub:hover > .dropdown {
    display: block;
  }
  .dropdown .has-sub {
    position: relative;
  }
  .dropdown .has-sub > .dropdown {
    top: 0;
    left: 100%;
  }
  .dropdown a {
    white-space: nowrap;
    color: #333 !important;
  }
}

/* 手機：漢堡選單 + click 展開 */
@media (max-width: 860px) {
  #nav-toggle {
    display: flex;
  }
  .site-nav {
    display: none;
    width: 100%;
  }
  .site-nav.open {
    display: block;
  }
  .site-header-inner {
    flex-wrap: wrap;
  }
  .site-nav ul {
    flex-direction: column;
    width: 100%;
  }
  .site-nav .dropdown {
    display: none;
    padding-left: 16px;
  }
  .has-sub.sub-open > .dropdown {
    display: block;
  }
  .site-nav .nav-label {
    justify-content: space-between;
    cursor: pointer;
  }
  .site-nav .nav-label a,
  .site-nav .nav-text {
    pointer-events: none; /* 點擊交給整排的 .nav-label，避免內層 <a> 搶先觸發導頁 */
  }
}

#site-footer {
  margin-top: 40px;
  padding: 24px;
  text-align: center;
  color: #888;
  font-size: 13px;
  border-top: 1px solid #e3e3e3;
}

#site-footer a {
  color: #248d6c;
}

/* ==== 自製圖片輪播（取代 Weebly 的 wSlideshow） ==== */
.lit-slideshow-main {
  text-align: center;
}
.lit-slideshow-main img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 4px;
}
.lit-slideshow-main a.is-clickable {
  cursor: pointer;
}
.lit-slideshow-main a.is-clickable img {
  outline: 3px solid transparent;
  transition: outline-color 0.15s;
}
.lit-slideshow-main a.is-clickable:hover img {
  outline-color: #248d6c;
}
.lit-slideshow-caption {
  text-align: center;
  color: #555;
  font-size: 14px;
  margin: 10px auto 4px;
  max-width: 640px;
  line-height: 1.6;
}
.lit-slideshow-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-start;
  margin: 0 auto 14px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scrollbar-width: thin;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.lit-slideshow-thumbs.is-dragging {
  cursor: grabbing;
}
.lit-slideshow-thumbs img {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.55;
  border: 2px solid transparent;
  transition: opacity 0.15s, border-color 0.15s;
  -webkit-user-drag: none;
}
.lit-slideshow-thumbs img.active,
.lit-slideshow-thumbs img:hover {
  opacity: 1;
  border-color: #248d6c;
}
