/* ==========================================================================
   KD FAQ — フロント用スタイル（3デザイン × 3カラバリ）
   ========================================================================== */

/* --- 共通 --- */
.kd-faq {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.kd-faq__item {
    margin-bottom: 0;
}

.kd-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s ease;
    gap: 16px;
    line-height: 1.8;
}

.kd-faq__question-text {
    flex: 1;
}

.kd-faq__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform 0.3s ease;
}

.kd-faq__answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px;
}

.kd-faq__answer[hidden] {
    display: block !important;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.kd-faq__answer.is-open {
    max-height: 1000px;
    padding: 0 20px 16px;
}

.kd-faq__answer-inner {
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ==========================================================================
   デザイン A: ベーシック（ボーダー区切り、+/- アイコン）
   ========================================================================== */
.kd-faq--basic .kd-faq__item {
    border-bottom: 1px solid;
}

.kd-faq--basic .kd-faq__item:first-child {
    border-top: 1px solid;
}

/* +/- アイコン */
.kd-faq--basic .kd-faq__icon::before,
.kd-faq--basic .kd-faq__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: currentColor;
    transition: transform 0.3s ease;
}

.kd-faq--basic .kd-faq__icon::before {
    width: 16px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.kd-faq--basic .kd-faq__icon::after {
    width: 2px;
    height: 16px;
    transform: translate(-50%, -50%);
}

.kd-faq--basic .kd-faq__question[aria-expanded="true"] .kd-faq__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

/* ==========================================================================
   デザイン B: カード（影付き、角丸、▼▲ アイコン）
   ========================================================================== */
.kd-faq--card .kd-faq__item {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
    overflow: hidden;
}

/* ▼ アイコン */
.kd-faq--card .kd-faq__icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid currentColor;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}

.kd-faq--card .kd-faq__question[aria-expanded="true"] .kd-faq__icon::before {
    transform: translate(-50%, -50%) rotate(180deg);
}

/* ==========================================================================
   デザイン C: アクセント（左サイドボーダー、→ 回転アイコン）
   ========================================================================== */
.kd-faq--accent .kd-faq__item {
    margin-bottom: 8px;
    border-left: 4px solid;
}

/* → アイコン */
.kd-faq--accent .kd-faq__icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: translate(-60%, -50%) rotate(45deg);
    transition: transform 0.3s ease;
}

.kd-faq--accent .kd-faq__question[aria-expanded="true"] .kd-faq__icon::before {
    transform: translate(-60%, -50%) rotate(135deg);
}

/* ==========================================================================
   カラバリ: ライト
   ========================================================================== */
.kd-faq--light {
    color: #333;
}

.kd-faq--light .kd-faq__question {
    color: #333;
}

.kd-faq--light .kd-faq__question:hover {
    background: rgba(0, 0, 0, 0.03);
}

.kd-faq--light .kd-faq__answer-inner {
    color: #555;
}

/* ライト + ベーシック */
.kd-faq--basic.kd-faq--light .kd-faq__item {
    border-color: #ddd;
}

/* ライト + カード */
.kd-faq--card.kd-faq--light .kd-faq__item {
    background: #fff;
}

/* ライト + アクセント */
.kd-faq--accent.kd-faq--light .kd-faq__item {
    border-left-color: #6c63ff;
    background: #f9f9ff;
}

/* ==========================================================================
   カラバリ: ダーク
   ========================================================================== */
.kd-faq--dark {
    color: #e0e0e0;
}

.kd-faq--dark .kd-faq__question {
    color: #e0e0e0;
}

.kd-faq--dark .kd-faq__question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.kd-faq--dark .kd-faq__answer-inner {
    color: #bbb;
}

/* ダーク + ベーシック */
.kd-faq--basic.kd-faq--dark .kd-faq__item {
    border-color: #444;
}

/* ダーク + カード */
.kd-faq--card.kd-faq--dark .kd-faq__item {
    background: #2a2a3e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ダーク + アクセント */
.kd-faq--accent.kd-faq--dark .kd-faq__item {
    border-left-color: #8b83ff;
    background: #1e1e30;
}

/* ==========================================================================
   カラバリ: ブルー
   ========================================================================== */
.kd-faq--blue {
    color: #1a3a5c;
}

.kd-faq--blue .kd-faq__question {
    color: #1a3a5c;
}

.kd-faq--blue .kd-faq__question:hover {
    background: rgba(59, 130, 246, 0.05);
}

.kd-faq--blue .kd-faq__answer-inner {
    color: #3a5a7c;
}

/* ブルー + ベーシック */
.kd-faq--basic.kd-faq--blue .kd-faq__item {
    border-color: #bcd4ee;
}

/* ブルー + カード */
.kd-faq--card.kd-faq--blue .kd-faq__item {
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

/* ブルー + アクセント */
.kd-faq--accent.kd-faq--blue .kd-faq__item {
    border-left-color: #3b82f6;
    background: #f0f7ff;
}

/* --- レスポンシブ --- */
@media (max-width: 768px) {
    .kd-faq__question {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .kd-faq__answer.is-open {
        padding: 0 16px 14px;
    }
}