/* ------------------------------------------------
   Brand Colors & Base
------------------------------------------------ */
:root {
  --inmu-orange: #ff7a00;
  --inmu-black: #1a1a1a;
  --inmu-gray: #f5f5f5;
  --inmu-border: #eaeaea;
}

/* ------------------------------------------------
   Navbar Base
------------------------------------------------ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 36px;
  background: #ffffffcc;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--inmu-border);

  transition: padding .3s ease;
}

.navbar__logo img {
  width: 95px;
  transition: .3s;
}

/* Scroll shrink */
.navbar.shrink {
  padding: 8px 36px;
}
.navbar.shrink .navbar__logo img {
  width: 140px;
}

/* ------------------------------------------------
   PC Menu
------------------------------------------------ */
.navbar__menu {
  display: flex;
  list-style: none;
  gap: 24px;
  padding-left: 0;
  margin: 0;
}

.navbar__menu > li {
  position: relative;
}

/* Main menu texts */
.navbar__menu-link {
  font-family: "GmarketSansMedium";
  font-size: 17px;
  color: var(--inmu-black);
  padding: 10px 12px;
  display: block;
  cursor: pointer;
  position: relative;
  transition: .2s;
  text-decoration: none;
}

/* underline slide */
.navbar__menu-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0%;
  height: 2px;
  background: var(--inmu-orange);
  transition: all .25s ease;
  transform: translateX(-50%);
}

.navbar__menu > li:hover > .navbar__menu-link::after {
  width: 65%;
}

/* ------------------------------------------------
   Dropdown Submenu (PC)
------------------------------------------------ */
/* ------------------------------------------------
   Dropdown Submenu (PC)
------------------------------------------------ */
.navbar__sub_menu {
  position: absolute;
  top: 100%;          /* 💡 부모 li 바로 아래 붙이기 */
  left: 50%;
  transform: translateX(-50%);

  background: #fff;
  border: 1px solid var(--inmu-border);
  border-radius: 10px;

  padding: 12px 0;
  min-width: 180px;

  display: none;
  flex-direction: column;

  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  animation: fadeDown .25s ease;
}


@keyframes fadeDown {
  0% { opacity: 0; transform: translate(-50%, -5px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}

.navbar__sub_menu li a {
  display: block;
  padding: 10px 18px;
  color: var(--inmu-black);
  font-family: "GmarketSansMedium";
  text-decoration: none;
  font-size: 15px;
  transition: .2s;
}

.navbar__sub_menu li a:hover {
  background: var(--inmu-gray);
}

/* PC Hover */
@media (min-width: 901px) {
  .navbar__menu > li:hover > .navbar__sub_menu {
    display: flex;
  }
}

/* ------------------------------------------------
   Icons
------------------------------------------------ */
.navbar__icons {
  display: flex;
  gap: 10px;
}
.navbar__icons a {
  color: var(--inmu-orange);
  font-size: 22px;
}

/* ------------------------------------------------
   Mobile Menu Toggle
------------------------------------------------ */
.navbar__toggleBtn {
  font-size: 28px;
  color: var(--inmu-black);
  display: none;
  cursor: pointer;
}

/* ------------------------------------------------
   Mobile Drawer
------------------------------------------------ */
@media (max-width: 900px) {

  .navbar {
    padding: 14px 20px;
  }

  .navbar__toggleBtn {
    display: block;
  }

  .navbar__menu,
  .navbar__icons {
    display: none;
  }

  /* Drawer */
    .navbar__menu.active {
    position: fixed;
    top: 0; right: 0;
    width: 78%;
    height: 100vh;
    background: #fff;


    flex-direction: column;
    padding-top: 100px;
    padding-left: 24px;
    padding-bottom: 40px;          /* 아래 여유 공간 */

    box-shadow: -2px 0 12px rgba(0,0,0,0.1);
    animation: slideIn .3s ease;

    display: flex;

    /* 🔥 여기 두 줄 추가가 핵심 */
    overflow-y: auto;              /* 사이드바 자체 스크롤 */
    -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
  }

  @keyframes slideIn {
    0% { transform: translateX(100%); }
    100% { transform: translateX(0); }
  }

  .navbar__menu > li {
    width: 100%;
    text-align: left;
  }

  .navbar__menu-link {
    font-size: 20px;
    padding: 16px 0;
  }

  /* --------------------------------------
     MOBILE SUBMENU — 튕김 제거 핵심
  --------------------------------------- */
  .navbar__sub_menu {
    position: static;     /* fixed/absolute 제거 */
    left: auto;
    right: auto;
    width: 100%;

    transform: none;       /* translateX 제거 */
    animation: none;       /* fadeDown 제거 */

    border: none;
    border-radius: 0;
    box-shadow: none;

    background: #fff;
    padding-left: 10px;

    display: none;
  }

  /* 클릭(is-open) 시에만 펼침 */
  .navbar__menu li.is-open > .navbar__sub_menu {
    display: flex;
  }

  .navbar__icons.active {
    display: flex;
    margin-top: 24px;
  }
}

/* 바깥 클릭 영역 오버레이 */
.navbar__overlay {
  position: fixed;
  inset: 0;                 /* top:0; right:0; bottom:0; left:0; 와 같음 */
  background: rgba(0, 0, 0, 0.4);
  z-index: 900;             /* 사이드바(메뉴)보다 살짝 낮게 */
  opacity: 0;
  pointer-events: none;     /* 기본은 클릭 안 됨 */
  transition: opacity .25s ease;
}

/* 활성화 시 (햄버거 클릭 후) */
.navbar__overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* 모바일에서 바디 스크롤 막기 */
body.no-scroll {
  overflow: hidden;
}
