@charset "utf-8";

.faq-section {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.faq-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.category-btn {
    width: 100%;
    padding: 15px 10px;
    border: 2px solid #004A78;
    background: #fff;
    color: #004A78;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-btn:hover {
    background: #f0f7fc;
}

.category-btn.active {
    background: #004A78;
    color: #fff;
}

.faq-container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.faq-category {
    display: none;
}

.faq-category.active {
    display: block;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.faq-question:hover {
    background: #f8f8f8;
}

.faq-question .arrow {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #004A78;
    border-bottom: 2px solid #004A78;
    transform: rotate(45deg);
    transition: transform 0.3s;
    margin-left: 10px;
}

.faq-question.active .arrow {
    transform: rotate(-135deg);
    margin-top: 5px;
}

.faq-answer {
    display: none;
    padding: 0 20px 20px;
    color: #666;
    line-height: 1.6;
    background: #f8f8f8;
}

.faq-answer.active {
    display: block;
}

/* モバイル: 767px以下 */
@media screen and (max-width: 767px) {
    .feature-top img[src="img/Group 173.webp"] {
        content: url("../img/Group 198.webp");
    }

    .faq-section {
        margin: 40px auto;
        padding: 0 15px;
    }

    .faq-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .category-btn {
        padding: 12px 8px;
        font-size: 14px;
    }
}

/* 小さなモバイル: 479px以下 */
@media screen and (max-width: 479px) {
    .faq-categories {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 10px;
    }

    .category-btn {
        padding: 10px 8px;
    }

    .faq-question {
        padding: 15px;
        font-size: 15px;
    }

    .faq-answer {
        padding: 0 15px 15px;
        font-size: 14px;
    }
}
