﻿@charset "utf-8";
/* =================================================================
   SP Menu (ハンバーガーメニュー)
   ================================================================= */

/* PC（1025px以上）ではハンバーガーメニュー関連を完全非表示 */
#sp_box,
#open_menu {
    display: none;
}

/* =================================================================
   1024px以下でのみ表示・有効化
   ================================================================= */
@media only screen and (max-width: 1024px) {
    #sp_box {
        display: block;
    }

    /* 画面右上に固定配置されるハンバーガーアイコン（通常時） */
    #spicon {
        position: fixed;
        right: 20px;
        top: 16px;
        width: 48px;
        height: 48px;
        background-color: #FFFFFF;
        border: 1.5px solid #006DB7;
        border-radius: 8px;
        padding: 12px 10px 12px;
        box-sizing: border-box;
        box-shadow: 0 2px 8px rgba(0, 109, 183, 0.15);
        z-index: 9999;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        transition: all 0.3s ease;
    }

    #spicon:hover {
        background-color: #F0F9FF;
    }

    /* アイコンの3本線 */
    #spicon span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #006DB7;
        border-radius: 2px;
        transition: all 0.35s ease;
    }

    /* 通常時下部のラベルテキスト */
    #spicon:before {
        content: "MENU";
        position: absolute;
        bottom: 2px;
        left: 0;
        width: 100%;
        text-align: center;
        font-family: "Yu Gothic", YuGothic, sans-serif;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0.05em;
        color: #006DB7;
        transition: all 0.3s ease;
        display: none;
    }

    /* =============================================================
       メニューオープン時：黒い×マーク
       ============================================================= */
    #spicon.m_active {
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding: 10px;
        justify-content: center;
    }

    #spicon.m_active:hover {
        background-color: rgba(0, 0, 0, 0.05);
        border-radius: 50%;
    }

    #spicon.m_active span {
        background-color: #000000;
        height: 2.5px;
        position: absolute;
        width: 28px;
    }

    #spicon.m_active span:nth-child(1) {
        transform: rotate(-45deg);
    }

    #spicon.m_active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    #spicon.m_active span:nth-child(3) {
        transform: rotate(45deg);
    }

    /* ×マーク時はテキストを非表示にしてすっきりと見せる */
    #spicon.m_active:before {
        display: none;
    }

    /* =============================================================
       開いたメニューのオーバーレイ領域
       ============================================================= */
    #open_menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        height: 100vh;
        z-index: 9990;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        overflow: hidden;
    }

    #center_box {
        position: relative;
        width: 100%;
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 85px 24px 60px;
        box-sizing: border-box;
    }

    /* メニュー内の閉じるボタン（黒い×マーク） */
    .sp-menu__close {
        position: fixed;
        right: 20px;
        top: 16px;
        width: 48px;
        height: 48px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        transition: opacity 0.2s ease;
    }

    .sp-menu__close:hover {
        opacity: 0.6;
    }

    .sp-menu__close span {
        position: absolute;
        width: 28px;
        height: 2.5px;
        background-color: #006DB7;
        border-radius: 2px;
    }

    .sp-menu__close span:nth-child(1) {
        transform: rotate(45deg);
    }

    .sp-menu__close span:nth-child(2) {
        transform: rotate(-45deg);
    }

    .sp-menu {
        max-width: 480px;
        margin: 0 auto;
    }

    /* ナビゲーションメニューリスト */
    .sp-menu__list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .sp-menu__item {
        border-bottom: 1px solid #EBF4F9;
    }

    .sp-menu__item > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 12px;
        font-family: "Yu Gothic", YuGothic, sans-serif;
        font-size: 16px;
        font-weight: 700;
        color: #363636;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .sp-menu__item > a:hover {
        color: #006DB7;
    }

    /* 診療メニューのアコーディオン展開ヘッダー */
    .sp-menu__sub-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 12px;
        background: transparent;
        border: none;
        cursor: pointer;
        text-align: left;
        box-sizing: border-box;
    }

    .sp-menu__sub-title {
        font-family: "Yu Gothic", YuGothic, sans-serif;
        font-size: 16px;
        font-weight: 700;
        color: #363636;
        transition: color 0.2s ease;
    }

    .sp-menu__sub-toggle:hover .sp-menu__sub-title,
    .sp-menu__sub-toggle.is-open .sp-menu__sub-title {
        color: #006DB7;
    }

    /* 開閉アコーディオンアイコン（＋／ー） */
    .sp-menu__sub-arrow {
        position: relative;
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

    .sp-menu__sub-arrow::before,
    .sp-menu__sub-arrow::after {
        content: "";
        position: absolute;
        background-color: #006DB7;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* 横棒 */
    .sp-menu__sub-arrow::before {
        top: 6px;
        left: 0;
        width: 14px;
        height: 2px;
    }

    /* 縦棒 */
    .sp-menu__sub-arrow::after {
        top: 0;
        left: 6px;
        width: 2px;
        height: 14px;
    }

    /* 開いた時（縦棒が消えて「−」になる） */
    .sp-menu__sub-toggle.is-open .sp-menu__sub-arrow::after {
        transform: rotate(90deg);
        opacity: 0;
    }

    /* 診療メニューのサブリスト（初期非表示） */
    .sp-menu__sub-list {
        display: none;
        list-style: none;
        padding: 10px 16px 14px;
        margin: 0 0 10px;
        background-color: #F4FAFD;
        border-radius: 10px;
    }

    .sp-menu__sub-list li { display: inline-block; width: 49%; box-sizing: border-box; vertical-align: top; }
    .sp-menu__sub-list li a {
        display: block;
        padding: 6px 0;
        font-family: "Yu Gothic", YuGothic, sans-serif;
        font-size: 14px;
        font-weight: 500;
        color: #555555;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .sp-menu__sub-list li a:hover {
        color: #006DB7;
    }

    /* =============================================================
       ハンバーガーメニュー一番下側のアクセス・TELボタン
       ============================================================= */
    .sp-menu__actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-top: 36px;
    }

    .sp-menu__btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 44px;
        border-radius: 100px;
        text-decoration: none;
        box-sizing: border-box;
        font-family: "Yu Gothic", YuGothic, sans-serif;
        font-weight: 700;
        transition: opacity 0.3s ease, transform 0.2s ease;
    }

    .sp-menu__btn:active {
        transform: scale(0.97);
    }

    .sp-menu__btn .btn__icon {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

    .sp-menu__btn.btn--access {
        width: 135px;
        background-color: #FFFFFF;
        border: 1.5px solid #006DB7;
        color: #006DB7;
        font-size: 15px;
    }

    .sp-menu__btn.btn--access:hover {
        background-color: #006DB7;
        color: #FFFFFF;
    }

    .sp-menu__btn.btn--tel {
        width: 195px;
        background-color: #006DB7;
        color: #FFFFFF;
        font-family: "Work Sans", "Yu Gothic", sans-serif;
        font-size: 18px;
        font-weight: 600;
    }

    .sp-menu__btn.btn--tel:hover {
        background-color: #01B5F4;
    }
}

/* 768px以下の微調整 */
@media only screen and (max-width: 768px) {
    #spicon, .sp-menu__close {
        right: 15px;
        top: 11px;
    }

    #center_box {
        padding: 75px 16px 50px;
    }

    .sp-menu__actions {
        gap: 10px;
        margin-top: 28px;
    }

    .sp-menu__btn.btn--access {
        width: 120px;
        height: 42px;
        font-size: 15px;
    }

    .sp-menu__btn.btn--tel {
        width: 175px;
        height: 42px;
        font-size: 17px;
    }

    .sp-menu__item > a,
    .sp-menu__sub-toggle {
        font-size: 17px;
        padding: 13px 8px;
    }

    .sp-menu__sub-list {
        padding: 6px 12px 10px 16px;
    }

    .sp-menu__sub-list li a {
        font-size: 15px;
    }
}







