/* IW Main Hero - GNB header styles */

.iwg-header{
  position:fixed;top:0;left:0;right:0;z-index:9999;
  background:transparent;
  transition:background .3s ease, transform .35s ease, box-shadow .3s ease;
  transform:translateY(0);
}
/* 드롭다운 열릴 때 상단 가로 라인 (전체 폭) */
.iwg-header::before{
  content:'';position:absolute;left:0;right:0;top:90px;height:1px;
  background:#e8e8e8;opacity:0;transition:opacity .25s ease;pointer-events:none;
}
.iwg-header:hover::before{opacity:1;}
.iwg-header.iwg-hidden{transform:translateY(-110%);}
.iwg-header.iwg-scrolled,
.iwg-header:hover{background:#fff;box-shadow:0 1px 0 rgba(0,0,0,.06);}

.iwg-bar{
  max-width:1800px;margin:0 auto;padding:0 40px;
  display:flex;align-items:flex-start;gap:60px;
}

/* ----- 로고 (흰색/컬러 전환) ----- */
.iwg-logo{flex:none;height:90px;display:flex;align-items:center;text-decoration:none !important;}
.iwg-logo img{height:44px !important;width:auto !important;max-width:none !important;display:block;}
.iwg-logo-text{font-size:22px;font-weight:800;letter-spacing:1px;color:#fff;}
.iwg-logo .iwg-logo-color{display:none;}
.iwg-logo-text.iwg-logo-color{color:#4318b5;}
.iwg-header.iwg-scrolled .iwg-logo-white,
.iwg-header:hover .iwg-logo-white{display:none;}
.iwg-header.iwg-scrolled .iwg-logo-color,
.iwg-header:hover .iwg-logo-color{display:block;}

/* ----- 메뉴 ----- */
ul.iwg-menu{
  list-style:none;margin:0 0 0 auto;padding:0;
  display:flex;justify-content:center;
  transition:padding .35s ease;
}
.iwg-item{flex:none;width:clamp(120px, 9.4vw, 170px);text-align:center;margin:0;position:relative;}
/* 컬럼 사이 세로 구분선 — 가로 라인(90px) 아래부터 패널 끝까지 */
.iwg-item::before{
  content:'';position:absolute;left:0;top:90px;bottom:0;width:1px;
  background:#e8e8e8;opacity:0;transition:opacity .25s ease;pointer-events:none;
}
.iwg-item:first-child::before{display:none;}
/* 마지막 컬럼 오른쪽 라인 */
.iwg-item:last-child::after{
  content:'';position:absolute;right:0;top:90px;bottom:0;width:1px;
  background:#e8e8e8;opacity:0;transition:opacity .25s ease;pointer-events:none;
}
.iwg-header:hover .iwg-item::before,
.iwg-header:hover .iwg-item:last-child::after{opacity:1;}
.iwg-top{
  display:flex;align-items:center;justify-content:center;height:90px;
  color:#fff;font-size:clamp(15px, 1.05vw, 19px);font-weight:700;text-decoration:none !important;
  transition:color .2s;letter-spacing:-.2px;
}
.iwg-header.iwg-scrolled .iwg-top,
.iwg-header:hover .iwg-top{color:#111;}
.iwg-item:hover > .iwg-top{color:#333 !important;opacity:.75;}

/* ----- 전체 드롭다운 ----- */
ul.iwg-sub{
  list-style:none;margin:0;padding:0;
  max-height:0;overflow:hidden;
  transition:max-height .35s ease;
}
.iwg-header:hover ul.iwg-sub{max-height:460px;padding:14px 0 40px;}
ul.iwg-sub li{margin:0;}
ul.iwg-sub a{
  display:block;padding:11px 0;
  color:#444;font-size:clamp(13px, 0.85vw, 15px);font-weight:500;text-decoration:none !important;
  transition:color .2s;
}
ul.iwg-sub a:hover{color:#333;font-weight:600;}

/* 드롭다운 좌측 썸네일 — 각 1차 메뉴 호버 시 헤더 좌측에 표시 */
.iwg-sub-thumb{
  position:fixed;
  left:max(24px, calc((100vw - 1800px) / 2 + 24px));top:108px;
  width:clamp(140px, 13vw, 280px);height:clamp(94px, 8.7vw, 187px);
  border-radius:12px;
  background-size:cover;background-position:center;background-repeat:no-repeat;
  opacity:0;visibility:hidden;transform:translateY(8px);
  transition:opacity .3s ease, visibility .3s ease, transform .3s ease;
  pointer-events:none;z-index:9998;
  box-shadow:0 12px 30px rgba(0,0,0,.12);
}
.iwg-item.iwg-thumb-active .iwg-sub-thumb{opacity:1;visibility:visible;transform:translateY(0);}
.iwg-cta-thumb.iwg-thumb-active .iwg-sub-thumb{opacity:1;visibility:visible;transform:translateY(0);}
.iwg-cta-thumb{position:relative;}

/* 좁은 화면에선 썸네일이 메뉴 컬럼을 덮으므로 숨김 (1280px 이하) */
@media (max-width:1280px){
  .iwg-sub-thumb{display:none !important;}
}

/* ----- 모바일 ----- */
.iwg-burger{display:none !important;}

/* 메뉴 우측 CTA 버튼 */
.iwg-cta{
  flex:none;align-self:flex-start;
  height:90px;
  display:inline-flex;align-items:center;
  padding:0 0 0 14px;
  color:#fff;font-size:15px;font-weight:700;text-decoration:none !important;
  letter-spacing:-.2px;white-space:nowrap;
  transition:color .2s;
}
.iwg-cta-inner{
  display:inline-flex;align-items:center;
  height:40px;padding:0 22px;
  border:1.5px solid rgba(255,255,255,.7);border-radius:22px;
  transition:color .2s, border-color .2s, background .2s;
}
.iwg-cta:hover .iwg-cta-inner{background:#fff;color:#111;border-color:#fff;}
.iwg-header.iwg-scrolled .iwg-cta,
.iwg-header:hover .iwg-cta{color:#111;}
.iwg-header.iwg-scrolled .iwg-cta-inner,
.iwg-header:hover .iwg-cta-inner{border-color:#ccc;}
.iwg-header.iwg-scrolled .iwg-cta:hover .iwg-cta-inner,
.iwg-header:hover .iwg-cta:hover .iwg-cta-inner{background:#111;color:#fff;border-color:#111;}

/* ----- 한/영 전환 (맨 오른쪽) ----- */
.iwg-lang{
  flex:none;align-self:flex-start;
  height:90px;display:inline-flex;align-items:center;gap:4px;
  margin-left:28px;
}
.iwg-lang-link{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-width:36px;height:32px;padding:0 10px;
  font-size:16px;font-weight:700;letter-spacing:.02em;
  color:rgba(255,255,255,.7);text-decoration:none !important;
  border-radius:6px;transition:color .2s,background .2s,opacity .2s;
}
.iwg-lang-flag{
  width:24px !important;height:16px !important;display:block;
  object-fit:cover;border-radius:2px;flex:none;
}
.iwg-lang-link:hover{color:#fff;}
.iwg-lang-link.iwg-lang-on{color:#fff;}
.iwg-header.iwg-scrolled .iwg-lang-link,
.iwg-header:hover .iwg-lang-link{color:#999;}
.iwg-header.iwg-scrolled .iwg-lang-link:hover,
.iwg-header:hover .iwg-lang-link:hover,
.iwg-header.iwg-scrolled .iwg-lang-link.iwg-lang-on,
.iwg-header:hover .iwg-lang-link.iwg-lang-on{color:#111;}
@media (max-width:1024px){
  .iwg-header::before,
  .iwg-item::before,
  .iwg-item:last-child::after{display:none;}
  /* 모바일: 헤더 배경 항상 표시 (투명일 때 흰 로고·버거가 묻히는 문제 방지) */
  .iwg-header{background:#fff !important;box-shadow:0 1px 0 rgba(0,0,0,.06);}
  .iwg-header .iwg-logo-white{display:none;}
  .iwg-header .iwg-logo-color{display:block;}
  /* 모바일: 좌측 썸네일 이미지 노출 안 함 */
  .iwg-sub-thumb{display:none !important;}
  /* 모바일: 제품문의 CTA 버튼 숨김 */
  .iwg-cta,
  .iwg-cta-thumb{display:none !important;}
  /* 모바일: 언어 버튼 — 흰 헤더 배경이라 어두운 글자로 고정 */
  .iwg-lang{height:66px;margin-left:0;}
  .iwg-header .iwg-lang-link,
  .iwg-header:hover .iwg-lang-link,
  .iwg-header.iwg-scrolled .iwg-lang-link{color:#888 !important;}
  .iwg-header .iwg-lang-link.iwg-lang-on,
  .iwg-header:hover .iwg-lang-link.iwg-lang-on,
  .iwg-header.iwg-scrolled .iwg-lang-link.iwg-lang-on{color:#111 !important;}
  .iwg-bar{
    max-width:100%;width:100%;box-sizing:border-box;
    padding:0 20px;gap:20px;align-items:center;
    justify-content:space-between;overflow:visible;
  }
  .iwg-logo{flex:1 1 auto;min-width:0;}
  .iwg-logo{height:66px;}
  .iwg-logo img{height:34px !important;}
  .iwg-logo-text{font-size:18px;}
  ul.iwg-menu{
    display:none;
    position:absolute;top:66px;left:0;right:0;
    background:#fff;
    padding:10px 24px 24px;box-shadow:0 12px 24px rgba(0,0,0,.08);
    max-height:calc(100vh - 66px);overflow-y:auto;
    flex:none !important;justify-content:flex-start !important;
  }
  .iwg-header.iwg-mopen{background:#fff;}
  .iwg-header.iwg-mopen.iwg-hidden{transform:translateY(0) !important;}
  .iwg-header.iwg-mopen ul.iwg-menu{display:block !important;}
  .iwg-header.iwg-mopen .iwg-logo-white{display:none;}
  .iwg-header.iwg-mopen .iwg-logo-color{display:block;}
  .iwg-header .iwg-menu .iwg-item{
    display:block !important;width:100% !important;
    text-align:left;margin:0;position:relative;
  }
  .iwg-header .iwg-menu .iwg-item > .iwg-top{
    display:block !important;width:100% !important;height:auto !important;
    min-height:0;padding:14px 0;color:#111;line-height:1.4;
    font-size:18px;font-weight:700;text-align:left;
  }
  .iwg-header.iwg-mopen .iwg-top{color:#111;}
  .iwg-header .iwg-menu .iwg-sub,
  .iwg-header:hover .iwg-menu .iwg-sub{
    display:block !important;max-height:none;border-left:none;
    padding:0 0 8px 14px;overflow:visible;
  }
  ul.iwg-sub a{padding:8px 0;}
  .iwg-header .iwg-burger{
    display:flex !important;margin-left:auto;flex:0 0 auto;
    width:44px;height:44px;align-items:center;justify-content:center;
    background:none !important;border:0 !important;outline:none !important;
    box-shadow:none !important;cursor:pointer;position:relative;z-index:2;
    padding:0;-webkit-appearance:none;appearance:none;
  }
  .iwg-header .iwg-burger:hover,
  .iwg-header .iwg-burger:focus,
  .iwg-header .iwg-burger:active{
    background:none !important;border:0 !important;outline:none !important;box-shadow:none !important;
  }
  .iwg-burger span{position:relative;width:24px;height:2px;background:#111;transition:background .2s;}
  .iwg-burger span::before,.iwg-burger span::after{
    content:'';position:absolute;left:0;width:24px;height:2px;background:inherit;
  }
  .iwg-burger span::before{top:-8px;}
  .iwg-burger span::after{top:8px;}
  .iwg-header.iwg-scrolled .iwg-burger span,
  .iwg-header.iwg-mopen .iwg-burger span{background:#111;}
}
