@charset "utf-8";

/* =========================================================================
   홈페이지 공용 헤더 (리뉴얼 디자인) — views/main/header.php, views/main/mobile/header.php
   홈은 투명 헤더(스크롤하면 흰색, home-renewal.js), 다른 화면은 흰 헤더(.hm-header--solid).
   다른 화면의 높이는 기존 헤더와 같게 둔다 (PC 90px · 모바일 64px — 본문 여백이 거기에 맞춰져 있음).
   ========================================================================= */

.hm-header {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.5;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 메뉴 밑줄 (헤더 맨 아래에 붙는다) ---------- */
.hm-header [data-navlink] {
  position: relative;
}

/* 밑줄은 transform 대신 background-size 로 늘린다 — transform 애니메이션은 크롬(윈도우)이 메뉴 글자를
   다른 층으로 떼어 그리면서 글자가 순간 얇아 보이게 만든다 */
.hm-header [data-navlink]::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0;
  height: 3px;
  background: linear-gradient(var(--hm-nav-accent, #ff4500), var(--hm-nav-accent, #ff4500)) left center / 0 100% no-repeat;
  transition: background-size .28s cubic-bezier(.2, .65, .25, 1);
}

/* 부가서비스 밑줄은 드롭다운 상자 위에 그린다 */
.hm-header .hm-nav-sub [data-navlink]::after {
  z-index: 201;
}

/* 아카데미는 남색 (가이드 Secondary-50) — 글자·밑줄 모두 */
.hm-header .hm-nav-academy {
  --hm-nav-accent: #003675;
}

/* 지금 보고 있는 화면(.is-on), 부가서비스는 드롭다운으로 마우스를 옮겨도 밑줄·색 유지 */
.hm-header [data-navlink]:hover,
.hm-header [data-navlink].is-on,
.hm-header .hm-nav-sub:hover [data-navlink] {
  color: var(--hm-nav-accent, #ff4500) !important;
}

/* 지금 보고 있는 화면은 글자도 한 단계 굵게 (500 → 700) — 부가서비스 드롭다운 항목은 굵기 그대로 (바탕·주황 글자로만 표시) */
.hm-header [data-navlink].is-on,
.hm-header [data-menu] a.is-on {
  font-weight: 700 !important;
}

.hm-header [data-navlink]:hover::after,
.hm-header [data-navlink].is-on::after,
.hm-header .hm-nav-sub:hover [data-navlink]::after {
  background-size: 100% 100%;
}

/* 드롭다운 폭 = 부가서비스 밑줄 폭 (밑줄과 같은 left/right -2px) */
/* 상자는 리뉴얼 선택박스처럼 회색 선 + 아래 모서리 둥글게. 윗부분은 주황 밑줄(3px) 뒤로 밀어 넣어
   밑줄에 딱 붙고 위쪽 회색 선은 보이지 않는다 (밑줄이 상자 위에 그려지도록 아래 ::after z-index) */
.hm-nav-sub__menu {
  position: absolute;
  top: calc(100% - 3px);
  left: -2px;
  right: -2px;
  padding: 9px 6px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .18);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.hm-nav-sub:hover .hm-nav-sub__menu {
  opacity: 1;
  pointer-events: auto;
}

/* 항목은 리뉴얼 선택박스(assets/renewal/css/forms.css .rn-select-menu__option)와 같은 모양 —
   마우스를 올리면 연주황(Primary-5) 네모 바탕에 글자는 검정 그대로, 지금 보는 화면은 바탕 + 주황 글자 */
.hm-nav-sub__menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #1d1d1d !important;
  text-align: center;
  white-space: nowrap;
  transition: background .15s ease;
}

.hm-nav-sub__menu a:hover {
  background: #fff4f0;
}

.hm-nav-sub__menu a.is-on {
  background: #fff4f0;
  color: #ff4500 !important;
}

/* ---------- 햄버거 메뉴 (모바일 시안 헤더) ---------- */
.hm-header [data-burger] span {
  transition: background .2s ease;
}

.hm-header [data-burger]:hover span {
  background: #1d1d1d !important;
}

.hm-menu {
  position: absolute;
  top: 100%;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .5);
  transform-origin: top center;
  transform: translateY(-6px) scaleY(.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .28s cubic-bezier(.2, .8, .22, 1);
}

.hm-menu.is-open {
  transform: translateY(8px) scaleY(1);
  opacity: 1;
  pointer-events: auto;
}

.hm-header [data-menu] a,
.hm-header [data-menu] a:hover {
  color: #1d1d1d;
}

.hm-header [data-menu] a.is-on {
  color: #ff4500 !important;
}

.hm-header [data-menu] a.hm-nav-academy.is-on {
  color: #003675 !important;
}

.hm-header [data-menu] .login_popup,
.hm-header [data-menu] .login_popup:hover {
  color: #fff;
}

/* 메뉴가 열려 있는 동안은 퀵메뉴(z-index 9990)보다 위에 */
.hm-header.is-menu-open {
  z-index: 9995 !important;
}

/* ---------- 모바일 헤더 (홈·다른 화면 모두 64px) ---------- */
.hm-header--mobile {
  height: 64px;
  padding: 0 18px !important;
  box-sizing: border-box;
}

.hm-header--mobile.hm-header--solid {
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- PC 헤더: 메뉴가 한 줄에 안 들어가는 좁은 창(900px 이하)에서는 햄버거 메뉴 ---------- */
.hm-header:not(.hm-header--mobile) .hm-burger,
.hm-header:not(.hm-header--mobile) .hm-menu {
  display: none !important;
}

@media (max-width: 900px) {
  .hm-header:not(.hm-header--mobile) {
    align-items: center !important;
    padding: 0 18px !important;
  }

  .hm-header .hm-nav-desk,
  .hm-header .hm-nav-login {
    display: none !important;
  }

  .hm-header:not(.hm-header--mobile) .hm-burger,
  .hm-header:not(.hm-header--mobile) .hm-menu {
    display: flex !important;
  }
}
