/* ============================================================
   새 상단 메뉴 — 공통 (iw-main-hero 1.50.0 · 1.51.0 간격·글자 크기·관리자 바·PC 미리보기)
   펼침 판 모양은 pN.css. 기존 GNB(iw-gnb.css, .iwg-*)와 클래스가 겹치지 않는다(.iwn-*).
   data-mode : solid | clear-light(사진 위 흰 글자) | clear-dark(밝은 바탕 위 진한 글자)
   .is-solid : 투명 모양이라도 마우스를 올리거나·펼치거나·내리면 흰색
   ============================================================ */
.iwn {
  --iwn-ac: var(--iw-brand, #1a5fb4);
  --iwn-ink: #14181f; --iwn-ink2: #4b525c; --iwn-line: #e7e9ec;
  --iwn-vw: 1vw;                        /* 편집기 PC 미리보기(.is-pcpv)는 16px = 1600 폭 기준으로 그린다 */
  --iwn-barh: var(--iwn-barh-pc, 90px); --iwn-logoh: var(--iwn-logoh-pc, 52px);
  --iwn-pad: clamp(20px, calc(3 * var(--iwn-vw)), 60px);
  /* 1차 메뉴 글자 사이 거리 — 1600 폭에서 '메뉴 간격' 값(기본 72), 넓으면 1.2배까지·좁으면 0.55배까지 */
  --iwn-gp: clamp(calc(var(--iwn-gapn, 72) * .55px), calc(var(--iwn-gapn, 72) * var(--iwn-vw) / 16), calc(var(--iwn-gapn, 72) * 1.2px));
  position: fixed; top: var(--iwn-abar, 0px); left: 0; right: 0; z-index: 9999;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif; word-break: keep-all;
  color: var(--iwn-ink); background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.07);
  transition: background .3s, box-shadow .3s, color .3s;
  -webkit-font-smoothing: antialiased;
}
.iwn *, .iwn *::before, .iwn *::after { box-sizing: border-box; }
.iwn ul { list-style: none; margin: 0; padding: 0; }
.iwn p { margin: 0; }
.iwn a { color: inherit; text-decoration: none; }
.iwn button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.iwn :focus-visible, .iwn-mo :focus-visible { outline: 2px solid var(--iwn-ac); outline-offset: 2px; }
.iwn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 투명 (메인 비주얼 위) */
.iwn[data-mode^="clear"]:not(.is-solid):not(:hover) { background: transparent; box-shadow: none; }
.iwn[data-mode="clear-light"]:not(.is-solid):not(:hover) { color: #fff; }
.iwn[data-mode="clear-light"]:not(.is-solid):not(:hover) .iwn-bar { text-shadow: 0 1px 12px rgba(0,0,0,.18); }

/* ---------- 바 ---------- */
.iwn-bar {
  position: relative; z-index: 3;
  height: var(--iwn-barh, 90px); max-width: 1800px; margin: 0 auto; padding: 0 var(--iwn-pad);
  display: flex; align-items: center; gap: clamp(20px, calc(2.5 * var(--iwn-vw)), 48px);
}
.iwn-logo { flex: none; display: flex; align-items: center; height: 100%; }
.iwn-logo img { display: block; height: var(--iwn-logoh, 52px); width: auto; max-width: 260px; object-fit: contain; }
.iwn-logo-tx { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.iwn-logo .iwn-logo-w { display: none; }
.iwn[data-mode="clear-light"]:not(.is-solid):not(:hover) .iwn-logo-w { display: block; }
.iwn[data-mode="clear-light"]:not(.is-solid):not(:hover) .iwn-logo-c { display: none; }

.iwn-nav { flex: 1 1 auto; height: 100%; display: flex; justify-content: center; min-width: 0; }
.iwn[data-align="right"] .iwn-nav { justify-content: flex-end; }
/* 간격은 1차 항목 양옆 여백으로 — 항목 사이에 마우스가 빠지는 틈이 없다. 넘치면 gnb2.js 가 --iwn-fit(간격)·--iwn-fitf(글자)를 줄인다 */
.iwn-menu { display: flex; height: 100%; }
.iwn-d1 { position: relative; height: 100%; display: flex; align-items: center; }
.iwn-d1a { position: relative; display: flex; align-items: center; height: 100%; padding: 0 calc(var(--iwn-gp) * var(--iwn-fit, 1) / 2);
  /* 글자 크기: 1600 폭 이상에서 설정값 그대로, 좁아지면 0.8배까지 */
  font-size: calc(clamp(calc(var(--iwn-top, 19px) * .8), calc(var(--iwn-topn, 19) * var(--iwn-vw) / 16), var(--iwn-top, 19px)) * var(--iwn-fitf, 1));
  font-weight: 700; letter-spacing: -.02em; white-space: nowrap; transition: color .2s; }
.iwn-d1a::after { content: ''; position: absolute; left: calc(var(--iwn-gp) * var(--iwn-fit, 1) / 2); right: calc(var(--iwn-gp) * var(--iwn-fit, 1) / 2); bottom: 0; height: 3px;
  background: var(--iwn-ac); transform: scaleX(0); transition: transform .3s cubic-bezier(.4,0,.2,1); }
.iwn.is-open .iwn-d1.is-act .iwn-d1a, .iwn-d1a:hover { color: var(--iwn-ac); }
.iwn.is-open .iwn-d1.is-act .iwn-d1a::after, .iwn-d1a:hover::after, .iwn-d1a:focus-visible::after { transform: scaleX(1); }
.iwn .iwn-d1a.is-cur, .iwn .iwn-d1a.is-anc { color: var(--iwn-ac); }
.iwn[data-mode="clear-light"]:not(.is-solid):not(:hover) .iwn-d1a.is-cur,
.iwn[data-mode="clear-light"]:not(.is-solid):not(:hover) .iwn-d1a.is-anc { color: inherit; }
.iwn-sub { display: none; }
.iwn-ext { font-size: .8em; margin-left: 3px; opacity: .7; }
.iwn-nomenu { font-size: 14px; opacity: .7; align-self: center; }

.iwn-util { flex: none; display: flex; align-items: center; gap: clamp(6px, calc(.8 * var(--iwn-vw)), 14px); margin-left: auto; }
.iwn[data-form="full"] .iwn-util { margin-left: auto; }
.iwn-member { display: flex; align-items: center; gap: 4px; margin-right: 6px; }
.iwn-member a { font-size: 14px; font-weight: 500; padding: 6px 8px; opacity: .85; }
.iwn-member a:hover { opacity: 1; color: var(--iwn-ac); }
.iwn-member a + a::before { content: ''; display: inline-block; width: 1px; height: 11px; background: currentColor; opacity: .35; margin: 0 10px 0 -8px; vertical-align: -1px; }
.iwn-ibtn, .iwn-all { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.iwn-ibtn:hover, .iwn-all:hover { color: var(--iwn-ac); }
.iwn-cta { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 999px;
  background: var(--iwn-ac); color: #fff !important; font-size: 15px; font-weight: 700; white-space: nowrap; transition: filter .2s, transform .2s; text-shadow: none; }
.iwn-cta svg { width: 16px; height: 16px; }
.iwn-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.iwn-burger { position: relative; width: 24px; height: 16px; display: block; }
.iwn-burger i { position: absolute; left: 0; height: 2px; width: 100%; background: currentColor; border-radius: 2px; transition: transform .3s, opacity .2s, width .3s; }
.iwn-burger i:nth-child(1) { top: 0; }
.iwn-burger i:nth-child(2) { top: 7px; width: 70%; left: 30%; }
.iwn-burger i:nth-child(3) { top: 14px; }
.iwn.is-all .iwn-burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.iwn.is-all .iwn-burger i:nth-child(2) { opacity: 0; }
.iwn.is-all .iwn-burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 펼침 판 (공통 틀) ---------- */
.iwn-drop {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 2;
  background: #fff; color: var(--iwn-ink); border-top: 1px solid var(--iwn-line);
  box-shadow: 0 24px 40px -24px rgba(16, 24, 40, .22);
  clip-path: inset(0 0 100% 0); opacity: 0; visibility: hidden;
  transition: clip-path .42s cubic-bezier(.4,0,.2,1), opacity .25s, visibility 0s linear .42s;
  text-shadow: none;
}
.iwn.is-open .iwn-drop, .iwn.is-all .iwn-drop {
  clip-path: inset(0 0 -100vh 0); opacity: 1; visibility: visible;
  transition: clip-path .42s cubic-bezier(.4,0,.2,1), opacity .2s, visibility 0s;
}
.iwn.is-all .iwn-drop { max-height: calc(100vh - var(--iwn-barh, 90px) - var(--iwn-abar, 0px)); overflow: auto; overscroll-behavior: contain; }
/* 전체 메뉴: 아래 페이지를 어둡게 (판(z2)·바(z3) 아래, 페이지 위) */
.iwn.is-all::after { content: ''; position: fixed; left: 0; right: 0; top: calc(var(--iwn-barh, 90px) + var(--iwn-abar, 0px)); bottom: 0; z-index: 1; background: rgba(12, 16, 24, .38); pointer-events: none; }
.iwn-drop-bg { display: none; }
.iwn-drop-x { display: none; position: absolute; top: 18px; right: var(--iwn-pad); width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center; z-index: 3; }
.iwn-drop-x:hover { color: var(--iwn-ac); }
/* 닫기는 전체 메뉴 버튼(✕로 바뀜)이 맡는다 */
.iwn-in { position: relative; max-width: 1400px; margin: 0 auto; padding: 44px var(--iwn-pad) 52px; }
.iwn-pnl a { transition: color .2s; }
.iwn-pnl a:hover, .iwn-pnl a:focus-visible, .iwn-pnl a.is-cur { color: var(--iwn-ac); }
.iwn-sec { display: none; }
.iwn-sec.is-act { display: block; }

/* ---------- 검색 ---------- */
.iwn-search { position: absolute; left: 0; right: 0; top: 100%; z-index: 4; background: #fff; color: var(--iwn-ink); border-top: 1px solid var(--iwn-line);
  box-shadow: 0 24px 40px -24px rgba(16, 24, 40, .22); padding: 34px var(--iwn-pad) 40px; text-shadow: none; }
.iwn-search[hidden] { display: none; }
.iwn-sform { position: relative; max-width: 820px; margin: 0 auto; display: flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--iwn-ink); }
.iwn-sform input { flex: 1; min-width: 0; border: 0; background: none; font: 600 clamp(18px, calc(1.6 * var(--iwn-vw, 1vw)), 24px) 'Pretendard', sans-serif; padding: 14px 4px; color: var(--iwn-ink); outline: none; }
.iwn .iwn-sform input:focus-visible { outline: none; }
.iwn-sform:focus-within { border-bottom-color: var(--iwn-ac); }
.iwn-sform input::placeholder { color: #a3a9b1; font-weight: 500; }
.iwn-sgo, .iwn-sx { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.iwn-sgo { color: var(--iwn-ac); }

.iwn-spacer { height: var(--iwn-hdr, 90px); }
/* 워드프레스 관리자 바(로그인 상태) — 메뉴를 그 아래로. 안 하면 메뉴 위가 바에 가리고, 메뉴와 비주얼 사이에 바 높이만큼 빈 띠가 생긴다 */
body.admin-bar { --iwn-abar: 32px; }
@media screen and (max-width: 782px) { body.admin-bar { --iwn-abar: 46px; } }

/* ---------- 모바일·태블릿: 오른쪽 패널 ---------- */
.iwn-mo { position: fixed; inset: 0; z-index: 10000; font-family: 'Pretendard', 'Noto Sans KR', sans-serif; word-break: keep-all; }
.iwn-mo[hidden] { display: none; }
.iwn-mo ul { list-style: none; margin: 0; padding: 0; }
.iwn-mo a { color: inherit; text-decoration: none; }
.iwn-mo button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.iwn-mo-dim { position: absolute; inset: 0; background: rgba(12, 16, 24, .45); opacity: 0; transition: opacity .3s; }
.iwn-mo-box { position: absolute; top: var(--iwn-abar, 0px); right: 0; bottom: 0; width: min(88vw, 420px); background: #fff; color: #14181f;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1); overflow: hidden; }
.iwn-mo.is-on .iwn-mo-dim { opacity: 1; }
.iwn-mo.is-on .iwn-mo-box { transform: none; }
.iwn-mo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; padding: 8px 12px 8px 20px; border-bottom: 1px solid #e7e9ec; }
.iwn-mo-head .iwn-member a { font-size: 14px; padding: 6px 8px; color: #4b525c; }
.iwn-mo-x { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.iwn-mo-nav { flex: 1; overflow: auto; overscroll-behavior: contain; }
.iwn-mo .iwn-mo-tg, .iwn-mo .iwn-mo-a { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; padding: 18px 22px; font-size: 18px; font-weight: 700; border-bottom: 1px solid #eef0f2; }
.iwn-mo-tg svg { transition: transform .25s; flex: none; color: #8a919a; }
.iwn-mo-tg[aria-expanded="true"] svg { transform: rotate(180deg); color: var(--iw-brand, #1a5fb4); }
.iwn-mo-tg[aria-expanded="true"] { color: var(--iw-brand, #1a5fb4); }
.iwn-mo-sub, .iwn-mo-sub3 { display: none; background: #f6f7f9; }
.iwn-mo-d1.is-open > .iwn-mo-sub, .iwn-mo-d2.is-open > .iwn-mo-sub3 { display: block; }
.iwn-mo .iwn-mo-sub > li > a, .iwn-mo .iwn-mo-d2 > .iwn-mo-tg { display: flex; padding: 13px 22px 13px 34px; font-size: 16px; font-weight: 500; color: #333a44; border-bottom: 1px solid #eceef1; }
.iwn-mo .iwn-mo-d2 > .iwn-mo-tg { font-weight: 600; justify-content: space-between; }
.iwn-mo-sub3 { background: #eef0f3; }
.iwn-mo .iwn-mo-sub3 a { display: block; padding: 11px 22px 11px 48px; font-size: 15px; color: #4b525c; border-bottom: 1px solid #e4e7eb; }
.iwn-mo-sub3 .iwn-mo-self { font-weight: 600; color: #333a44; }
.iwn-mo a.is-cur { color: var(--iw-brand, #1a5fb4); font-weight: 700; }
.iwn-mo-cta { padding: 18px 20px 24px; border-top: 1px solid #e7e9ec; }
.iwn-mo-cta .iwn-cta { display: flex; justify-content: center; height: 50px; border-radius: 12px; background: var(--iw-brand, #1a5fb4); color: #fff; font-weight: 700; align-items: center; gap: 8px; }
.iwn-mo-cta .iwn-cta svg { width: 16px; height: 16px; }
html.iwn-lock, html.iwn-lock body { overflow: hidden; }

@media (max-width: 1280px) {
  .iwn-util .iwn-member { display: none; }
}
@media (max-width: 1024px) {
  .iwn { --iwn-barh: var(--iwn-barh-mo, 66px); --iwn-logoh: var(--iwn-logoh-mo, 38px); }
  .iwn-nav, .iwn-drop, .iwn-util .iwn-cta, .iwn-util .iwn-member { display: none !important; }
  .iwn-logo-tx { font-size: 20px; }
  .iwn-spacer { height: var(--iwn-hdr-mo, 66px); }
  .iwn-search { padding: 18px 16px 22px; }
}
/* ---------- 편집기 PC 미리보기 (v1.51.0) ----------
   미리보기 칸이 1024px 이하여도 PC 배치·PC 글자(1600 폭 기준)로 그린다. gnb2.js 가 미리보기에서만 .is-pcpv 를 붙인다 */
.iwn.is-pcpv { --iwn-vw: 16px; }
@media (max-width: 1024px) {
  .iwn.is-pcpv { --iwn-barh: var(--iwn-barh-pc, 90px); --iwn-logoh: var(--iwn-logoh-pc, 52px); }
  .iwn.is-pcpv .iwn-nav { display: flex !important; }
  .iwn.is-pcpv .iwn-drop { display: block !important; }
  .iwn.is-pcpv .iwn-util .iwn-cta { display: inline-flex !important; }
  .iwn.is-pcpv .iwn-logo-tx { font-size: 24px; }
  .iwn.is-pcpv .iwn-search { padding: 34px var(--iwn-pad) 40px; }
  html.iwn-pcpv .iwn-spacer { height: var(--iwn-hdr, 90px); }
}
@media (prefers-reduced-motion: reduce) {
  .iwn, .iwn *, .iwn-mo * { transition: none !important; }
}
