﻿/* 基本スタイル */
body {
    background-color: #fff;
    color: #333;
    font-family: "Noto Sans JP", "Noto Sans CJK JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    margin: 0;
    line-height: 1.8;
}

html {
    scroll-behavior: smooth;
}

.faq-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 200px 20px 200px;
}

/* ヘッダー */
.faq-header h1 {
    font-size: 48px;
    color: #666;
    margin-bottom: 36px;
    font-weight: 500;
}

/* レイアウト構成（2カラム） */
.faq-wrapper {
    display: block;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
}

/* メイン部分 */
.faq-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    column-gap: 0;
    row-gap: 56px;
    align-items: start;
    background-color: #fff;
}

.faq-main>section {
    grid-column: 1;
    background-color: #fff;
    border-radius: 72px 0 0 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    width: 100%;
    box-sizing: border-box;
    padding: 4rem;
    scroll-margin-top: 24px;
}

.section-title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    color: #666;
    display: inline-block;
    text-align: left;
    margin: 0 0 17px;
    padding-bottom: 7px;
    position: relative;
    z-index: 1;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 28%;
    transform: translateX(-50%);
    width: 100%;
    height: 0.32em;
    background-color: #ededed;
    border-radius: 999px;
    z-index: -1;
}

.subsection-title {
    font-size: clamp(20px, 4vw, 24px);
    color: #666;
    margin-top: 44px;
    margin-bottom: 15px;
}

.subsection-title.subsection-title--first {
    margin-top: 0;
}

/* FAQブロック */
.faq-block {
    background-color: #ebebeb;
    margin-bottom: 15px;
    padding: 25px;
    border-radius: 24px 0 0 0;
}

#faq-product .faq-list .faq-block:last-child {
    margin-bottom: 0;
}

.faq-q,
.faq-a {
    display: flex;
    gap: 15px;
}

.faq-q {
    font-weight: bold;
    margin-bottom: 10px;
}

.faq-q .symbol {
    font-size: 20px;
}

.faq-a {
    font-size: 14px;
    color: #444;
}

.faq-a .symbol {
    font-weight: bold;
    font-size: 20px;
}

.faq-q p,
.faq-a p {
    margin: 0;
}

.faq-q p {
    font-size: clamp(16px, 1.8vw, 20px);
}

.faq-a p {
    font-size: clamp(14px, 1.8vw, 16px);
}

.faq-a-accordion .faq-a-content {
    flex: 1;
    min-width: 0;
}

.faq-a-accordion .faq-a-text {
    position: relative;
    overflow: hidden;
    max-height: 7.4em;
    transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: max-height;
}

.faq-a-accordion .faq-a-text::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.6em;
    background: linear-gradient(to bottom, rgba(235, 235, 235, 0), #ebebeb 78%);
    pointer-events: none;
}

.faq-a-accordion.is-open .faq-a-text::after {
    display: none;
}

.faq-accordion-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    color: #AFA336;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 0 0;
    cursor: pointer;
}

/* SP限定アコーディオン: PCでは常時展開 */
.faq-a-accordion-sp .faq-a-content {
    flex: 1;
    min-width: 0;
}

.faq-a-accordion-sp .faq-a-text {
    max-height: none;
    overflow: visible;
}

.faq-a-accordion-sp .faq-a-text::after {
    display: none;
}

.faq-a-accordion-sp .faq-accordion-toggle {
    display: none;
}

/* サイドバー */
.faq-sidebar {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 24px;
    width: 200px;
    border: none;
}

.faq-sidebar ul {
    list-style: none;
    padding: 0 0 0 32px;
    margin: 0;
}

.faq-sidebar li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.58);
}

.faq-sidebar a {
    display: block;
    padding: 12px 10px;
    text-decoration: none;
    color: #333;
    font-size: clamp(14px, 1.2vw, 16px);
    transition: background-color 0.35s ease, color 0.35s ease;
}

.faq-sidebar a.is-active {
    background-color: #d17a91;
    color: #fff;
    font-weight: 700;
}

@media (hover: hover) {
    .faq-sidebar a:hover {
        background-color: #eee;
    }
}

/* レスポンシブ対応（スマホ時） */
@media (max-width: 768px) {
    .faq-page {
        padding: 100px 20px 100px;
    }

    :root {
        --mobile-menu-panel-width: 176px;
        --mobile-menu-right: 8px;
        --mobile-menu-bottom: 16px;
        --mobile-toggle-height: 48px;
    }

    .faq-wrapper {
        display: block;
        border-radius: 0;
        padding: 0;
    }

    .faq-main {
        grid-template-columns: 1fr;
        row-gap: 28px;
    }

    .faq-main>section {
        border-radius: 36px 0 0 0;
        padding: 1.8rem;
    }

    .section-title {
        font-size: 24px;
        padding-bottom: 6px;
    }

    .faq-sidebar {
        width: 100%;
        margin-bottom: 40px;
    }

    .faq-header h1 {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .faq-a-accordion-sp .faq-a-text {
        position: relative;
        overflow: hidden;
        max-height: 7.4em;
        transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
        will-change: max-height;
    }

    .faq-a-accordion-sp .faq-a-text::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2.6em;
        background: linear-gradient(to bottom, rgba(235, 235, 235, 0), #ebebeb 78%);
        pointer-events: none;
        display: block;
    }

    .faq-a-accordion-sp.is-open .faq-a-text::after {
        display: none;
    }

    .faq-a-accordion-sp .faq-accordion-toggle {
        display: inline-block;
    }
}

/* ==========================================
   追加: スマホ用オーバーレイメニュー
========================================== */

/* 1. 全体設定と共通クラス
------------------------------------------- */

/* 開閉用のチェックボックスは常に隠す */
.menu-checkbox {
    display: none;
}

/* 2. デスクトップ表示（PC）での設定
------------------------------------------- */
@media (min-width: 769px) {

    /* PCではスマホ用ボタンとオーバーレイを隠す */
    .mobile-menu-btn,
    .mobile-menu-overlay {
        display: none;
    }
}

/* 3. スマホ表示（SP）での設定
------------------------------------------- */
@media (max-width: 768px) {

    /* 前回の設定を微調整: PC用サイドバーは非表示に */
    .faq-wrapper {
        display: block;
        /* 縦並び */
    }

    .faq-sidebar {
        display: none;
        /* PC用サイドバーを隠す */
    }

    /* --- 右下の「menu」ボタン --- */
    .mobile-menu-btn {
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed;
        /* 画面に固定 */
        bottom: var(--mobile-menu-bottom);
        right: var(--mobile-menu-right);
        width: 60px;
        height: 60px;
        background-color: #d17a91;
        /* 画像のピンク色 */
        border-radius: 50%;
        /* 正円 */
        color: #fff;
        /* 大文字に */
        cursor: pointer;
        z-index: 1000;
        /* 最前面に */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        transition: opacity 0.25s;
    }

    .mobile-menu-btn .btn-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
    }

    /* --- オーバーレイメニュー本体 --- */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        pointer-events: none;
    }

    /* --- ナビゲーションリスト --- */
    .mobile-nav {
        position: fixed;
        right: var(--mobile-menu-right);
        bottom: calc(var(--mobile-menu-bottom) + var(--mobile-toggle-height));
        width: var(--mobile-menu-panel-width);
    }

    .mobile-nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
        background-color: #d17a91;
        border-radius: 24px 24px 0 0;
        overflow: hidden;
    }

    .mobile-nav li {
        border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    }

    .mobile-nav li:last-child {
        border-bottom: none;
    }

    .mobile-nav a {
        display: block;
        padding: 12px 16px;
        color: #fff;
        text-decoration: none;
        font-size: 13px;
        font-weight: 700;
        text-align: left;
    }

    .mobile-nav a.is-active {
        background-color: #fff;
        color: #d17a91;
    }

    .mobile-menu-close {
        position: fixed;
        right: var(--mobile-menu-right);
        bottom: var(--mobile-menu-bottom);
        width: var(--mobile-menu-panel-width);
        height: var(--mobile-toggle-height);
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0 16px;
        background-color: #d17a91;
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
        border-radius: 0 0 24px 24px;
        cursor: pointer;
        box-sizing: border-box;
        text-transform: lowercase;
    }

    /* 4. 開閉時のアクション（CSSハック）
    ------------------------------------------- */

    /* チェックボックスがONになった時（メニューが開いた時） */

    /* 1. オーバーレイを表示 */
    .menu-checkbox:checked~.mobile-menu-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* 2. メニュー展開中は右下の丸ボタンを隠す */
    .menu-checkbox:checked~.mobile-menu-btn {
        opacity: 0;
        pointer-events: none;
    }
}