/* ヘッダー */
header {
    display: flex;
    align-items: center;
    background: white;
    height: 64px;
    padding: 0;
    border-bottom: 1px solid gray;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 0 4rem;
}

/* モバイルメニューボタン */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 100;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: black;
    margin: 5px 0;
    transition: 0.3s;
}

/* モバイルメニューが開いている時のボタン */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.header-logo-container {
    & img {
        height: 40px;
    }

    & a {
        display: flex;
        align-items: center;
        box-sizing: border-box;
        height: 64px;
        transition: background 0.3s ease, color 0.3s ease;
    }
}

.header-logo-container a:hover {
    background: black;
    color: white;
    & img {
        filter: invert(1);
    }
}

.header-nav ul {
    display: flex;
    list-style: none;
    gap: 0;
}

.header-nav a {
    font-size: 2rem;
    text-decoration: none;
    color: black;
    font-weight: bold;
    display: inline-block;
    box-sizing: border-box;
    height: 64px;
    padding: 0 1rem;
    line-height: 64px;
    transition: background 0.3s ease, color 0.3s ease;   
}

.header-nav a:hover {
    background: black;
    color: white;
}

/* タブレット用レスポンシブ対応 */
@media (max-width: 820px) {
    .header-content {
        padding: 0 1rem;
    }

    .header-nav a {
        font-size: 1.5rem;
        padding: 0 0.5rem;
    }
}

/* スマートフォン用レスポンシブ対応 */
@media (max-width: 480px) {
    .header-content {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin: 0 auto;
        padding: 0 1rem;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 100;
    }

    .header-logo-container {
        margin-left: -45px;
    }

    .header-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: calc(100vh - 64px);
        margin-top: 64px;
        background-color: rgba(255, 255, 255, 0.9);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        z-index: 99;
        transition: left 0.3s ease-in-out;
        padding-top: 2rem;
    }

    .header-nav.active {
        left: 0;
    }

    .header-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .header-nav ul li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }

    .header-nav ul li a {
        font-size: 2rem;
        height: auto;
        line-height: 1.5;
        padding: 10px 20px;
        display: block;
        width: 100%;
    }

    .header-nav ul li a:hover {
        background: black;
        color: white;
    }
}

