/* =====================================================
   HEADER — fixed wrapper
   ===================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: background 0.3s, box-shadow 0.3s;
}

/* =====================================================
   GNB FRAME
   ===================================================== */
.frame {
  display: flex;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 4px 40px;
  position: relative;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.frame .layer {
  width: 190px;
  height: 34px;
  display: block;
  object-fit: contain;
}

.frame .layer.logo-img--w { display: block; }
.frame .layer.logo-img--b { display: none; }

.frame .div {
  display: inline-flex;
  height: 60px;
  gap: 32px;
  padding: 0 50px;
  flex: 0 0 auto;
  border-radius: 60px;
  align-items: center;
  position: relative;
  list-style: none;
}

.frame .div-wrapper {
  display: inline-flex;
  justify-content: center;
  padding: 0 20px;
  align-self: stretch;
  flex: 0 0 auto;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.frame .text-wrapper {
  position: relative;
  width: fit-content;
  font-family: "Pretendard-SemiBold", "Pretendard", "Apple SD Gothic Neo", Helvetica, sans-serif;
  font-weight: 600;
  color: #ffffff;
  font-size: 16px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
  transition: color 0.2s;
  text-decoration: none;
  display: block;
}

.frame .div-wrapper:hover .text-wrapper,
.frame .div-wrapper-2:hover .text-wrapper,
.frame .div-wrapper.is-active .text-wrapper,
.frame .div-wrapper-2.is-active .text-wrapper {
  color: #e30f1c !important;
  opacity: 1;
}


.frame .div-wrapper-2 {
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  align-self: stretch;
  flex: 0 0 auto;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.frame .div-2 {
  display: inline-flex;
  gap: 12px;
  flex: 0 0 auto;
  align-items: center;
  position: relative;
}

.frame .div-wrapper-3 {
  display: inline-flex;
  justify-content: center;
  height: 40px;
  padding: 0 24px;
  flex: 0 0 auto;
  background-color: #e32d21;
  border-radius: 78px;
  overflow: hidden;
  align-items: center;
  position: relative;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.frame .div-wrapper-3:hover {
  background-color: #ffffff;
}

.frame .div-wrapper-3:hover .text-wrapper-2 {
  color: #e32d21;
}

.header--light .frame .div-wrapper-3:hover {
  background-color: #000000;
}

.header--light .frame .div-wrapper-3:hover .text-wrapper-2 {
  color: #ffffff;
}

.frame .text-wrapper-2 {
  position: relative;
  width: fit-content;
  margin-top: -1px;
  font-family: "Pretendard-SemiBold", "Pretendard", "Apple SD Gothic Neo", Helvetica, sans-serif;
  font-weight: 600;
  color: #ffffff;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 24px;
  white-space: nowrap;
  transition: color 0.2s;
}

.frame .div-3 {
  display: flex;
  width: 120px;
  height: 40px;
  justify-content: center;
  padding: 0 24px;
  background-color: #ffffff;
  border-radius: 78px;
  align-items: center;
  cursor: default;
  gap: 8px;
}

.frame .text-wrapper-3 {
  position: relative;
  width: fit-content;
  font-family: "Pretendard-SemiBold", "Pretendard", "Apple SD Gothic Neo", Helvetica, sans-serif;
  font-weight: 600;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
}

.frame .gridicons-dropdown {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  flex-shrink: 0;
}

.frame .vector {
  display: block;
  width: 10px;
  height: 10px;
  object-fit: contain;
}

/* =====================================================
   LIGHT HEADER OVERRIDES
   ===================================================== */
.header--light {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.header--light .frame .layer.logo-img--w { display: none; }
.header--light .frame .layer.logo-img--b { display: block; }

.header--light .frame .text-wrapper {
  color: #000000;
}

.header--light .frame .div-3 {
  border: 1.5px solid #000000;
}

/* Red section overrides */
.header--red .frame .div-wrapper:hover .text-wrapper,
.header--red .frame .div-wrapper-2:hover .text-wrapper {
  color: #000000 !important;
}

/* =====================================================
   GNB MEGA MENU
   ===================================================== */
.gnb-mega {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
  z-index: 98;
  animation: gnbFadeIn 0.18s ease;
}

@keyframes gnbFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gnb-mega.is-open { display: block; }

.gnb-mega-inner {
  position: relative;
  width: 100%;
}

.gnb-mega-col {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 120px;
  text-align: center;
}

.gnb-mega-cat {
  font-family: "Pretendard-Bold", "Pretendard", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #111111;
  margin: 0 0 4px;
  letter-spacing: 0.01em;
}

.gnb-mega-sub {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gnb-mega-sub li a {
  font-family: "Pretendard", sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.45);
  text-decoration: none;
  transition: color 0.2s;
}

.gnb-mega-sub li a:hover,
.gnb-mega-sub li a.is-active { color: #e30f1c; }

/* 헤더 메가 오픈 시 즉시 흰색 */
.header.mega-open {
  transition: none !important;
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

.header.mega-open .text-wrapper { color: #000000 !important; }
.header.mega-open .div-wrapper:hover .text-wrapper,
.header.mega-open .div-wrapper-2:hover .text-wrapper { color: #e30f1c !important; }
.header--light .frame .div-wrapper:hover .text-wrapper,
.header--light .frame .div-wrapper-2:hover .text-wrapper { color: #e30f1c !important; }
.header.mega-open .logo-img--w { display: none !important; }
.header.mega-open .logo-img--b { display: block !important; }

/* =====================================================
   HAMBURGER TOGGLE
   ===================================================== */
.gnb-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #ffffff;
  flex-shrink: 0;
}

.header--light .gnb-toggle,
.header.mega-open .gnb-toggle { color: #000000; }

.gnb-toggle-bar {
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, width 0.25s ease;
}

.gnb-toggle.is-open {
  position: fixed;
  top: 6px;
  right: 14px;
  z-index: 9200;
  color: #ffffff !important;
}
.gnb-toggle.is-open .gnb-toggle-bar:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.gnb-toggle.is-open .gnb-toggle-bar:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* =====================================================
   MOBILE DRAWER
   ===================================================== */
.gnb-drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: #ffffff;
  z-index: 9100;
  overflow-y: auto;
  transform: translateX(100%);
  transition: none;
}

.gnb-drawer.is-open {
  transform: translateX(0);
}

/* ── Drawer Header ── */
.gnb-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #FA1B48 0%, #2D74FF 100%);
}

.gnb-drawer-sitemap {
  font-family: "Pretendard-Bold", "Pretendard", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.08em;
}

.gnb-drawer-langs {
  display: flex;
  align-items: center;
  gap: 2px;
}

.gnb-drawer-lang {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-family: "Pretendard-SemiBold", "Pretendard", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
  padding: 2px 5px;
  transition: color 0.15s;
}

.gnb-drawer-lang--active { color: #ffffff; }

.gnb-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: -6px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  font-size: 0;
  flex-shrink: 0;
}

.gnb-drawer-close::before,
.gnb-drawer-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

.gnb-drawer-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.gnb-drawer-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* ── Drawer Items ── */
.gnb-drawer-item {
  position: relative;
}

.gnb-drawer-item::after {
  content: '';
  display: block;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 0 20px;
}

.gnb-drawer-row {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 56px;
  position: relative;
}

.gnb-drawer-main {
  flex: 1;
  text-align: center;
  font-family: "Pretendard-SemiBold", "Pretendard", sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: #111111;
  text-decoration: none;
  transition: color 0.15s;
}

.gnb-drawer-main:hover { color: #e30f1c; }

.gnb-drawer-item--solo .gnb-drawer-main {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 20px;
}

.gnb-drawer-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: #555555;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
  position: absolute;
  right: 20px;
}

.gnb-drawer-toggle svg { display: none; }
.gnb-drawer-toggle::after { content: '+'; }
.gnb-drawer-item.is-open .gnb-drawer-toggle::after { content: '−'; color: #e30f1c; }

/* ── Sub Menu ── */
.gnb-drawer-sub {
  visibility: hidden;
  list-style: none;
  padding: 0;
  margin: 0;
  background: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.gnb-drawer-item.is-open .gnb-drawer-sub { max-height: 400px; visibility: visible; }

.gnb-drawer-sub li a {
  display: block;
  padding: 13px 20px;
  font-family: "Pretendard", sans-serif;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.65);
  text-decoration: none;
  text-align: center;
  transition: color 0.15s;
}

.gnb-drawer-sub li a:hover,
.gnb-drawer-sub li a.is-active { color: #e30f1c; }

/* ── Drawer Footer ── */
.gnb-drawer-foot {
  margin-top: auto;
  padding: 24px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.gnb-drawer-cta {
  display: block;
  text-align: center;
  padding: 14px 20px;
  background: #e32d21;
  color: #ffffff;
  font-family: "Pretendard-SemiBold", "Pretendard", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 78px;
  transition: background 0.2s;
}

.gnb-drawer-cta:hover { background: #c41e15; }

/* ── Overlay ── */
.gnb-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 9099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.gnb-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* =====================================================
   TABLET & MOBILE (≤1024px)
   ===================================================== */
@media (max-width: 1024px) {
  .frame .div     { display: none; }
  .frame .div-2   { display: none; }
  .gnb-toggle     { display: flex !important; }
  .gnb-mega       { display: none !important; }
  .frame          { padding: 4px 20px; }

  /* 모바일/태블릿: JS 클래스 변경 여부와 무관하게 헤더 항상 흰색 */
  .header {
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08) !important;
  }
  .header .logo-img--w { display: none !important; }
  .header .logo-img--b { display: block !important; }
  .header .gnb-toggle  { color: #000000 !important; }
  .header .gnb-toggle .gnb-toggle-bar { background: #000000 !important; }
  .header .text-wrapper { color: #000000 !important; }
}

@media (max-width: 767px) {
  .frame { height: 60px; padding: 0 20px; }
  .gnb-toggle { margin-right: -6px; }
}
