header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.91);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-sizing: border-box;
}

.header-inner {
    padding: 0px 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    width: 50%;
    padding: 10px 0px;
}

.header-right {
    width: 50%;
    align-self: stretch;
}
.header-menu {
    height: 100%;
}

.header-menu > ul {
    height: 100%;
}

.header-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    gap: 50px;
}
.header-menu > ul > li {
    margin-bottom: 0;
    position: relative;
}
.header-menu > ul > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo img {
    height: 40px;
    width: auto;
}

.header-logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.header-logo-text span {
    font-size: 1.2rem;
    display: block;
}

.hamburger-menu {
    display: none;
}

.header-menu ul.submenu li span {
    display: none;
}

/* PC用スタイル */
.header-menu ul.submenu {
    display: none;
    position: absolute;
    background-color: white;
    list-style: none;
    margin: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    left: 50%;
    transform: translate(-50%, 0);
    min-width: 220px;
}

.header-menu ul.submenu li {
    padding: 10px 26px;
    text-align: center;
}

.header-menu ul.submenu li:hover {
    background-color: #f0f0f0;
}

.header-menu li:hover > ul.submenu {
    display: block;
}

/* スマホ用スタイル */
@media (max-width: 768px) {
    body {
        overflow: hidden;
    }
    header {
        top: 0;
        height: 60px;
    }
    .header-inner {
        padding: 10px 20px;
    }

    .header-container {
        display: block;
        position: relative;
    }

    .header-left {
        width: 100%;
    }

    .header-menu {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .header-logo {
        gap: 10px;
    }

    .header-logo img {
        height: 30px;
    }

    .header-logo-text {
        font-size: 2rem;
    }

    .header-logo-text span {
        font-size: 1rem;
    }

    /* Active menu styles */
    .header-menu ul.active {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    /* =========================================
   ハンバーガーアイコンの初期状態
   ========================================= */
    .hamburger-menu {
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 100%;
        width: 30px;
        border: none;
        outline: none;
    }

    .hamburger-icon {
        width: 30px;
        height: 3px;
        background-color: #333;
        transition: all 0.3s ease;
        position: relative;
        display: block;
    }

    /* 疑似要素で上下のバーを作る */
    .hamburger-icon::before,
    .hamburger-icon::after {
        content: "";
        width: 30px;
        height: 3px;
        background-color: #333;
        position: absolute;
        left: 0;
        transition: all 0.3s ease;
    }

    .hamburger-icon::before {
        top: -7px; /* 上側 */
    }
    .hamburger-icon::after {
        top: 7px; /* 下側 */
    }

    /* =========================================
   .open クラスが付いたとき（バツ形に変形）
   ========================================= */
    .hamburger-menu.open .hamburger-icon {
        background-color: transparent; /* 中央バーを消す */
    }

    .hamburger-menu.open .hamburger-icon::before {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger-menu.open .hamburger-icon::after {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* =========================================
   メニューのスライドイン（初期は左側に隠す）
   ========================================= */
    .header-menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        list-style: none;
        margin: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        height: calc(100vh - 60px);
    }

    /* .active が付いたらスライドイン */
    .header-menu.active {
        transform: translateX(0);
        display: block;
        background: #fff;
    }

    .header-menu ul {
        display: block;
    }

    .header-menu ul li {
        padding: 20px;
        text-align: left;
    }

    .header-menu > ul > li > a {
        font-size: 2rem;
        text-align: left;
        display: block;
    }

    .header-menu ul.submenu {
        display: block;
        position: static;
        background-color: transparent;
        box-shadow: none;
        min-width: 100%;
        left: 0;
        transform: none;
    }

    .header-menu ul.submenu li {
        padding: 10px 20px;
        text-align: left;
    }

    .header-menu ul.submenu li span {
        display: inline-block;
        margin-right: 10px;
    }
}
