/* ナビゲーション用のフローティングボタン*/
.floating-buttons-wrapper {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: row-reverse;
    gap:10px;
}

/* 閉じるボタン（スマホのみ表示） */
.floating-close-button {
    display: none;
}

/* フローティングボタンを非表示にする */
.floating-buttons-wrapper.hidden {
    display: none;
}

.circle-button {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: width 0.3s ease, height 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    padding: 10px;
    box-sizing: border-box;
    border: 3px solid transparent;
    
}

.cnv-button-text {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.3;
}

.cnv-button-icon {
    border-radius: 50%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: none;
}

/* ホバー時の拡大 */
.circle-button:hover {
    width: 135px;
    height: 135px;
    transform: scale(1.038) translateZ(0); 
}

.cnv-button-icon .icon-hover {
    display: none;
}

.iju-navi-button {
    background-color: #ffffff;
    border: 5px solid #009639;
    box-shadow: none;
    border-radius: 50%;

    padding: 0;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}
.iju-navi-button a {
    margin: 0;
    height: 100%;
    width: 100%;
    text-decoration: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 45px 0;
    box-sizing: border-box;
}

.iju-navi-button .cnv-button-text {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;

    font-family: 'Hiragino Kaku Gothic ProN', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.05em;
    color: #009639;
    text-align: center;

}
.iju-navi-button .cnv-button-icon {
    width: 23px;
    height: 23px;
    background-color: transparent;
    border: none;

    display: flex;
    justify-content: center;
    align-items: center;
    /* 縮小防止 */
    flex-shrink: 0;
    box-sizing: content-box;
    margin-top:0.5em;
}
.iju-navi-button .cnv-button-text-sp-p,
.iju-navi-button .cnv-button-text-sp-s {
    display: none !important;
}

.iju-navi-button .cnv-button-icon svg {
    width: 100%; /* 親コンテナのサイズに合わせる */
    height: 100%;
}
.iju-navi-button .cnv-button-icon svg path:nth-child(2) {
    stroke: white; /* 白い矢印 */
}
.iju-navi-button .cnv-button-icon svg path:nth-child(1) {
    fill: #039639;
    stroke: none;
}

.iju-navi-button:hover {
    background-color: rgba(250, 249, 244, 0.5);
    border-color: #009639;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}
.iju-navi-button:hover .cnv-button-text {
    color: #009639;
}
.iju-navi-button:hover .cnv-button-icon {
    background-color: #009639;
    opacity: 1;
}
.iju-navi-button:hover .cnv-button-icon svg path:nth-child(2) {
    stroke: #ffffff;
    stroke-width: 1;
}

.kyoju-navi-button {
    background-color: #FFE55D;
    border: 5px solid #643200;

    box-shadow: none;
    border-radius: 50%;

    padding: 0;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}
.kyoju-navi-button a {
    margin: 0;
    height: 100%;
    width: 100%;
    text-decoration: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 0 0 0;
    box-sizing: border-box;
}
.kyoju-navi-button .cnv-button-text-l {
    display: block !important;
    max-width: 103px;
    width: auto;

    font-family: 'Hiragino Kaku Gothic ProN', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.05em;
    color: #643200;
    text-align: center;
    margin: 0;
    padding: 0;

    flex-shrink: 0;
}
.kyoju-navi-button .cnv-button-text-s {
    display: block !important;
    max-width: 103px;
    width: auto;

    font-family: 'Hiragino Kaku Gothic ProN', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.05em;
    color: #643200;

    text-align: center;
    margin: 0;
    padding: 0;

    flex-shrink: 0;
    gap: 8px
}
.kyoju-navi-button .cnv-button-icon {
    width: 23px;
    height: 23px;

    background-color: transparent;
    border: none;

    display: flex;
    justify-content: center;
    align-items: center;
    /* 縮小防止 */
    flex-shrink: 0;
    box-sizing: content-box;
    margin-top:0.5em;
}
.kyoju-navi-button .cnv-button-icon svg {
    width: 100%; /* 親コンテナのサイズに合わせる */
    height: 100%;
}

.kyoju-navi-button:hover {
    background-color: rgba(255, 229, 93, 0.5);
    border-color: #643200;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
    filter: none;
}
.kyoju-navi-button:hover .cnv-button-icon {
    background-color: transparent;
    opacity: 1;
}

kyoju-navi-button:hover .cnv-button-icon svg path:nth-child(2) {
    stroke: #643200;
}
/* ------------------------------------ */
/* スマホサイズのスタイル (メディアクエリで上書き) */
/* ------------------------------------ */

@media (max-width: 768px) {
    .floating-buttons-wrapper {
        flex-direction: column;
        right: 15px;
        bottom: 15px;
        gap:5px;
    }
    .floating-close-button {
        display: flex;
        position: absolute;
        top: -6px;
        right: 0;
        background-color: transparent;
        border: none;
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        padding: 0;
        transition: transform 0.3s ease;
    }

    .floating-close-button img {
        width: 21px;
        height: 21px;
        display: block;
    }

    .floating-close-button:active {
        transform: scale(0.9);
    }
    .circle-button {
        width: 100px;
        height: 100px;
        padding: 5px;
    }
    /* スマホ版でのボタンの不透明度のトランジション設定 */
    .iju-navi-button,
    .kyoju-navi-button {
        opacity: 1;
        transition: opacity 0.1s ease-out;
        /* タップ時の不透明度変更はJavaScriptで制御 */
    }
    /* タップ時のクラス */
    .iju-navi-button.button-tapped,
    .kyoju-navi-button.button-tapped {
        opacity: 0.7 !important;
    }
    /* ★修正3: スマホでホバー効果を無効化 */
    .circle-button:hover {
        width: 100px;
        height: 100px;
        transform: none;
        /* background-color, border-color, box-shadowは継承させる */
    }

    /* スマホでは:activeスタイルを完全に無効化 */
    .circle-button:active {
        /* Webkit（iOS/Android）のタップハイライトを無効化 */
        -webkit-tap-highlight-color: transparent;
        /* iOSで :active をより速く、より正確に認識させる */
        touch-action: manipulation;
    }

    /* iju-navi-buttonとkyoju-navi-buttonのhover/activeを明示的に上書き */
    .iju-navi-button:hover,
    .iju-navi-button:active,
    .iju-navi-button:focus,
    .iju-navi-button:focus-visible {
        background-color: #ffffff !important;
        border-color: #009639 !important;
        box-shadow: none !important;
    }

    .kyoju-navi-button:hover,
    .kyoju-navi-button:active,
    .kyoju-navi-button:focus,
    .kyoju-navi-button:focus-visible {
        background-color: #FFE55D !important;
        border-color: #643200 !important;
        box-shadow: none !important;
    }

    /* 内部のaタグにも同様の設定を適用 */
    .iju-navi-button a:hover,
    .iju-navi-button a:active,
    .iju-navi-button a:focus,
    .iju-navi-button a:focus-visible {
        outline: none !important;
        opacity: 1 !important;
    }

    .kyoju-navi-button a:hover,
    .kyoju-navi-button a:active,
    .kyoju-navi-button a:focus,
    .kyoju-navi-button a:focus-visible {
        outline: none !important;
        opacity: 1 !important;
    }
    /* iju-navi-button と kyoju-navi-button のタップ時の不透明度設定 */
    /* JavaScriptで制御するため、:activeは削除 */
    .iju-navi-button .cnv-button-icon {
        width: 18px;
        height: 18px;
        margin-top: 0.5em;
    }

    .kyoju-navi-button .cnv-button-icon {
        width: 18px;
        height: 18px;
        margin-top: 0.5em;
        background-color: transparent;
        border: none;
        border-radius: 0;
    }
    .cnv-button-icon svg {
        width: 100%;
        height: 100%;
    }
    .kyoju-navi-button .cnv-button-text-l,
    .kyoju-navi-button .cnv-button-text-s {
        font-size: 10px;
        font-weight: 600;
        line-height: 1.3;
        margin-bottom: 0;
    }

    .iju-navi-button .cnv-button-text {
        display: none!important;
    }
    .iju-navi-button .cnv-button-text-sp-p,
    .iju-navi-button .cnv-button-text-sp-s {
        display: block !important;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
        margin-bottom: 0;
        color: #009639;
        text-align: center;
    }
    .iju-navi-button a {
        padding: 10px 0;
        justify-content: space-evenly;
    }
    .kyoju-navi-button a {
        padding: 20px 0 0 0;
        justify-content: flex-start;
    }
    .kyoju-navi-button .cnv-button-icon {
        width: 18px;
        height: 18px;

        background-color: transparent;
        border: none;
        border-radius: 0;
    }
}