*,
::before,
::after {
    box-sizing: border-box;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif, Apple Color Emoji, "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body {
    min-height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
    display: grid;
    gap: 3vw;
    grid-template-rows: min-content 1fr min-content;
}

a {
    color: currentColor;
}

footer {
    border-top: 2px dotted;
    text-align: center;
}

header {
    border-bottom: 2px dotted;
}

img {
    max-width: 100%;
    height: auto;
    /* 保持比例 */
}

.template-homepage main {
    text-align: left;
}

.skip-link {
    position: absolute;
    top: -30px;
}

.skip-link:focus-visible {
    top: 5px;
}

.page-form label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
}

.page-form :is(textarea, input, select) {
    width: 100%;
    max-width: 500px;
    min-height: 40px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.page-form .helptext {
    font-style: italic;
}

/* 分頁容器樣式 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; /* 按鈕間的間距 */
    margin-top: 30px;
    padding: 20px 0;
    font-family: Arial, sans-serif;
}

/* 連結按鈕基礎樣式 */
.pagination a {
    padding: 8px 16px;
    text-decoration: none;
    background-color: #f4f4f4;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

/* 滑鼠懸停效果 */
.pagination a:hover {
    background-color: #007bff; /* Wagtail 常用藍色或 Django 綠 */
    color: white;
    border-color: #0056b3;
}

/* 頁碼資訊文字 */
.pagination span {
    color: #666;
    font-size: 0.9rem;
}

/* 當前頁面或禁用狀態的輔助樣式（選用） */
.pagination .current {
    font-weight: bold;
    color: #007bff;
}