html, body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

#about,
#member,
#company {
  scroll-margin-top: 80px;
}

/* ===========================================
   Header
   =========================================== */
#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    height: 100px;
}

h1 {
    height: auto;
    z-index: 200;
}

h1 img {
    max-height: 30px;
    height: auto;
}


#nav {
    display: flex;
    justify-content: center;
    gap: 30px;
}

#nav ul.nav-menu {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    gap: 40px;
}

#nav ul.nav-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    color: var(--text-tertiary);
    font-weight: var(--font-weight-bold);
}

.nav-menu li a .nav-arrow {
  display: none;
}

.apply-btn {
    margin-left: auto;
}

.apply-btn a {
    position: relative;
    padding: 10px 20px;
    border: 1px solid var(--color-white);
    border-radius: 10px;
    background: var(--primary-gradient);
    color: var(--color-white);
    text-decoration: none;
    display: inline-block;
    overflow: hidden;
}

.apply-btn a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-secondary);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 10px;
    z-index: 0;
}

.apply-btn a span {
    position: relative;
    z-index: 1;
}

.apply-btn a:hover::before {
    opacity: 1; 
}


/* ハンバーガーメニュー */
.toggle-btn {
    display: none;
    width: 90px;
    height: 100px;
    cursor: pointer;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 200;
}

.toggle-btn span {
    display: block;
    position: absolute;
    left: 25%;
    width: 50%;
    height: 3px;
    background-color: var(--text-tertiary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.toggle-btn span:nth-child(1) {
    top: 35%;
}

.toggle-btn span:nth-child(2) {
    top: 50%;
}

.toggle-btn span:nth-child(3) {
    top: 65%;
}

.open .toggle-btn span:nth-child(1) {
    top: 50%;
    transform: rotate(45deg);
}

.open .toggle-btn span:nth-child(2) {
    opacity: 0;
}

.open .toggle-btn span:nth-child(3) {
    top: 50%;
    transform: rotate(-45deg);
}


@media screen and (max-width: 768px) {
    #nav {
        display: none; 
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        height: auto;   
        background: var(--color-white);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 100;   
    }

    #nav ul.nav-menu {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        width: 97%;
        height: 50%;
        margin: 0 auto;
        padding: 30px 30px;
        border-bottom: var(--header-border) solid #E5E5E5;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    #nav ul.nav-menu li {
        width: 100%;
        padding-bottom: 10px;
    }

    #nav ul.nav-menu img.nav-arrow { 
        width: 25px;
        height: auto;
        display: block;
    }

    .toggle-btn span {
        width: 40%;
        background-color: var(--text-tertiary);
    }

    /* PC右端のお問い合わせボタンは非表示 */
    .apply-btn {
        display: none;
    }

    .open .apply-btn {
        display: block;
        margin: 0 auto;
        margin-top: 20px;
    }

    #header {
        justify-content: space-between;
        padding: 0 20px;
    }

    .toggle-btn {
        display: flex;
    }

    /* メニュー開いたとき */
    .open #nav {
        display: flex;
        opacity: 1;
        visibility: visible;
        height: 100vh;
    }
    
}