/* 全站字體與背景 */
body {
    font-family: 'Noto Sans TC', "微軟正黑體", sans-serif;
    background-color: #f9f8f6; /* 燕麥色背景 */
    color: #3e3a39; /* 深灰色字體 */
    line-height: 1.8;
    margin: 0;
    padding: 0;
    padding-bottom: 60px;
}

/* 導覽列 */
.navbar {
    background-color: #333;
    display: flex;
}

/* 漢堡按鈕 */
.menu-toggle {
  font-family: 'Noto Serif TC', "新細明體", serif;
  font-size: 20px;
  color: white;
  cursor: pointer;
  display: none; /* 桌機隱藏 */
  margin-left: 10px;
}

/* 連結區塊 */
.menu-links {
  display: flex;
  flex-wrap: wrap;
}

.menu-links a {
  color: white;
  padding: 10px 15px;
  text-decoration: none;
}

.menu-links a:hover {
  background-color: #555;
}

.menu-links a.active {
  background-color: #8e8781;
}

/* 手機版：導覽列改成漢堡 */
@media (max-width: 768px) {
  .menu-toggle {
    display: block; /* 手機顯示漢堡按鈕 */
    z-index: 1000;        /* 設定比地圖更高的層級 */
  }
  .menu-links {
    display: none; /* 預設隱藏選單 */
    flex-direction: column;
    background-color: #333;
    position: absolute;
    top: 35px;
    left: 0;
    width: 100%;
    z-index: 1001;        /* 比地圖高，確保不被蓋住 */
  }
  .menu-links.show {
    display: flex; /* 點擊漢堡後顯示 */
  }
  .menu-links a {
    border-top: 1px solid #444;
    text-align: center;
  }
}

.navbar a {
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    font-weight: 400;
}
.navbar a:hover {
    background-color: #555;
}
.navbar a.active {
    background-color: #8e8781;
}

/* 內容區塊 */
.container {
    max-width: 900px;
    margin: 30px auto;
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* 標題與副標題 */
h1 {
    font-family: 'Noto Serif TC', "新細明體", serif;
    font-weight: 700;
    font-size: 2.2rem;
    letter-spacing: 4px;
    margin-top: 0;
    margin-bottom: 10px;
    color: #2b2b2b;
    text-align: center;
}
.subtitle {
    font-family: 'Noto Serif TC', serif;
    font-weight: 300;
    font-size: 1.1rem;
    color: #8e8781;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-align: center;
    line-height: 1.6;
}

/* 文章內文 */
p {
    font-weight: 300;
    font-size: 1.05rem;
    text-align: justify;
    margin-bottom: 25px;
}

/* 頁尾屬名 */
.footer {
    margin-top: 40px;
    font-size: 0.9rem;
    color: #b5ada5;
    letter-spacing: 1px;
    text-align: center;
}

/* 左圖右文排版 */
.content-row {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 20px;
}
.image-box {
    flex: 1;
    position: sticky;
    top: 30px;
}
.image-box img {
    width: 100%;
    border-radius: 8px;
    display: block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.text-box {
    flex: 1.5;
}
.text-box .subtitle {
    text-align: left;
    color: #555;
    font-weight: 700;
}

/* 集章遊戲專用元素 */
#map {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
#stamps {
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.6;
}
button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}
button:hover {
    background-color: #555;
}

.site-footer {
  margin-top: 15px;       /* 與上方內容距離縮小 */
  padding: 8px 0;         /* 上下內距縮小，避免太厚 */
  background: #f9f9f9;    /* 淺灰背景 */
  text-align: center;     /* 文字置中 */
  font-size: 13px;        /* 字體稍小 */
  color: #555;            /* 字色淡化 */
  border-top: 1px solid #ddd; /* 頁尾上方加一條細線 */
}

.site-footer a {
  color: #0066cc;
  text-decoration: none;
  margin: 0 4px;          /* 連結間距縮小 */
}

.site-footer a:hover {
  text-decoration: underline;
}

/* 讓所有圖片在手機上自動縮放 */
img {
  max-width: 100%;   /* 圖片寬度不超過容器 */
  height: auto;      /* 高度等比例縮放 */
  display: block;    /* 避免圖片旁邊出現空隙 */
  margin: 0 auto;    /* 置中顯示 */
}

/* 響應式設計：手機優化 */
@media (max-width: 768px) {
  .container {
    padding: 20px;   /* 手機時縮小內距 */
  }
  h1 {
    font-size: 1.6rem; /* 標題縮小 */
  }
  .subtitle {
    font-size: 0.95rem;
  }
  .content-row {
    flex-direction: column; /* 左圖右文改成上下排列 */
    gap: 20px;
  }
  .image-box {
    position: static; /* 手機上取消 sticky，避免排版錯亂 */
    top: auto;
  }
}
