@charset "utf-8";

.faq-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    box-sizing: border-box;
}

.faq-main-group {
    margin-bottom: 6.25rem;
}

.faq-main-group:last-of-type {
    margin-bottom: 0;
}

#faq h3 {
    font-size: 1.5rem;
    margin-bottom: 1.88rem;
    font-weight: 600;
}

.faq-item {
    margin-bottom: 1.88rem;
}

.faq-item:last-of-type {
    margin: 0;
}

.faq-q {
    background: var(--accent-color_02);
    display: flex;
    align-items: center;
    padding: 1.88rem;
    box-sizing: border-box;
    gap: 1.88rem;
    border-radius: 0.94rem;
    position: relative;
    transition: background 1.7s ease, border-radius 1.7s ease;
}

.faq-item.active .faq-q {
    background: var(--accent-color_02);
    border-radius: 1.25rem 1.25rem 0 0;
    transition: background 0.4s ease, border-radius 0.4s ease;
}

.faq-q::before, .faq-q::after {
    display: block;
    content: "";
    background: var(--text-line-main);
    position: absolute;
    width: 1.16rem;
    height: 0.18rem;
    border-radius: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    right: 1.88rem;
    opacity: 1;
    transition: transform 1s ease, opacity 1s ease, background 1s;
}

.faq-q::before {
    width: 0.18rem;
    height: 1.16rem;
    right: 2.36rem;
}

.faq-item.active .faq-q::before {
    opacity: 0;
}

.faq-item.active .faq-q::after {
    transform: translateY(-50%) rotate(180deg);
    transition: transform 0.4s ease, opacity 0.4s ease, background 0.4s;
}

.faq-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.13rem;
    height: 1.25rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    color: var(--text-line-main);
    background: var(--base-color_01);
    font-family: Arial;
    font-weight: 600;
    transition: background 1.7s ease, color 1.7s ease;
}

.faq-item .faq-q-title {
    transition: color 1.7s ease;
}

.faq-answer {
    background: var(--base-color_01);
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    gap: 1.88rem;
    border-radius: 0 0 0.94rem 0.94rem;

    max-height: 0;
    overflow: hidden;

    padding-block: 0;
    padding-inline: 1.88rem;
    opacity: 0;

    transition:
        max-height 0.5s ease,
        padding-block 0.5s ease,
        opacity 0.3s ease;
}

.faq-answer .faq-num {
    background: var(--text-line-main);
    color: var(--base-color_01);
    margin-top: 6px;
}

.faq-item.active .faq-answer {
    max-height: 62.5rem;
    padding-block: 1.88rem;
    opacity: 1;
}

.faq-q-title,
.faq-a-content {
    flex: 1;
    min-width: 0;
}

@media screen and (max-width: 440px) {

    .faq-main-group {
        margin-bottom: 3.13rem;
    }

    #faq h3 {
        margin-bottom: 1.25rem;
    }

    .faq-item {
        margin-bottom: 1.25rem;
    }

    .faq-q {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .faq-q::before {
        right: 1.73rem;
    }

    .faq-q::after {
        right: 1.25rem;
    }

    .faq-num {
        width: 2.6rem;
    }

    .faq-q-title {
        flex: 0.89;
    }

    .faq-answer {
        gap: 1.25rem;

        /* 閉じているときから左右1.25rem */
        padding-inline: 1.25rem;
    }

    .faq-item.active .faq-answer {
        /* 上下だけ1.25remに広げる */
        padding-block: 1.25rem;
    }
}