/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/
/*
 * 版面骨架沿用舊站（Joomla Gantry5 Helium）的斷點與欄寬：
 *   容器寬度：≥1200 → 1200、960–1199 → 960、768–959 → 768、481–767 → 480、≤480 → 100%
 *   768px 以上主欄 75% / 側欄 25%；767px 以下堆疊、選單收成漢堡按鈕
 * 2026-11-11 現代化調整：字型統一 Noto Sans TC、標題加粗、列表加分隔線、留白收斂、
 *   相簿改格狀＋燈箱、表單與分頁改成大尺寸可點擊區。調整前的版本在 _backup/style.before-modern-20261111.css。
 * 結構在 Bricks templates（.vmtu-* class），由 _scripts/vmtu-bricks-templates.php 建立。
 */
:root {
  --vmtu-dark: #2b2d36;
  --vmtu-text: #333842;
  --vmtu-soft-text: #6b7280;
  /* 品牌青綠只用在裝飾；文字連結用加深的版本，白底對比才夠（約 4.8:1） */
  --vmtu-link: #4db2b3;
  --vmtu-link-text: #1a7f80;
  --vmtu-line: #e3e7ea;
  --vmtu-muted: #f6f8f9;
  --vmtu-radius: 10px;
  --vmtu-gutter: 25px;
}

body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Helvetica", "Arial", sans-serif;
  color: var(--vmtu-text);
  font-size: 17px;
  line-height: 1.8;
}

a {
  color: var(--vmtu-link-text);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--vmtu-text);
}

:focus-visible {
  outline: 2px solid var(--vmtu-link-text);
  outline-offset: 2px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.brxe-section {
  padding: 0;
}

.brxe-container {
  width: 1200px;
  max-width: 100%;
  padding: 0;
}

@media (min-width: 960px) and (max-width: 1199.98px) {
  .brxe-container {
    width: 960px;
  }
}

@media (min-width: 768px) and (max-width: 959.98px) {
  .brxe-container {
    width: 768px;
  }
}

@media (min-width: 480.02px) and (max-width: 767.98px) {
  .brxe-container {
    width: 480px;
  }
}

@media (max-width: 480px) {
  .brxe-container {
    width: 100%;
  }
}

/* 選單 */
.vmtu-nav {
  background: var(--vmtu-dark);
  min-height: 72px;
  justify-content: center;
}

.vmtu-nav .brxe-container {
  padding: 0 var(--vmtu-gutter);
}

.vmtu-nav .bricks-nav-menu {
  gap: 0 28px;
  flex-wrap: wrap;
}

.vmtu-nav .bricks-nav-menu > li {
  margin: 0;
}

.vmtu-nav .bricks-nav-menu > li > a {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.vmtu-nav .bricks-nav-menu > li > a:hover,
.vmtu-nav .bricks-nav-menu > .current-menu-item > a {
  border-bottom-color: var(--vmtu-link);
}

@media (min-width: 768px) and (max-width: 959.98px) {
  .vmtu-nav .bricks-nav-menu {
    gap: 0 14px;
  }
}

/* 手機：舊站沒有深色選單列，漢堡按鈕浮在橫幅左上角；
   點開後是 192px 寬的青綠色側欄（Gantry offcanvas），頁面整個往右推 */
@media (max-width: 767.98px) {
  .vmtu-nav {
    min-height: 0;
    height: 0;
    position: relative;
    z-index: 30;
  }

  .vmtu-nav .brxe-container {
    padding: 0;
    width: 100%;
  }

  .vmtu-nav .bricks-mobile-menu-toggle,
  .vmtu-nav .show-mobile-menu .bricks-mobile-menu-toggle {
    position: absolute;
    left: 13px;
    top: 23px;
    width: 27px;
    min-width: 27px;
    height: 23px;
    color: var(--vmtu-link);
    transition: left 0.3s;
  }

  /* 三條粗橫線（舊站是 FontAwesome 的 bars）；Bricks 內建的細線與開啟時的 X 不用 */
  .vmtu-nav .bricks-mobile-menu-toggle span {
    display: none;
  }

  .vmtu-nav .bricks-mobile-menu-toggle::before {
    bottom: auto;
    height: 5px;
    border-radius: 2px;
    background: currentColor;
    box-shadow: 0 9px 0 currentColor, 0 18px 0 currentColor;
  }

  .vmtu-nav .show-mobile-menu .bricks-mobile-menu-toggle {
    left: 205px;
    color: #eceeef;
  }

  .vmtu-nav .bricks-mobile-menu-wrapper {
    width: 192px;
    transition-duration: 0.3s;
  }

  .vmtu-nav .bricks-mobile-menu-wrapper::before {
    background-color: var(--vmtu-link);
  }

  .vmtu-nav .bricks-mobile-menu-wrapper li a {
    color: #eceeef;
    line-height: 2;
    padding: 15px;
  }

  .vmtu-nav .bricks-mobile-menu-wrapper .current-menu-item > a,
  .vmtu-nav .bricks-mobile-menu-wrapper li a:hover {
    background: rgba(0, 0, 0, 0.1);
  }

  .vmtu-nav .bricks-mobile-menu-overlay {
    background: transparent;
  }

  .vmtu-banner,
  .vmtu-breadcrumb,
  #brx-content,
  #brx-footer {
    transition: transform 0.3s;
  }

  body:has(.vmtu-nav .show-mobile-menu) :is(.vmtu-banner, .vmtu-breadcrumb, #brx-content, #brx-footer) {
    transform: translateX(192px);
  }

  /* 頁面被推出畫面右側的部分不要產生橫向捲軸 */
  html:has(.vmtu-nav .show-mobile-menu),
  body:has(.vmtu-nav .show-mobile-menu) {
    overflow-x: clip;
  }
}

/* 橫幅 */
.vmtu-banner {
  padding: 24px 0;
  position: relative;
  z-index: 1;
}

/* 舊站 #g-testimonials:before 的漸層罩色 */
.vmtu-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(40deg, #4db2b3, #8f4dae);
  opacity: 0.9;
}

.vmtu-banner .brxe-container {
  align-items: center;
  padding: var(--vmtu-gutter);
}

.vmtu-banner .brxe-image {
  display: block;
  margin: 16px 0;
}

/* 麵包屑：一行小字加底線，不再用灰底方塊 */
.vmtu-breadcrumb {
  padding: 0;
}

.vmtu-breadcrumb .brxe-container {
  padding: 0 var(--vmtu-gutter);
}

.vmtu-breadcrumb .brxe-breadcrumbs {
  width: 100%;
  padding: 14px 0;
  border-bottom: 1px solid var(--vmtu-line);
  gap: 6px;
  font-size: 14px;
  line-height: 1.6;
}

.vmtu-breadcrumb .brxe-breadcrumbs,
.vmtu-breadcrumb .brxe-breadcrumbs a {
  color: var(--vmtu-soft-text);
}

.vmtu-breadcrumb .brxe-breadcrumbs a:hover {
  color: var(--vmtu-link-text);
}

/* 主內容 75% + 側欄 25% */
.vmtu-main {
  padding: 0;
}

.vmtu-layout {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
}

.vmtu-mainbar,
.vmtu-sidebar {
  padding: 40px var(--vmtu-gutter) 56px;
  min-width: 0;
}

.vmtu-mainbar {
  flex: 0 0 75%;
  width: 75%;
}

.vmtu-sidebar {
  flex: 0 0 25%;
  width: 25%;
}

@media (max-width: 767.98px) {
  .vmtu-layout {
    flex-direction: column;
  }

  .vmtu-mainbar,
  .vmtu-sidebar {
    flex: none;
    width: 100%;
    padding-top: 28px;
    padding-bottom: 28px;
  }
}

/* 區塊標題（活動剪影、分類名稱、站外資源、來訪人數）：粗體＋底線，左端一小段品牌色 */
.vmtu-title {
  position: relative;
  width: 100%;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--vmtu-line);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.vmtu-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 3px;
  background: var(--vmtu-link);
}

.vmtu-sidebar .vmtu-title {
  font-size: 18px;
}

.vmtu-sidebar .vmtu-title:not(:first-child) {
  margin-top: 36px;
}

.vmtu-item-title {
  width: 100%;
  margin: 4px 0 24px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
  text-wrap: balance;
}

@media (max-width: 767.98px) {
  .vmtu-item-title {
    font-size: 24px;
  }
}

/* 最新消息列表：每則之間一條分隔線 */
.vmtu-news-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--vmtu-line);
}

.vmtu-news-item:first-of-type {
  padding-top: 0;
}

.vmtu-news-item .vmtu-title {
  margin: 2px 0 6px;
  padding: 0;
  border: 0;
  font-size: 20px;
  font-weight: 700;
}

.vmtu-news-item .vmtu-title::after {
  content: none;
}

.vmtu-news-item .vmtu-title a {
  color: var(--vmtu-text);
  text-decoration: none;
}

.vmtu-news-item .vmtu-title a:hover {
  color: var(--vmtu-link-text);
}

.vmtu-date {
  display: block;
  width: 100%;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vmtu-soft-text);
  font-variant-numeric: tabular-nums;
}

.vmtu-readmore {
  display: block;
  width: 100%;
  font-size: 15px;
  line-height: 1.6;
}

.vmtu-readmore a {
  text-decoration: none;
}

.vmtu-readmore a::after {
  content: " \2192";
}

.vmtu-readmore a:hover {
  text-decoration: underline;
}

/* 活動剪影輪播：左右各 3px 外距；下方 30px + 與列表之間的 50px */
.vmtu-slider {
  width: calc(100% - 6px);
  margin: 0 3px 64px;
  overflow: visible;
}

.vmtu-slider .swiper-wrapper {
  border-radius: var(--vmtu-radius);
}

.vmtu-slider .bricks-swiper-container {
  width: 100%;
  margin: 0;
  border-radius: var(--vmtu-radius);
  box-shadow: 0 6px 24px rgba(20, 30, 40, 0.14);
}

/* Bricks 預設 min-height: 50vh。舊站 flexslider 的高度跟著每張圖變動（第 1 張 1024x678，
   其餘 1024x768）；這裡固定用第 1 張的比例，載入時的版面與舊站相同，也不會換圖時跳動 */
.brxe-slider.vmtu-slider .swiper-slide {
  min-height: 0;
  aspect-ratio: 1024 / 678;
}

.vmtu-slider .slider-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  padding: 28px 16px 10px;
  text-align: center;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.vmtu-slider .title {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  color: #fff;
}

/* 箭頭：舊站滑鼠移上才出現 */
.vmtu-slider .swiper-button {
  opacity: 0;
  transition: opacity 0.3s;
  color: #fff;
}

.vmtu-slider:hover .swiper-button {
  opacity: 0.8;
}

/* 圓點在圖片下方 */
.vmtu-slider .swiper-pagination {
  bottom: -11px;
}

.vmtu-slider .swiper-pagination-bullet {
  width: 9px;
  height: 9px;
  margin: 0 9px;
  background: #c3cad0;
  opacity: 1;
}

.vmtu-slider .swiper-pagination-bullet-active {
  background: var(--vmtu-link-text);
}

/* 分頁：文字沿用舊站（最先 前一個 1 2 … 下一個 最後），外觀改成好點的方塊 */
.k2Pagination {
  margin-top: 32px;
}

.k2Pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}

.k2Pagination li a,
.k2Pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--vmtu-line);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  color: var(--vmtu-text);
  font-variant-numeric: tabular-nums;
}

.k2Pagination li a:hover {
  border-color: var(--vmtu-link-text);
  color: var(--vmtu-link-text);
}

.k2Pagination li span {
  color: #a3abb3;
  background: var(--vmtu-muted);
}

.k2Pagination li span[aria-current] {
  border-color: var(--vmtu-link-text);
  background: var(--vmtu-link-text);
  color: #fff;
  font-weight: 700;
}

.k2Pagination p {
  margin: 0;
  font-size: 14px;
  color: var(--vmtu-soft-text);
}

/* 列表的前言 */
.vmtu-intro {
  width: 100%;
  font-size: 16px;
}

/* 內文裡有很長的網址，不斷行會把手機版面撐寬 */
.vmtu-intro,
.vmtu-content {
  overflow-wrap: anywhere;
}

.vmtu-intro p {
  margin: 0 0 8px;
}

/* 側欄：站外資源是圖片連結（比照舊站），圖檔原尺寸 175x60 */
.vmtu-links {
  width: 100%;
}

.vmtu-links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.vmtu-links a {
  display: block;
  padding: 6px;
  border: 1px solid var(--vmtu-line);
  border-radius: var(--vmtu-radius);
  background: #fff;
  line-height: 0;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.vmtu-links img {
  width: 175px;
  max-width: 100%;
  height: auto;
}

.vmtu-links a:hover,
.vmtu-links a:focus-visible {
  border-color: var(--vmtu-link);
  box-shadow: 0 2px 8px rgba(43, 45, 54, 0.08);
}

.visitorcounter {
  align-self: stretch;
  padding: 12px 16px;
  border-radius: var(--vmtu-radius);
  background: var(--vmtu-muted);
  font-size: 15px;
}

.visitorcounter p {
  display: flex;
  /* 窄側欄（768px）放不下時整個數字換到下一行，不要把標籤拆成兩行 */
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 8px;
  margin: 0;
  white-space: nowrap;
}

.visitorcounter .floatright {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 內文 */
.vmtu-content {
  width: 100%;
}

.vmtu-content p {
  margin: 0 0 1em;
}

.vmtu-content h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  margin: 1.6em 0 0.6em;
}

.vmtu-content h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin: 1.4em 0 0.6em;
}

.vmtu-content ul,
.vmtu-content ol {
  margin: 0 0 1em 1.4em;
  padding: 0;
}

.vmtu-content > :first-child {
  margin-top: 0;
}

.vmtu-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.vmtu-backtotop {
  width: 100%;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--vmtu-line);
  font-size: 15px;
}

.vmtu-backtotop a {
  text-decoration: none;
}

.vmtu-backtotop a::before {
  content: "\2191 ";
}

/* 附件 */
.itemAttachmentsBlock {
  margin: 28px 0 0;
  padding: 16px 20px;
  border-radius: var(--vmtu-radius);
  background: var(--vmtu-muted);
}

.itemAttachmentsBlock .itemAttachmentsLabel {
  font-weight: 700;
}

.vmtu-content .itemAttachmentsBlock .itemAttachments {
  list-style: none;
  margin: 6px 0 0;
}

.itemAttachmentsBlock .itemAttachments a::before {
  content: "\2193 ";
}

/* 活動剪影相簿：自動排滿的格狀縮圖，點圖開燈箱（vmtu-core 掛上 Bricks 的 PhotoSwipe） */
.vmtu-content .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 0 0 8px;
}

/* selector 刻意寫到 4 個 class：Bricks 的 .gallery.gallery-columns-N .gallery-item 有 3 個 */
.vmtu-content .gallery[class*="gallery-columns-"] .gallery-item {
  position: relative;
  width: auto;
  /* WP 會依 gallery-columns-N 設 max-width 百分比 */
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--vmtu-radius);
  aspect-ratio: 4 / 3;
  background: var(--vmtu-muted);
}

.vmtu-content .gallery-icon,
.vmtu-content .gallery-icon a {
  display: block;
  width: 100%;
  height: 100%;
}

.vmtu-content .gallery-icon img {
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  object-fit: cover;
  transition: transform 0.3s;
}

.vmtu-content .gallery-item:hover img {
  transform: scale(1.04);
}

.vmtu-content .gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 24px 12px 8px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

.vmtu-content .gallery br {
  display: none;
}

/* 聯絡表單：輸入框 16px 以上，iPhone 點進去才不會自動放大畫面 */
.vmtu-content .fluentform {
  max-width: 640px;
}

.vmtu-content .fluentform .ff-el-group {
  margin-bottom: 20px;
}

.vmtu-content .fluentform .ff-el-input--label label {
  font-size: 16px;
  font-weight: 500;
  color: var(--vmtu-text);
}

.vmtu-content .fluentform .ff-el-form-control {
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--vmtu-text);
  border: 1px solid #c5ccd3;
  border-radius: 8px;
  box-shadow: none;
}

.vmtu-content .fluentform .ff-el-form-control:focus {
  border-color: var(--vmtu-link-text);
  box-shadow: 0 0 0 3px rgba(26, 127, 128, 0.18);
}

.vmtu-content .fluentform textarea.ff-el-form-control {
  min-height: 140px;
}

/* Fluent Forms 會替每張表單輸出 form.fluent_form_N .ff-btn-submit:not(.ff_btn_no_style) 的藍底，selector 要比它重 */
.vmtu-content .fluentform form .ff-btn-submit:not(.ff_btn_no_style) {
  padding: 10px 28px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  border: 0;
  border-radius: 8px;
  background-color: var(--vmtu-link-text);
  color: #fff;
}

.vmtu-content .fluentform form .ff-btn-submit:not(.ff_btn_no_style):hover {
  background-color: #14696a;
}

/* 頁尾 */
.vmtu-footer {
  background: var(--vmtu-dark);
  color: #d9dde2;
  padding: 28px 0;
  font-size: 15px;
  line-height: 1.9;
}

.vmtu-footer a {
  color: #8fd6d6;
}

.vmtu-footer a:hover {
  color: #fff;
}

.vmtu-footer .brxe-container {
  padding: 0 var(--vmtu-gutter);
}

.vmtu-footer .brxe-text {
  width: 100%;
}

.vmtu-footer p {
  margin: 8px 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
