body { 
    font-family: Arial, sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: #fff2df; 
    overflow-x: hidden; 
}

header { 
    background-color: #015697; 
    color: #f2f2f2; 
    padding: 8px 16px; 
    display: flex; 
    align-items: center;
    justify-content: space-between; 
    position: relative; 
    z-index: 1000; 
    width: 100%; 
    box-sizing: border-box; 
}

header img { 
    height: 80px; 
   
}

header h1 { 
    margin: 0; 
    font-size: 24px;
}
.site-title {
    font-size: 20px;
    color: #ffffff;
    margin-left: 12px;
    font-weight: bold;
}
.buttons { 
    display: flex; 
    justify-content: space-between;
    width: 100%;
    max-width: 1000px; /* 可依需要調整寬度 */
    margin: 0 auto;
}

.buttons > * {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

button, .dropbtn {
    width: 100%;
    padding: 15px 25px; 
    background-color: #015697; 
    color: #fff; 
    border: none; 
    cursor: pointer; 
    font-size: 20px !important;
    text-align: center;
}

button a {
    color: #fff;
    text-decoration: none;
    display: block;
    width: 100%;
}
.button-link {
    color: white !important;
    background-color: #015697;
    display: block;
    width: 100%;
    padding: 15px 25px;
    text-align: center;
    text-decoration: none;
    font-size: 20px;
    border: none;
    cursor: pointer;
}

.button-link:hover {
    background-color: #555;
    color: white !important;
}


button:hover,
.dropbtn:hover {
    background-color: #555;
}

.dropdown {
    position: relative; 
    width: 100%;
}

.dropdown-content { 
    display: none; 
    position: absolute; 
    background-color: white;
    min-width: 160px; 
     font-size: 16px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
    z-index: 1;
    top: 100%;
    left: 0;
}

.dropdown-content a { 
   
    padding: 12px 16px; 
    text-decoration: none; 
    display: block; 
}

.dropdown:hover .dropdown-content { 
    display: block; 
}


a { 
    color: black;
    text-decoration: none; 
}

a:hover { 
    color: darkblue;
    text-decoration: underline; 
}

a:visited, a:active {
    color: black;
}

.search-bar { 
    display: none; 
    flex-direction: row; 
    flex-wrap: wrap; 
    align-items: center; 
    justify-content: center;
    background-color: #015697; 
    padding: 40px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 
    position: absolute; 
    top: 60px; 
    width: 97%;
    z-index: 9999; 
    overflow: hidden; 
    transition: max-height 0.5s ease; 
    gap: 15px;
}

.search-bar.active { 
    display: flex;
    background-color: #015697; 
}

.search-bar select, .search-bar input, .search-bar button {
    font-size: 24px; /* 放大字體 */
    padding: 18px 24px; /* 增加內距 */
    border-radius: 12px;
    min-width: 3000px; /* 增加最小寬度，確保輸入框夠大 */
    text-align: center;
}


.latest-news { 
    padding: 20px;
    background-color: #015697; 
    margin: 20px; 
    border-radius: 10px; 
}
.slideshow-container {
    width: 100%;
    max-width: 1024px; /* 你可以依據原始圖片最大寬度調整 */
    
    height: 768px;
    
    margin: 0 auto;
    position: relative;
    background-color: #fff2df;
    overflow: hidden;
}

.slides {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.slides.active {
    display: flex;
}

.slides img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}


.next { 
    right: 0;
}

.prev:hover, .next:hover {
    background-color: #015697; 
}

.dots { 
    text-align: center; 
    padding: 20px; 
}

.dot { 
    cursor: pointer; 
    height: 15px; 
    width: 15px; 
    margin: 0 2px;
    background-color: #015697;
    border-radius: 50%; 
    display: inline-block;
    transition: background-color 0.6s ease; 
}

.active, .dot:hover {
    background-color: #717171; 
}

table {
    width: 90%;
    margin: 40px auto 20px;
    border-collapse: collapse;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

th, td { 
    padding: 14px 16px; 
    font-size: 20px;
    background-color: #015697;
    color: white;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    word-break: break-word;
    white-space: pre-wrap;
}

td:first-child { 
    text-align: center;
    width: 50px;
}
td:nth-child(3) {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
     white-space: nowrap; /* 確保文字不折行 */
}

tr:hover td {
    background-color: #0469b0;
    transition: background-color 0.3s ease;
}

th:first-child, td:first-child {
    border-top-left-radius: 12px;
}

th:last-child, td:last-child {
    border-top-right-radius: 12px;
}

table a {
    color: white !important; /* 強制所有超連結為白色 */
    background-color: #015697; /* 統一藍底 */
    text-decoration: none;
    padding: 8px 12px; /* 增加內距使其更美觀 */
    border-radius: 5px; /* 圓角效果 */
    display: inline-block; /* 確保樣式統一 */
}

table a:hover {
    background-color: #023e6d; /* 鼠標懸停時的加深藍色 */
    color: #ffffff; /* 保持白字 */
    text-decoration: none;
}


.sort-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.sort-options button {
    margin: 0 5px;
    padding: 5px 10px;
    background-color: #000;
    color: #fff;
    border: none;
    cursor: pointer;
}

.sort-options button:hover {
    background-color: #555;
}

.preview-text {
    color: blue;
    cursor: pointer;
    text-decoration: underline;
}

.full-text {
    color: black;
}

.legal-basis {
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    padding: 8px; /* 確保初始狀態有一致內距 */
}

.legal-basis.expanded {
    white-space: normal;
    display: block;
    text-decoration: none;
    background-color: #015697;
    color: white;
    padding: 8px;
    border-radius: 5px;
    width: 100%; /* 展開後保持與表格寬度一致 */
    box-sizing: border-box; /* 確保內距不影響對齊 */
}



.legal-basis.expanded:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(1, 86, 151, 0.35);
}

.title, .buttons button, .sort-button, .pagination a, .pagination span {
    font-size: 16px;
}

.site-footer {
    background-color: #fff2df;
    padding: 20px;
    font-size: 14px;
    color: #333;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.footer-logo {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    align-items: start;
}

.footer-logo img {
    max-width: 100px;
    margin: 5px 0;
}

.accessibility-badge {
    max-width: 120px;
}

.footer-section {
  flex: 1 1 200px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* 對齊頂端 */
   align-items: flex-start; /* 讓所有欄位對齊頂部 */
}

.footer-section img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-top: 5px;
}

.footer-section h3 {
    margin-bottom: 10px;
    border-bottom: 1px solid #aaa;
        font-size: 20px !important;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 6px;
        font-size: 16px !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 10px;
    font-size: 16px;
    color: #666;
}

.pagination-container {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    clear: both;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination a {
    padding: 8px 16px;
    background-color: #015697;
    border: 1px solid black;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease-in-out;
}

.pagination a:hover {
    background-color: #0469b0;
    transform: translateY(-2px);
}

.pagination a.active, .pagination span.active {
    background-color: #023e6d;
    color:white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(1, 86, 151, 0.2);
    transition: all 0.3s ease-in-out;
}

.pagination a.active:hover, .pagination span.active:hover {
    background-color: #015697;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(1, 86, 151, 0.4);
}
/* 表格區域 */
.news-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
  font-family: "Noto Sans TC", sans-serif;
}

/* 表頭 */
.news-table thead {
  background-color: #003366;
  color: white;
  text-align: left;
}

.news-table th,
.news-table td {
  padding: 14px 20px;
  font-size: 16px;
}

/* 列表交錯背景 */
.news-table tbody tr:nth-child(odd) {
  background-color: #e8f1fa;
}
.news-table tbody tr:nth-child(even) {
  background-color: #ffffff;
}

/* 滑鼠 hover 效果 */
.news-table tbody tr:hover {
  background-color: #d1e8ff;
  cursor: pointer;
}

/* 標題超連結樣式 */
.news-table a {
  color: #003366;
  text-decoration: none;
  font-weight: 500;
}

.news-table a:hover {
  text-decoration: underline;
}

/* RWD 響應式 */
@media (max-width: 768px) {
  .news-table th,
  .news-table td {
    font-size: 14px;
    padding: 10px;
  }
}


