/* ============================================
   FAQ セクション専用CSS
   ============================================ */

/* FAQセクション全体 */
.faq-section {
    padding: 80px 0;
    background: #ffffff;
    position: relative;
}

/* FAQコンテナ */
.faq-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* FAQアイテム */
.faq-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.faq-item.active {
    border-color: #6366f1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

/* FAQ質問ボタン */
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease;
    position: relative;
}

.faq-question:hover {
    background-color: #f8fafc;
}

.faq-item.active .faq-question {
    background-color: #f0f1ff;
}

.faq-question-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.6;
    flex: 1;
}

/* FAQアイコン */
.faq-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-icon svg {
    color: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-icon svg {
    transform: rotate(180deg);
}

/* FAQ回答 */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.faq-answer-content {
    padding: 0 28px 24px 28px;
    color: #475569;
    line-height: 1.8;
}

.faq-answer-content p {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

.faq-answer-content strong {
    color: #1e293b;
    font-weight: 700;
}

/* ============================================
   レスポンシブ対応
   ============================================ */

/* タブレット */
@media (max-width: 768px) {
    .faq-section {
        padding: 60px 16px;
    }

    .faq-question {
        padding: 20px 20px;
        gap: 16px;
    }

    .faq-question-text {
        font-size: 1rem;
    }

    .faq-icon {
        width: 28px;
        height: 28px;
    }

    .faq-icon svg {
        width: 20px;
        height: 20px;
    }

    .faq-answer-content {
        padding: 0 20px 20px 20px;
    }

    .faq-answer-content p {
        font-size: 0.9rem;
    }
}

/* スマートフォン */
@media (max-width: 480px) {
    .faq-section {
        padding: 50px 16px;
    }

    .faq-container {
        gap: 12px;
    }

    .faq-item {
        border-radius: 10px;
    }

    .faq-question {
        padding: 18px 16px;
        gap: 12px;
    }

    .faq-question-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .faq-icon {
        width: 26px;
        height: 26px;
    }

    .faq-icon svg {
        width: 18px;
        height: 18px;
    }

    .faq-answer-content {
        padding: 0 16px 18px 16px;
    }

    .faq-answer-content p {
        font-size: 0.875rem;
        line-height: 1.7;
        margin-bottom: 10px;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .faq-section {
        background: #0f172a;
    }

    .faq-item {
        background: #1e293b;
        border-color: #334155;
    }

    .faq-item:hover {
        border-color: #475569;
    }

    .faq-item.active {
        border-color: #6366f1;
    }

    .faq-question:hover {
        background-color: #1e293b;
    }

    .faq-item.active .faq-question {
        background-color: rgba(99, 102, 241, 0.1);
    }

    .faq-question-text {
        color: #f1f5f9;
    }

    .faq-answer-content {
        color: #cbd5e1;
    }

    .faq-answer-content strong {
        color: #f1f5f9;
    }
}

/* アニメーション強化 */
@media (prefers-reduced-motion: no-preference) {
    .faq-item {
        animation: fadeInUp 0.5s ease-out backwards;
    }

    .faq-item:nth-child(1) { animation-delay: 0.05s; }
    .faq-item:nth-child(2) { animation-delay: 0.1s; }
    .faq-item:nth-child(3) { animation-delay: 0.15s; }
    .faq-item:nth-child(4) { animation-delay: 0.2s; }
    .faq-item:nth-child(5) { animation-delay: 0.25s; }
    .faq-item:nth-child(6) { animation-delay: 0.3s; }
    .faq-item:nth-child(7) { animation-delay: 0.35s; }
    .faq-item:nth-child(8) { animation-delay: 0.4s; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
