html {
    scroll-behavior: smooth;
}

.navbar {
    position: relative;
    right: 0;
    left: 0;
    padding: 1.2rem 2rem 1.2rem 1.2rem;
    width: 100%;
    z-index: 1;
    background-color: transparent;
    box-sizing: border-box;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px #4b4b4bb3;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  

.nav-logo{
    -webkit-tap-highlight-color: transparent;
    align-items: center;
    display: flex;
    line-height: 1;
}

.nav-logo img {
    height: 35px;
    max-height: 50px;
    display: block;
    object-fit: contain;
    transition: max-height 0.3s ease;
}

.navbar.scroll {
    position: fixed;
    padding: 1rem;
    background-color: #ffffffe2;
    box-shadow: 0 2px 5px #4b4b4bb3;
}

.navbar.scroll .nav-logo img {
    height: 28px;
    max-height: none;
}

.navbar.scroll .nav-link a {
    color: #2e3d86;
    transition: all 0.5s ease;
    font-size: clamp(0.7rem,2vw,1.2rem);
    font-weight: 700;
}

.navbar.scroll .nav-link a:hover {
    color: #f7e647;
}


.navbar .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: auto;
    font-weight: 550;
}


.navToggle {
    display: none;
    font-size: clamp(1.4rem,4vw,1.5rem);
    background: none;
    border: none;
    color: rgb(0, 0, 0);
    transition: color 0.5s ease;
    -webkit-tap-highlight-color: transparent;
    height: 0;
    padding: 0 15px 0 0;
}

.navToggle:hover {
    background-color: #ffffff00;
    height: 0;
    padding-top: 0;
}


.nav-link {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-link a {
    color: rgb(46 61 134);
    text-decoration: none;
    font-size: clamp(1.2rem,2vw,1.4rem);
    transition: color 0.5s ease;
    align-items: center;
}

.nav-link a:hover {
    color: #f7e647;
}


@media (max-width: 900px) {
    .navbar {
        position: relative;
        padding: 0.7rem;
        background-color: transparent;
    }

    .navbar.scroll {
        position: fixed;
        padding: 0.7rem;
        background-color: #ffffffe2;
    }

    .navbar.scroll .nav-logo img {
        max-height: clamp(20px,4vw,35px);
    }
    
    .navbar.scroll .nav-link a {
        color: #2e3d86;
        -webkit-tap-highlight-color: transparent;
        font-size: clamp(0.9rem,3vw,1.2rem);
    }

    .navbar .nav-logo img {
        max-height: clamp(20px,4vw,35px);
    }

    .nav-link a {
        color: #2e3d86;
        -webkit-tap-highlight-color: transparent;
        font-size: clamp(0.9rem,3vw,1.2rem);
        font-weight: 700;
    }

    .navToggle {
        display: flex;
        color: #2e3d86;
        align-items: center; /* 세로 가운데 정렬 */

    }

    .navToggle:hover {
        display: flex;
        color: #f7e647;
    }


    .nav-link {
        display: flex;
        flex-direction: column;
        position: absolute;
        background-color: #ffffffe2;
        box-shadow: 0 2px 5px #4b4b4bb3;
        top: 100%;
        left: 0;
        width: 100%;
        text-align: center;
        gap: 0;

        max-height: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        overflow: hidden;
        transition:
            max-height 0.5s ease,
            opacity 0.3s ease,
            transform 0.3s ease,
            padding 0.3s ease;
    }

    .nav-link li {
        padding: 0.6rem 0;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.179);
      }
      
      .nav-link li:last-child {
        box-shadow: none; /* 마지막 항목은 선 제거 */
      }

    .nav-link.show {
        max-height: 300px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

}