/* =========================================================================
 * VA MAP CSS - Vanishing Acts 展覽客製化樣式表
 * 版本: 重構版本
 * 說明: 按功能模組重新整理，提升可維護性
 * ========================================================================= */

/* =========================================================================
 * 1. 基礎佈局與通用元素
 * ========================================================================= */

/* 基礎容器間距 */
#about_index_sec, 
#whatson_index_sec, 
#program_index_sec, 
#team_index_sec,
#about-pane,
#program-pane, 
#team-pane {
  padding:50px 20px 50px 20px;
  height: auto;
}

#whatson-pane td, #whatson-pane>div, #whatson-pane>p, #whatson-pane .wp-block-heading{padding-right: 20px; padding-left: 20px;}
#whatson-pane  .whatson-pane_title:nth-child(1) ,#whatson-pane .wp-block-heading{padding-top:20px;}
.va-brand{padding:40px 0px 50px 0px; height: auto;line-height:1.5; }
#whatson-pane figure{margin: unset;}

/* 通用元素樣式 */
.va-target { 
  min-height: 60vh; 
}

.va-loading { 
  padding: 16px; 
  opacity: .7; 
}

.va-title { 
  margin: 12px 0; 
  font-size: 1.25rem; 
  line-height: 1.3; 
}

.va-empty { 
  padding: 16px; 
  color: #666; 
}

.va-link {
  cursor: pointer;
}

.va-link .va-whatson-meta {
  text-align: center; 
  line-height: normal; 
  font-size: 10px;
  font-weight: 500;
}

.va-brand_mobile{opacity: 0;}

@media (min-width: 1399px) {
  #whatson_content_sec{width: 60% !important;}
}

@media (min-width: 1199px) and (max-width: 1399px) {
  #about_index_sec, #whatson_index_sec, #program_index_sec, #team_index_sec, #about-pane, #program-pane,  #team-pane { padding:80px 20px 50px 20px !important;height: auto;}
  #whatson_content_sec{width: 60% !important;}

  .va-sidebar .va-brand{opacity: 0;}
  body.va-leftnav #va-sidebar.is-open{width: 100vw;}
  .va-brand_mobile{position: fixed; left: 85px; top: 30px; font-size: 1.3rem; font-weight: bold; z-index: 9999; opacity: 1;}
  
}

@media (max-width: 1199px){
  #about_index_sec, #whatson_index_sec, #program_index_sec, #team_index_sec, #about-pane, #program-pane,  #team-pane { padding:80px 10px 150px 10px;height: auto;}
  .va-brand_mobile{position: fixed; left: 20px; top: 20px; font-size: 1.3rem; font-weight: bold; z-index: 10003; opacity: 1;}
} 

/* =========================================================================
 * 2. 響應式佈局系統 - 桌機/平板/手機
 * ========================================================================= */

/* 桌機版 - 左右欄位配置 */


@media (min-width: 1199px) {
  #va-mob-nav-sec {
    display: none;
  }
  
  .va-mob-nav {
    display: none;
  }

  /* 左欄 40% / 右欄 60% */
  #about_index_sec, 
  #whatson_index_sec, 
  #program_index_sec, 
  #team_index_sec {
    width: 40% !important;
  }
  
  #about_content_sec, 
  #whatson_content_sect_sec, 
  #program_content_sec, 
  #team_content_sec {
    width: 60% !important;
  }

}

/* 手機版 - 全寬佈局 */
@media (max-width: 1199px) {
  #about_index_sec, 
  #whatson_index_sec, 
  #program_index_sec, 
  #team_index_sec {
    width: 100% !important;
  }
  
  #about_content_sec, 
  #whatson_content_sec, 
  #program_content_sec, 
  #team_content_sec {
    width: 100% !important;
  }
  
  .va-about-card {
    max-width: unset;
  }
}

/* =========================================================================
 * 3. 導航系統 - 側邊欄 / 底部導航 / 漢堡選單
 * ========================================================================= */

/* 手機版底部導航 */
@media (max-width: 1199px) {
  .va-mob-nav {
    position: fixed; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    z-index: 9999;
    display: flex; 
    gap: 8px; 
    padding: 8px calc(12px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
    background: rgba(111,121,124,.5); 
    backdrop-filter: blur(6px);
  }
  
  .va-mob-nav__item {
    font-size: small; 
    justify-content: center;
    flex: 1; 
    text-align: center; 
    font-weight: 700; 
    border: 0; 
    border-radius: 8px;
    padding: 10px 8px; 
    background: #6f797c; 
    text-decoration: none;
    display: flex; 
    align-items: center; 
    justify-content: center;
    line-height: 1;
  }
  
  .va-mob-nav__more { 
    background: #3a3a3a; 
  }
  
  body { 
    padding-bottom: calc(58px + env(safe-area-inset-bottom)); 
  }
}

/* 平板版漢堡選單系統 */
#va-hamburger {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 10001;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#va-hamburger:hover {
  background: rgba(0,0,0,0.8);
  transform: scale(1.05);
}

#va-hamburger span {
  position: relative;
  width: 20px;
  height: 2px;
  background: #fff;
  display: block;
  transition: all 0.3s ease;
}

#va-hamburger span::before,
#va-hamburger span::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
  left: 0px;
}

#va-hamburger span::before {
  top: -6px;
}

#va-hamburger span::after {
  top: 6px;
}

/* 漢堡按鈕動畫 - 變成X */
#va-hamburger.is-open span {
  background: transparent;
}

#va-hamburger.is-open span::before {
  top: 0;
  transform: rotate(45deg);
}

#va-hamburger.is-open span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* 側邊欄遮罩層 */
#va-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#va-sidebar-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* 側邊欄控制 */
body.va-leftnav #va-sidebar {
  transition: transform 0.3s ease;
}

/* =========================================================================
 * 4. 響應式斷點控制
 * ========================================================================= */

/* 桌機版 (>1399px) - 維持原有行為 */
@media (min-width: 1400px) {
  body.va-leftnav #va-sidebar {
    transform: translateX(0) !important;
  }
  
  #va-hamburger,
  #va-sidebar-overlay {
    display: none !important;
  }
}

/* 平板版 (1399px - 575px) - 新增漢堡目錄 */
@media (min-width: 1199px) and (max-width: 1399px) {
  body.va-leftnav #va-sidebar {
    transform: translateX(-100%);
  }
  
  body.va-leftnav #va-sidebar.is-open {
    transform: translateX(0);
  }
  
  #va-hamburger {
    display: flex !important;
  }
  
  .va-mob-nav {
    display: none;
  }
  
  body {
    padding-bottom: 0;
  }
  
  body.va-leftnav .site-content {
    margin-left: 0 !important;
  }
}

/* 手機版 (<575px) - 維持原有底部導航 */
@media (max-width: 575px) {
  body.va-leftnav #va-sidebar,
  #va-hamburger,
  #va-sidebar-overlay {
    display: none !important;
  }
}

/* =========================================================================
 * 5. About 區塊 - 卡片式佈局
 * ========================================================================= */

#about-pane img{object-fit: contain !important; max-height: 500px;}

/* 左側 3×1 卡片格 */
.va-about-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  width: fit-content;
}

.va-about-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  max-width: 200px;
  margin: 10px;
  border-radius: 8px;
  background-color: #1C1C1C;
}

.va-about-meta { 
  padding: 10px; 
  line-height: 1.1; 
}

.va-about-meta small { 
  font-size: 12px; 
  color: #666; 
}

.va-about-thumb { 
  margin: 0; 
  position: relative;
  background-color: #efefef;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
}

.va-about-thumb img { 
  width: 100%; 
  object-fit: cover; 
  display: block; 
  transition: transform .18s ease;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
}

.va-about-thumb figcaption {
  position: absolute; 
  inset: 0;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-weight: 700; 
  color: #444; 
  text-align: center; 
  pointer-events: none;
}

/* 互動微動效 */
.va-about-card:hover .va-about-thumb img { 
  transform: scale(1.01); 
}

/* RWD */

@media (max-width: 1199px) {
  .va-about-index { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .va-about-card{max-width: unset;}
}

@media (max-width: 767px) {
  .va-about-index { grid-template-columns: repeat(3, minmax(0,1fr)); }
}


@media (max-width: 574px) {
  .va-about-index { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* 右側內容區：限制高度（左側索引高度），超出就捲動 */
#about-pane {
  overflow: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

@media (min-width: 1199px) and (max-width: 1399px) {
  .va-about-index {grid-template-columns: repeat(2, minmax(0,1fr));}
}

@media (max-width: 1199px) {
  #about-pane { 
    max-height: none;
    display: none; /* 手機：隱藏桌機版容器，改用彈窗 */
  }
}

/* About Pane 滾動修復 - 加入到 va-map.css */

/* 確保 about-pane 容器可以正常滾動 */
#about-pane {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  /* 設定最大高度，確保不會超出父容器 */
  max-height: calc(100vh - 120px) !important; /* 120px 給上下 padding */
  /* 確保有足夠的 padding */
  padding: 60px 20px 50px 20px !important;
  box-sizing: border-box !important;
}

/* 在 Spot Slider 環境下的特殊處理 */
.spot-slider-container #about-pane {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: 100vh !important; /* 調整 padding */
  padding: 110px 20px !important;

}

/* 確保 about_content_sec 容器允許滾動 */
#about_content_sec {
  overflow: visible !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

/* 確保內容區域的父容器不會阻止滾動 */
#about_content_sec .elementor-widget-wrap {
  overflow: visible !important;
  height: 100% !important;
}

/* 確保 spot-slide 不會阻止滾動 */
.spot-slide#sec-about {
  overflow: visible !important;
}

/* 修復 iframe 和媒體內容在滾動容器中的問題 */
#about-pane iframe,
#about-pane video,
#about-pane embed {
  pointer-events: auto !important;
  max-width: 100% !important;
}

/* 確保圖片在滾動容器中正常顯示 */
#about-pane img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

/* 確保文字內容在滾動容器中正常顯示 */
#about-pane p,
#about-pane div,
#about-pane span {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

/* 調整 text-editor widget 的高度 */
#about_content_sec .elementor-text-editor {
  height: 100% !important;
  overflow: visible !important;
}

/* 確保 PDF 嵌入和其他內容正常顯示 */
#about-pane .wp-block-file,
#about-pane .wp-block-embed {
  margin: 20px 0 !important;
  width: 100% !important;
}

/* 桌機版額外優化 */
@media (min-width: 1400px) {
  #about-pane {
    max-height: calc(100vh - 100px) !important;
    padding: 50px 30px !important;
  }
}

/* 平板版優化 */
@media (min-width: 1199px) and (max-width: 1399px) {
  #about-pane {
    max-height: calc(100vh - 120px) !important;
    padding: 60px 20px !important;
  }
}

/* 手機版 - 保持原有彈窗行為 */
@media (max-width: 767px) {
  #about-pane {
    max-height: none !important;
    overflow-y: auto !important;
    padding: 20px !important;
  }
}

/* 通用修復：確保所有 pane 容器都可以滾動 */
#program-pane {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  max-height: calc(100vh - 120px) !important;
  padding: 60px 20px 50px 20px;
  box-sizing: border-box !important;
}

.spot-slider-container #program-pane {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: calc(100vh - 80px) !important;
  padding: 110px 20px;
}

#program_content_sec {
  overflow: visible !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

#program_content_sec .elementor-widget-wrap {
  overflow: visible !important;
  height: 100% !important;
}

.spot-slide#sec-program {
  overflow: visible !important;
}

/* Team pane 也套用相同修復 */
#team-pane {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  max-height: calc(100vh - 120px) !important;
  padding: 60px 20px 50px 20px !important;
  box-sizing: border-box !important;
}

.spot-slider-container #team-pane {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: calc(100vh - 80px) !important;
  padding: 60px 20px !important;
}

#team_content_sec {
  overflow: visible !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

#team_content_sec .elementor-widget-wrap {
  overflow: visible !important;
  height: 100% !important;
}

.spot-slide#sec-team {
  overflow: visible !important;
}

/* =========================================================================
 * 6. What's On 區塊 - 網格與滑動系統
 * ========================================================================= */

.vanishing_acts_btn{ border: 1px solid #23e2d0; padding:7px 14px; border-radius: 8px; color:#23e2d0; font-size: 11px; line-height: 1.2;}

#whatson-pane .wp-block-image img{object-fit: contain !important; max-height: 500px;}

#whatson-index_mobile{display: none;}

/* 基本網格佈局 */
.va-index-grid {
  display: grid; 
  grid-template-columns: repeat(2, minmax(0,1fr)); 
  width: fit-content;
}

.va-index-grid a { 
  display: block;
  overflow: hidden; 
}

.va-index-grid img { 
  width: 100%; 
  object-fit: cover; 
  display: block; 
  transition: transform .2s ease; 
}

.va-index-grid a:hover img { 
  transform: scale(1.03); 
}

/* RWD 網格調整 */
@media (max-width: 900px) { 
  .va-index-grid { 
    grid-template-columns: repeat(3,1fr);
  } 
}

@media (max-width: 640px) { 
  .va-index-grid { 
    grid-template-columns: repeat(2,1fr);
  } 
}

#whatson-pane {
  overflow: auto;
}

/* 手機版滑動系統 */
@media (max-width: 1199px) {
  #whatson-index {
    overflow: hidden;
  }
  
  /* JS 生成的滑動容器與頁面 */
  #whatson-index .va-slider { 
    display: flex; 
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; 
    gap: 0; 
  }
  
  #whatson-index .va-slide { 
    flex: 0 0 100%; 
    scroll-snap-align: center; 
    padding: 0 8px; 
    box-sizing: border-box; 
  }
  
  /* 每頁顯示 4 張小卡 */
  #whatson-index .va-page {
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 12px;
  }
  
  #whatson-index .va-page .va-link img { 
    width: 100%; 
    height: auto; 
    display: block; 
  }
  
  /* 豆豆 */
  .va-dots { 
    display: flex; 
    justify-content: center; 
    gap: 6px; 
    margin-top: 12px; 
  }
  
  .va-dots button { 
    width: 8px; 
    height: 8px; 
    border-radius: 50%; 
    border: 0; 
    background: #c8c8c8; 
    opacity: .8; 
  }
  
  .va-dots button.is-active { 
    background: #333; 
    opacity: 1; 
  }
}

/* WhatsOn 手機滑動強制樣式 */
@media (max-width: 1199px) {
  #whatson-index_mobile{display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));}
  #whatson-index{display: none !important;}
}

@media (max-width: 767px) {
  #whatson-index_mobile{display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));}
 }

@media (max-width: 574px) {
  #whatson-index_mobile{display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));}
}



/* 確保 whatson-pane 容器可以正常滾動 */
#whatson-pane {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  /* 設定最大高度，確保不會超出父容器 */
  max-height: 100vh !important; /* 120px 給上下 padding */
  /* 確保有足夠的 padding */
  box-sizing: border-box !important;
}

#whatson-pane>p:nth-child(1){padding-top:110px;}

/* 在 Spot Slider 環境下的特殊處理 */
.spot-slider-container #whatson-pane {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: 100vh !important; /* 調整 padding */
}

/* 確保 whatson_content_sec 容器允許滾動 */
#whatson_content_sec {
  overflow: visible !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

/* 確保內容區域的父容器不會阻止滾動 */
#whatson_content_sec .elementor-widget-wrap {
  overflow: visible !important;
  height: 100% !important;
}

/* 確保 spot-slide 不會阻止滾動 */
.spot-slide#sec-whatson {
  overflow: visible !important;
}

/* 修復 Vimeo iframe 在滾動容器中的問題 */
#whatson-pane iframe {
  pointer-events: auto !important;
}

/* 確保表格在滾動容器中正常顯示 */
#whatson-pane table {
  width: 100% !important;
  display: table !important;
}

#whatson-pane table td {
  vertical-align: top !important;
  word-wrap: break-word !important;
}

/* 調整 text-editor widget 的高度 */
#what_on_content {
  height: 100% !important;
  overflow: visible !important;
}

#what_on_content .elementor-text-editor {
  height: 100% !important;
  overflow: visible !important;
}

/* 桌機版額外優化 */
@media (min-width: 1400px) {
  #whatson-pane {
    max-height: 100vh !important;
  }
}

/* 平板版優化 */
@media (min-width: 1199px) and (max-width: 1399px) {
  #whatson-pane {
    max-height: calc(100vh - 120px) !important;
    padding: 60px 20px !important;
  }

  #whatson_index_sec {
    max-height: 100vh;
    overflow-y: auto !important;
  }
}

/* 手機版 - 保持原有彈窗行為 */
@media (max-width: 1199px) {
  #whatson-pane {
    max-height: none !important;
    overflow-y: auto !important;
    padding: 20px !important;
  }

  #whatson-pane img{object-fit: contain !important; max-height: 200px;}
}

/* =========================================================================
 * 7. Program 區塊 - 表格式清單
 * ========================================================================= */

/* 兩欄不用特別寫，交給 Elementor 欄寬即可；以下只處理左側表格感 */
.va-prog-index { 
  display: block; 
}

.va-year { 
  font-size: 18px; 
  margin: 0 0 8px;
}

.va-year-sub { 
  font-size: 15px; 
  margin: 24px 0 8px;
}

.va-prog-row {
  display: grid;
  grid-template-columns: 150px 150px 1fr; /* 日期 / 類型 / 標題 */
  align-items: center;
  gap: 16px;
  padding: 5px 0;
  border-bottom: 1px solid #ddd;
  text-decoration: none;
  color: inherit;
}

.va-prog-row>span:nth-child(2){font-weight: normal;}

.va-prog-row:hover { 
  background: rgba(0,0,0,0.025); 
}

.va-date { 
  display: flex; 
  flex-direction: column; 
  line-height: 1.1; 
}


.va-type { 
  font-weight: 600; 
}

.va-title { 
  font-size: 16px; 
}

.va-prog-cat{border: 1px solid #23e2d0; border-radius: 8px; width: fit-content; padding: 5px 14px; margin-bottom: 10px;}

@media (max-width: 768px) {
  .va-prog-row { 
    grid-template-columns: 90px 1fr; 
  }
  
  .va-type { 
    order: 2; 
  }
  
  .va-title { 
    order: 3; 
    grid-column: 1 / -1; 
  }
}

/* 程式清單的可讀性 */
.va-prog-index .va-prog-row {
  display: grid;
  grid-template-columns: 15px 100px 120px 1fr; /* 日期 / 類型 / 標題 */
  gap: 10px; 
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-decoration: none; 
  color: inherit;
  align-items: start;
  padding-left: 10px;
  padding-right: 10px;
}

.va-prog-index .va-prog-row:hover { 
  background: rgba(255,255,255,.04); 
}

.va-prog-index .va-date { 
  display: flex; 
  flex-direction: column; 
  line-height: 1; 
  font-size: 12px;
  font-weight: 700;
}


.va-prog-index .va-date small { 
  opacity: .7; 
}

.va-prog-index .va-type { 
  font-weight: 700; 
  opacity: .9; 
}

.va-prog-index .va-prog-row.is-active { 
  background: rgba(255,255,255,.08); 
}

/* 手機：不顯示右側內容容器，改用彈窗 */
@media (max-width: 1199px) {
  #program-pane { 
    display: none !important; 
  }
}

#program-index{padding: 10px;}

@media (max-width: 599px){
  .va-prog-index .va-prog-row{
    display: grid;
    grid-template-columns: 16px 86px 1fr;
    grid-template-areas:
      "icon date kind"
      "icon date who";
    row-gap: 4px;
    column-gap: 10px;
  }
  .va-prog-index .va-prog-row > * { min-width: 0; }
  .va-prog-index .va-prog-row > span:nth-child(1){ grid-area: icon; }
  .va-prog-index .va-prog-row .va-date{ grid-area: date; }
  .va-prog-index .va-prog-row .text-text:first-of-type{ grid-area: kind; white-space:nowrap; }
  .va-prog-index .va-prog-row .text-text:last-of-type{ grid-area: who;  white-space:normal; }
}

/* =========================================================================
 * 8. Credits 區塊 - 製作團隊資訊
 * ========================================================================= */

.va-credits { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: clamp(24px, 5vw, 48px); 
  align-items: start; 
}

.va-credits-left { }

.va-credits-right {
  padding: clamp(24px, 4vw, 40px); 
  border-radius: 12px; 
}

.va-credits-list { 
  margin: 0; 
  padding: 0; 
}

.va-credits-item { 
  display: block; 
  margin: 0 0 28px 0; 
}

.va-credits-item dt { 
  font-size: 14px; 
  color: #666; 
  margin: 0 0 6px 0; 
}

.va-credits-item dd { 
  margin: 0; 
  font-weight: 700; 
  font-size: clamp(18px, 2vw, 22px); 
}

.va-credits-heading { 
  margin: 0 0 20px; 
  font-size: clamp(20px, 2.2vw, 28px); 
  line-height: 1.25; 
}

.va-credits-logo { 
  height: 72px; 
  display: flex; 
  align-items: center; 
  justify-content: flex-start; 
  font-weight: 700; 
  letter-spacing: .02em; 
  margin: 16px 0 20px; 
}

.va-social { 
  list-style: none; 
  padding: 0; 
  margin: 8px 0 16px; 
  display: flex; 
  flex-direction: column; 
  gap: 4px; 
}

.va-social a { 
  text-decoration: none; 
  font-weight: 800; 
  letter-spacing: .02em; 
  color: #111; 
}

.va-copy { 
  font-size: 14px; 
  color: #333; 
  line-height: 1.5; 
  max-width: 48ch; 
}

/* Reset dl default indent (部分主題會縮排 dd) */
.va-credits-list, 
.va-credits-list dt, 
.va-credits-list dd { 
  margin-inline-start: 0; 
}

#team-pane_mobile{display: none;}

/* RWD */
@media (max-width: 1199px) {
  .va-credits { 
    grid-template-columns: 1fr; 
  }
  
  .va-credits-right { 
    order: 2; 
  }

  #team-pane_mobile{display: block;}

}

/* =========================================================================
 * 9. Modal 彈窗系統 - 更絲滑的動畫版本
 * ========================================================================= */

.va-modal {
  /* 預設隱藏 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              visibility 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.va-modal:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.va-modal[hidden] { 
  display: none; 
}

.va-modal__backdrop { 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,.55); 
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.va-modal:not([hidden]) .va-modal__backdrop {
  opacity: 1;
}

.va-modal__panel {
  position: fixed; 
  top: 0;
  left: 0; 
  right: 0; 
  bottom: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: #343434; 
  padding: 20px; 
  z-index: 10001;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  
  /* 更明顯的滑入動畫 */
  transform: translateY(50px) scale(0.95);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.va-modal:not([hidden]) .va-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.va-modal__close { 
  position: sticky; 
  top: 0px; 
  right: 0px; 
  float: right;
  font-size: 2rem; 
  background: none; 
  border: 0; 
  padding: 2px 10px;
  z-index: 10002;
  color: #23e2d0;
  opacity: 0;
  transform: scale(0.8) rotate(-90deg);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s,
              transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
}

.va-modal:not([hidden]) .va-modal__close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.va-modal__body { 
  margin-top: 80px;
  padding-bottom: 40px;
  max-width: 100%;
  word-wrap: break-word;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s, 
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s;
}

.va-modal:not([hidden]) .va-modal__body {
  opacity: 1;
  transform: translateY(0);
}

.va-modal__body .va-title { 
  margin-top: 0; 
}

.va-modal__body img { 
  max-width: 100%; 
  height: auto; 
  max-height: 400px;
  margin-bottom: 1rem;
  object-fit: contain !important;
}

/* Modal 內嵌影片：強制響應式 */
.va-modal__body iframe[src*="vimeo.com"],
.va-modal__body iframe[src*="youtube.com"],
.va-modal__body iframe[src*="youtu.be"] {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

.va-modal__body .wp-block-embed.is-type-video > .wp-block-embed__wrapper {
  position: relative !important;
  width: 100% !important;
  height: 0 !important;
  padding-bottom: 56.25% !important;
  overflow: hidden;
}

.va-modal__body .wp-block-embed__wrapper iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

/* 防止背景滾動 */
body.va-modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* =========================================================================
 * 10. Modal 導航系統 - 豆豆與左右箭頭
 * ========================================================================= */

/* 彈窗內的豆豆與左右鍵 */
.va-modal-dots { 
  display: flex; 
  justify-content: center; 
  gap: 6px; 
  margin: 32px 0 0; 
}

.va-modal-dots button { 
  width: 8px; 
  height: 8px; 
  border-radius: 50%; 
  border: 0; 
  background: #c8c8c8; 
  opacity: .9; 
}

.va-modal-dots button.is-active { 
  background: #111; 
}

.va-modal-nav { 
  display: flex; 
  justify-content: space-between; 
  margin-top: 8px; 
}

.va-modal-nav button { 
  border: 0; 
  background: #eee; 
  padding: 8px 12px; 
  border-radius: 8px; 
}

/* Modal 導覽預設不顯示；僅在 data-ctx="whatson" 時開啟 */
#va-modal .va-modal-nav,
#va-modal .va-modal-dots { 
  display: none; 
}

#va-modal[data-ctx="whatson"] .va-modal-nav { 
  display: flex; 
  justify-content: space-between; 
}

#va-modal[data-ctx="whatson"] .va-modal-dots { 
  display: flex; 
  justify-content: center; 
  gap: 6px; 
}

#va-modal[data-ctx="whatson"] .va-modal-dots { display: none !important; }

@media (max-width: 576px) {
  #va-modal[data-ctx="whatson"] .va-modal-dots { display: none; }

}

/* =========================================================================
 * 11. More 覆蓋層（手機版 More 選單）
 * ========================================================================= */

.va-more[hidden] { 
  display: none; 
}

.va-more__backdrop { 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,.5); 
}

.va-more__panel {
  position: fixed; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  max-height: 75vh; 
  overflow: auto;
  background: rgba(111,121,124,0.95);  
  padding: 16px; 
  z-index: 10000;
}

.va-more__header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  margin-bottom: 6px; 
}

.va-more__close { 
  font-size: 28px; 
  background: none; 
  border: 0; 
  line-height: 1; 
  float: right; 
}

.va-more__section { 
  padding: 10px 0 12px; 
}

.va-more__section div{padding-bottom: 5px;}

.va-list { 
  list-style: none; 
  margin: 8px 0 0; 
  padding: 0; 
}

.va-list li { 
  padding: 10px 0; 
  font-weight: 800; 
}

.va-list li.is-disabled { 
  opacity: .5; 
}

.va-list a { 
  color: #111; 
  text-decoration: none; 
}

/* =========================================================================
 * 12. 多語言字體系統
 * ========================================================================= */

  
.menu-description.va-side-desc{font-size: 12px; line-height: 1.2; margin-top: 10px;}
.text-menu {font-size: 16px; line-height: 1.2;}
.text-menu_sub{font-size: 12px; line-height: 1.2;}
.text-file{font-size: 12px; line-height: 1.2;}
.text-file_sub{margin-bottom: 5px;}


.text-title {
  font-size: 28px; 
  line-height: 28px; 
  font-weight: 700;
}

.text-info {
  font-size: 16px; 
  line-height: 1.3rem; 
  font-weight: 700;
}

.text-text {
  font-size: 16px; 
  line-height: 1.5; 
}

.text-navi, .text-note  {
  font-size: 12px; 
  line-height: 1rem; 
  font-weight: 700;
}

/* 中等螢幕字體調整 */
@media (max-width: 1399px) {

  .text-title {
    font-size: 24px; 
    line-height: 24px; 
    font-weight: 700;
  }
  
  .text-info {
    font-size: 16px; 
    line-height: 20px; 
    font-weight: 700;
  }
  
  .text-text  {
    font-size: 16px; 
    line-height: 18px; 
  }
  
  .text-navi {
    font-size: 14px; 
    line-height: 1rem; 
    font-weight: 700;
  }
  
  .show-up-1399 {
    display: none;
  }
  
  .show-under-1399 {
    display: block;
  }
}

@media (min-width: 575px) and (max-width: 1399px) {
  #whatson-index .text-text{font-size: 11px; line-height: 18px;}
}

/* =========================================================================
 * 13. 手機版區段切換系統
 * ========================================================================= */

/* 手機版區段切換樣式 */
@media (max-width: 1199px) {
  /* 右側內容區域完全隱藏 */
  #about_content_sec,
  #whatson_content_sec, 
  #program_content_sec,
  #team_content_sec {
    display: none !important;
  }
  
  /* 左側區段佔滿全寬 */
  #about_index_sec,
  #whatson_index_sec,
  #program_index_sec, 
  #team_index_sec {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh;
  }
  
  /* 導航按鈕 active 狀態 */
  .va-mob-nav__item.va-nav-active {
    background: #23e2d0 !important;
    color: #000 !important;
    transform: translateY(-2px);
  }

  .va-mob-nav__item.va-nav-active span{color: #000;}
  
  .va-mob-nav__item {
    transition: all 0.3s ease;
  }
}

/* =========================================================================
 * 14. 手機版背景覆蓋層優化
 * ========================================================================= */

@media (max-width: 1199px) {
  /* 為每個區段添加深色半透明背景覆蓋層 */
  #about_index_sec,
  #whatson_index_sec,
  #program_index_sec, 
  #team_index_sec {
    position: relative !important;
  }
  
  #about_index_sec::before,
  #whatson_index_sec::before,
  #program_index_sec::before, 
  #team_index_sec::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(2px) !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }
  
  /* 確保內容文字在覆蓋層之上 */
  #about_index_sec > *,
  #whatson_index_sec > *,
  #program_index_sec > *,
  #team_index_sec > * {
    position: relative !important;
    z-index: 2 !important;
  }
  
  /* 針對圖片內容的特殊處理 */
  #about_index_sec img,
  #whatson_index_sec img,
  #program_index_sec img,
  #team_index_sec img {
    position: relative !important;
    z-index: 2 !important;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
  }
  
  /* What's On 區段的網格佈局優化 */
  #whatson_index_sec .va-index-grid,
  #whatson_index_sec .va-slider,
  #whatson_index_sec .va-page {
    position: relative !important;
    z-index: 2 !important;
  }
  
  /* 確保網格項目的圖片有適當的邊框 */
  #whatson_index_sec .va-index-grid a,
  #whatson_index_sec .va-page a {
    position: relative !important;
    z-index: 2 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
  }
  
  #program_index_sec>div{padding: unset;}

  /* Dots 樣式優化 */
  .va-dots button {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
  }
  
  .va-dots button.is-active {
    background: #ecfd00 !important;
    border: 1px solid #ecfd00 !important;
  }
}

/* 針對不同區段的背景顏色變化（可選） */
@media (max-width: 1199px) {
  /* About 區段 - 標準深色 */
  #about_index_sec::before {
    background: rgba(0, 0, 0, 0.2) !important;
  }
  
  /* What's On 區段 - 稍微偏暖的深色 */
  #whatson_index_sec::before {
    background: rgba(10, 10, 10, 0.6) !important;
  }
  
  /* Program 區段 - 稍微偏冷的深色 */
  #program_index_sec::before {
    background: rgba(20, 20, 20, 0.8) !important;
  }
  
  /* Team 區段 - 稍微偏紫的深色 */
  #team_index_sec::before {
    background: rgba(20, 20, 20, 0.2) !important;
  }
}

/* =========================================================================
 * 15. CSS 文件結尾註記
 * ========================================================================= */

/*
 * CSS 重構完成
 * 
 * 主要改進：
 * 1. 按功能模組重新組織代碼結構
 * 2. 移除重複的樣式規則
 * 3. 統一註解格式，提升可讀性
 * 4. 優化響應式斷點邏輯
 * 5. 整合相關樣式到同一區塊
 * 
 * 模組劃分：
 * - 基礎佈局與通用元素
 * - 響應式佈局系統
 * - 導航系統
 * - 各功能區塊 (About/What's On/Program/Credits)
 * - 彈窗系統
 * - 多語言系統
 * - 手機版特殊功能
 */


 /* Programme Tabs（桌機顯示，手機隱藏） */
.va-prog-tabs{ 
  display:flex; gap:10px; align-items:center;
  border-bottom:1px solid rgba(255,255,255,.12);
  padding: 6px 0px 20px 0px;
  flex-wrap: wrap;
}
.va-tab{
  appearance:none; border:0; cursor:pointer;
  padding:5px 14px; border-radius:8px; border: 1px solid #b0b0b0;
}

.va-tab.is-active{ background:#23e2d0; color:#000; border: 1px solid #23e2d0;}

@media (max-width: 576px){
  .va-prog-tabs{ display:none; } /* 手機回到條列，不顯示分頁列 */
}


/* 移除可能導致問題的限制 */
@media (max-width: 1199px) {
  /* 重置 whatson-index 的限制性樣式 */
  #whatson-index > div {
    max-width: none !important; /* 移除65px限制 */
    width: auto !important;
  }
  
  /* 確保文字可讀性 */
  #whatson-index .text-file {
    font-size: 12px !important; /* 增加字體大小 */
    line-height: 1.3 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  /* 重置 whatson-meta 樣式 */
  .va-link .va-whatson-meta {
    text-align: center;
    line-height: 1.2 !important;
    font-size: 12px !important; /* 增加字體大小 */
    padding: 4px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  /* 修復滑動容器問題 */
  #whatson-index.is-slider .va-page .va-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: none !important;
  }
  
  /* 確保圖片和文字的比例正確 */
  #whatson-index.is-slider .va-page .va-link img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 4px !important;
  }
  
  /* 文字容器樣式 */
  #whatson-index.is-slider .va-page .va-link .va-whatson-meta {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 3em !important; /* 確保有足夠高度 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* 如果不是滑動模式，確保正常網格也能正常顯示 */
  #whatson-index:not(.is-slider) .va-index-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 8px !important;
  }
  
  #whatson-index:not(.is-slider) .va-index-grid a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  
  #whatson-index:not(.is-slider) .va-index-grid img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
    margin-bottom: 4px !important;
  }
  
  #whatson-index:not(.is-slider) .va-whatson-meta {
    font-size: 11px !important;
    line-height: 1.2 !important;
    width: 100% !important;
    max-width: none !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
}

/* 針對非常小的螢幕進一步優化 */
@media (max-width: 374px) {
  #whatson-index .text-file,
  .va-link .va-whatson-meta {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }
  
  /* 在極小螢幕上使用1欄佈局 */
  #whatson-index:not(.is-slider) .va-index-grid {
    grid-template-columns: repeat(1, 1fr) !important;
  }
  
  #whatson-index.is-slider .va-page {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* 調試用：可以暫時加入這個來檢查元素 */
/*
@media (max-width: 574px) {
  #whatson-index * {
    border: 1px solid red !important;
  }
}
*/


/* 方案一：所有導航項目都加上箭頭 */
.va-nav .menu-link {
    position: relative !important;
    padding-right: 40px !important; /* 為箭頭留出空間 */
}

.va-nav .menu-link::after {
    content: "›" !important; /* 或使用 ">" 或 "▶" */
    position: absolute !important;
    right: 25px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 16px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
}

.va-nav .menu-link:hover::after {
    color: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-50%) translateX(4px) !important;
}

.va-nav .current-menu-item .menu-link::after,
.va-nav .menu-link.active::after {
    color: #23e2d0 !important;
}