/**
 * FAQページ用CSS（ブロックエディター対応）
 * 
 * @package NONKE_SPA
 * @since 1.0.6
 */

/* ==========================================================================
   FAQページ共通スタイル
   ========================================================================== */
.p-faqContent {
    margin: 0;
    padding: 40px 0 80px;
    background: transparent;
}

.p-faqContent .l-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   FAQ項目（ブロックエディター用）
   ========================================================================== */

/* グループブロックをFAQ項目として使用 */
.p-faqContent .wp-block-group.faq-item,
.p-faqContent .wp-block-group.is-style-faq {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

/* 質問部分 - H3見出しを使用 */
.p-faqContent .wp-block-group.faq-item h3,
.p-faqContent .wp-block-group.is-style-faq h3,
.p-faqContent h3.faq-question {
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 20px;
    background: #303c09;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
    border-bottom: 1px solid rgba(48, 60, 9, 0.4);
}

/* Q アイコンを擬似要素で追加 */
.p-faqContent .wp-block-group.faq-item h3::before,
.p-faqContent .wp-block-group.is-style-faq h3::before,
.p-faqContent h3.faq-question::before {
    content: "Q";
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 20px;
    background: #fff;
    color: #303c09;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

/* 回答部分 - 段落を使用 */
.p-faqContent .wp-block-group.faq-item p,
.p-faqContent .wp-block-group.is-style-faq p,
.p-faqContent .faq-answer {
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 20px;
    background: #fff5b8;
    color: #333;
    font-size: 16px;
    line-height: 1.8;
}

/* A アイコンを擬似要素で追加 */
.p-faqContent .wp-block-group.faq-item p::before,
.p-faqContent .wp-block-group.is-style-faq p::before,
.p-faqContent .faq-answer::before {
    content: "A";
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 20px;
    background: #ff0000;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

/* ==========================================================================
   カスタムHTMLブロック用（より細かい制御が必要な場合）
   ========================================================================== */
.faq-list {
    margin: 0;
    padding: 0;
}

.faq-list__item {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.faq-list__question {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #303c09;
    border-bottom: 1px solid rgba(48, 60, 9, 0.4);
}

.faq-list__answer {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #fff5b8;
}

.faq-list__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-right: 20px;
}

.faq-list__question .faq-list__icon {
    background: #fff;
    color: #303c09;
}

.faq-list__answer .faq-list__icon {
    background: #ff0000;
    color: #fff;
}

.faq-list__text {
    flex: 1;
    margin: 0;
    padding-top: 8px;
}

.faq-list__question .faq-list__text {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.faq-list__answer .faq-list__text {
    color: #333;
    font-size: 16px;
    line-height: 1.8;
}

/* ==========================================================================
   セクション見出し
   ========================================================================== */
.p-faqContent h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 60px 0 40px;
    padding-bottom: 15px;
    border-bottom: 2px solid #303c09;
    color: #d9d9d9;
}

.p-faqContent h2:first-child {
    margin-top: 0;
}

/* ==========================================================================
   カテゴリー別FAQ
   ========================================================================== */
.p-faqContent .faq-category {
    margin-bottom: 60px;
}

.p-faqContent .faq-category__title {
    font-size: 20px;
    font-weight: 700;
    color: #69d6d6;
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 4px solid #69d6d6;
}

/* ==========================================================================
   アコーディオン機能（オプション）
   ========================================================================== */
.p-faqContent .faq-accordion .faq-list__question {
    cursor: pointer;
    position: relative;
    padding-right: 50px;
}

.p-faqContent .faq-accordion .faq-list__question::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.p-faqContent .faq-accordion .faq-list__item.is-open .faq-list__question::after {
    content: "-";
    transform: translateY(-50%) rotate(180deg);
}

.p-faqContent .faq-accordion .faq-list__answer {
    display: none;
}

.p-faqContent .faq-accordion .faq-list__item.is-open .faq-list__answer {
    display: flex;
}

/* ==========================================================================
   レスポンシブ対応
   ========================================================================== */
@media (max-width: 768px) {
    .p-faqContent {
        padding: 30px 0 60px;
    }
    
    .p-faqContent .wp-block-group.faq-item,
    .p-faqContent .wp-block-group.is-style-faq,
    .faq-list__item {
        margin-bottom: 20px;
    }
    
    .p-faqContent .wp-block-group.faq-item h3,
    .p-faqContent .wp-block-group.is-style-faq h3,
    .p-faqContent h3.faq-question,
    .faq-list__question {
        padding: 15px;
        font-size: 16px;
    }
    
    .p-faqContent .wp-block-group.faq-item h3::before,
    .p-faqContent .wp-block-group.is-style-faq h3::before,
    .p-faqContent h3.faq-question::before,
    .faq-list__icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-right: 15px;
    }
    
    .p-faqContent .wp-block-group.faq-item p,
    .p-faqContent .wp-block-group.is-style-faq p,
    .p-faqContent .faq-answer,
    .faq-list__answer {
        padding: 15px;
        font-size: 14px;
    }
    
    .p-faqContent .wp-block-group.faq-item p::before,
    .p-faqContent .wp-block-group.is-style-faq p::before,
    .p-faqContent .faq-answer::before {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-right: 15px;
    }
    
    .faq-list__text {
        padding-top: 5px;
    }
    
    .faq-list__question .faq-list__text {
        font-size: 16px;
    }
    
    .faq-list__answer .faq-list__text {
        font-size: 14px;
    }
    
    .p-faqContent h2 {
        font-size: 20px;
        margin: 40px 0 30px;
    }
}