/* =====================================
   ENSOL 새 상단 메뉴 전용 스타일
   ===================================== */

/* 메뉴 내부에만 기본 스타일 적용 */
#ensol-header,
#ensol-header *,
#ensol-header *::before,
#ensol-header *::after {
  box-sizing: border-box;
}

#ensol-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1100;

  width: 100%;
  height: 89px;
  margin: 0;
  padding: 0;

  background: rgba(255, 255, 255, 0.96);
  border: 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);

  font-family: "Pretendard", "Noto Sans KR", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #111;
  text-align: left;

  overflow: visible;

  /*
   * fixed 모바일 메뉴의 기준이 달라지지 않도록
   * 헤더 자체에는 backdrop-filter / transform을 적용하지 않습니다.
   */
  transform: none;
  filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 고정 헤더만큼 본문 공간 확보 */
.ensol-header-spacer {
  display: block;
  width: 100%;
  height: 89px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

#ensol-header ul,
#ensol-header li {
  margin: 0;
  padding: 0;
  list-style: none;
}

#ensol-header li {
  float: none;
  width: auto;
  height: auto;
}

#ensol-header a {
  color: inherit;
  text-decoration: none;
  letter-spacing: normal;
}

#ensol-header button {
  margin: 0;
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

#ensol-header a:focus-visible,
#ensol-header button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

/* =====================================
   로고 / 헤더 내부
   ===================================== */

#ensol-header .header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  max-width: 1200px;
  height: 88px;
  margin: 0 auto;
  padding: 14px 16px;

  float: none;
}

#ensol-header .logo {
  position: static;
  float: none;
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  line-height: 1;
}

#ensol-header .logo a {
  display: block;
}

#ensol-header .logo img {
  display: block;
  width: auto;
  height: 60px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: contain;
}

/* =====================================
   PC 메뉴
   ===================================== */

#ensol-header .desktop-nav {
  position: static;
  display: none;
  float: none;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  background: transparent;
}

#ensol-header .nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
}

#ensol-header .nav-item {
  position: relative;
}

#ensol-header .nav-item > a {
  display: inline-block;
  padding: 8px 0;

  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  color: #0f172a;

  transition: color 0.2s ease;
}

#ensol-header .nav-item > a:hover {
  color: #2563eb;
}

#ensol-header .lang-item > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 44px;
  height: 36px;
  padding: 0 12px;

  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
}

/* 2차 메뉴 */
#ensol-header .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;

  display: none;
  width: max-content;
  min-width: 200px;
  margin: 0;
  padding: 0;

  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
}

#ensol-header .dropdown-wide {
  min-width: 220px;
}

#ensol-header .dropdown li a {
  display: block;
  padding: 10px 16px;

  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
  color: #000;

  transition: background 0.2s ease, color 0.2s ease;
}

#ensol-header .dropdown li a:hover {
  background: #f8fafc;
  color: #2563eb;
}

/* 마우스 및 키보드 접근 */
#ensol-header .has-dropdown:hover > .dropdown,
#ensol-header .has-dropdown:focus-within > .dropdown {
  display: block;
}

/* 3차 메뉴 */
#ensol-header .has-child {
  position: relative;
}

#ensol-header .has-child > a {
  position: relative;
  padding-right: 28px;
}

#ensol-header .has-child > a::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);

  font-size: 16px;
  color: #94a3b8;
}

#ensol-header .child-dropdown {
  position: absolute;
  top: 0;
  left: calc(100% - 2px);
  z-index: 11;

  display: none;
  width: max-content;
  min-width: 200px;
  margin: 0;
  padding: 0;

  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0;
}

#ensol-header .child-dropdown li a {
  display: block;
  padding: 10px 16px;

  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
  color: #000;
}

#ensol-header .child-dropdown li a:hover {
  background: #f8fafc;
  color: #2563eb;
}

#ensol-header .has-child:hover > .child-dropdown,
#ensol-header .has-child:focus-within > .child-dropdown {
  display: block;
}

/* =====================================
   모바일 메뉴 열기 버튼
   ===================================== */

#ensol-header .menu-toggle {
  display: inline-flex;
  flex: 0 0 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;

  width: 44px;
  height: 44px;
  margin-left: 12px;
  padding: 0;

  border: 0;
  border-radius: 12px;
  background: #eff6ff;
}

#ensol-header .menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  background: #2563eb;
}

/* =====================================
   모바일 슬라이드 메뉴
   ===================================== */

#ensol-header .mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: auto;
  left: auto;
  z-index: 2;

  display: block;
  width: 88%;
  max-width: 360px;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;

  background: #fff;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.12);

  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  visibility: hidden;
  transform: translateX(100%);

  transition:
    transform 0.3s ease,
    visibility 0s linear 0.3s;
}

#ensol-header .mobile-menu.active {
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

#ensol-header .mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 18px 14px;
  border-bottom: 1px solid #e5e7eb;
}

#ensol-header .mobile-menu-header strong {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

#ensol-header .menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;
  padding: 0;

  border: 0;
  background: transparent;

  font-size: 30px;
  line-height: 1;
  color: #0f172a;
}

#ensol-header .mobile-nav-list {
  display: block;
  margin: 0;
  padding: 10px 16px 24px;
}

#ensol-header .mobile-accordion {
  display: block;
  padding: 0;
  border-bottom: 1px solid #999;
}

#ensol-header .mobile-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  padding: 14px 0;

  border: 0;
  border-radius: 0;
  background: transparent;

  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  color: #333;
}

#ensol-header .accordion-icon {
  font-size: 8px;
  color: #666;
  transition: transform 0.25s ease;
}

#ensol-header .mobile-accordion.active .accordion-icon {
  transform: rotate(180deg);
}

#ensol-header .mobile-submenu {
  display: none;
  padding: 0 0 14px;
}

#ensol-header .mobile-accordion.active .mobile-submenu {
  display: block;
}

#ensol-header .mobile-submenu ul {
  display: block;
  margin: 0;
  padding: 0 0 0 10px;
}

#ensol-header .mobile-submenu ul li a {
  display: block;
  padding: 6px 0;

  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: #444;
  overflow-wrap: anywhere;
}

#ensol-header .mobile-submenu ul ul {
  margin-top: 4px;
  padding-left: 14px;
}

#ensol-header .mobile-submenu ul ul li a {
  padding: 5px 0;
  font-size: 14px;
  color: #666;
}

#ensol-header .mobile-single-link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid #999;
}

#ensol-header .mobile-single-link > a {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

/* 모바일 메뉴 배경 */
#ensol-header .mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;

  display: block;
  background: rgba(15, 23, 42, 0.45);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#ensol-header .mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =====================================
   PC 전환 기준: 992px
   ===================================== */

@media (min-width: 992px) {
  #ensol-header .desktop-nav {
    display: block;
  }

  #ensol-header .menu-toggle,
  #ensol-header .mobile-menu,
  #ensol-header .mobile-menu-overlay {
    display: none;
  }
}

/* 움직임 최소화 설정 */
@media (prefers-reduced-motion: reduce) {
  #ensol-header .mobile-menu,
  #ensol-header .mobile-menu-overlay,
  #ensol-header .accordion-icon {
    transition: none;
  }
}