
.photobox_list {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.photobox_list .photobox_list_thumb {
    width:160px;
    height:133px;
    margin:5px;
    padding:2px;
    border:1px solid #e5e5e5;
    background-color:#fafafa;
}
.photobox_list .photobox_list_thumb img {
    /* max-width:100%;
    max-height:calc(100% - 20px); */
  width: 100%;
  height: 100%;
  max-width:100%;
  max-height:100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 767px) {
.photobox_list .photobox_list_thumb {
    width:160px;
    height:133px;
    margin:5px;
    padding:0px;
    border:1px solid #e5e5e5;
    background-color:#fafafa;
}
}
@media (max-width: 376px) {
.photobox_list .photobox_list_thumb {
    width:155px;
    height:133px;
    margin:5px;
    padding:0px;
    border:1px solid #e5e5e5;
    background-color:#fafafa;
}
}

.txtshadow   { text-shadow: #aaa 0px 2px 2px; }
.txtshadow_w { text-shadow: #fff 0px 0px 1px; }

/*宗教堂介紹*/
.hdetail
.title-h2 {
  display: flex;              /* 讓文字跟線條同一行 */
  align-items: center;        /* 垂直置中 */
  font-size: 2em;
  line-height: 2em;
  font-weight: 700;
  margin: 10px 0;

}
.hdetail {
    text-align: justify;
}
.hdetail p {
    display: block;
    margin-block-start: 1.3em;
    margin-block-end: 1.3em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
    text-align: justify;
}

.hdetail {
  font-size:0.9rem;
  line-height: 1.6;
}
.hdetail h1 {
  font-size: 2.2rem;
  line-height: 1.35;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.hdetail h2 {
  display: flex;              /* 讓文字跟線條同一行 */
  align-items: center;        /* 垂直置中 */
  font-size: 1.625em;
  line-height: 32px;
  font-weight: 700;
  margin: 30px 0 30px 0;
}

.hdetail h2::after {
  content: "";
  flex: 1;                    /* 自動撐滿剩餘空間 */
  margin-left: 8px;          /* 與文字間距 */
  border-top: 1px solid #AB8535;
  background-color: #AB8535;  /* 可選，確保顏色一致 */
}

.hdetail h3 {
  display: flex;              /* 讓文字跟線條同一行 */
  align-items: center;        /* 垂直置中 */
  font-size: 1.375em;
  line-height: 24px;
  font-weight: 700;
  margin: 20px 0 20px 0;
}

.hdetail h2::before,
.hdetail h3::before {
  content: "";
  width: 8px;
  height: 1em;
  margin-right: 16px;          /* 與文字間距 */
  background-color: #bc9e77ff;  /* 可選，確保顏色一致 */
}

.hdetail img {
  max-width: 100%;
  height: auto;
  display: inline;
}

@media (max-width: 640px) {
  .hdetail h2 {
    font-size: 1.4em;
    line-height: 1.4;
    margin: 10px 0;
  }
  .hdetail h2::after{
    flex: 1;
    margin-left: 16px;
    border-top: 1px solid #AB8535;
    background-color: #AB8535;
  }
  .hdetail h3{
    font-size: 1.25em;
    line-height: 18px;
    margin: 10px 0;
  }
  .hdetail h3::before {
  content: "";
  width: 4px;
  height: 1em;
  /* margin-right: 8px; */
  }
  .hdetail .spot-h2::before {
  margin-right: 16px;          /* 與文字間距 */
  background-color: #956A30;  /* 可選，確保顏色一致 */
  }
}

.title-h2::after {
  content: "";
  flex: 1;                    /* 自動撐滿剩餘空間 */
  margin-left: 8px;          /* 與文字間距 */
  border-top: 1px solid #AB8535;
  background-color: #AB8535;  /* 可選，確保顏色一致 */
}

.title-h3 {
  display: flex;              /* 讓文字跟線條同一行 */
  align-items: center;        /* 垂直置中 */
  font-size: 1.5em;/*24px;*/
  line-height: 1.5em;/*24px;*/
  font-weight: 700;
}

.title-h2::before,
.title-h3::before {
  content: "";
  width: 4px;
  height: 1em;
  margin-right: 16px;          /* 與文字間距 */
  background-color: #956A30;  /* 可選，確保顏色一致 */
}

@media (max-width: 640px) {
  .title-h2 {
    font-size: 0.875em;/*14px;*/
    line-height: 1.125em;/*18px;*/
  }
  .title-h2::after{
    flex: 1;
    margin-left: 16px;
    border-top: 1px solid #AB8535;
    background-color: #AB8535;
  }
  .title-h3{
    font-size: 0.750em;/*12px;*/
    line-height: 1.125em;/*18px;*/
  }
  .title-h3::before {
  content: "";
  width: 4px;
  height: 1em;
  margin-right: 4px;          /* 與文字間距 */
  background-color: #956A30;  /* 可選，確保顏色一致 */
}
  .spot-h2::before {
  margin-right: 16px;          /* 與文字間距 */
  background-color: #956A30;  /* 可選，確保顏色一致 */
}
}

ul.custom-list {
  list-style: none;
  padding-left: 0;
}

ul.custom-list li::before {
  content: "•";
  font-size: 0.750em;/*12px;*/
  color: #AB8535;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
}



.section-title {
  display: flex;              /* 讓文字跟線條同一行 */
  align-items: center;        /* 垂直置中 */
  font-size: 2em;/*32px;*/
  line-height: 2em;/*32px;*/
  font-weight: 700;
}

.section-title::after {
  content: "";
  flex: 1;                    /* 自動撐滿剩餘空間 */
  margin-left: 8px;          /* 與文字間距 */
  border-top: 1px solid #AB8535;
  background-color: #AB8535;  /* 可選，確保顏色一致 */
}

.section-title-h3 {
  display: flex;              /* 讓文字跟線條同一行 */
  align-items: center;        /* 垂直置中 */
  font-size: 1.5em;/*24px;*/
  line-height: 24px;
  font-weight: 700;
}

.section-title-h3::before {
  content: "";
  width: 8px;
  height: 1em;
  margin-right: 16px;          /* 與文字間距 */
  background-color: #956A30;  /* 可選，確保顏色一致 */
}
.spot-section::before {
  content: "";
  width: 8px;
  height: auto;
  margin-right: 32px;          /* 與文字間距 */
  background-color: #956A30;  /* 可選，確保顏色一致 */
}
@media (max-width: 640px) {
  .section-title {
    font-size: 0.875em;/*14px;*/
    line-height: 1.125em;/*18px;*/
  }
  .section-title::after{
    flex: 1;
    margin-left: 16px;
    border-top: 1px solid #AB8535;
    background-color: #AB8535;
  }
  .section-title-h3{
    font-size: 0.750em;/*12px;*/
    line-height: 1.125em;/*18px;*/
  }
  .section-title-h3::before {
  content: "";
  width: 4px;
  height: 1em;
  margin-right: 4px;          /* 與文字間距 */
  background-color: #956A30;  /* 可選，確保顏色一致 */
  }
  .spot-section::before {
  margin-right: 16px;          /* 與文字間距 */
  background-color: #956A30;  /* 可選，確保顏色一致 */
  }
}

.contentbody {
  max-width:900px;
  margin:0 auto;
}


/*文章顯示*/
.article {
  max-width:900px;
  margin:0 auto;
}
.article h1 {
  font-weight: 700;
  font-size: 2.375em;/*38px;*/
  color: #81571e;
  line-height: 1.44;
  margin: 1.5rem 0;
  letter-spacing: 1;
  text-align: justify;
  margin:20px 0;
}
@media (max-width: 576px) {
  .article {
    margin:10px;
  }
  .article h1 {
    font-size: 1.50em;/*28px;*/
  }
}

.article h2 {
  display: flex;              /* 讓文字跟線條同一行 */
  align-items: center;        /* 垂直置中 */
  font-size: 1.625em;/*26px;*/
  line-height: 1.625em;/*26px;*/
  font-weight: 700;
  color: #956A30;
  margin:25px 0 16px 0;
}

.article h2::before {
  content: "";
  width: 8px;
  height: 1em;
  border-radius: 2px;
  margin-right: 16px;          /* 與文字間距 */
  background-color: #c8a374;
}

.article h3 {
  display: flex;              /* 讓文字跟線條同一行 */
  align-items: center;        /* 垂直置中 */
  font-size: 1.25em;/*20px;*/
  line-height: 1.5em;/*24px;*/
  font-weight: 700;
  color: #956A30;
  margin:25px 0 16px 0;
}

.article h3::before {
  content: "";
  width: 5px;
  height: 1em;
  margin-right: 16px;          /* 與文字間距 */
  background-color: #d9b587;
}
.article h4 {
  display: flex;
  align-items: center;
  font-size: 1.125em;/*18px;*/
  line-height: 1.5em;/*24px;*/
  font-weight: 700;
  color: #956A30;
  margin:15px 0;
}
.article h5 {
  display: flex;
  align-items: center;
  font-size: 1.125em;/*18px;*/
  line-height: 1.5em;/*24px;*/
  font-weight: 700;
  color: #956A30;
  margin:15px 0;
}

@media (max-width: 576px) {
  .article h2 {
    font-size: 1.250em;/*20px;*/
  }
  .article h3 {
    font-size: 1.125em;/*18px;*/
  }
}

.article .articlebody {
  font-size: 1.0625em;/*17px;*/
  line-height: 1.7;
  width:100%;
  margin:0 auto;
}
@media (max-width: 767px) {
 .article .articlebody {
  width:100%;
  padding:0 20px;
}
}
.article a:hover{
  color:#000;
  text-decoration: underline ;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-style: solid;
  text-decoration-color: #999;
}
.article p {
  margin: 10px 0
}

.article li {
  margin-bottom:8px;
}
.article li::before {
    content: "•";
    font-size: 0.750em;/*12px;*/
    color: #AB8535;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
}

.img-title {
  margin-top: .3rem;
  color: #8b9192;
  line-height: 1.6;
  padding-left: 0;
}
.img-title {
  font-size: 0.875em;/*14px;*/
  padding-left: 12px;
  margin-top: 2px;
  margin-bottom:12px;
  color: #8b9192;
  line-height: 1.6;
  display: inline-flex;
}
.img-title:before {
  content: "";
  width: 8px;
  height:20px;
  margin-right: 6px;
  background-color: #e3c092;
}

.relarticle h4 {
  display: flex;
  align-items: center;
  font-size: 1.125em;/*18px;*/
  line-height: 1.5em;/*24px;*/
  font-weight: 700;
  color: #956A30;
  margin:0;
}
@media (max-width: 576px) {
.relarticle h4 {
  font-size: 0.9375em;/*15px;*/
  line-height: 1em;/*16px;*/
  font-weight: 400;
}
}


.spot-section1 {
  color: #81571e;
  background-color: #CBB98980;
  margin-bottom:25px;
  padding:0;
  display: flex;
}
.spot-section1 .spot-info {
  padding:10px;
}
.spot-section1 .title {
  color:#000;
  font-size: 1.5em;/*24px;*/
  font-weight: 700;
  margin: 10px;
}
.spot-section1::before {
  content: "";
  width: 8px;
  height: auto;
  margin-right: 12px;
  background-color: #956A30;
}
.spot-section1 li {
  margin-bottom:5px;
  list-style: none;;
}
.spot-section1 li::before {
    content: "•";
    font-size: 0.750em;/*12px;*/
    color: #AB8535;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
}
@media (max-width: 576px) {
.spot-section1::before {
    margin-right: 12px;
}
.spot-section1 .title { font-size:1.125em;/*18px;*/ }
.spot-section1 { font-size:0.875em;/*14px;*/ }
}



/* Bootstrap-like pagination styles (self-contained) */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top:20px;
}
.page-item {
  list-style: none;
}
.page-item:not(:first-child) .page-link {
  margin-left: -1px;
}
.page-link,
.pagination > li > a,
.pagination > li > span {
  position: relative;
  display: block;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #777;
  background-color: #fff;
  border: 1px solid #dee2e6;
  text-decoration: none;
}
.page-link:hover,
.pagination > li > a:hover,
.pagination > li > span:hover {
  z-index: 2;
  color: #0a58ca;
  background-color: #e9ecef;
  border-color: #dee2e6;
}
.page-link:focus {
  z-index: 3;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.page-item.active .page-link,
.pagination > li.active > a,
.pagination > li.active > span {
  z-index: 3;
  color: #fff;
  background-color: #d3af2f;
  border-color: #c09f26ff;
}
.page-item.disabled .page-link,
.pagination > li.disabled > a,
.pagination > li.disabled > span {
  color: #6c757d;
  pointer-events: none;
  background-color: #eee;
  border-color: #dee2e6;
}
.pagination-lg .page-link {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
}
.pagination-sm .page-link {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}


/* 首頁的毛玻璃主題變數：淺色（預設） / 深色 */
.theme-dark {
  --mask-bg: #956a3080;
  --text-color: #ffffff;

  --btn-bg: #ffffff;
  --btn-text: #956a30;

  /* fallback values for non-supporting browsers (optional) */
  --mask-fallback: rgba(149, 106, 48, 0.5);
  --btn-border: rgba(0, 0, 0, 0.08);
}

.theme-light {
  --mask-bg: #ffffff80;
  --text-color: #84520f;/*#956a30;*/

  --btn-bg: #956a30;
  --btn-text: #ffffff;

  --mask-fallback: rgba(255, 255, 255, 0.5);
  --btn-border: rgba(0, 0, 0, 0.08);
}

.glass-brown {
  /* backdrop-filter（包含 Safari 前綴） */
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  /* 使用主題變數 */
  background-color: var(--mask-bg);
  color: var(--text-color);
  /* 其他外觀 */
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  /* 若要支援 tailwind 的 h-full 等，組合即可 */
  border-radius: 5px;
}

/* fallback：不支援 backdrop-filter 的瀏覽器，使用更不透明背景 */
@supports not ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))) {
  .glass-brown {
    background-color: var(--mask-fallback);
  }
}

.glass-brown a {
  color: var(--btn-text);
  text-decoration: none;
}

.readmore-button {
  width: 105px;
  height: 32px;
  border-radius: 18.5px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  line-height: 1;
  box-shadow: 2px 4px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}




@page { margin: 1.5cm; }
@media print {
  /* 隱藏 main 以外的所有區域 */
  header, footer,
  #mobile-menu, #mobile-footer-nav,
  #carousel-container { display: none !important; }

  /* main 內不需列印的區塊 */
  #share-bar { display: none !important; }

  /* 讓 main 滿版 */
  #main-content {
    max-width: 100% !important;
    padding: 0 !important;
    color: #000 !important;
  }
}


/*行事曆相關------*/
@media (max-width: 768px) {
    .calendar-table-scroll {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-table-scroll .calendar-table {
        min-width: 720px;
    }
}

.calendar-toolbar {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.calendar-toolbar .btn {
    margin-right: 10px;
}

.legend {
    margin: 10px 0;
    font-size: 0.875rem;
}

.legend-item {
    display: inline-block;
    margin-right: 20px;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 15px;
    margin-right: 5px;
    border-radius: 3px;
    vertical-align: middle;
}

.lunar-event { background-color: #ffe6c5; color: #000; }
.cycle-event { background-color: #ffe6c5; color: #000; }
.normal-event { background-color: #2196f3; color: #000; }

.calendar-container {
    margin: 20px 0;
}

.calendar-header {
    margin-bottom: 20px;
    text-align: center;
}

.calendar-nav {
    display: inline-block;
    margin: 0 20px;
}

.calendar-nav button {
    margin: 0 5px;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.calendar-table th,
.calendar-table td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: center;
    vertical-align: top;
    height: 140px;
    max-height: 150px;
    width: 14.28%;
}

.calendar-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    height: 40px;
}

.calendar-table td {
    position: relative;
}

/* .calendar-table td:hover {
    background-color: #f5f5f5;
} */

.calendar-table td.calendar-day {
    /* cursor: pointer; */
    max-width:140px;
    /* max-height: 140px; */
    overflow: hidden;
}
.calendar-table td.calendar-day .lunar-day {
    color: #555;
}

/* .calendar-table td.calendar-day:hover {
    background-color: #f5f5f5;
} */

.calendar-table td.other-month {
    background-color: #fafafa;
    color: #ccc;
    cursor: default;
}

.calendar-table td.today {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
}

.calendar-day-btn {
  display: flex;          /* 改為 flex 容器 */
  flex-direction: column; /* 子元素垂直排列 */
  align-items: flex-start;/* 水平靠左 */
  justify-content: flex-start; /* 垂直靠上 ← 關鍵 */
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
  color: inherit;
}

.day-number {
    display: block;
    text-align: left;
    font-weight: bold;
    margin-bottom: 5px;
}

.event-item {
    display: block;
    width:100%;
    font-size: 0.875rem;
    text-align: left;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-item:hover {
    opacity: 0.8;
}


.modal-body .form-group {
    margin-bottom: 15px;
}

.checkbox-inline {
    margin-right: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

/* Modal 相關樣式 */
.modal-lg {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 1rem;
}
.modal-header .modal-title {
    font-size:18px;
    margin: 5px 0
}
.modal-header .close {
    margin-left: auto;
    padding: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #000;
    opacity: 0.5;
}

.modal-header .close:hover {
    opacity: 0.75;
}

#modal-events-list .event-detail {
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid;
}

#modal-events-list .event-detail.normal-event {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
}

#modal-events-list .event-detail.lunar-event {
    background-color: #fff3e0;
    border-left-color: #f7c37f;
}

#modal-events-list .event-detail.cycle-event {
    background-color: #e8f5e8;
    border-left-color: #4caf50;
}

.event-detail .event-title {
    font-size: 0.9375em;/*15px;*/
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.event-detail .event-meta {
    font-size: 0.875rem;/*14px;*/
    color: #666;
    margin-bottom: 3px;
}

.event-detail .event-description {
    font-size: 0.9375rem;/*15px;*/
    color: #555;
    line-height: 1.5;
}

.event-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;/*12px;*/
    font-weight: bold;
    color: white;
    margin-right: 8px;
}

.event-type-badge.normal { background-color: #2196f3; }
.event-type-badge.lunar { background-color: #ff9800; }
.event-type-badge.cycle { background-color: #4caf50; }

/* 寺廟群組樣式 */
.temple-group {
  margin-bottom: 10px;
  padding: 5px;
}

.temple-group-header {
    margin-bottom: 8px;
    padding-bottom: 3px;
    border-bottom: 2px solid #ddd;

}

.temple-group-header h6 {
    margin: 0;
    color: #333;
    font-weight: bold;
    font-size: 0.9375rem;/*15px;*/
}

.temple-group .event-detail {
    margin-bottom: 8px;
    margin-left: 10px;
    background-color: #ffffff;
}
/*end行事曆相關*/


.youtube-container {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px;
    height: 0;
    overflow: hidden;
}

.youtube-container iframe,
.youtube-container object,
.youtube-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#Accesskey_C {
  font-size: 0.2em;font-weight:400;color:#000;margin-left:-0.875em;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;

  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* 旅遊路線1~7的景點文字連結樣式 */
.route-link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.route-link-grid a,
.route-link-grid button {
  display: block;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #CBB989;
  border-radius: 6px;
  background-color: #fff;
  color: #956A30;
  text-decoration: none;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.4;
  cursor: pointer;
}

.route-link-grid a:hover,
.route-link-grid a:focus,
.route-link-grid button:hover,
.route-link-grid button:focus {
  background-color: #f5e9cc;
  color: #6b4a1e;
}

@media (max-width: 767px) {
  .route-link-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* end 旅遊路線1~7的景點文字連結樣式 */
