Copy/* ========================================
   共通ヘッダー：ベーススタイル
   ======================================== */
#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
}

#topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   ロゴ（PC/SP共通ベース）
   ======================================== */
#logo {
    flex-shrink: 0;
}

#logo img {
    height: 80px; /* PCでの高さ */
    width: auto;
    display: block;
}

/* ========================================
   ナビゲーション（PC版の基本設定）
   ======================================== */
#gnav {
    flex-grow: 1;
    display: flex; /* PCでは常に表示 */
    justify-content: center;
    align-items: center;
    background: transparent; /* 背景は透明 */
    position: static; /* 固定しない */
    width: auto;
    height: auto;
}

ul.gnav {
    display: flex;
    flex-direction: row; /* 横並び */
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gnav .menu-item a {
    text-decoration: none;
    color: #333; /* PCの文字色は黒 */
    font-size: 15px;
    transition: color 0.3s;
    font-weight: 500;
}

.gnav .menu-item a:hover {
    color: #F5C932;
}

/* ========================================
   右側のボタン群（PCでは電話のみ表示）
   ======================================== */
#topbar-tel-btn {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

#topbar-tel-btn button {
    background: #F5C932;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

#topbar-tel-btn button:hover {
    background: #e0b820;
}

/* PCではメニューボタンと検索ボタン、閉じるボタンを隠す */
#topbar-menu-btn,
#topbar-search-btn,
#overlay-menu-close-btn,
#overlay-search {
    display: none;
}


/* ========================================
   ★スマホ対応（768px以下）
   ここから下がスマホ専用のデザインです
   ======================================== */
@media screen and (max-width: 768px) {
    
    /* --- ヘッダーレイアウト調整 --- */
    #topbar {
        padding: 10px 15px;
        height: 60px;
    }

    #logo img {
        height: 40px; /* スマホではロゴを小さく */
    }

    /* --- メニューボタン・検索ボタンを表示 --- */
    #topbar-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px;
        cursor: pointer;
        margin-left: 10px;
    }
    
    #topbar-menu-btn svg {
        width: 24px;
        height: 24px;
        fill: #333;
    }

    /* 検索ボタン（虫眼鏡）は非表示にする */
    #topbar-search-btn {
        display: none !important;
    }

    /* 電話ボタンをアイコンのみの円形にする */
    #topbar-tel-btn button {
        background: #F5C932;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0; /* 文字を消す */
    }
    #topbar-tel-btn button::before {
        content: "📞"; /* 簡易的な電話アイコン（必要に応じてSVGなどに変更可） */
        font-size: 18px;
        color: #333;
    }

    /* --- オーバーレイメニュー（黒い画面の設定） --- */
    /* ★ここが修正ポイント：スマホの時だけこの設定を適用する */
    #gnav {
        display: none; /* 閉じた状態 */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95); /* 黒背景 */
        z-index: 9998;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    /* 開いた時（.activeがついた時） */
    #gnav.active {
        display: flex !important;
    }

    /* メニューリスト（縦並び） */
    #gnav ul.gnav {
        flex-direction: column;
        gap: 0; /* gapではなくmarginで制御 */
        text-align: center;
        width: 100%;
    }

    /* メニュー項目 */
    #gnav .menu-item {
        margin-bottom: 40px; /* ★ここで隙間を空ける */
        width: 100%;
    }
    #gnav .menu-item:last-child {
        margin-bottom: 0;
    }

    /* リンク文字 */
    #gnav .menu-item a {
        color: #fff; /* 白文字 */
        font-size: 18px;
        display: block;
        padding: 10px 0;
    }

    /* 閉じるボタン（×） */
    #overlay-menu-close-btn {
        display: none; /* 最初は隠す */
    }
    #gnav.active #overlay-menu-close-btn {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        cursor: pointer;
        z-index: 9999;
    }
    #overlay-menu-close-btn svg {
        width: 30px;
        height: 30px;
        fill: #fff;
    }
}