/* 回到頂部按鈕樣式 */
#backToTop {
    display: none;
    position: fixed;
    bottom: 40px; /* 按鈕距離底部 40px */
    left: 80%; /* 水平置中 */
    transform: translateX(-50%); /* 向左偏移自身寬度的 50%，實現真正的居中 */
    width: 60px;
    height: 60px;
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0;
    transform: scale(0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* 設定高層級，確保不會被覆蓋 */
}

/* 按鈕滑鼠懸停效果 */
#backToTop:hover {
    background-color: #005ecb;
    transform: scale(1);
}

/* 顯示按鈕時的動畫 */
#backToTop.show {
    opacity: 1;
    transform: scale(1);
}

/* 按鈕內的 SVG 圖示 */
#backToTop svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 1);
    padding: 8px 15px; /* 增加 padding 讓 hover 效果明顯 */
    transition: all 0.3s ease-in-out;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2); /* 背景變亮一點 */
    border-radius: 5px; /* 圓角效果 */
}



.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    right: 102%; /* 讓第二層選單往左展開 */
    margin-left: -1px; /* 微調邊框對齊 */
}

.dropdown-item:hover, 
.dropdown-item:focus {
    background-color: #007bff !important; /* 亮藍色 */
    color: #fff !important; /* 文字變白 */
}

.carousel-inner img {
    width: 100%; /* 讓圖片寬度填滿 */
    max-height: 500px; /* 最大高度 500px */
    height: 50vh; /* 高度為視窗的 50%，手機會自適應 */
    object-fit: cover; /* 確保圖片填滿不變形 */
}

.image-button {
	border: 2px solid #ccc;       /* 邊框 */
	border-radius: 10px;          /* 圓角 */
	padding: 4px;                 /* 內距讓圖片不貼邊 */
	transition: 0.3s ease-in-out; /* 平滑過渡效果 */
	display: inline-block;
}

.image-button:hover {
	border-color: #007bff;        /* hover 邊框顏色 */
	box-shadow: 0 0 10px rgba(0,123,255,0.4); /* hover 陰影 */
	transform: scale(1.03);       /* 微微放大 */
}

.image-button img {
	border-radius: 10px; /* 圖片本身也圓角 */
	display: block;
}

@media (max-width: 576px) {
    .td-title {
        min-width: 200px; /* 你要的最小寬度 */
        white-space: normal;
        word-break: break-all;
    }
    .td-number {
        word-break: break-all;
        white-space: normal;
    }
}
@media (min-width: 577px) {
    .td-number {
        white-space: nowrap;
        word-break: normal;
    }
}

.rwd-table {
    background: #fff;
    overflow: hidden;
}

.rwd-table tr:nth-of-type(2n){
    background: #eee;
}
.rwd-table th,
.rwd-table td {
    margin: 0.5em 1em;
}
.rwd-table {
    min-width: 100%;
}

.rwd-table th {
    display: none;
}

.rwd-table td {
    display: block;
}

.rwd-table td:before {
    content: attr(data-th) "";
    font-weight: bold;
    width: 4em;
    display: inline-block;
}

.rwd-table th, .rwd-table td {
    text-align: left;
}

.rwd-table th, .rwd-table td:before {
    color: #000000;
    font-weight: bold;
}

@media (min-width: 800px) {
    .rwd-table td:before {
        display: none;
    }
    .rwd-table th, .rwd-table td {
        display: table-cell;
        padding: 0.25em 0.5em;
    }
    .rwd-table th:first-child,
    .rwd-table td:first-child {
        padding-left: 0;
    }
    .rwd-table th:last-child,
    .rwd-table td:last-child {
        padding-right: 0;
    }
    .rwd-table th,
    .rwd-table td {
        padding: 1em !important;
    }
}
