/* ===== 全体のスタイル ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    line-height: 1.7;
    margin: 0;
    background-color: #f8f9fa;
    color: #333;
}

/* ===== ヘッダーナビゲーションのスタイル ===== */
header {
    background-color: #fff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #dee2e6;
    position: sticky; /* スクロールしても画面上部に固定 */
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #007bff;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

header nav a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.2s;
}

header nav a:hover {
    color: #0056b3;
}

/* ===== メインコンテンツのスタイル ===== */
main {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.manual-section {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.manual-section h2 {
    background-color: #007bff;
    color: #fff;
    font-size: 1.8rem;
    margin: 0 0 2rem 0;
    padding: 1rem 2rem;
    border-radius: 8px 8px 0 0;
}

/* ===== 各ステップのスタイル ===== */
.step {
    padding: 0 2rem 2rem 2rem;
    border-bottom: 1px dashed #ccc;
}
.step:last-child {
    border-bottom: none;
}

.step h3 {
    font-size: 1.4rem;
    color: #333;
    border-left: 5px solid #007bff;
    padding-left: 10px;
    margin-bottom: 1rem;
}

.step p {
    font-size: 1rem;
    background-color: #fafafa;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #d4d4d4;
}

.step img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 注意書きのボックス */
.notice {
    background-color: #ffe9ee;
    border: 1px solid #ffc5b3;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

/* 注意書きのボックス */
.directory-note {
    background-color: #e9fbff;
    border: 1px solid #b3beff;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

/* ファイルパスの表示 */
code {
    background-color: #e9ecef;
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 90%;
    border-radius: 3px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* 手順リスト(ol)のスタイル */
.step ol {
    padding-left: 20px;
    margin-top: 1rem;
}
.step li {
    margin-bottom: 1rem;
}

/* 自動更新テーブルのスタイル */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}
th, td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}
th {
    background-color: #f8f9fa;
    font-weight: bold;
}
tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

/* --- ▼▼▼ ここからサイドナビゲーション用のスタイルを追加 ▼▼▼ --- */

.side-nav {
    position: fixed; /* 画面に固定 */
    top: 20px;       /* 上から20pxの位置 */
    right: 20px;      /* 右から20pxの位置 */
    width: 250px;     /* 幅を指定 */
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;   /* 他の要素より手前に表示 */
}

.side-nav h3 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #005a9c;
    font-size: 18px;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav ul li {
    margin-bottom: 10px;
}

.side-nav > ul > li > a {
    font-weight: bold; /* 親項目を太字に */
}

.side-nav ul li a {
    text-decoration: none;
    color: #337ab7; /* リンクの色 */
    font-size: 15px;
    display: block;
    transition: color 0.2s;
}

.side-nav ul li a:hover {
    color: #23527c;
}

/* 子項目のスタイル */
.side-nav .sub-menu {
    padding-left: 15px; /* インデントを追加 */
    margin-top: 8px;
    border-left: 2px solid #ddd;
}

.side-nav .sub-menu li {
    margin-bottom: 8px;
}

.side-nav .sub-menu li:last-child {
    margin-bottom: 0;
}

.side-nav .sub-menu li a {
    font-size: 14px; /* 親項目より少し小さいフォント */
    color: #555;
    font-weight: normal; /* 太字を解除 */
}
/* --- ▲▲▲ サイドナビゲーション用のスタイルはここまで ▲▲▲ --- */

/* --- ▼▼▼ ここからポップアップ表示用のスタイルを追加 ▼▼▼ --- */

/* オーバーレイのスタイル */
#overlay {
    position: fixed; /* 画面に固定 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* 少し濃いめの半透明の黒 */
    display: none; /* 初期状態では非表示 */
    justify-content: center; /* 内部の要素(画像)を水平中央に */
    align-items: center; /* 内部の要素(画像)を垂直中央に */
    cursor: pointer; /* 閉じる動作のためカーソルをポインターに */
    z-index: 2000; /* サイドナビ(1000)より手前に表示 */
}

/* 拡大表示される画像のスタイル */
#popup-image {
    max-width: 90%; /* 画面幅の90%を最大幅に */
    max-height: 90%; /* 画面高さの90%を最大高さに */
    box-shadow: 0 0 25px rgba(0,0,0,0.5); /* 画像に影を付けて立体感を出す */
}

/* マニュアル内の画像にマウスカーソルを合わせた際のスタイル */
.manual-section .step img {
    cursor: pointer; /* クリックできることを示すポインターに */
    transition: opacity 0.2s; /* ホバー時に滑らかな変化を追加 */
}

.manual-section .step img:hover {
    opacity: 0.8; /* マウスを乗せると少し透明にする */
}

/* --- ▲▲▲ ポップアップ表示用のスタイルはここまで ▲▲▲ --- */


/* ===== お知らせエリアのスタイル ===== */
.news-section {
    background-color: #fff;
    border: 2px solid #ffc107;
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.news-header {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    padding: 1rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.news-header:hover {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
}

.news-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-icon {
    font-size: 1.5rem;
}

.new-badge {
    background-color: #dc3545;
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.toggle-icon {
    font-size: 1.2rem;
    color: #856404;
    transition: transform 0.3s;
}

.toggle-icon.rotated {
    transform: rotate(-180deg);
}

.news-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.news-content.expanded {
    max-height: 1000px;
    transition: max-height 0.4s ease-in;
}

.news-list {
    list-style: none;
    padding: 1rem 2rem 1.5rem 2rem;
    margin: 0;
}

.news-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-date {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: bold;
    min-width: 120px;
}

.news-text {
    flex: 1;
    font-size: 1rem;
    color: #333;
}

/* --- ▼▼▼ 過去のお知らせ表示用スタイル ▼▼▼ --- */

/* 初期状態で非表示にするクラス */
.past-news-hidden {
    display: none;
}

/* 過去のお知らせ表示/非表示切り替えボタン */
.past-news-toggle-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    color: #007bff;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}

.past-news-toggle-btn:hover {
    background-color: #e2e6ea;
}

/* 過去のお知らせを展開したときに、エリアが切れないように高さを拡張 */
.news-content.expanded {
    max-height: 2000px; /* 必要に応じて数値を増やしてください */
}

/* --- ▼▼▼ ここからタブ切り替え用のスタイルを追加 ▼▼▼ --- */

.tab-buttons {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

.tab-button {
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: #f8f9fa;
    color: #555;
    border: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -12px; /* border-bottomに重ねる */
}

.tab-button:hover {
    background-color: #e2e6ea;
}

.tab-button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
/* --- ▲▲▲ タブ切り替え用のスタイルはここまで ▲▲▲ --- */