.header {position: fixed; top: 0; left: 0; right: 0; z-index: 1000; width: 100%; background: var(--color-white);}

.header:has(.header__item:hover) {box-shadow: 0 12px 32px rgba(36, 36, 36, 0.06);}

.header__bar {height: var(--header-height);}

.header__inner {display: flex; align-items: center; justify-content: space-between; height: 100%; position: relative;}

.header__logo {position: relative; z-index: 2;}

.header__logo img {width: 117px; height: 56px;}

.header__gnb {position: absolute; left: 0; right: 0; top: 0; height: 100%; display: flex; justify-content: center;}

ul.header__menu,
ul.header__mega-list {margin: 0; padding: 0; list-style: none;}

.header__menu {display: flex; align-items: center; justify-content: center; gap: 64px; height: 100%;}

.header__item {height: 100%; display: flex; align-items: center;}

.header__link {position: relative; display: flex; align-items: center; height: 100%; font-size: 20px; font-weight: 600; line-height: 26px; letter-spacing: -0.4px; color: var(--color-heading); white-space: nowrap;}

.header__link::after {content: ""; position: absolute; left: 0; right: 0; bottom: 28px; height: 2px; background: var(--color-main); transform: scaleX(0); transform-origin: center; transition: transform 0.25s ease;}

.header__item:hover .header__link,
.header__item.is-active .header__link {color: var(--color-main);}

.header__item:hover .header__link::after,
.header__item.is-active .header__link::after {transform: scaleX(1);}

.header__mega {position: fixed; left: 0; top: var(--header-height); width: 100vw; padding: 40px 0 48px; background: var(--color-white); border-top: 1px solid #f0f0f0; box-shadow: 0 24px 48px rgba(36, 36, 36, 0.08); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s ease, visibility 0.25s ease;}

.header__item:hover .header__mega {opacity: 1; visibility: visible; pointer-events: auto;}

@media (min-width: 1101px) {
  .header.is-mega-hold .header__mega {opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; transition: none !important;}
}

.header__mega-cards {display: flex; flex-wrap: wrap; gap: 16px;}

.header__mega-card {flex: 1 1 200px; min-width: 200px; max-width: 280px; padding: 28px 24px; background: #f5f5f5; border-radius: 16px; transition: background-color 0.25s ease;}

a.header__mega-card {display: block; color: inherit; text-decoration: none;}

.header__mega-card:hover {background: #efefef;}

.header__mega-title {display: block; font-size: 17px; font-weight: 700; line-height: 26px; letter-spacing: -0.34px; color: var(--color-heading); white-space: normal; word-break: keep-all; overflow: visible; height: auto;}

.header__mega-card:hover .header__mega-title {color: var(--color-main);}

.header__mega-list {display: flex; flex-direction: column; gap: 8px; margin-top: 16px;}

.header__mega-list a {font-size: 15px; font-weight: 400; line-height: 24px; letter-spacing: -0.3px; color: var(--color-body);}

.header__mega-list a:hover {color: var(--color-main);}

.header__utils {position: relative; z-index: 2;}

.header__burger {display: none; width: 30px; height: 30px; flex-direction: column; justify-content: center; gap: 6px;}

.header__burger span {display: block; height: 2px; background: var(--color-heading);}

@media (max-width: 1400px) {
  .header__menu {gap: 32px;}

  .header__link {font-size: 17px;}
}

@media (max-width: 1100px) {
  .header:has(.header__item:hover) {box-shadow: none;}

  .header__gnb {display: none; position: fixed; left: 0; right: 0; top: var(--header-height); bottom: auto; width: 100%; height: auto; max-height: calc(100dvh - var(--header-height)); padding: 8px 20px 40px; overflow-y: auto; overscroll-behavior: contain; transform: none; background: var(--color-white); border-top: 1px solid var(--color-border); box-shadow: 0 12px 24px rgba(36, 36, 36, 0.08);}

  .header.is-open .header__gnb {display: block;}

  html:has(.header.is-open),
  html:has(.header.is-open) body {overflow: hidden;}

  .header__menu {flex-direction: column; align-items: stretch; gap: 0; height: auto;}

  .header__item {height: auto; flex-direction: column; align-items: stretch; border-bottom: 1px solid #f0f0f0;}

  .header__item:last-child {border-bottom: 0;}

  .header__link {height: auto; padding: 14px 0;}

  .header__link::after {display: none;}

  .header__mega {position: static; width: auto; opacity: 1; visibility: visible; pointer-events: auto; padding: 0 0 16px; border: 0; box-shadow: none; transition: none;}

  .header__mega-inner.inner {max-width: none; padding: 0;}

  .header__mega-cards {gap: 8px;}

  .header__mega-card {flex: 1 1 100%; min-width: 0; max-width: none; padding: 16px 18px; border-radius: 12px;}

  .header__burger {display: flex;}
}

@media (max-width: 767px) {
  .header__logo img {width: 80px; height: 38px;}

  .header__burger {width: 24px; height: 24px; gap: 5px;}

  .header__gnb {padding: 4px 16px 32px;}

  .header__link {padding: 12px 0; font-size: 16px; line-height: 22px; letter-spacing: -0.32px;}

  .header__mega {padding: 0 0 12px;}

  .header__mega-cards {gap: 6px;}

  .header__mega-card {padding: 14px 16px; border-radius: 10px;}

  .header__mega-title {font-size: 15px; line-height: 22px; letter-spacing: -0.3px; }

  .header__mega-list {gap: 6px; margin-top: 10px !important;}

  .header__mega-list a {font-size: 14px; line-height: 20px;}
}
