/* 基本スタイルとリセット */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #444950; /* 全体の背景を薄い灰色に */
    color: #ffffff;
}

/* ページ全体のコンテナ */
.page-container {
    display: flex; /* サイドバーとメインコンテンツを横並びにする */
    height: 100%;
}

/* 左側のサイドバー */
.sidebar {
    width: 240px; /* サイドバーの幅を固定 */
    background-color: #343a40; /* サイドバーの背景を濃い灰色に */
    color: #f8f9fa; /* 文字色を明るく */
    padding: 20px;
    box-sizing: border-box; /* paddingを含めて幅を計算 */
    height: 100vh; /* 画面の高さいっぱいに広げる */
    display: flex;
    flex-direction: column;
    overflow-y: auto; 
}

.sidebar-header h2 {
    margin: 0 0 30px 0;
    text-align: center;
    border-bottom: 1px solid #258af0;
    padding-bottom: 20px;
}

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

.sidebar ul li a {
    display: block;
    color: #dee2e6;
    text-decoration: none;
    padding: 15px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background-color: #495057; /* ホバー時やアクティブなメニューの背景色 */
    color: #fff;
}

/* 右側のメインコンテンツ */
.main-content {
    flex: 1; /* 残りの幅をすべて使用 */
    padding: 40px;
    overflow-y: auto; /* コンテンツがはみ出た場合にスクロールバーを表示 */
    height: 100vh;
    box-sizing: border-box;
}

/* ★★★ 変更点 ★★★ */
/* メインコンテンツ内の各セクションのスタイル */
.section {
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0; /* セクションを区切る線 */
}
.main-content .section:last-child {
    border-bottom: none; /* 最後のセクションの線は消す */
    margin-bottom: 0;
}


/* 見出しスタイル */
header h1 {
    text-align: center;
    color: #237fdb;
    margin: 0 0 30px 0;
}

h2 {
    text-align: center;
    color: #3498db;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 30px;
}

h3 {
    color: #2980b9;
}

h4{
    color: #2980b9;
}
/* 機能リスト */
.feature-category ul {
    list-style-type: none;
    padding: 0;
}

.feature-category li {
    background-color: #e9ecef; /* 背景色に合わせて少し調整 */
    border-left: 5px solid #3498db;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 5px;
}

/* スライドショー */
.slider {
    position: relative;
    max-width: 75%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}

.slides {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.slides img {
    width: 100%;
    flex-shrink: 0;
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 5px;
    user-select: none;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.prev-btn:hover, .next-btn:hover { background-color: rgba(0,0,0,0.8); }

/* (トップページ用) クイックリンクのスタイル */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.link-card {
    border: 1px solid #ddd;
    padding: 25px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s, border-color 0.2s;
    display: block;
}
.link-card:hover {
    background-color: #fff;
    border-color: #ccc;
}
.link-card h3 {
    margin-top: 0;
    color: #3498db;
}
.link-card p {
    margin-bottom: 0;
    color: #ffffff;
}
#menu-toggle-btn {
    display: none; /* PCでは非表示 */
    position: fixed;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    z-index: 2000; /* 最前面に表示 */
    cursor: pointer;
    padding: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#menu-toggle-btn span {
    display: block;
    background: #333;
    height: 3px;
    width: 100%;
    margin: 4px auto;
    border-radius: 2px;
}

/* メニュー表示時の背景オーバーレイ */
.overlay {
    display: none; /* PCでは非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 900;
}

.overlay.open {
    display: block;
}


/* 画面幅が768px以下の場合に適用されるスタイル */
@media (max-width: 768px) {
    
    #menu-toggle-btn {
        display: block; /* スマホでは表示 */
    }

    .page-container {
        display: block; /* flex解除 */
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 250px;
        height: 100%;
        z-index: 1000; /* ボタンよりは下、オーバーレイよりは上 */
        transform: translateX(-100%); /* 初期状態では画面の外に隠す */
        transition: transform 0.3s ease-in-out;
    }

    .sidebar.open {
        transform: translateX(0); /* .openクラスが付いたら表示 */
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
    }
    
    .main-content {
        padding: 20px;
        padding-top: 70px; /* ヘッダーボタンと被らないように調整 */
    }

    /* PC用の見出しは非表示に */
    .main-content > header {
        display: none;
    }

    /* h1,h2のフォントサイズを調整 */
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.4em; }

    /* 開発者カードのアイコンサイズ調整 */
    .developer-icon {
        width: 60px;
        height: 60px;
    }
    .developer-name {
        font-size: 1.4em;
    }
}
/* --- トップページ バナー用のスタイル（文字重ねなし版） --- */
.banner-section {
    margin-bottom: 30px; /* バナーと下のテキストとの間隔 */
}



.banner-image-container { /* 新しく追加するスタイル */
    width: 100%;
    height: 250px; /* ★この数値を変更してバナーの高さを調整 */
    display: flex; /* 画像をコンテナ内で中央に配置するため */
    justify-content: center;
    align-items: center;
    overflow: hidden; /* コンテナの境界線を超えた画像を隠す */
    background-color: #f0f2f5; /* 画像の周りに余白ができる場合の背景色 */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.banner-image {
    width: 700px;      /* ★この数値を変更して横幅を固定 */
    max-width: 100%;   /* 画面が狭い時にはみ出さないようにする */
    height: 250px;     
    /*object-fit: fill; */
    display: block;
    margin: 0 auto;    /* ← これが中央揃えの指定 */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


/* スマートフォン表示時の調整 */
@media (max-width: 768px) {
    .banner-image {
        height: 180px; /* スマホでは少し高さを抑える */
    }
}

.welcome-text {
    text-align: center; /* テキストを中央揃えに */
}

.welcome-text h1 {
    /* ページのメインタイトルとしてスタイルを調整 */
    font-size: 2.2em;
    border: none;
    padding: 0;
    margin-bottom: 15px;
}
.welcome-text p {
    font-size: 1.1em;
    color: #555;
}


/* スマートフォン表示時の調整 */
@media (max-width: 768px) {
    .welcome-text h1 {
        font-size: 1.8em;
    }
}
.category-group {
    margin-bottom: 40px;
}
.category-group h2 {
    text-align: left;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.6em;
}

.content-card {
    display: block;
    background-color: #fff;
    padding: 12px 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    position: relative;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

/* カード右端の矢印アイコン */
.content-card::after {
    content: '→';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    color: #3498db;
    font-weight: bold;
}



.content-card-text h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.0em;
}
.content-card-text p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* 詳細ページ用のスタイル */
.detail-page-image {
    max-width: 100%;
    width: 600px;
    margin: 20px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    font-size: 1.1em;
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
}
.back-link:hover {
    text-decoration: underline;
}
/* --- 申請名表示用のスタイル (追記) --- */
.content-card-text .application-name {
    font-size: 0.85em;      /* 文字を少し小さく */
    color: #6c757d;        /* 文字色を少し薄く（グレー系）*/
    margin: -2px 0 8px 0;  /* 上下の余白を微調整 */
    padding: 0;
    font-style: italic;    /* 少し斜体にする */
}

.status-legend {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
}
.status-legend h4 { margin: 0 0 10px 0; }
.status-legend ul { list-style: none; padding: 0; margin: 0; }
.status-legend li { margin-bottom: 5px; color: #555; }
.status-legend li:last-child { margin-bottom: 0; }
.legend-badge {
    display: inline-block;
    width: 60px;
    text-align: center;
    font-size: 0.8em;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
}
.badge-adjusting { color: #0f5132; background-color: #d1e7dd; }
.badge-disabled { color: #6c757d; background-color: #e9ecef; }
.badge-abolished { color: #dc3545; background-color: #f8d7da; }
.badge-ok { color: #665e5f; background-color: #ffffff; }


/* --- ステータス別カードの基本スタイル --- */

/* 「調整中」のカードスタイル (グレーアウト, クリック可能) */
.content-card.is-adjusting {
    opacity: 0.5;
    background-color: #f8f9fa;
}
.content-card.is-adjusting:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

/* 「準備中」のカードスタイル (グレーアウト, クリック可能) */
.content-card.is-disabled {
    opacity: 0.5;
    background-color: #f8f9fa;
}
.content-card.is-disabled:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

/* 「廃止」のカードスタイル (グレーアウト, クリック不可, 取り消し線) */
.content-card.is-abolished {
    opacity: 0.5;
    background-color: #f8f9fa;
    cursor: not-allowed;
    pointer-events: none; /* クリック無効化 */
    text-decoration: line-through; /* 取り消し線 */
    color: #6c757d;
}
.content-card.is-abolished:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}


/* --- タイトル横のバッジスタイル --- */

.content-card.is-adjusting .content-card-text h3::after {
    content: '調整中';
    font-size: 0.7em;
    font-weight: bold;
    color: #0f5132;
    background-color: #d1e7dd;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

.content-card.is-disabled .content-card-text h3::after {
    content: '準備中';
    font-size: 0.7em;
    font-weight: bold;
    color: #6c757d;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

.content-card.is-abolished .content-card-text h3::after {
    content: '廃止';
    font-size: 0.7em;
    font-weight: bold;
    color: #dc3545;
    background-color: #f8d7da;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
    text-decoration: none; /* バッジの取り消し線は消す */
}
.badge-ending-soon {
    color: #664d03;
    background-color: #fff3cd;
}

/* 「廃止予定」カードのタイトル横バッジ */
.content-card.is-ending-soon .content-card-text h3::after {
    content: '廃止予定';
    font-size: 0.7em;
    font-weight: bold;
    color: #664d03; /* 黄色系の色 */
    background-color: #fff3cd; /* 薄い黄色 */
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}
.modal {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
}

/* モーダルのコンテンツ部分 */
.modal-content {
    position: relative;
    margin: auto;
    width: 90%;
    max-width: 800px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 拡大表示される画像 */
#modal-image {
    max-width: 100%;
    max-height: 80vh; /* 画面の高さの80%まで */
    display: block;
}

/* キャプション（画像のaltテキストが表示される） */
#caption {
    margin-top: 15px;
    color: #ccc;
    font-size: 1.1em;
    text-align: center;
}

/* 閉じるボタン */
.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* 次へ・前へボタン */
.prev-slide, .next-slide {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
}
.next-slide { right: 0; border-radius: 3px 0 0 3px; }
.prev-slide { left: 0; }
.prev-slide:hover, .next-slide:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
.single-image-viewer {
    position: relative; /* 矢印ボタンを配置するための基準 */
    max-width: 600px;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

#main-display-image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background-color: #333;
}

.image-caption {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    font-size: 0.9em;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

/* ページ上の次へ・前へボタン */
.prev-btn-onpage, .next-btn-onpage {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* 上下中央揃え */
    width: auto;
    padding: 10px 15px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    user-select: none;
    transition: background-color 0.3s ease;
}
.prev-btn-onpage { left: 0; border-radius: 0 5px 5px 0; }
.next-btn-onpage { right: 0; border-radius: 5px 0 0 5px; }

.prev-btn-onpage:hover, .next-btn-onpage:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.data-table th, .data-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}
.data-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}
.data-table tbody tr:nth-child(odd) {
    background-color: #fdfdfd;
}

/* 注意書きボックス */
.alert-box {
    display: flex;
    gap: 15px;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    border-left-width: 5px;
    border-left-style: solid;
}
.alert-box i {
    font-size: 1.5em;
    margin-top: 5px;
}
.alert-box p {
    margin: 0;
    line-height: 1.6;
}

.alert-box.alert-warning {
    background-color: #fff9e6;
    border-color: #f39c12;
    color: #664d03;
}
.alert-box.alert-warning i { color: #f39c12; }
/* --- h4見出し下の説明文スタイル (追記) --- */
.subtitle-description {
    font-size: 0.9em;      /* h4より少し小さい文字サイズ */
    color: #c0bfbf;           /* 少し薄い文字色 */
    margin-top: -10px;     /* h4との間隔を詰める */
    margin-bottom: 20px;   /* 下のコンテンツとの間隔を確保 */
}
.alert-box {
    display: flex;
    gap: 15px;
    padding: 15px;
    margin-top: 20px;
    border-radius: 8px;
    border-left-width: 5px;
    border-left-style: solid;
}
.alert-box i {
    font-size: 1.5em;
    margin-top: 5px;
}
.alert-box p, .alert-box div {
    margin: 0;
    line-height: 1.6;
}

/* 警告・注意 (黄色) */
.alert-box.alert-warning {
    background-color: #fff9e6;
    border-color: #f39c12;
    color: #664d03;
}
.alert-box.alert-warning i { color: #f39c12; }
.alert-box.alert-warning a { color: #664d03; font-weight: bold; }

.alert-box.alert-deprecation {
    background-color: #ffe5d0;
    border-color: #fd7e14;
    color: #653209;
}
.alert-box.alert-deprecation i { color: #fd7e14; }
.alert-box.alert-deprecation a { color: #653209; font-weight: bold; }