.title-list {
    color: #374151;         /* 深灰色，比純黑更高級 */
    font-weight: 700;       /* 粗體強調 */
    letter-spacing: 2px;    /* 增加字距，符合你之前的「寬一點」需求 */
    margin-bottom: 20px;    /* 與下方按鈕保持距離 */
    position: relative;
    display: inline-block;  /* 讓寬度隨文字長度調整 */
    padding-bottom: 12px;
}

/* 品牌裝飾底線 */
.title-list::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%); /* 居中 */
    width: 60px;                /* 短底線更有現代感 */
    height: 4px;
    background-color: #506ab1;  /* 你的品牌主色 */
    border-radius: 10px;
}

#resultTable thead th {
    color: #6b7280 !important;   /* 灰色（Tailwind Gray-500） */
    font-size: 10pt !important; /* 約 10pt */
    font-weight: 500;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb;
}

/* 移除 DataTables 預設排序顏色（即使你關掉 ordering 也保險） */
table.dataTable thead th,
table.dataTable thead td {
    color: #6b7280 !important;
}

/* hover / active 狀態也一起壓掉藍色 */
table.dataTable thead th:hover,
table.dataTable thead th:active {
    color: #6b7280 !important;
}
#resultTable tbody td {
    padding: 20px 20px;
}
.result-tag{
    color: #464545;
}
.result-title{
    color:#506ab1;
}

/* 篩選按鈕組樣式 */

.btn-filter {
    color:#464545;
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 500;
    margin: 5px;
    border: 2px solid #506ab1;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    background-color: #506ab1;
    color: white;
    transform: translateY(-2px);
}

.btn-filter.active {
    background-color: #506ab1 !important;
    color: white !important;
}

td.dt-control {
    cursor: pointer;
    text-align: center;
}
td.dt-control:before {
    content: "+";
    color: #506ab1;
    font-weight: bold;
    font-size: 18px;
}
tr.shown td.dt-control:before {
    content: "−";
}

.border-custom-color{
    border-color:#506ab1 !important;
}
.btn-label-primary {
    color: #696cff;
    border-color: transparent;
    background: #e7e7ff;
}

.btn-label-primary:hover {
    border-color: transparent !important;
    background: #5f61e6 !important;
    color: #fff !important;
    box-shadow: 0 .125rem .25rem #696cff66 !important;
    transform: translateY(-1px) !important;
}

.btn-label-secondary {
    color: white;
    border-color: transparent;
    background: #b9b9b9;
}

.btn-label-secondary:hover {
    border-color: transparent !important;
    background: #707070 !important;
    color: #fff !important;
    box-shadow: 0 .125rem .25rem #696cff66 !important;
    transform: translateY(-1px) !important;
}

/* 進階搜尋整體卡片 */
#advancedFilter {
    background: linear-gradient(180deg, #f9fafb, #ffffff);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-top: 8px;
    box-shadow: inset 0 1px 0 #f1f5f9;
}

#advancedFilter.collapse {
    transition: all 0.3s ease;
}
/* 收合標題 */
.filter-toggle {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
}

.filter-toggle:hover {
    background: #eef2ff;
}

/* 箭頭動畫 */
.filter-toggle .toggle-icon {
    transition: transform 0.25s ease;
    font-size: 1.1rem;
}

/* 展開時箭頭旋轉 */
.filter-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* 進階篩選說明文字 */
.filter-guide {
    font-size: 0.85rem;
    color: #4b5563;
    background: #f8fafc;
    padding: 7px 10px;
    line-height: 1.6;
}

.filter-guide span {
    color: #506ab1;
    font-weight: 600;
}


/* Primary（組別） */
.btn-outline-primary {
    color: #506ab1;
    border-color: #c7d2fe;
    background-color: #ffffff;
}
.btn-outline-primary:hover {
    background-color: #eef2ff;
    border-color: #506ab1;
    color: #506ab1;
}

/* Success（領域） */
.btn-outline-success {
    color: #3a7f63;
    border-color: #b7e4c7;
    background-color: #ffffff;
}
.btn-outline-success:hover {
    background-color: #eafaf1;
    border-color: #3a7f63;
}

/* Dark（SDG） */
.filter-label {
    width: 115px;
    flex-shrink: 0;
    color: #374151;
}

.btn-outline-dark {
    color: #374151;
    border-color: #d1d5db;
    background-color: #ffffff;
}
.btn-outline-dark:hover {
    background-color: #f3f4f6;
    border-color: #374151;
}

/* checked 狀態 */
.btn-check:checked + .btn-outline-primary {
    background-color: #4257a6;   /* 比 #506ab1 深 */
    border-color: #4257a6;
    color: #ffffff;
}
.btn-check:checked + .btn-outline-success {
    background-color: #2f6f55;   /* 深綠 */
    border-color: #2f6f55;
    color: #ffffff;
}

.btn-check:checked + .btn-outline-dark {
    background-color: #374151;   /* 深灰藍 */
    border-color: #374151;
    color: #ffffff;
}

/* SDG 容器：可換行、整齊 */
.sdg-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;   /* 行距 / 列距 */
    align-items: flex-start;
}

/* SDG 按鈕統一尺寸感 */
.sdg-wrap .btn {
    white-space: nowrap;
}


/*詳細頁的CSS*/
.detail-custom-link {
    text-decoration: none !important;
    letter-spacing: 1.25px;
    color: #696cff;
    font-size: 1.25rem;
}
.detail-custom-link:hover {
    color: #696cff93;
}

/* 讓後方的標題也保持相同風格 */
.detail-text-link {
    letter-spacing: 1.65px;
    color: #8e8e8e;
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%; /* 限制最大寬度防止擠壓到分享按鈕 */
    display: inline-block;
    vertical-align: bottom;
}

/* 分享連結區域的微調 */
#newsLinks-detail {
    display: flex;
    justify-content: flex-end;
    gap: 10px; 
    color: #8e8e8e;
}
.share-icon-detail {
    border: 1px solid #eee;
    text-decoration:none;
    color: #384386;
}
.share-icon-detail:hover{
    color: #384286a6;
}

/*vote button*/
/* 圓角長按鈕的微調 */
.btn-pill {
    padding-left: 2rem;
    padding-right: 2rem;
    transition: all 0.3s ease;
}

/* 投票按鈕的懸停效果 */
.btn-primary.rounded-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3) !important;
}

/* 狀態：已截止或已投票的處理 */
.btn:disabled {
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/*award*/
.award-none{
    filter: grayscale(100%); 
    opacity: 0.3;
}

/*票箱CSS*/
/* ============================= */
/* 🎟️ 右側固定票箱 */
/* ============================= */

.vote-cart {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    cursor: pointer;
}

/* 整顆按鈕 */
.vote-cart-inner {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d8cf3, #5842a6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 12px 30px rgba(80, 106, 177, 0.35);
    color: #ffffff;
    transition: all 0.3s ease;
    position: relative;
}

/* hover 動畫 */
.vote-cart-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(80, 106, 177, 0.5);
}

/* icon */
.vote-icon {
    font-size: 26px;
    margin-bottom: 4px;
}

/* 文字 */
.vote-text {
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: 600;
}

/* 紅色票數 badge */
.vote-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 7px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

/* Offcanvas 內最近加入清單小美化 */
.cart-recent-wrap{
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #f9fafb, #ffffff);
  padding: 10px;
  max-height: 56vh;      /* 桌機：用視窗高度比例 */
  overflow-y: auto;
}

/* 手機：高度更小，避免 offcanvas 太長 */
@media (max-width: 576px){
  .cart-recent-wrap{
    max-height: 46vh;
    padding: 8px;
  }
}

/* 清單 item 美化 */
#cartRecentList .list-group-item{
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 10px;
}

#cartRecentList .item-id{
  color: #6b7280;
  font-size: 12px;
}

#cartRecentList .item-title{
  color: #374151;
  font-weight: 600;
  letter-spacing: .5px;
}

/* 手機：字稍微小一點更省空間 */
@media (max-width: 576px){
  #cartRecentList .item-title{ font-size: 14px; }
  #cartRecentList .item-id{ font-size: 11px; }
}