/* =========================
  BASE
========================= */
:root {
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* 배경(유리+흰슬라이드) */
  --t-bg: 0.42s;
  --d-bg: 0.06s;

  /* depth 오픈 */
  --t-depth: 0.62s;
  --d-depth: 0.03s;

  --header-h: 130px;
  --brand: #F30905;
  --accent: #3B88B4;
}



/* =========================
    HEADER (2-layer background)
    layer1: #header.bg (glass)
    layer2: #header::before (white slide)
  ========================= */

/* glass layer */
#header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: var(--header-h);
  padding: 10px 160px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;

  /* glass layer transition sync */
  transition:
    background-color var(--t-bg) var(--ease-soft) var(--d-bg),
    backdrop-filter var(--t-bg) var(--ease-soft) var(--d-bg);
}

/* 기본은 유리 OFF (원하면 기본 유리 ON 하고 싶으면 bg를 기본으로 넣어도 됨) */
#header.bg {
  background-color: rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(30px);
}

/* white slide layer */
#header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 0;

  transform: translateY(-101%);
  transition: transform var(--t-bg) var(--ease-soft) var(--d-bg);
}

/* ✅ hover(on) 또는 스크롤(is-scrolled)일 때 흰 배경 노출 */
#header.on::before,
#header.is-scrolled::before {
  transform: translateY(0);
}

/* 스크롤 상태는 고정된 느낌(딜레이 최소화) */
#header.is-scrolled::before {
  transition-delay: 0s;
}

/* =========================
    LOGO / GNB
  ========================= */
#header .logo {
  position: relative;
  width: 230px;
  height: 64px;
  background: url('../images/exiromed-Logo.svg') no-repeat center center/contain;
  overflow: hidden;
  text-indent: -999px;
  z-index: 10;

  transition: background-image 0.30s ease 0.04s;
}

#header .gnb {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 56px;
  z-index: 5;
  background: transparent;
}

#header .gnb>ul {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
}

#header .gnb>ul>li {
  position: relative;
  z-index: 2;
  width: fit-content;
}

#header .gnb>ul>li>a {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #FFF;
  font-size: 18px;
  font-weight: 400;

  transition: color 0.28s ease 0.04s;
}

/* =========================
    DEPTH (MEGA) - ONLY .is-open
    ⚠️ li:hover로 depth 열리는 CSS는 삭제해야 함
  ========================= */
#header .gnb .depth {
  position: fixed;
  left: 0;
  top: var(--header-h);
  width: 100%;
  display: flex;
  justify-content: center;

  background: #FFF;
  overflow: hidden;

  /* 닫힘 기본 */
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;

  /* 열림(부드럽게) */
  transition:
    max-height var(--t-depth) var(--ease-out) var(--d-depth),
    opacity 0.22s ease var(--d-depth),
    transform 0.35s var(--ease-soft) var(--d-depth);
}

/* 열림 상태 */
#header .gnb .depth.is-open {
  max-height: 590px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 닫힘은 살짝 더 빠르게 (클래스 제거될 때 체감 좋아짐) */
#header .gnb .depth:not(.is-open) {
  transition:
    max-height 0.40s var(--ease-soft),
    opacity 0.18s ease,
    transform 0.25s var(--ease-soft);
}

#header .gnb .depth:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #ccc;
}

#header .gnb .depth:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #ccc;
}

/* s2 */
#header .gnb .depth.s2>ul {
  display: flex;
  justify-content: center;
  align-items: center;
  /* padding: 18px 0; */
}

#header .gnb .depth.s2>ul>li {
  margin: 0 20px;
}

#header .gnb .depth.s2>ul>li>a {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  font-size: 16px;
  font-weight: 500;
  color: #000;
  transition: color .25s ease;
}

#header .gnb .depth.s2>ul>li>a:hover {
  color: var(--brand);
}

/* pro padding smooth */
#header .gnb .depth.pro {
  padding: 0;
  transition:
    max-height var(--t-depth) var(--ease-out) var(--d-depth),
    opacity 0.22s ease var(--d-depth),
    transform 0.35s var(--ease-soft) var(--d-depth),
    padding 0.30s var(--ease-soft) var(--d-depth);
}

#header .gnb .depth.pro.is-open {
  padding: 12px 0;
}

/* =========================
    HEADER STATE (on / is-scrolled)
    - on: hover일 때
    - is-scrolled: 스크롤 50 이상일 때
  ========================= */
#header.on .logo,
#header.is-scrolled .logo {
  background-image: url('../images/exiromed-Logo.svg');
}

#header.on .gnb ul>li>a,
#header.is-scrolled .gnb ul>li>a {
  color: #000;
}

/* =========================
    YOUR CUSTOM LIST (기존 유지)
  ========================= */
.depth .list_wrap {
  display: flex;
  justify-content: center;
  width: 700px;
}

.depth .list_wrap .left {
  width: 140px;
}

.depth .list_wrap .left .list {
  display: flex;
  flex-direction: column;
  width: 140px;
}

.depth .list_wrap .left .list a {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  height: 35px;
}

.depth .list_wrap .left .list a:hover {
  color: var(--brand) !important;
  font-weight: bold;
}

.depth .list_wrap .left .list ul {
  width: 100%;
}

.depth .list_wrap .left .list ul>li {
  width: 100%;
  height: 26px;
}

.depth .list_wrap .left .list ul>li>a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  font-size: 15px;
  color: #929292 !important;
}

.depth .list_wrap .left .list ul>li>a:hover {
  color: var(--brand) !important;
  font-weight: bold;
}

.depth .list_wrap .right {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  gap: 24px 0;
}

.depth .list_wrap .right .list {
  display: flex;
  flex-direction: column;
  width: 140px;
}

.depth .list_wrap .right .list a {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  height: 35px;
}

.depth .list_wrap .right .list a:hover {
  color: var(--brand) !important;
  font-weight: bold;
}

.depth .list_wrap .right .list ul {
  width: 100%;
}

.depth .list_wrap .right .list ul>li {
  width: 100%;
  height: 26px;
}

.depth .list_wrap .right .list ul>li>a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  font-size: 15px;
  color: #929292 !important;
  font-weight: 400;
}

.depth .list_wrap .right .list ul>li>a:hover {
  color: var(--brand) !important;
  font-weight: bold;
}


#header .header_right {
  position: absolute;
  right: 160px;
  top: 50px;
  display: flex;
  align-items: center;
  gap: 30px;
  z-index: 20;
}

.lang_switcher {
  display: flex;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang_switcher li a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

#header.on .lang_switcher li a,
#header.is-scrolled .lang_switcher li a {
  color: #000;
}

.lang_switcher li.current-lang a {
  color: var(--accent) !important;
}

.lang_switcher li a:hover {
  color: var(--accent) !important;
}

#header .btnMenu {
  display: none;
  width: 30px;
  height: 20px;
  background: url(../images/btn_m_menu_black.png) no-repeat center / contain;
  overflow: hidden;
  text-indent: -999px;
  transition: opacity 0.25s ease;
}

/* =========================
    MOBILE MENU (m_menu)
    - 기본: 오른쪽 밖(translateX(100%))
    - 열림: .m_menu.is-open  (translateX(0))
  ========================= */

/* 오버레이 메뉴(패널) */
.m_menu {
  display: block;
  z-index: 9999;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #FFF;

  transform: translateX(100%);
  transition: transform .35s ease .05s;

  /* ✅ 닫힘 상태 클릭 방지 + 접근성 느낌 */
  visibility: hidden;
  pointer-events: none;
}

/* ✅ 열림 상태 */
.m_menu.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

/* 헤더 */
.m_menu .m_menu_header {
  position: relative;
  height: 50px;
  border-bottom: 1px solid #E5E5E5;
  line-height: 50px;
}

/* HOME 버튼 */
.m_menu .m_menu_header .btn_home {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 24px;
  height: 24px;
  background: url('../images/icon_home.png') no-repeat center center / 24px;
  transform: translateY(-50%);
  overflow: hidden;
  text-indent: -999px;
}

/* CLOSE 버튼 */
.m_menu .m_menu_header .btn_close {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 24px;
  height: 24px;
  background: url('../images/icon_close_black.png') no-repeat center center / 24px;
  transform: translateY(-50%);
  overflow: hidden;
  text-indent: -999px;
  border: 0;
}

/* (선택) 언어 영역 */
.m_menu .m_menu_header .m_lang {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
}

.m_menu .m_menu_header .m_lang ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
}

.m_menu .m_menu_header .m_lang ul li a {
  font-size: 14px;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  font-family: 'MyriadPro', sans-serif;
}

.m_menu .m_menu_header .m_lang ul li.current-lang a {
  color: var(--accent);
}

/* 메뉴 스크롤 영역 */
.m_menu .m_gnb {
  height: calc(100% - 50px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 1차 메뉴 */
.m_menu .m_gnb>ul>li>a {
  position: relative;
  display: block;
  padding: 0 40px 0 15px;
  color: #000;
  font-size: 14px;
  line-height: 50px;
  font-weight: 500;
}

/* + 아이콘 */
.m_menu .m_gnb>ul>li>a:after {
  content: '';
  position: absolute;
  top: 50%;
  right: 15px;
  width: 20px;
  height: 20px;
  background: url('../images/icon_plus.png') no-repeat 0 0 / 100%;
  transform: translateY(-50%);
}

/* 열림 아이콘 */
.m_menu .m_gnb>ul>li>a.on:after {
  background-image: url('https://geneselabs.net/img/geneselabs/icon_arrowDown_black.png');
}

/* 구분선 */
.m_menu .m_gnb>ul>li+li {
  border-top: 1px solid #E5E5E5;
}

/* 2차 메뉴 */
.m_menu .m_gnb .sub_gnb {
  display: none;
  padding: 16px 24px;
  background: #F9F9F9;
  border-top: 1px solid #E5E5E5;
}

.m_menu .m_gnb .sub_gnb li+li {
  margin-top: 8px;
}

.m_menu .m_gnb .sub_gnb li a {
  display: inline-block;
  color: #000;
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
}

/* =========================
    RWD: mobile menu only show on ≤1024px
  ========================= */
@media (min-width: 1400px) {
  .m_menu {
    display: none;
  }
}


@media (max-width: 1400px) {

  :root {
    --header-h: 92px;
  }

  #header {
    padding: 8px 16px 0;
  }

  #header .header_right {
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
  }

  .lang_switcher {
    display: none;
    /* Hide on mobile header, show in mobile menu instead */
  }

  /* 데스크탑 메뉴 숨김 */
  #header .gnb {
    display: none;
  }

  /* 모바일 버튼 표시 */
  #header .btnMenu {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    right: 16px;
    width: 22px;
    height: 20px;

    /* ✅ 네가 넣어둔 이미지 유지 */
    background: url(../images/btn_m_menu.png) no-repeat center / contain;
    transition: opacity .25s ease;
  }

  #header.on .btnMenu {
    background: url(../images/btn_m_menu_black.png) no-repeat center / contain;
  }

  #header.is-scrolled .btnMenu {
    background: url(../images/btn_m_menu_black.png) no-repeat center / contain;
  }

  /* 로고 중앙 유지 */
  #header .logo {
    margin: 0 auto;
    width: 180px;
    height: 74px;
  }

  /* depth가 혹시 남아있어도 모바일에선 안 보이게(안전) */
  #header .gnb .depth {
    display: none !important;
  }
}




/* =========================
    RWD: ≤475px
    - 가장 작은 모바일
  ========================= */
@media (max-width: 475px) {

  :root {
    --header-h: 64px;
  }

  #header {
    padding: 8px 12px 0;
  }

  #header .logo {
    width: 155px;
    height: 46px;
  }

  #header .btnMenu {
    left: 12px;
    width: 20px;
    height: 18px;
  }
}