/* ヘッダーMENUボタン最適化CSS v2.1 */

/* 横スクロール防止（全体） */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* PC表示時（1025px以上） */
@media screen and (min-width: 1025px) {
    .btn_menu {
        display: none !important;
    }
}

/* タブレット・モバイル表示時（1024px以下） */
@media screen and (max-width: 1024px) {
    /* ナビゲーション非表示 */
    .a22-header .nav_a {
        display: none !important;
    }
    
    /* ヘッダー内部のレイアウト調整 */
    .a22-header_inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-right: 10px;
    }
    
    /* MENUボタン - flexで安全に配置 */
    .a22-header .btn_menu {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        font-size: 8px;
        width: 46px;
        height: 40px;
        margin-left: 10px;
        flex-shrink: 0;
        cursor: pointer;
        color: #2e2e2e;
    }
    
    /* ハンバーガーアイコン - 中央の線 */
    .a22-header .btn_menu i {
        display: block;
        width: 24px;
        height: 1px;
        background: #2e2e2e;
        margin: 0 auto 13px;
        position: relative;
    }
    
    /* ハンバーガーアイコン - 上下の線 */
    .a22-header .btn_menu i:before,
    .a22-header .btn_menu i:after {
        content: "";
        display: block;
        width: 100%;
        height: 1px;
        background: #2e2e2e;
        position: absolute;
        left: 0;
    }
    
    .a22-header .btn_menu i:before {
        top: -7px;
    }
    
    .a22-header .btn_menu i:after {
        top: 7px;
    }
    
    /* アクティブ状態（メニュー開いた時） */
    .a22-header .btn_menu.active i {
        background: none;
    }
    
    .a22-header .btn_menu.active i:before,
    .a22-header .btn_menu.active i:after {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(45deg);
    }
    
    .a22-header .btn_menu.active i:after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }
}