:root {
    --primary-color: #4793af; /* 主要顏色，用於品牌標識、活動按鈕等 */
    --secondary-color: #F0F8FF; /* 次要顏色，用於懸停效果、背景等 */
    --text-color: #333333; /* 主要文字顏色 */
    --background-color: #FFFFFF; /* 主要背景顏色 */
    --accent-color: #4a7d99; /* 強調顏色，用於連結懸停等 */
    --border-color: #ddd; /* 邊框顏色 */
    --shadow: 0 2px 8px rgba(0,0,0,0.1); /* 陰影效果 */
    --header-height: 80px; /* 定義header高度 */
}

* { /* 通用選擇器，重設所有元素的預設樣式 */
    margin: 0; /* 清除外邊距 */
    padding: 0; /* 清除內邊距 */
    box-sizing: border-box; /* 盒模型計算方式，邊框和內邊距包含在寬高內 */
}

body {
    font-family: system-ui, -apple-system, 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans CJK TC', sans-serif; /* 設定字體 */
    color: var(--text-color); /* 設定文字顏色 */
    line-height: 1.6; /* 設定行高 */
    background-color: var(--background-color); /* 設定背景顏色 */
    padding-top: var(--header-height); /* 為固定header預留空間 */
    min-height: 100vh; /* 確保body至少佔滿視窗高度 */
    display: flex; /* 使用flex布局 */
    flex-direction: column; /* 垂直排列 */
}

/* 頁首樣式 - 固定在頂部 */
.site-header {
    background-color: var(--background-color); /* 背景顏色 */
    box-shadow: var(--shadow); /* 陰影 */
    padding: 0.5rem 2rem; /* 內邊距 */
    position: fixed; /* 固定定位 */
    top: 0; /* 距離頂部為0 */
    left: 0; /* 距離左側為0 */
    width: 100%; /* 寬度100% */
    height: var(--header-height); /* 高度 */
    z-index: 1000; /* 堆疊順序，確保在最上層 */
    display: flex; /* 使用Flexbox佈局 */
    align-items: center; /* 垂直置中 */
}

.header-container {
    display: flex; /* 使用Flexbox佈局 */
    justify-content: space-between; /* 兩端對齊 */
    align-items: center; /* 垂直置中 */
    width: 100%; /* 寬度100% */
    max-width: 1200px; /* 最大寬度 */
    margin: 0 auto; /* 水平置中 */
}

.logo {
    display: flex; /* 使用Flexbox佈局 */
    align-items: center; /* 垂直置中 */
}

.logo img {
    height: 50px; /* 圖片高度 */
    margin-right: 1rem; /* 右外邊距 */
}

.logo h1 {
    text-decoration: none;
    font-size: 1.5rem; /* 字體大小 */
    color: var(--primary-color); /* 字體顏色 */
    white-space: nowrap; /* 防止文字換行 */

}

/* 導覽列 */
.main-nav ul {
    display: flex; /* 使用Flexbox佈局 */
    list-style: none; /* 移除列表樣式 */
}

.main-nav li {
    position: relative; /* 相對定位，為下拉選單定位 */
}

.main-nav a {
    display: block; /* 顯示為區塊元素 */
    padding: 0.5rem; /* 內邊距 */
    color: var(--text-color); /* 文字顏色 */
    text-decoration: none; /* 移除底線 */
    transition: all 0.3s; /* 過渡效果 */
}

.main-nav a:hover, 
.main-nav a:focus {
    background-color: var(--secondary-color); /* 懸停時的背景顏色 */
    color: var(--accent-color); /* 懸停時的文字顏色 */
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}
        
.page-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
}

/* 下拉選單 */
.dropdown-content {
        display: none; /* 預設隱藏 */
        position: absolute; /* 絕對定位 */
        background-color: var(--background-color); /* 背景顏色 */
        min-width: 200px; /* 最小寬度 */
        box-shadow: var(--shadow); /* 陰影 */
        z-index: 1; /* 堆疊順序 */
        border-radius: 0 0 4px 4px; /* 圓角 */
        overflow: hidden; /* 隱藏超出內容 */
}

/* 桌機 hover 顯示下拉選單 */
@media (min-width: 969px) {
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

.dropdown-content a {
    padding: 0.8rem 1rem; /* 內邊距 */
    border-bottom: 1px solid var(--border-color); /* 底部邊框 */
}

.dropdown-content a:last-child {
    border-bottom: none; /* 最後一個子元素移除底部邊框 */
}

/* 漢堡選單 (行動裝置) */
.menu-toggle {
    display: none; /* 預設隱藏 */
    flex-direction: column; /* Flexbox方向為垂直 */
    justify-content: space-around; /* 均勻分佈 */
    width: 30px; /* 寬度 */
    height: 25px; /* 高度 */
    background: transparent; /* 透明背景 */
    border: none; /* 無邊框 */
    cursor: pointer; /* 滑鼠指標為手形 */
    padding: 0; /* 無內邊距 */
}

.menu-toggle span {
    width: 100%; /* 寬度100% */
    height: 3px; /* 高度 */
    background-color: var(--primary-color); /* 背景顏色 */
    border-radius: 2px; /* 圓角 */
    transition: all 0.3s; /* 過渡效果 */
}

/* 響應式設計 */
@media (max-width: 968px) { /* 當螢幕寬度小於等於968px時 */
    .header-container {
        flex-direction: column; /* Flexbox方向為垂直 */
        align-items: flex-start; /* 從頭對齊 */
        height: auto; /* 高度自動 */
    }
    
    .site-header {
        height: auto; /* 高度自動 */
        min-height: var(--header-height); /* 最小高度 */
        padding: 0.5rem 1rem; /* 內邊距 */
    }
    
    .menu-toggle {
        display: flex; /* 顯示漢堡選單 */
        position: absolute; /* 絕對定位 */
        top: 1.5rem; /* 距離頂部 */
        right: 1rem; /* 距離右側 */
    }
    
    .main-nav {
        width: 100%; /* 寬度100% */
        display: none; /* 預設隱藏 */
        margin-top: 0.5rem; /* 上外邊距 */
    }
    
    .main-nav.active {
        display: block !important; /* 點擊後顯示，使用 !important 確保優先級 */
    }
    
    .main-nav ul {
        flex-direction: column; /* Flexbox方向為垂直 */
    }
    
    .dropdown-content {
        position: static; /* 靜態定位 */
        box-shadow: none; /* 無陰影 */
        width: 100%; /* 寬度100% */
        display: none; /* 預設隱藏，僅由 JS 控制 */
        background-color: var(--secondary-color); /* 背景顏色，讓子選單更明顯 */
        border-left: 3px solid var(--primary-color); /* 左邊框，增加視覺識別 */
    }
    .dropdown.open .dropdown-content {
        display: block !important;
        animation: slideDown 0.3s ease-out; /* 添加動畫效果 */
    }
    @keyframes slideDown {
        from { opacity: 0; max-height: 0; }
        to { opacity: 1; max-height: 200px; }
    }
    .dropdown-content a {
        padding-left: 2rem; /* 左內邊距 */
        border-bottom: 1px solid rgba(255,255,255,0.3); /* 分隔線 */
    }
    /* 手機上禁用 hover 顯示 */
    .dropdown:hover .dropdown-content {
        display: none;
    }
    
    body {
        padding-top: 70px; /* 移動設備上减少頂部間距 */
    }
}

@media (max-width: 480px) { /* 當螢幕寬度小於等於480px時 */
    .site-header {
        padding: 0.5rem; /* 內邊距 */
    }
    
    .logo h1 {
        font-size: 1.2rem; /* 字體大小 */
    }
    
    .logo img {
        height: 40px; /* 圖片高度 */
    }
    
    .menu-toggle {
        top: 1rem; /* 距離頂部 */
        right: 0.5rem; /* 距離右側 */
    }
    .page-header h1 {
    font-size: 1.5rem;
    }
            
    .gallery-grid {
    grid-template-columns: 1fr;
    }
            
    .lightbox-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    }
}

/* === 首頁專用樣式 === */

/* 主內容區 */
main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1; /* 佔用剩餘空間，將footer推到底部 */
}

/* 輪播區 */
.carousel {
    position: relative;
    height: 400px;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.carousel-inner {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 1rem;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 1rem;
}

.carousel-control {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
}

.carousel-indicator.active {
    background: white;
}

/* 快速連結區 */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.quick-link-card {
    background: var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.quick-link-card:hover {
    transform: translateY(-5px);
}

.quick-link-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.quick-link-card a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.quick-link-card a:hover {
    background: var(--accent-color);
}

/* 最新消息區 */
.news-section {
    margin-bottom: 2rem;
}

.section-title {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.news-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.news-content {
    padding: 1rem;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-title {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.news-title:hover {
    color: var(--accent-color);
}

.news-category {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--accent-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* YouTube 影片區 */
.youtube-video-section {
    margin-bottom: 2rem;
}

.video-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.thanks-text {
    flex: 1;
    background: var(--secondary-color);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.thanks-text h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.thanks-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.9rem; /* 調整字體大小 */
}

.thanks-columns {
    display: flex;
    gap: 1.5rem;
}

.thanks-column {
    flex: 1;
}

.video-wrapper {
    flex: 1;
    width: 100%; /* 在手機版面下確保寬度為100% */
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-description {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-top: 0.1rem;
    text-align: left;
    color: #666;
}

/* 響應式設計 - 首頁專用 */
@media (max-width: 992px) {
    .video-layout {
        flex-direction: column;
        gap: 1.5rem;
    }
    .video-wrapper,
    .thanks-text {
        width: 100%;
        flex: 1 1 100%;
    }
    .thanks-columns {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .carousel {
        height: 300px;
    }
    
    .quick-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem 0.5rem;
    }
    
    .carousel {
        height: 250px;
    }

    .carousel-caption h2 {
        font-size: 1.2rem;
    }

    .carousel-caption p {
        font-size: 0.9rem;
    }
}

/* ===== Laws3.html 頁面專用樣式 ===== */
/* 主內容區 */
.laws3-main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.laws3-page-header {
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.laws3-page-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
}

/* 篩選和搜索區域 */
.laws3-filters {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: var(--secondary-color);
    border-radius: 8px;
}

.laws3-filter-group {
    display: flex;
    flex-direction: column;
}

.laws3-filter-group label {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.laws3-filter-group select,
.laws3-filter-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.laws3-filter-group select:focus,
.laws3-filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(3, 102, 214, 0.2);
}

/* 新聞表格 */
.laws3-news-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background-color: var(--background-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.laws3-news-table th,
.laws3-news-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.laws3-news-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.laws3-news-table tbody tr:hover {
    background-color: #f8f9fa;
}

.laws3-news-title {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.laws3-news-title:hover {
    text-decoration: underline;
}

.laws3-news-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    background-color: var(--secondary-color);
    color: var(--accent-color);
}

/* 新聞詳情模態框 */
.laws3-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.laws3-modal-content {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    position: relative;
}

.laws3-close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.laws3-close-modal:hover {
    color: #000;
}

.laws3-modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.laws3-modal-title {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.laws3-modal-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.laws3-modal-body {
    line-height: 1.6;
}

.laws3-modal-body p {
    margin-bottom: 1rem;
}

.laws3-modal-body ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.laws3-modal-body li {
    margin-bottom: 0.5rem;
}

.laws3-modal-body a {
    color: var(--accent-color);
    text-decoration: none;
}

.laws3-modal-body a:hover {
    text-decoration: underline;
}

/* 分頁控件 */
.laws3-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.laws3-pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background-color: var(--background-color);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.laws3-pagination button:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.laws3-pagination button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.laws3-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 無結果提示 */
.laws3-no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Laws3 響應式設計 */
@media (max-width: 768px) {
    .laws3-filters {
        grid-template-columns: 1fr;
    }
    
    .laws3-news-table th, 
    .laws3-news-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .laws3-modal-content {
        padding: 1.5rem;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .laws3-page-header h1 {
        font-size: 1.5rem;
    }
    
    .laws3-news-table th, 
    .laws3-news-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.9rem;
    }
    
    .laws3-news-category {
        font-size: 0.75rem;
    }
    
    .laws3-modal-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ===== Laws 頁面通用樣式 (laws.html, laws2.html) ===== */
/* 主內容區 */
.laws-common-main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.laws-common-page-header {
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.laws-common-page-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
}

/* 篩選和搜索區域 */
.laws-common-filters {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: var(--secondary-color);
    border-radius: 8px;
}

.laws-common-filter-group {
    display: flex;
    flex-direction: column;
}

.laws-common-filter-group label {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.laws-common-filter-group select,
.laws-common-filter-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.laws-common-filter-group select:focus,
.laws-common-filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(3, 102, 214, 0.2);
}

/* 新聞表格容器 */
.laws-common-news-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border-radius: 8px;
}

.laws-common-news-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--background-color);
}

.laws-common-news-table th,
.laws-common-news-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.laws-common-news-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.laws-common-news-table tbody tr:hover {
    background-color: #f8f9fa;
}

.laws-common-news-title {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.laws-common-news-title:hover {
    text-decoration: underline;
}

.laws-common-news-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    background-color: var(--secondary-color);
    color: var(--accent-color);
}

/* 新聞詳情模態框 */
.laws-common-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.laws-common-modal-content {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    position: relative;
}

.laws-common-close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.laws-common-close-modal:hover {
    color: #000;
}

.laws-common-modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.laws-common-modal-title {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.laws-common-modal-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.laws-common-modal-body {
    line-height: 1.6;
}

.laws-common-modal-body p {
    margin-bottom: 1rem;
}

.laws-common-modal-body ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.laws-common-modal-body li {
    margin-bottom: 0.5rem;
}

.laws-common-modal-body a {
    color: var(--accent-color);
    text-decoration: underline;
}

.laws-common-modal-body a:hover {
    text-decoration: underline;
}

/* laws-common 無結果提示 */
.laws-common-no-results {
    display: none;
    text-align: center;
    padding: 2rem;
    color: #666;
}

.laws-common-no-results p {
    font-size: 1.1rem;
}

/* 分頁控件 */
.laws-common-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.laws-common-pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background-color: var(--background-color);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.laws-common-pagination button:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.laws-common-pagination button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.laws-common-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Laws Common 響應式設計 */
@media (max-width: 768px) {
    .laws-common-filters {
        grid-template-columns: 1fr;
    }
    
    .laws-common-news-table th, 
    .laws-common-news-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .laws-common-modal-content {
        padding: 1.5rem;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .laws-common-page-header h1 {
        font-size: 1.5rem;
    }
    
    .laws-common-news-table th, 
    .laws-common-news-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.9rem;
    }
    
    .laws-common-news-category {
        font-size: 0.75rem;
    }
    
    .laws-common-modal-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .laws-common-pagination {
        flex-wrap: wrap;
    }
}

/* ===== 網站 Footer 樣式 ===== */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section h3 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.footer-section p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0.25rem 0;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ecf0f1;
    text-decoration: underline;
}

/* 社交媒體連結 */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: #bdc3c7;
    transition: fill 0.3s ease;
}

.social-links a:hover .social-icon {
    fill: #3498db;
}

/* 版權信息 */
.copyright {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    margin-top: 2rem;
}

.copyright p {
    margin: 0.5rem 0;
    font-size: 0.8rem;
    color: #95a5a6;
}

/* 回到頂端按鈕 */
#goToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#goToTopBtn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Footer 響應式設計 */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .site-footer {
        padding: 1.5rem 1rem;
    }
    
    .footer-section h3 {
        font-size: 1rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.85rem;
    }
    
    .social-links {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .social-icon {
        width: 28px;
        height: 28px;
    }
    
    .copyright p {
        font-size: 0.75rem;
    }
    
    #goToTopBtn {
        bottom: 15px;
        right: 15px;
        padding: 12px;
        font-size: 16px;
    }
}

/* Downloads頁面樣式 */
.downloads-common {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.downloads-common main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.downloads-common .page-header {
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.downloads-common .page-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
}

/* 篩選和搜索區域 */
.downloads-common .filters {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: var(--secondary-color);
    border-radius: 8px;
}

.downloads-common .filter-group {
    display: flex;
    flex-direction: column;
}

.downloads-common .filter-group label {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.downloads-common .filter-group select,
.downloads-common .filter-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.downloads-common .filter-group input {
    width: 100%;
}

/* 檔案表格 */
.downloads-common .downloads-table-container {
    overflow-x: auto;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    border-radius: 8px;
}

.downloads-common table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--background-color);
}

.downloads-common th,
.downloads-common td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.downloads-common th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.downloads-common tr:nth-child(even) {
    background-color: var(--secondary-color);
}

.downloads-common tr:hover {
    background-color: rgba(174, 198, 207, 0.1);
}

.downloads-common .file-name {
    color: var(--accent-color);
    font-weight: bold;
}

.downloads-common .file-format {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    background-color: var(--secondary-color);
    color: var(--accent-color);
    text-transform: uppercase;
}

.downloads-common .download-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.downloads-common .download-btn:hover {
    background-color: var(--accent-color);
}

/* 檔案類型標記 */
.downloads-common .file-pdf {
    background-color: #f8d7da;
    color: #721c24;
}

.downloads-common .file-doc {
    background-color: #cce5ff;
    color: #004085;
}

.downloads-common .file-xls {
    background-color: #d4edda;
    color: #155724;
}

.downloads-common .file-zip {
    background-color: #e2e3e5;
    color: #383d41;
}

/* 無結果提示 */
.downloads-common .no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    display: none;
}

/* 分類標題 */
.downloads-common .category-title {
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--primary-color);
    color: var(--accent-color);
}

/* Downloads響應式設計 */
@media (max-width: 768px) {
    .downloads-common .filters {
        grid-template-columns: 1fr;
    }
    
    .downloads-common th,
    .downloads-common td {
        padding: 0.75rem 0.5rem;
    }
    
    .downloads-common .download-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .downloads-common .page-header h1 {
        font-size: 1.5rem;
    }
    
    .downloads-common th,
    .downloads-common td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .downloads-common .file-name {
        font-size: 0.9rem;
    }
    
    .downloads-common .file-format {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Contact頁面樣式 */
.contact-common main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.contact-common .page-header {
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.contact-common .page-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
}

/* 聯絡資訊區塊 */
.contact-common .contact-section {
    margin-bottom: 3rem;
}

.contact-common .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-common .contact-card {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.contact-common .contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.contact-common .contact-info {
    margin-bottom: 1rem;
}

.contact-common .contact-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.contact-common .contact-info i {
    margin-right: 0.5rem;
    color: var(--accent-color);
    min-width: 20px;
}

.contact-common .map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.contact-common .map-container iframe {
    display: block;
    width: 100%;
    border: none;
}

/* 表單樣式 */
.contact-common .contact-form {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-common .form-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.contact-common .form-group {
    margin-bottom: 1.5rem;
}

.contact-common .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.contact-common .form-group input,
.contact-common .form-group select,
.contact-common .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-common .form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-common .submit-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.contact-common .submit-btn:hover {
    background-color: var(--accent-color);
}

/* QR Code 樣式 */
.contact-common .qr-container {
    margin-top: 1.5rem;
}

.contact-common .qr-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-common .qr-item {
    text-align: center;
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-common .qr-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.contact-common .qr-code {
    width: 150px;
    height: 150px;
    max-width: 100%;
    margin-bottom: 0.75rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contact-common .qr-label {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* Contact響應式設計 */
@media (max-width: 968px) {
    .contact-common .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-common .qr-codes {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .contact-common .qr-code {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .contact-common .contact-card,
    .contact-common .contact-form {
        padding: 1rem;
    }
    
    .contact-common .page-header h1 {
        font-size: 1.5rem;
    }
    
    .contact-common .qr-codes {
        gap: 0.8rem;
    }
    
    .contact-common .qr-item {
        padding: 0.8rem;
    }
    
    .contact-common .qr-code {
        width: 100px;
        height: 100px;
    }
    
    .contact-common .qr-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .contact-common main {
        padding: 1rem 0.5rem;
    }
    
    .contact-common .form-group input,
    .contact-common .form-group select,
    .contact-common .form-group textarea {
        padding: 0.5rem;
    }
    
    .contact-common .qr-codes {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 200px;
        margin: 1rem auto 0;
    }
    
    .contact-common .qr-item {
        padding: 1rem;
    }
    
    .contact-common .qr-code {
        width: 120px;
        height: 120px;
    }
    
    .contact-common .qr-label {
        font-size: 0.85rem;
    }
}