/*header共通CSS*/
#header {
    position: fixed;
    height: 80px;
    width: 100%;
    transition: background-color 0.4s ease;
    background-color: #3f88d7;
    z-index: 1000;
    padding: 20px 0;
}

#header.top {
    background-color: #ffffff00;
}


.header-inner {
    margin: 0 auto;
    padding-right: 10px;
    display: flex;
    justify-content: space-between;
    /* 左右に配置 */
    align-items: center;
    /* 縦位置を揃える */
}

/*ロゴの大きさ*/
.logo img {
    height: 80px;
    position: absolute;
    top: 0;
    left: 0;
    aspect-ratio: auto 636 / 165;
}



/*mega*/
.megamenu {
    position: absolute;
    top: 95px;
    width: 60%;
    left: 20%;
    background: rgb(17 39 63 / 94%);
    display: none;
    padding: 30px;
    border-radius: 20px;
}


.megamenu-block h5 {
    position: relative;
    padding: 10px;
    color: #fff;
    font-size: 20px;
    margin: 0 15px;
}

.megamenu-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 20px;
}

.megamenu-items a {
    position: relative;
    text-decoration: none;
    color: #fff;
    display: block;
    padding: 9px 0;
    border-bottom: solid .2px #ffffff;
    margin: 0 20px;
}

.megamenu-items a span {
    position: absolute;
    top: 18px;
    right: 5px;
    width: 10px;
    height: 10px;
    border-top: solid;
    border-right: solid;
    transform: rotate(45deg);
}

.megamenu-items a:hover {
    color: #ff930c;
}

.hamburger-title::before,
.megamenu-block h5::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #ff930c;
    /* アクセントカラー */
    border-radius: 2px;
}

/*PC用*/
@media (min-width: 1025px) {
    .header-nav {
        position: relative;
        top: 20px;
        right: 10px;
    }

    .header-nav ul {
        display: flex;
        gap: 25px;
        /* メニュー間の余白 */
        list-style: none;
    }

    .header-nav a,
    #service {
        text-decoration: none;
        color: #ffffff;
        font-weight: 500;
        cursor: pointer;
    }

    .hamburger {
        display: none;
    }
}

/*タブレット/スマホ対応*/
@media (max-width: 1024px) {

    /*PC用ヘッダーを隠す*/
    .header-nav,
    .megamenu {
        display: none;
    }

    /*ハンバーガーメニューを表示*/
    .hamburger {
        position: relative;
        margin-top: 5px;
        margin-right: 20px;
    }

    /* チェックボックス非表示 */
    .hamburgerlb {
        display: none;
    }

    /* ハンバーガーボタン */
    .hamburger-btn {
        width: 40px;
        height: 30px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        position: relative;
        z-index: 1001;
    }

    /*ハンバーガー白線*/
    .hamburger-btn span {
        height: 5px;
        background: #fff;
        border-radius: 2px;
        transition: 0.4s;
    }

    /* ハンバーガー変形 */
    .hamburgerlb:checked+.hamburger-btn span:nth-child(1) {
        transform: translateY(13px) rotate(45deg);
    }

    .hamburgerlb:checked+.hamburger-btn span:nth-child(2) {
        opacity: 0;
    }

    .hamburgerlb:checked+.hamburger-btn span:nth-child(3) {
        transform: translateY(-13px) rotate(-45deg);
    }

    /* メニュー本体 */
    .hamburger-menu {
        position: fixed;
        top: 0;
        right: -90%;
        width: 90%;
        height: 100vh;
        overflow-y: auto;
        /* ← はみ出たら縦スクロール */
        padding: 140px 10px;
        background: rgba(17, 39, 63, 0.5);
        backdrop-filter: blur(12px);
        border-left: 1px solid rgba(255, 255, 255, 0.3);
        padding-top: 80px;
        transition: 0.4s;
        z-index: 1000;
    }

    .hamburgerlb:checked~.hamburger-menu {
        right: 0;
    }

    .hamburger-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }

    .hamburger-item {
        position: relative;
        margin-bottom: 20px;
    }

    /* メニュー項目 */
    .hamburger-title {
        color: #fff;
        font-size: 30px;
        padding: 0 20px;
        margin: 0;
        position: relative;
        transition-delay: 0.1s;
    }

    .hamburger-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .hamburger-menu ul li {
        opacity: 0;
        transform: translateX(20px);
        transition: 0.4s;
        margin: 20px;
    }

    .hamburger-menu ul li a {
        color: #fff;
        text-decoration: none;
        font-size: 20px;
    }

    /* 順番にフェードイン */
    .hamburgerlb:checked~.hamburger-menu ul li {
        opacity: 1;
        transform: translateX(0);
    }

    .hamburger-menu ul li {
        transition-delay: 0.2s;
    }
}

@media (max-width: 500px) {
    .hamburger-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

}