.header {
  background: white;
  position: relative;
  z-index: 1000;
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6b7280;
  position: relative;
}

.left img {
  object-fit: contain;
  cursor: pointer;
}

.mega-top-nav {
  margin-left: auto;
}

.mega-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.mega-top-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  text-decoration: none;
  font-size: 20px;
  padding: 8px 6px;
  font-weight: 600;
  justify-content: center;
}

.mega-top-link:hover {
  color: #111827;
  text-decoration: none;
}

.mega-top-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.mega-panel-all {
  display: none;
  position: absolute;
  width: 700px;
  right: 0;
  left: auto;
  transform: none;
  top: 100%;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-top: -18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  padding: 18px 0;
  z-index: 2000;
}

.mega-panel-all .bi {
  font-size: 18px;
  color: #0479CD;
  justify-content: center;
}

.mega-panel-all .mega-list a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mega-panel-inner .mega-col:nth-child(1){
  flex: 0.6;
}

.mega-panel-inner .mega-col:nth-child(2){
  flex: 1;
}

.mega-panel-inner .mega-col:nth-child(3){
  flex: 1.4;
}

.mega-panel-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 30px;
}

.mega-col {
  flex: 1;
  min-width: 0;
}

.mega-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  color: #111827;
}

.mega-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0;

}

.mega-panel-all .mega-list {
  background-color: #f8fafc;
  border-radius: 5px;
  padding: 5px;
}

.mega-list.box {
  gap: 10px;
}

.mega-list li {
  min-height: 40px;
}

.mega-list a {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 40px;
  font-size: 16px;
  color: #111827;
  text-decoration: none;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  text-align: center;
  letter-spacing: -0.7px;
}

.mega-list a i {
  margin-left: 3px;
}

.mega-list a i::before {
  color: #1d4ed8;
}

.mega-list a:hover {
  background-color: #e5edff;
  color: #1d2d6e;
  font-weight: 600;
}

.mega-box {
  padding: 12px;
  background: #f5f6f9;
  border-radius: 5px;
}

.mega-box-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  color: #111;
  text-align: center;
}

.mega-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 28px;
  color: #111827;
  cursor: pointer;
  margin-left: auto;
}

.mega-top-item {
  position: relative;
  width: auto;
}

.mega-top-item .depth2 {
  display: none;
  position: absolute;
  width: 200px;
  background-color: #ffffff;
  padding: 10px;
  border: 1px solid #d6d6d6;
  border-radius: 5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  left: 50%;
  transform: translateX(-50%);
}

.mega-top-item:hover .depth2 {
  display: block;
}

.mega-top-item .depth2.lg {
  width: 250px;
}

.mega-top-item .depth3 {
  display: none;
  position: absolute;
  width: 200px;
  background-color: #ffffff;
  padding: 10px;
  border: 1px solid #d6d6d6;
  border-radius: 5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateX(-12.5%);
}

.mega-top-item:hover .depth3 {
  display: block;
}

.mega-top-item .depth3.lg {
  width: 250px;
  transform: translateX(-20%);
}

.header-util-wrap {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.header-util {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #495057;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s ease;
}

.header-util:hover {
  color: #007bff;
}

.header-util i {
  font-size: 16px;
}

/* 반응형 */
@media (max-width: 1280px) {
  .mega-top-list {
    gap: 5px;
  }

  .mega-top-link {
    font-size: 16px;
  }
}

@media (max-width: 992px) {
  .header-inner {
    padding: 10px 14px;
    position: relative;
  }

  .mega-top-nav {
    display: none !important;
  }

  .mega-toggle {
    display: block;
    margin-left: auto;
  }

  .mega-panel-all {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    width: 100%;
    margin-top: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    padding: 12px 0;
    display: none;
    z-index: 2000;
    text-align: center;
  }

  .mega-panel-all.is-open {
    display: block;
  }

  .mega-panel-inner {
    flex-direction: column;
    gap: 14px;
    padding: 0 14px;
    text-align: left;
  }

  .mega-col { flex: none; }
  .mega-panel-inner .mega-col:nth-child(1),
  .mega-panel-inner .mega-col:nth-child(2),
  .mega-panel-inner .mega-col:nth-child(3) {
    flex: none;
  }

  .mega-list a {
    justify-content: flex-start;
    padding: 0 16px;
  }

  .mega-box-title {
    text-align: left;
  }

  .header-util-wrap {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .lang-switch {
    right: 60px;
  }
  .sitemap {
    right: 120px;
  }
}
