/**
 * FAQ (よくある質問) 専用スタイルシート
 * 
 * 既存の style.css と干渉しないよう、すべてのFAQレイアウト・UI定義を
 * このファイルに記述します。
 */

/* ==========================================================================
   1. 共通ベーススタイル（背景色・セクション見出し）
   ========================================================================== */
/* FAQ専用背景色の白化調整 (他ページに干渉させず、!importantも不使用) */
body.faq_body #voice #contents .contents_box .bg {
    background: #ffffff;
}

/* よくある質問共通 セクション見出し */
.faq_heading_block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #f0882e;
    padding-left: 10px;
    margin-bottom: 20px;
    margin-top: 45px;
    gap: 15px;
}

/* 左側：タイトル */
.faq_heading_title {
    flex: 1;
    min-width: 0;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.4;
    margin: 0;
    word-break: break-word;
}

/* 右側：件数や一覧リンク */
.faq_heading_meta {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 14px;
    color: #898989;
    line-height: 1.2;
}

.faq_heading_link {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 14px;
    color: #f0882e;
    text-decoration: none;
    font-weight: bold;
    line-height: 1.2;
}

.faq_heading_link:hover {
    color: #f0882e;
    text-decoration: underline;
}

.faq_heading_link i {
    margin-left: 4px;
}

/* ==========================================================================
   2. サイドバーパーツ (parts/side_bar/faq.php 用)
   ========================================================================== */
.faq_accordion_sidebar {
    border: 1px solid #f3ded1;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    margin-bottom: 25px;
}

.faq_sidebar_title {
    background: #f0882e;
    color: #fff;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 16px;
}

.faq_tree_item {
    border-bottom: 1px solid #f3ded1;
}

.faq_tree_item:last-child {
    border-bottom: none;
}

/* 大カテゴリ行 */
.faq_parent_row {
    display: flex;
    align-items: center;
    background: #faf6f2;
    transition: background 0.2s ease;
}

.faq_parent_row:hover {
    background: #fff7f0;
}

/* トグル開閉アイコン */
.faq_toggle_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 44px;
    border-right: 1px solid #f3ded1;
    color: #898989;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.faq_toggle_icon:hover {
    background: #f3ded1;
    color: #f0882e;
}

/* 子要素がない場合のプレースホルダー */
.faq_toggle_icon_placeholder {
    width: 40px;
    height: 44px;
    border-right: 1px solid #f3ded1;
    display: inline-block;
}

.faq_parent_link {
    flex: 1;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: bold;
}

.faq_parent_link:hover {
    color: #f0882e;
}

/* 大カテゴリの現在地ハイライト */
.faq_tree_item.active .faq_parent_row {
    background: #fff2e6;
}

.faq_tree_item.active .faq_parent_link {
    color: #f0882e;
}

/* 中カテゴリリスト */
.faq_child_list {
    border-top: 1px solid #f3ded1;
}

.faq_child_item {
    border-bottom: 1px solid #f3ded1;
}

.faq_child_item:last-child {
    border-bottom: none;
}

.faq_child_item a {
    display: block;
    padding: 12px 15px 12px 45px;
    font-size: 14px;
    font-weight: 500;
}

.faq_child_item a i {
    font-size: 10px;
    margin-right: 8px;
    vertical-align: middle;
}

.faq_child_item a:hover {
    background: #fff7f0;
    color: #f0882e;
}

/* 中カテゴリの現在地ハイライト */
.faq_child_item.active {
    background: #fff7f0;
}

.faq_child_item.active a {
    color: #f0882e;
    font-weight: bold;
}

.faq_child_item.active i {
    color: #f0882e;
}

.faq_count_badge {
    font-size: 11px;
    color: #666;
    font-weight: normal;
    margin-left: 4px;
}

/* サイドバー検索ブロック */
.faq_sidebar_search_block {
    border: 1px solid #f3ded1;
    border-radius: 4px;
    background: #fff;
    overflow: visible;/* サジェスト枠を表示可能に */
    margin-bottom: 25px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.faq_sidebar_search_form {
    display: flex;
    position: relative;
    padding: 10px;
    background: #fff;
    box-sizing: border-box;
    width: 100%;
}

.faq_sidebar_search_input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #f3ded1;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
}

.faq_sidebar_search_input:focus {
    border-color: #f0882e;
}

.faq_sidebar_search_btn {
    flex: 0 0 50px;
    width: 50px;
    padding: 0;
    background-color: #f0882e;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.faq_sidebar_search_btn:hover {
    background-color: #d9701a;
}

/* ==========================================================================
   3. PC版とSP版でのサイドバー表示切り分け
   ========================================================================== */
/* 初期状態（PC表示時）：メイン内のSP用サイドバーは非表示 */
.faq_sidebar_sp {
    display: none;
}

/* スマホ版の表示切り替え */
@media screen and (max-width: 743px) {

    /* PC用サイドバーを非表示に */
    body.faq_body .faq_sidebar {
        display: none;
    }

    /* メインカラム内に埋め込んだSP用サイドバーを表示 */
    body.faq_body .faq_sidebar_sp {
        display: block;
        margin-top: 40px;
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   4. 検索バー & サジェスト & キーワードタグ
   ========================================================================== */
.faq_search_section {
    background: #fff7f0;
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 30px;
    position: relative;
    border: 1px solid #f3ded1;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.faq_search_box {
    display: flex;
    width: 100%;
    max-width: 100%;
    position: relative;/* サジェスト枠の基準点 */
    box-sizing: border-box;
}

.faq_search_input {
    flex: 1 1 0;
    min-width: 0;/* iOS Safariでflex要素が親要素を突き抜けるのを防ぐ */
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #f3ded1;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
}

.faq_search_input:focus {
    border-color: #f0882e;
}

.faq_search_submit {
    flex: 0 0 auto;
    padding: 12px 25px;
    background-color: #f0882e;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.faq_search_submit:hover {
    background-color: #d9701a;
}

/* サジェスト結果枠 */
.faq_search_suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #f3ded1;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}

.faq_suggest_item a {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid #fff7f0;
}

.faq_suggest_item a strong {
    background: linear-gradient(transparent 50%, #ffff66 50%);
    font-weight: bold;
}

.faq_suggest_item a:hover {
    background-color: #fff7f0;
    opacity: 1;
}

/* 注目のキーワード */
.faq_popular_keywords {
    margin-top: 15px;
    font-size: 14px;
}

.faq_popular_keywords_label {
    font-weight: bold;
    color: #333;
}

.faq_popular_keywords_label i {
    color: #f0882e;
    margin-right: 4px;
}

.faq_keyword_tag {
    display: inline-block;
    background: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #f3ded1;
    margin: 4px;
    color: #425b76;
}

.faq_keyword_tag:hover {
    background-color: #f0882e;
    color: #fff;
    border-color: #f0882e;
}

/* 検索結果セクション */
.faq_search_results_section {
    margin-bottom: 40px;
}

/* 0件表示用_ボックス型（検索結果やカテゴリ内一覧が0件のとき） */
.faq_empty_box {
    background: #fff;
    border: 1px solid #f3ded1;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #898989;
    margin: 20px 0 40px 0;
}

.faq_empty_box p {
    line-height: 1.6;
}

.faq_empty_box .faq_empty_title {
    font-size: 16px;
    color: #425b76;
    margin-bottom: 10px;
    font-weight: 500;
}

.faq_empty_box .faq_empty_desc {
    font-size: 14px;
    color: #898989;
}

/* 0件表示用_テキスト型（カード内やおすすめ枠内などで0件のとき） */
.faq_empty_text {
    color: #898989;
    text-align: center;
    padding: 15px 0;
}

@media screen and (max-width: 743px) {

    .faq_search_section {
        padding: 15px;
    }

    .faq_search_input {
        padding: 10px 12px;
    }

    .faq_search_submit {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* ==========================================================================
   5. FAQトップ用 カテゴリーカードセクション
   ========================================================================== */
.faq_category_section {
    margin-bottom: 40px;
}

.faq_category_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.faq_category_card {
    background: #fff;
    border: 1px solid #f3ded1;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq_category_card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    border-color: #f0882e;
}

.faq_card_header {
    display: flex;
    align-items: center;
}

.faq_card_header.has_sub {
    border-bottom: 1px solid #f3ded1;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.faq_card_icon {
    font-size: 20px;
    color: #f0882e;
    margin-right: 10px;
    display: inline-flex;
}

.faq_card_parent_title {
    flex: 1;
    display: block;
    font-weight: bold;
    font-size: 18px;
    text-decoration: none;
}

.faq_card_sub_list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq_card_sub_list a {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.faq_card_sub_list i {
    font-size: 10px;
    margin-right: 8px;
    color: #898989;
}

.faq_sub_count {
    font-size: 12px;
    color: #898989;
    margin-left: 5px;
}

/* ==========================================================================
   6. カテゴリ/キーワードページ用 Q&A一覧
   ========================================================================== */
.faq_list_container {
    margin-bottom: 40px;
}

.faq_category_group_section {
    margin-bottom: 40px;
}
   
.faq_full_qa_list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.faq_full_qa_item {
    background: #fff;
    border: 1px solid #f3ded1;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.faq_q_block {
    background-color: #fff7f0;
    border-bottom: 1px solid #f3ded1;
    padding: 20px;
    font-size: 18px;
}

.faq_q_block a {
    font-weight: bold;
    display: flex;
    line-height: 1.4;
}

.faq_q_block a::before {
    content: "Q";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f0882e;
    color: #fff;
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    margin-right: 14px;
    flex-shrink: 0;
    line-height: 1;
}

.faq_a_block {
    position: relative;
    padding: 20px 20px 20px 60px;
    line-height: 1.7;
    font-size: 14px;
}

.faq_a_block::before {
    content: "A";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #425b76;
    color: #fff;
    position: absolute;
    left: 20px;
    top: 20px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.faq_btn_readmore {
    display: inline-flex;
    align-items: center;
    color: #f0882e;
    font-size: 14px;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 8px;
    white-space: nowrap;
}

.faq_btn_readmore:hover {
    color: #f0882e;
    text-decoration: underline;
}

.faq_btn_readmore i {
    font-size: 11px;
    margin-left: 3px;
}

/* ==========================================================================
   7. よく見られている質問
   ========================================================================== */
.faq_popular_list {
    padding: 5px 20px;
    background: #fff;
    border: 1px solid #f3ded1;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.faq_popular_list li {
    border-bottom: 1px solid #f3ded1;
}

.faq_popular_list li:last-child {
    border-bottom: none;
}

.faq_popular_list li a {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    line-height: 1.6;
}

.faq_popular_list li a::before {
    content: "Q.";
    flex: 0 0 auto;
    margin-right: 12px;
    white-space: nowrap;
    font-weight: bold;
    color: #f0882e;
}

/* ==========================================================================
   8. FAQ詳細ページ (single-faq.php) 用スタイル
   ========================================================================== */
#voice.faq .article .main_ttl {
    border-bottom: 3px solid #f3ded1;
    padding: 30px 0 25px 0;
    margin: 0 0 20px;
    display: flex;
}

#voice.faq .article .main_ttl::before {
    content: "Q";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f0882e;
    color: #fff;
    flex: 0 0 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
    line-height: 1;
}

@media screen and (max-width: 743px) {

    #voice.faq .article .main_ttl {
        font-size: 120%;
        border-bottom-width: 2px;
        padding: 30px 0 20px;
        margin: 0 0 15px;
    }

    #voice.faq .article .main_ttl::before {
        flex: 0 0 28px;
        height: 28px;
        font-size: 16px;
        margin-right: 10px;
    }

}

.faq_answer_content {
    position: relative;
}

/* CTA お問い合わせ */
.faq_cta_section {
    margin-top: 60px;
    text-align: center;
}

.faq_cta_section p {
    font-size: 14px;
    color: #898989;
    margin-bottom: 12px;
}

.faq_cta_button {
    display: inline-block;
    background-color: #f0882e;
    color: #fff;
    padding: 12px 35px;
    border-radius: 4px;
    font-weight: 500;
}

.faq_cta_button i {
    margin-right: 5px;
}

.faq_cta_button:hover {
    background-color: #f0882e;
}

/* 関連質問セクション */
.faq_related_sub {
    margin-top: 40px;
}

.faq_related_parent {
    margin-top: 60px;
}

/* ページ最下部 よくある質問TOPへ戻るボタン */
.faq_bottom_back_wrap {
    margin-top: 50px;
    margin-bottom: 20px;
    text-align: center;
}

.faq_btn_back_top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    border: 2px solid #f0882e;
    color: #f0882e;
    font-size: 15px;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.faq_btn_back_top:hover {
    background: #f0882e;
    color: #fff;
}

.faq_btn_back_top i {
    font-size: 14px;
}

