.jlpt-header {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column; /* 強制所有子元素由上至下排列 */
}
/* 讓 Logo 和工具列左右分開的關鍵 */
.header-top {
  display: flex;             /* 開啟彈性佈局 */
  justify-content: space-between; /* 關鍵：一個推到最左，一個推到最右 */
  align-items: flex-end;     /* 讓工具列底部對齊 Logo 底部，比較美觀 */
  width: 100%;
  padding-bottom: 10px;
}

/* 右側工具列內部垂直排列 */
.row-utils {
  display: flex;
  flex-direction: column;    /* 讓語言連結跟搜尋框上下排 */
  align-items: flex-end;     /* 內容通通靠右對齊 */
  gap: 20px;
}
@font-face {
  font-family: 'HanNomGothic';
  src: url('./Han-NomGothic.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
.nav-item {
  font-family: 'HanNomGothic', serif;
}
.title-text{
  font-family: 'HanNomGothic', serif;
}
/* 搜尋框與按鈕的微調 */
.search-controls {
  display: flex;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  margin-bottom: 30px;

}

.search-box {
  border: 1px solid #ccc;
  display: flex;
  margin-left: 5px;
}

.search-box input {
  border: none;
  padding: 2px 5px;
  outline: none;
}

.search-btn {
  background: #eee;
  border: none;
  border-left: 1px solid #ccc;
  cursor: pointer;
}

/* 文字大小按鈕樣式 */
.btn-size {
  border: 1px solid #ccc;
  background: #f9f9f9;
  padding: 1px 6px;
  cursor: pointer;
}
.btn-size.active {
  background: #046cd7;
  color: #fff;
}
/* 第一層 Logo */
.row-logo {
  width: 100%;
  padding: 10px 0;
}
.main-logo { height: 80px; }
.divider {
  margin: 0 10px;  /* 左右各10px */
}
/* 第二層 工具列 */
.row-utils {
  width: 100%;
  display: flex;
  flex-direction: column; /* 工具列內部的連結與搜尋也分兩行 */
  align-items: flex-end;  /* 靠右對齊 */
  font-size: 14px;
}
.search-controls {
  margin-bottom: 20px;
}
.lang-links a {
  color: #444;              /* 黑灰色 */
  text-decoration: none;    /* 取消原本藍色下劃線 */
  transition: 0.2s;
}
.sidebar-image-box {
    position: relative;   /* 這行非常重要 */
}

.sidebar-img {
    width: 100%;
    display: block;
}

/* 左下角長方形按鈕 */
.image-btn {
  font-family: 'HanNomGothic', serif;
    position: absolute;
    bottom: 45px;   /* 距離底部 */
    left: 30px;     /* 距離左邊 */

    background: #ffc05a;   /* JLPT 紅 */
    color: rgb(43, 43, 43);
    padding: 6px 60px 6px 10px;
    font-size: 14px;
    text-decoration: none;

    border-radius: 4px;
    transition: 0.3s ease;
}
/* --- Footer 樣式 --- */
.jlpt-footer {
    width: 100%;
    max-width: 960px;
    margin: 40px auto 0;
    border-top: 1px dotted #ccc;
    padding-top: 20px;
    text-align: center; /* 讓內容置中 */
    font-size: 13px;
    color: #666;
}

.footer-links {
    margin-bottom: 15px;
}
.footer-links a {
    text-decoration: none;
    color: #666;
    margin: 0 10px;
}

.footer-desc {
  font-family: 'HanNomGothic', serif;
    margin-bottom: 20px;
    line-height: 1.8;
}

.footer-logos {
    display: flex;
    justify-content: center; /* 左右並排且置中 */
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logos .org {
    display: flex;
    align-items: center;
    gap: 10px;
}
.org img{
  height: 52px;
}

.copyright {
    background-color: #ddd; /* 灰色背景條 */
    padding: 10px 0;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

/* --- 修正 Header 跑版 (針對你的第二張圖) --- */
.header-top {
    display: flex;
    justify-content: space-between; /* 關鍵：讓 Logo 在左，工具列在右 */
    align-items: flex-end;
    width: 100%;
    margin-bottom: 15px;
}

/* 工具列內部的兩行對齊 */
.row-utils {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* 讓語言連結跟搜尋框全部靠右對齊 */
}
/* Hover 效果 */
.image-btn:hover {
    background: #ffa719;
}
.lang-links a:hover {
  text-decoration: underline;  /* 滑鼠移上去顯示下劃線 */
}

.lang-links .divider {
  margin: 0 12px;  /* 控制距離 */
  color: #888;     /* 灰色 */
}
/* 第三層 導覽按鈕 */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 橫向 4 個按鈕 */
  border-top: 1px solid #ccc;
  border-left: 1px solid #ccc;
}

.nav-item {
  height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: #5c5c5c;
  font-weight: bold;
  background: linear-gradient(to bottom, #fff, #f5f5f5);
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  transition: all 0.3s ease;  /* 平滑動畫 */
}

.nav-item:hover {
  background: #1e73be;
  color: white;
}

.nav-item:hover ruby,
.nav-item:hover rt {
  color: white;
}
.nav-item ruby{
  font-size: 14px;
}
/* 振假名 */
rt { font-size: 8px; margin-bottom: 2px; }
body {
    margin: 0;
    padding: 0;
    background-color: #fff;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
    color: #333;
    line-height: 1.6;
}
.sidebar-image-box {
    width: 100%;
    margin-bottom: 20px; /* 保持跟下方元素的間距 */
}

.sidebar-img {
    width: 100%;         /* 寬度自動撐滿側邊欄 */
    height: auto;        /* 高度依比例縮放 */
    display: block;      /* 消除圖片下方微小間隙 */
    border: none;        /* 如果原本有框線不需要的話可以設為 none */
    border-radius: 8px;  /* 如果圖片想要一點圓角感可以加上 */
}
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* 頂部語言切換區 */
header {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 5px;
    margin-bottom: 20px;
}
header span { margin-left: 3px; cursor: pointer; color: #666; }

/* 主橫幅區塊 (Banner) */
.hero-banner {
    display: flex;
    margin-bottom: 30px;
    position: relative;
}
.banner-left { flex: 1;  display: flex;
  flex-direction: column;
  height: 297px;   /* 必須有高度才會平均 */ }
.banner-right { flex: 3; padding-left: 20px; text-align: center; }
.banner-right img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
}
.nav-button {
  flex: 1;              /* 關鍵：平均分配 */
  display: flex;
  align-items: center;  /* 垂直置中 */
  justify-content: center; /* 水平置中 */
}

.year-text { font-size: 80px; font-weight: bold; color: #046cd7; line-height: 1; }
.jlpt-logo-text { font-size: 18px; font-weight: bold; border-top: 2px solid #333; display: inline-block; }

.date-box {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    font-size: 24px;
    font-weight: bold;
}
.date-box div { border-left: 1px solid #ccc; padding-left: 20px; }

/* 主要內容佈局：左側資訊，右側側欄 */
.main-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 30px;
}

/* 左側：最新消息區 */
.section-title {
    color: #333;
    font-size: 18px;
    border-left: 8px solid #046cd7;
    padding-left: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.news-list {
    list-style: none;
    padding: 0;
    border-top: 1px solid #a5a5a5;
}
.news-item {
    border-bottom: 1px solid #c2c2c2;
    display: flex;
    align-items: flex-start;  /* 改這個 */
    font-size: 14px;
}
.news-date {
  border-top: 5px solid #f4f4f4;
    width: 150px;
    padding: 14px 0 0 8px;   /* 與文字上方對齊 */
    color: rgb(190, 153, 49);
    font-size: 108%;
    font-weight: bold;
    flex-shrink: 0;          /* 防止被壓縮 */
}
.news-text{
  font-family: 'HanNomGothic', serif;
  font-size: 14px;
  color: #555;
  padding: 14px;
  letter-spacing: 1px;   /* 調大數字 = 間距變大 */
}


/* 右側：側邊欄與按鈕 */
.sidebar-card {
    border: 2px solid #046cd7;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}
.card-header {
    background-color: #046cd7;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
}
.card-body {
    padding: 15px;
    text-align: center;
}
.exam-date {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}
.sunday { color: red; }

/* ===== Hero Banner ===== */

.hero-banner {
  display: flex;
  margin-bottom: 30px;
}

/* 左側按鈕區 */
.banner-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 297px;   /* 固定高度才會平均 */
  gap: 12px;
}

/* 右側圖片 */
.banner-right {
  flex: 3;
  padding-left: 20px;
  text-align: center;
}

.banner-right img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
}

/* ===== 左側金色按鈕 ===== */

.nav-button {
    flex: 1;
    display: flex;
    justify-content: space-between;  /* 文字左，箭頭右 */
    align-items: center;
    padding: 0 20px;

    border: 2px solid #b08a00;
    border-radius: 6px;
    color: #8c6b00;
    text-decoration: none;

    transition: background 0.3s ease;
}
.nav-button span {
  transition: transform 0.3s ease;
}

.nav-button:hover span {
  transform: translateX(6px);
}
/* 小字 */
.small {
  font-size: 12px;
  color: #666;
}

/* 主文字 */
.big {
  font-size: 20px;
  font-weight: bold;
}

/* 子網址 */
.sub {
  font-size: 12px;
  color: #555;
  margin-top: 4px;
}
/* 引入 Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@700;900&display=swap');

.nav-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    /* 設定字體與粗細 */
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 800; /* 最厚實的數值 */
}

