/* ==========================================
   質問ページ - カスタムCSS
   ========================================== */

/* ==========================================
   カラー変数
   ========================================== */
:root {
    --color-bg-primary: #f8f7ee;
    --color-accent-red: #db5331;
    --color-accent-blue: #1f3663;
    --color-accent-green: #208d62;
    --color-white: #ffffff;
    --color-text-dark: #333333;
}

/* ==========================================
   基本設定
   ========================================== */
body {
    font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-dark);
    overflow-x: hidden;
}


/* ==========================================
   ヘッダーセクション
   ========================================== */
.question-header {
    text-align: center;
    padding-top: calc(100vw * 26.52 / 390);
    padding-bottom: calc(100vw * 20 / 390);
    padding-left: calc(100vw * 20 / 390);
    padding-right: calc(100vw * 20 / 390);
}

.question-header__img {
    width: 100%;
    max-width: calc(100vw * 390 / 390);
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ==========================================
   ステップインジケーター
   ========================================== */
.step-indicator {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: calc(100vw * 20 / 390) calc(100vw * 45.24 / 390);
    position: relative;
}

.step-indicator__line-img {
    position: absolute;
    top: calc(100vw * 23 / 390 + calc(100vw * 10 / 390));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw * 214.456 / 390);
    height: auto;
    z-index: 0;
}

.step-indicator__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(100vw * 5 / 390);
    position: relative;
    z-index: 1;
}

.step-indicator__circle {
    width: calc(100vw * 20 / 390);
    height: calc(100vw * 20 / 390);
    border-radius: 50%;
    background-color: var(--color-white);
    border: calc(100vw * 3 / 390) solid #1F3663;
}

.step-indicator__item--active .step-indicator__circle {
    background-color: var(--color-accent-red);
}

.step-indicator__text {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 900;
    font-size: calc(100vw * 14 / 390);
    color: var(--color-accent-blue);
    line-height: 1;
    text-align: center;
}

/* ==========================================
   質問セクション
   ========================================== */
.questions {
    max-width: calc(100vw * 390 / 390);
    margin: 0 auto;
    padding: calc(100vw * 20 / 390) 0;
    overflow: hidden;
}

.questions__wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.questions__step {
    min-width: 100%;
    padding: 0 calc(100vw * 20 / 390);
    box-sizing: border-box;
    display: none;
}

.questions__step.active {
    display: block;
}

.question-item {
    margin-bottom: calc(100vw * 30 / 390);
}

.question-item__header {
    display: flex;
    align-items: center;
    gap: calc(100vw * 10 / 390);
    margin-bottom: calc(100vw * 10 / 390);
    letter-spacing: 0;
}

.question-item__q {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 900;
    font-size: calc(100vw * 32 / 390);
    color: var(--color-accent-red);
    line-height: 1;
    flex-shrink: 0;
}

.question-item__text {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: calc(100vw * 16 / 390);
    color: var(--color-accent-blue);
    line-height: 1;
    margin: 0;
}

.question-item__options {
    display: flex;
    gap: calc(100vw * 10 / 390);
}

.question-option {
    flex: 1;
    background-color: var(--color-white);
    border: none;
    border-radius: calc(100vw * 3 / 390);
    padding: calc(100vw * 10 / 390);
    min-height: calc(100vw * 54 / 390);
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: calc(100vw * 16 / 390);
    color: var(--color-accent-blue);
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.question-option:hover {
    background-color: #f0f0f0;
}

.question-option:active,
.question-option.selected {
    background-color: var(--color-accent-blue);
    color: var(--color-white);
}

.question-option:nth-child(2) {
    font-size: calc(100vw * 14 / 390);
}

/* ==========================================
   次へボタン
   ========================================== */
.next-button-container {
    text-align: center;
    padding-bottom: 0;
    margin-bottom: calc(100vw * 40 / 390);
}

.next-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: calc(100vw * 242 / 390);
    height: calc(100vw * 52 / 390);
    background-color: var(--color-accent-green);
    border: calc(100vw * 1.125 / 390) solid var(--color-white);
    border-radius: calc(100vw * 56.274 / 390);
    padding-left: calc(100vw * 33.764 / 390);
    padding-right: calc(100vw * 5.065 / 390);
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.next-button--result {
    background-color: #DB5331;
}

.next-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.next-button:hover {
    transform: translateY(calc(100vw * -2 / 390));
}

.next-button.disabled:hover {
    transform: none;
}

.next-button__text {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: calc(100vw * 14 / 390);
    color: var(--color-white);
    line-height: 1;
}

.next-button__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100vw * 43.004 / 390);
    height: calc(100vw * 43.004 / 390);
    background-color: var(--color-white);
    border-radius: 50%;
    flex-shrink: 0;
}

.next-button__arrow-img {
    width: 50%;
    height: 100%;
    object-fit: contain;
}

/* ==========================================
   フッター
   ========================================== */
.question-footer {
    position: relative;
    padding: calc(100vw * 50 / 390) calc(100vw * 20 / 390) calc(100vw * 40 / 390);
    text-align: center;
    overflow: hidden;
    margin-top: calc(100vw * 100 / 390);
}

.question-footer__circle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw * 1312.84 / 390);
    height: calc(100vw * 1312.84 / 390);
    border-radius: 50%;
    background: radial-gradient(circle, var(--color-accent-blue) 0%, rgba(31, 54, 99, 0.8) 100%);
    z-index: -1;
}

.question-footer__links {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: calc(100vw * 12 / 390);
    color: var(--color-white);
    position: relative;
    z-index: 1;
}

.question-footer__link {
    color: var(--color-white);
    text-decoration: none;
}

.question-footer__link:hover {
    text-decoration: underline;
}

.question-footer__separator {
    margin: 0 calc(100vw * 7 / 390);
}

/* ==========================================
   768px以上のレスポンシブ対応
   ========================================== */
@media screen and (min-width: 768px) {
    .main_body {
        width: 390px;
        box-shadow: 0px 0px 17px 0px rgba(0, 0, 0, 0.35);
        margin: auto;
    }

    .question-header,
    .step-indicator,
    .questions,
    .next-button-container {
        max-width: 390px;
        margin-left: auto;
        margin-right: auto;
    }

    .question-footer {
        width: 100%;
    }

    /* ヘッダーセクション */
    .question-header {
        padding-top: 26.52px;
        padding-bottom: 20px;
    }

    .question-header__img {
        max-width: 390px;
    }

    /* ステップインジケーター */
    .step-indicator {
        padding: 20px 45.24px;
        justify-content: center;
        gap: 74.228px;
    }

    .step-indicator__line-img {
        top: calc(20px + 10px);
        width: 214.456px;
    }

    .step-indicator__item {
        gap: 5px;
    }

    .step-indicator__circle {
        width: 20px;
        height: 20px;
        border: 3px solid #1F3663;
    }

    .step-indicator__text {
        font-size: 14px;
    }

    /* 質問セクション */
    .questions {
        max-width: 390px;
        padding: 20px 0;
    }

    .questions__step {
        padding: 0 20px;
    }

    .question-item {
        margin-bottom: 30px;
    }

    .question-item__header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .question-item__q {
        font-size: 32px;
    }

    .question-item__text {
        font-size: 16px;
    }

    .question-item__options {
        gap: 10px;
    }

    .question-option {
        border-radius: 3px;
        padding: 10px;
        min-height: 54px;
        font-size: 16px;
    }

    .question-option:nth-child(2) {
        font-size: 14px;
    }

    /* 次へボタン */
    .next-button-container {
        padding: 0 54px;
        padding-bottom: 40px;
        margin-bottom: 0;
    }

    .next-button {
        max-width: 242px;
        height: 52px;
        border: 1.125px solid var(--color-white);
        border-radius: 56.274px;
        padding-left: 33.764px;
        padding-right: 5.065px;
    }

    .next-button--result {
        background-color: #DB5331;
    }

    .next-button.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }

    .next-button:hover {
        transform: translateY(-2px);
    }

    .next-button.disabled:hover {
        transform: none;
    }

    .next-button__text {
        font-size: 14px;
    }

    .next-button__arrow {
        width: 43.004px;
        height: 43.004px;
    }

    .next-button__arrow-img {
        width: 50%;
        height: 100%;
    }

    /* フッター */
    .question-footer {
        padding: 50px 20px 40px;
        margin-top: 100px;
    }

    .question-footer__circle {
        width: 1312.84px;
        height: 1312.84px;
    }

    .question-footer__links {
        font-size: 12px;
    }

    .question-footer__separator {
        margin: 0 7px;
    }
}
