header{
    background-color: var(--color-primary-light);    padding: 1rem 2rem;
    width: 100%;
    height: fit-content;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.title{
    padding: 0 5px;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}
.title a{
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}
.title a:hover{
    padding: 0 5px;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}
header h2{
    font-size: 2rem;
}
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    right: 2rem;
}
nav a {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border: 2px solid var(--color-text-dark);
    font-weight: bold;
}
/* 漢堡按鈕，預設隱藏 */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.hamburger svg{
    width: 2rem;
    height: 2rem;
}
/* 側邊選單，沿用 nav a 的樣式 */
.side-menu {
    position: fixed;
    top: 0;
    right: -70%;
    width: 70%;
    height: 100%;
    background-color: #222;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 60px 24px 24px;
    gap: 1rem;          /* 與 nav 的 gap 一致 */
    transition: right 0.3s ease;
    box-sizing: border-box;
}
.side-menu a {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;   /* 與 nav a 一致 */
    text-decoration: none;
    border: 2px solid #e3e3e3;  /* 原本是 black，這裡配合深色背景改淺色 */
    font-weight: bold;
    color: #e3e3e3;
}
.side-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}
.close-btn {
    position: absolute;
    top: 16px;
    right: 2rem;
    background: none;
    border: none;
    color: #e3e3e3;
    font-size: 1.5rem;
    cursor: pointer;
}
/* 黑色遮罩 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
}
.side-menu.open {
    right: 0;
}
.overlay.open {
    display: block;
}
/* 手機 */
@media (max-width: 768px) {
    nav {
        display: none;
    }
    .hamburger {
        display: block;
    }
}