:root {
 --bs-primary: #063c26; /* 流域深墨綠色 */
 --bs-primary-hover: #C7602A; /* 內容次選單底色 */
 --bs-secondary: #E0753B; /* 次選單滑鼠滑過底色 */
 --bs-secondary-hover: #b45309;
 --bg-warm: #EBEBEB; /* 背景色 */
}
/* 頂部橫式色塊 */
.top-bar {
	background-color: var(--bs-primary-hover);
	background: linear-gradient(to right, #C8D669, #004A42); /* 左右漸層 */
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0px; /* 文字間距 */
}
/* 頂部 LOGO 小圖客製化樣式 */
.top-bar-logo {
	height: 30px;
	width: auto;
	object-fit: contain;
}
/* 整合與加大後的響應式 LOGO */
.responsive-logo {
	height: calc(80px + 3vw);
	max-height: 140px;
	width: auto;
	object-fit: contain;
	filter: drop-shadow(2px 0px 0px #FFFFFF) drop-shadow(-2px 0px 0px #FFFFFF) drop-shadow(0px 2px 0px #FFFFFF) drop-shadow(0px -2px 0px #FFFFFF) drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.6));
	position: relative;
	z-index: 3;
}
body {
	background-color: var(--bg-warm);
	font-family: 'PingFang TC', 'Microsoft JhengHei', sans-serif;
	color: #2d3748;
	font-size: 1.15rem;
}
/* ==========================================================================
   Banner 圖片疊交淡入淡出輪播
   ========================================================================== */
.title-banner {
	position: relative;
	min-height: 280px; /* 手機版基本高度 */
	overflow: hidden;
	display: flex;
	align-items: center;
	border-bottom: 2px solid #FFFFFF; /* 白邊縫隙 */
}

/* 遮罩層：維持在所有背景圖上方（z-index: 2），確保前方文字標題清晰 */
.title-banner::after {
 content: "";
 position: absolute;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 background: linear-gradient(rgba(4, 41, 26, 0.6), rgba(0, 0, 0, 0.25));
 z-index: 2;
 pointer-events: none;
}
/* 前景內容層：確保 LOGO 與文字頂在最上層（z-index: 3） */
.title-banner .container {
	position: relative;
	z-index: 3;
}
/* 背景單張幻燈片基礎樣式 */
.banner-slide {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-size: cover;
	background-position: center center; /* 上下左右置中裁切 */
	background-repeat: no-repeat;
	opacity: 0; /* 預設隱藏 */
	z-index: 1;
	animation: crossFadeImages 24s infinite linear;
}
/* 桌機電腦版輪播圖 (992px 以上才作用) */
.pc-slide1 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/banner.png');
	animation-delay: 0s;
}
.pc-slide2 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/banner2.png');
	animation-delay: 4s;
}
.pc-slide3 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/banner3.png');
	animation-delay: 8s;
}
.pc-slide4 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/banner4.png');
	animation-delay: 12s;
}
.pc-slide5 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/banner5.png');
	animation-delay: 16s;
}
.pc-slide6 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/banner6.png');
	animation-delay: 20s;
}
/* 手機行動版輪播圖 (992px 以下作用) */
.mobile-slide1 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/m-banner.png');
	animation-delay: 0s;
}
.mobile-slide2 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/m-banner2.png');
	animation-delay: 4s;
}
.mobile-slide3 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/m-banner3.png');
	animation-delay: 8s;
}
.mobile-slide4 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/m-banner4.png');
	animation-delay: 12s;
}
.mobile-slide5 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/m-banner5.png');
	animation-delay: 16s;
}
.mobile-slide6 {
	background-image: url('https://sakafiyaw.pct.org.tw/images/m-banner6.png');
	animation-delay: 20s;
}

/* 輪播圖交錯淡入淡出演算法 (總長24秒)：
   0%~5% (1.2秒) 淡入 | 5%~25% (4.8秒) 靜止顯現 | 25%~30% (1.2秒) 淡出 | 30%~100% 隱藏
*/
@keyframes crossFadeImages {
 0% {
opacity: 0;
}
 5% {
opacity: 1;
}
 25% {
opacity: 1;
}
 30% {
opacity: 0;
}
 100% {
opacity: 0;
}
}
/* 響應式自動縮放標題 */
.responsive-title {
	font-size: calc(1.6rem + 1.8vw);
	letter-spacing: 3px; /* 文字間距 */
	position: relative;
	z-index: 3;
	color: #C7602A; /* Banner 標題橘色 */
	-webkit-text-stroke: 4px #FFFFFF; /* 描邊 4px (一半會被橘字蓋住，呈現 2px 外邊效果) */
	paint-order: stroke fill; /* 核心關鍵：先畫邊框再填顏色，防止字體被白邊吃掉 */
	filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.7)); /* 立體黑陰影 */
}
 @media (min-width: 1200px) {
 .title-banner {
 min-height: 350px;
}
 .responsive-title {
 font-size: 3.6rem;
}
}
/* 導航選單樣式 */
.navbar-custom {
	background-color: var(--bs-primary-hover);
}
.navbar-custom .nav-link {
	color: #f8fafc !important;
	font-weight: 700;
	font-size: 1.60rem;
	padding: 20px 30px !important;
	transition: all 0.3s;
}
.navbar-custom .nav-link:hover, .navbar-custom .nav-link.active, .navbar-custom .nav-item.dropdown:hover .nav-link {
	background: linear-gradient(#C7602A, #EB7E43); /* 選單滑鼠滑過漸層 */
	color: white !important;
}

/* ==========================================================================
   響應式選單排版優化
   ========================================================================== */

/* 1. 電腦寬螢幕樣式（992px 以上） */
@media (min-width: 992px) {
 .navbar-custom .navbar-nav .nav-item {
 position: static; /* 讓次選單可以相對於外層導覽列滿版定位 */
 display: flex;
 align-items: center;
}

/* 滑鼠滑過展開橫式次選單 */
 .navbar-custom .nav-item.dropdown:hover .dropdown-menu-horizontal {
 display: flex !important;
}
 .navbar-custom .dropdown-menu-horizontal {
 position: absolute;
 top: 100%;
 left: 0;
 right: 0;
 width: 100%;
 background: #145A4E; /* 次選單底色 */
 border: none;
 border-radius: 0;
 margin-top: 0;
 padding: 8px 15px;
 box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
 z-index: 999;
  
/* 橫式往右排列與置中 */
  display: none;
 flex-direction: row;
 flex-wrap: wrap;
 justify-content: center;
 align-items: center;
 gap: 8px;
}
 .navbar-custom .dropdown-menu-horizontal .dropdown-item {
 color: #ffffff !important;
 font-size: 1.15rem;
 font-weight: 600;
 padding: 8px 15px;
 width: auto;
 white-space: nowrap;
 border-radius: 4px;
 transition: all 0.2s;
}
 .navbar-custom .dropdown-menu-horizontal .dropdown-item:hover {
 background-color: var(--bs-secondary) !important;
 color: #ffffff !important;
}
}

/* 2. 手機/平板窄螢幕樣式（992px 以下） */
@media (max-width: 991.98px) {
 .navbar-custom .nav-link {
 padding: 12px 20px !important; /* 縮小手機版主選單間距 */
 font-size: 1.3rem; /* 微調手機版字體大小 */
 text-align: center;
}
/* 覆蓋 Bootstrap 預設行為，讓手機版點擊展開 */
 .navbar-custom .dropdown-menu-horizontal {
 display: none;
 background-color: rgba(0, 0, 0, 0.2) !important; /* 深色半透明背景層次 */
 border: none;
 border-radius: 0;
 padding: 5px 0;
 margin: 0;
 box-shadow: none;
 width: 100%;
}
/* 當點擊展開時顯示直式 */
 .navbar-custom .dropdown-menu-horizontal.show {
 display: block !important;
}
 .navbar-custom .dropdown-menu-horizontal .dropdown-item {
 color: #e2e8f0 !important;
 font-size: 1.1rem;
 font-weight: 600;
 padding: 10px 20px;
 text-align: center; /* 置中對齊 */
 display: block;
 width: 100%;
}
 .navbar-custom .dropdown-menu-horizontal .dropdown-item:hover, .navbar-custom .dropdown-menu-horizontal .dropdown-item:focus {
 background-color: var(--bs-secondary) !important;
 color: white !important;
}
/* 隱藏手機版自帶的箭頭圖示以維持簡潔 */
 .dropdown-toggle::after {
 display: inline-block;
 margin-left: 0.255em;
 vertical-align: 0.255em;
}
}
/* 內容卡片客製化 */
.custom-card {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.50);
	background-color: #ffffff;
}
.card-title-border {
	color: #000000;
	font-weight: 700;
	font-size: 1.6rem;
	/* border-bottom: 2px solid var(--bs-primary-hover); */
	padding-bottom: 10px;
}
/* 表格樣式 */
.table-custom {
	font-size: 1.1rem;
}
.table-custom th {
	font-size: 1.15rem;
	padding: 12px 8px;
}
.table-custom thead {
	background-color: var(--bs-primary-hover);
	color: white;
}
.table-custom tbody tr:nth-child(even) {
 background-color: #fcfbf7;
}
/* 內容次選單 */
.sub-menu-btn {
	background-color: var(--bs-primary-hover);
	color: white;
	font-weight: 600;
	font-size: 1.05rem;
	border: none;
	padding: 12px 4px;
	transition: background 0.2s;
}
.sub-menu-btn:hover {
	background-color: var(--bs-secondary);
	color: white;
}
/* 粉專照片轉播框 */
.photo-stream-card {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.50);
}
/* 限制輪播框架並指定 4:3 比例 */
.photo-carousel-box {
	width: 100%;
	aspect-ratio: 4 / 3;
	background-color: #edf2f7;
	border-radius: 4px;
	overflow: hidden;
}
/* 確保所有輪播相片維持 4:3 比例且滿版不變形 */
.photo-carousel-box .carousel-inner, .photo-carousel-box .carousel-item {
	width: 100%;
	height: 100%;
}
.photo-carousel-box img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.photo-yellow-tag {
	background-color: #fde047;
	color: #000;
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 1px;
	padding: 6px 16px;
	display: inline-block;
}
/* 報名按鈕 */
.btn-register {
	background-color: var(--bs-secondary);
	color: white;
	font-weight: 700;
	font-size: 1.1rem;
	border: none;
	padding: 10px 20px;
}
.btn-register:hover {
	background-color: var(--bs-secondary-hover);
	color: white;
}
/* 頁腳 */
footer {
	background-color: #1a202c;
	color: #a0aec0;
	border-top: 4px solid var(--bs-primary-hover);
	font-size: 1.05rem;
}
footer .text-light-highlight {
	color: #edf2f7;
	font-weight: 600;
}
.top-bar-logo1 {
	height: 30px;
	width: auto;
	object-fit: contain;
}
/* 返回頂部箭頭按鈕 */
.back-to-top {
	position: fixed;
	bottom: 25px;
	right: 25px;
	width: 48px;
	height: 48px;
	background-color: #E0753B; /* 使用主視覺橘色 */
	color: #ffffff !important; /* 使用白色 */
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease-in-out;
	z-index: 9999;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
	border: 4px solid rgba(255, 255, 255, 0.4);
}
.back-to-top:hover {
	background-color: #b45309; /* 使用深橘色 */
	transform: translateY(-3px);
	box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}
.back-to-top.show {
	opacity: 1;
	visibility: visible;
}
/* 文章開頭空兩格 */
.indent {
	text-indent: 2em;
}
/* 隱藏超連結底線 */
a {
	text-decoration:none
}
/* 消息列表分隔線 */
.listunderline
{
    border-bottom: solid;
    border-bottom-color: #B6B6B6;
    border-bottom-width: 1px;
    padding-top: 10px;
    padding-bottom: 10px;
}
/* 消息列表分隔線 - 自動隱藏最後一個項目的下分隔線 */
:last-child > .listunderline {
    border-bottom: none !important;
}