/* =================================================
   css/faq.css
   FAQスタイル共通
   対象:
     - parts/faq-section.php（single.php / single-ink_series.php 埋め込み用）
     - page-faq.php（独立ページ用）
   ================================================= */


/* =========================================
   FAQ固有のCSS変数
   main.cssの変数（--color-main等）はそのまま参照
   ここではFAQ専用の色・値のみ定義
   ========================================= */
:root {
    --faq-border:          #eee;        /* アイテム枠線 */
    --faq-divider:         #f0f0f0;     /* Q/A間の区切り線 */
    --faq-hover-bg:        #f8f8f8;     /* Q行ホバー背景 */
    --faq-text:            #333;        /* A行本文テキスト */
    --faq-text-heading:    #222;        /* Q行・見出しテキスト */
    --faq-text-muted:      #888;        /* サブテキスト */
    --faq-text-icon:       #aaa;        /* アコーディオンアイコン */
    --faq-badge-a-bg:      #f0f0f0;     /* Aバッジ背景 */
    --faq-badge-a-color:   #333;        /* Aバッジ文字色 */
    --faq-category-bg:     #f5f5f5;     /* カテゴリー見出し背景 */
    --faq-contact-bg-from: #f0f8ff;     /* お問い合わせバナー背景グラデ開始 */
    --faq-contact-bg-to:   #e8f4fd;     /* お問い合わせバナー背景グラデ終了 */
    --faq-tab-border:      #eee;        /* タブナビ下線 */
}

/* =========================================
   アコーディオン共通
   ========================================= */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
 
.faq-item {
    border: 1px solid var(--faq-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-white, #fff);
    transition: box-shadow 0.2s;
}
 
.faq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
 
.faq-item.is-open {
    border-color: var(--color-main, #219cd8);
    box-shadow: 0 2px 12px rgba(33, 156, 216, 0.1);
}
 
/* Q行 */
.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Shippori Mincho', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--faq-text-heading);
    line-height: 1.5;
    transition: background 0.15s;
}
 
.faq-question:hover {
    background: var(--faq-hover-bg);
}
 
.faq-question-badge {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-main, #219cd8);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
 
.faq-question-text {
    flex: 1;
}
 
.faq-question-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--faq-text-icon);
    transition: transform 0.25s, color 0.2s;
}
 
.faq-item.is-open .faq-question-icon {
    transform: rotate(180deg);
    color: var(--color-main, #219cd8);
}
 
/* A行 */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px 0 60px; /* 左：badge幅(28) + gap(12) + 左padding(20) */
    font-size: 14px;
    line-height: 1.8;
    color: var(--faq-text);
    border-top: 0px solid var(--faq-divider);
}
 
.faq-item.is-open .faq-answer {
    max-height: 1000px;
    padding: 0 20px 20px 60px;
    border-top: 1px solid var(--faq-divider);
}
 
.faq-answer-badge {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--faq-badge-a-bg);
    color: var(--faq-badge-a-color);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    line-height: 28px;
    margin-right: 12px;
    margin-left: -40px; /* Aバッジを左に引き戻す */
    margin-top: 16px;   /* テキストとの重なり解消 */
    float: left;
    flex-shrink: 0;
}
 
.faq-answer-text {
    display: block;
    overflow: hidden; /* float解除 */
    padding-top: 16px;
}
 
.faq-answer a {
    color: var(--color-main, #219cd8);
    text-decoration: underline;
}
 
 
/* =========================================
   セクション埋め込み用（single系）
   ========================================= */
.faq-container {
    background: var(--color-white, #fff);
    border: 1px solid var(--faq-border);
    border-radius: 8px;
    padding: 28px;
}
 
.faq-category-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--faq-text-heading);
    margin: 0 0 16px;
    padding: 8px 12px;
    background: var(--faq-category-bg);
    border-left: 3px solid var(--color-main, #219cd8);
    border-radius: 2px;
}
 
.faq-category-group {
    margin-bottom: 32px;
}
 
.faq-category-group:last-child {
    margin-bottom: 0;
}
 
 
/* =========================================
   独立ページ用（page-faq.php）
   ========================================= */
.faq-page {
    padding: 40px 0 80px;
    background: var(--color-white, #fff);
}
 
.faq-page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
 
.faq-page-header {
    text-align: center;
    margin-bottom: 48px;
}
 
.faq-page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--faq-text-heading);
    margin-bottom: 12px;
}
 
.faq-page-desc {
    font-size: 15px;
    color: var(--faq-text-muted);
}
 
/* タブナビ */
.faq-tab-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--faq-tab-border);
    padding-bottom: 0;
}
 
.faq-tab-btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--faq-text-muted);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-family: 'Shippori Mincho', serif;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
 
.faq-tab-btn:hover {
    color: var(--color-main, #219cd8);
}
 
.faq-tab-btn.is-active {
    color: var(--color-main, #219cd8);
    border-bottom-color: var(--color-main, #219cd8);
}
 
/* タブパネル */
.faq-tab-panel {
    display: none;
}
 
.faq-tab-panel.is-active {
    display: block;
}
 
.faq-tab-panel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--faq-text-heading);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-main, #219cd8);
}
 
 
/* =========================================
   お問い合わせ誘導バナー（ページ末尾）
   ========================================= */
.faq-contact-banner {
    margin-top: 60px;
    padding: 32px;
    background: linear-gradient(135deg, var(--faq-contact-bg-from) 0%, var(--faq-contact-bg-to) 100%);
    border: 1px solid rgba(33, 156, 216, 0.2);
    border-radius: 12px;
    text-align: center;
}
 
.faq-contact-banner p {
    font-size: 15px;
    color: var(--faq-text);
    margin-bottom: 16px;
}
 
.faq-contact-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--color-main, #219cd8);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}
 
.faq-contact-btn:hover {
    background: var(--color-main-dark, #1a7dac);
    transform: translateY(-1px);
}
 
 
/* =========================================
   レスポンシブ
   ========================================= */
@media (max-width: 767px) {
    .faq-question {
        padding: 14px 16px;
        font-size: 14px;
    }
 
    .faq-question-badge {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
 
    .faq-answer {
        padding: 0 16px 16px 52px;
        font-size: 13px;
    }
 
    .faq-container {
        padding: 20px 16px;
    }
 
    .faq-page-title {
        font-size: 24px;
    }
 
    .faq-tab-nav {
        gap: 4px;
    }
 
    .faq-tab-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
 
    .faq-contact-banner {
        padding: 24px 16px;
    }
}
 