/* ==========================================
   2. FAQ（よくある質問）共通スタイリング
   ========================================== */

/* 全体を包むコンテナ */
.custom-faq-container {
    /* max-width: 800px; */
    max-width: 1000px;
    margin: 20px auto;
    font-family: sans-serif;
}

/* 質問と回答を包むボックス（各質問のまとまり） */
.custom-faq-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* マウスホバー時に少し浮かび上がらせてクリックを促す */
.custom-faq-item:hover {
    border-color: #3182ce;
    /* 親しみやすいブルー */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 質問部分（アコーディオンのヘッダー） */
.custom-faq-item summary.custom-faq-question {
    padding: 18px 24px;
    font-weight: bold;
    font-size: 16px;
    color: #2d3748;
    background-color: #ffffff;
    cursor: pointer;
    list-style: none;
    /* デフォルトの矢印を消す */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

/* Safari用のデフォルト矢印消去 */
.custom-faq-item summary.custom-faq-question::-webkit-details-marker {
    display: none;
}

/* 「Q」のアイコンを先頭に装飾 */
.custom-faq-item summary.custom-faq-question span {
    display: flex;
    align-items: center;
    padding-right: 20px;
    /* 右側の矢印との余白 */
}

.custom-faq-item summary.custom-faq-question span::before {
    content: "Q";
    font-family: Arial, sans-serif;
    background-color: #3182ce;
    /* 青色 */
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

/* 右側に配置する「開閉のプラス・マイナス」マーク */
.custom-faq-item summary.custom-faq-question::after {
    content: "";
    display: block;
    width: 12px;
    height: 12px;
    border-bottom: 2px solid #718096;
    border-right: 2px solid #718096;
    transform: rotate(45deg);
    /* 下矢印にする */
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

/* アコーディオンが開いているときの「質問」の背景と右側矢印の変化 */
.custom-faq-item[open] summary.custom-faq-question {
    background-color: #f7fafc;
    /* 少しグレーにして開いている感を出す */
    border-bottom: 1px solid #e2e8f0;
}

.custom-faq-item[open] summary.custom-faq-question::after {
    transform: rotate(-135deg);
    /* 上矢印に反転 */
}

/* 回答部分（展開される中身） */
.custom-faq-item .custom-faq-answer {
    padding: 20px 24px;
    background-color: #ffffff;
    color: #4a5568;
    font-size: 15px;
    line-height: 1.7;
    overflow: hidden;
    /* 簡易的なフェードインアニメーション */
    animation: fadeIn 0.4s ease;
}

/* 回答の中のPタグの余白リセット */
.custom-faq-item .custom-faq-answer p {
    margin: 0;
    display: inline;
    /* 「A」のアイコンと並べるため */
}

/* 「A」のアイコンを回答の先頭に装飾 */
.custom-faq-item .custom-faq-answer::before {
    content: "A";
    font-family: Arial, sans-serif;
    background-color: #e53e3e;
    /* 赤・ピンク系 */
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    vertical-align: top;
    flex-shrink: 0;
}

/* アニメーションの定義 */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-4px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   3. Table of Contents（目次）& h2 スタイリング
   ========================================== */

/* 目次全体のボックス */
.faq-toc {
    /* max-width: 800px; */
    max-width: 1000px;
    margin: 20px auto 40px auto;
    padding: 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: sans-serif;
}

/* 目次のタイトル */
.faq-toc-title {
    font-weight: bold;
    font-size: 26px;
    color: #2d3748;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

/* 目次のタイトルの前に小さなアイコン風の装飾 */
.faq-toc-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background-color: #3182ce;
    /* 質問と同じ青 */
    margin-right: 8px;
    border-radius: 2px;
}

/* 目次のリスト */
.faq-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-toc ul li {
    margin-bottom: 8px;
}

.faq-toc ul li:last-child {
    margin-bottom: 0;
}

/* 目次のリンク（製品名） */
.faq-toc ul li a {
    color: #3182ce;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s ease;
    display: inline-block;
}

/* ホバー時に下線を表示 */
.faq-toc ul li a:hover {
    color: #2b6cb0;
    text-decoration: underline;
}

/* 製品ごとのh2タイトル */
h2.faq-genre-title {
    font-size: 20px;
    color: #2d3748;
    margin: 40px 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #edf2f7;
    position: relative;
    /* ページ内ジャンプ時に上部に適度な余白を作る（ヘッダー被り防止） */
    scroll-margin-top: 100px;
}

/* h2タイトルの下線の一部にアクセントカラーを付ける */
h2.faq-genre-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #3182ce;
}

/* ==========================================
   4. ネストされた目次（TOC）の追加調整
   ========================================== */
.faq-toc ul li ul {
    list-style: none;
    padding-left: 20px;
    /* 質問一覧をインデントさせる */
    margin-top: 6px;
    margin-bottom: 12px;
}

.faq-toc ul li ul li {
    margin-bottom: 6px;
    line-height: 1.4;
}

.faq-toc ul li ul li a {
    color: #4a5568;
    /* 質問は少し控えめな色にする */
    font-size: 14px;
    /* 質問のフォントサイズをやや小さく */
    display: inline;
}

.faq-toc ul li ul li a:hover {
    color: #3182ce;
    text-decoration: underline;
}

/* ==========================================
 * preタグの背景
   ========================================== */

pre.grey-bg {
    background-color: #f5f5f5;
    /* 薄いグレー */
    padding: 1em;
    /* 内側の余白 */
    border-radius: 8px;
    /* 角を少し丸くする（任意） */
    overflow-x: auto;
    /* はみ出たときにスクロールバーを表示 */
}
