.mainHeader {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 10;
  background-color: transparent;
  transition: background-color 0.2s ease, border-bottom 0.2s ease, min-height 0.2s ease;
  padding-bottom: 15px;
  height: auto;
  min-height: 93px;
}

header.hovered {
  background-color: #fff;
  border-bottom: 1px solid #e2e8f0;
}

header.expanded { min-height: 85px; }

.header-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 36px 24px 16px;
  z-index: 1000;
}

.header-top {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
  margin-bottom: 0;
}

.logo {
  position: absolute;
  left: 24px;
  height: 42px;
  top: 28px;
}

.nav-menu {
  display: flex;
  gap: 74px;
  font-family:"Noto Sans KR",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.nav-menu a {
  text-decoration: none;
  color: #fff;
  position: relative;
  transition: color 0.3s;
}
header.hovered .nav-menu a { color: #1f2937; }

.nav-menu .menu-item.active a {
  color: #2d42d0;
  border-bottom: 2px solid #2d42d0;
  padding-bottom: 4px;
}

.top-links {
  position: absolute;
  top: 32px;
  right: 24px;
  font-family:"Noto Sans KR",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  font-size: 12px;
  display: flex;
  gap: 40px;
  color: #fff;
  z-index: 1001;
  transition: color 0.3s;
}
header.hovered .top-links { color: #6b7280; }

.top-links a { text-decoration: none; color: inherit; }
.top-links a:hover { color: #2d42d0; }

/* ===== Submenu ===== */
.submenu-container {
  display: none;
  width: 100%;
  padding: 13px 0 0;
  margin-top: 13px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}
.submenu-container.active {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 1;
  transform: translateY(0);
}

.submenu-items {
  display: flex;
  flex-direction: row;
  gap: 100px;
  min-height: 12px;
  align-items: flex-start;
}
.submenu-items a {
  text-decoration: none;
  color: #1f2937;
  font-size: 18px;
  font-family:"Noto Sans KR",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  font-weight: 500;
  padding: 6px 10px 0;
}
.submenu-items a:hover { color: #2d42d0; }

.menu-item { position: relative; }

.top-links svg path {
  fill: #fff;
  transition: fill 0.3s;
}
header.hovered .top-links svg path { fill: #1f2937; }
.top-links a:hover svg path { fill: #2d42d0; }

/* ===== Sitemap overlay ===== */
.sitemap-overlay {
  position: fixed;
  top: -100vh;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #ffffff;
  z-index: 9999;
  transition: top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}
.sitemap-overlay.active { top: 0; }

.sitemap-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 50px 60px 30px;
  color: #1f2937;
  height: 90vh;
  display: flex;
  flex-direction: column;
}

.sitemap-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
}

.sitemap-title {
  font-family:"Noto Sans KR",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  font-size: 44px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #1f2937;
  letter-spacing: -0.02em;
}

.sitemap-close {
  position: absolute;
  top: 40px;
  right: 40px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 28px;
  cursor: pointer;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.sitemap-close:hover {
  background: #000000;
  border-color: #000000;
  color: #fff;
  transform: scale(1.05);
}

.sitemap-grid {
  display: flex;
  flex-direction: row;
  gap: 35px;
  flex: 1;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
  overflow: visible;
}

.sitemap-section {
  background: #f8fafc;
  border-radius: 18px;
  padding: 20px;
  transition: all 0.3s ease;
  width: 240px;
  flex-shrink: 0;
}
.sitemap-section:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.sitemap-section h3 {
  font-family:"Noto Sans KR",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  color: #1e293b;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  text-align: center;
}
.sitemap-links { list-style: none; padding: 0; margin: 0; }
.sitemap-links a {
  color: #475569;
  text-decoration: none;
  font-family:"Noto Sans KR",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  font-size: 17px;
  transition: all 0.3s ease;
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 400;
  text-align: center;
}
.sitemap-links a:hover {
  color: #3b82f6;
  background: #eff6ff;
  transform: translateX(4px);
  font-family:"Noto Sans KR",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  font-weight: 500;
}

/* ===== Hamburger (uses currentColor for line color) ===== */
.hamburger{
  display: none; /* desktop hidden */
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  position: absolute;
  right: 24px;
  top: 34px;
  z-index: 1100;

  /* line color follows currentColor */
  color: #fff; /* desktop default: white lines */
}
.hamburger span{
  display: block;
  height: 3px;
  background-color: currentColor; /* key point */
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* desktop hover/expanded: dark lines */
header.hovered .hamburger,
.hamburger.active{
  color: #1f2937;
}

/* ===== Mobile nav panel ===== */
.mobile-nav{
  display: none;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  z-index: 999;
  padding: 20px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.mobile-nav a{
  color: #1f2937;
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
  padding: 12px;
  width: 100%;
  text-align: center;
  transition: background-color 0.2s;
}
.mobile-nav a:hover{ background-color: #000000; color:#fff; }
.mobile-nav.active{ display: flex; }

/* ===== Tablet & Mobile (≤1024px) ===== */
@media (max-width: 1024px) {
  :root{
    --icon-size: 24px;   /* both icons height */
    --icon-top: 18px;    /* vertical alignment top */
    --icon-right: 16px;  /* right padding */
    --icons-gap: 12px;   /* gap between icons */
  }

  /* stick header to top on mobile */
  .mainHeader{
    position: fixed;
    top: 0; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    min-height: 64px;
    padding-bottom: 0;
  }
  .header-wrapper{ padding: 12px 16px; }

  /* push body so content isn't under header */
  body{ padding-top: 72px; }

  /* only hamburger + location icon remain */
  .logo{ display: none !important; }
  .nav-menu{ display: none !important; }
  .submenu-container{ display: none !important; }

  .hamburger,
  .top-links{
    position: absolute;
    top: var(--icon-top);
    height: var(--icon-size);
  }

  /* hamburger on the far right */
  .hamburger{
    right: var(--icon-right);
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--icon-size);
    color: #111 !important;     /* always black on mobile */
  }
  .hamburger span{
    height: 2px;                /* a bit thinner on mobile */
  }

  /* location icon to the left of hamburger */
  .top-links{
    right: calc(var(--icon-right) + var(--icon-size) + var(--icons-gap));
    display: flex;
    align-items: center;
    gap: var(--icons-gap);
    color: #111 !important;
  }
  /* hide sitemap icon on mobile */
  .top-links #sitemapToggle{ display: none !important; }

  .top-links a{
    width: var(--icon-size);
    height: var(--icon-size);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111 !important;
  }
  .top-links svg{
    width: var(--icon-size);
    height: var(--icon-size);
    display: block;
  }
  .top-links svg path{ fill: #111 !important; }

  .mobile-nav{ top: 100%; }
}

/* ===== Very small phones (≤360px) ===== */
@media (max-width: 360px){
  :root{
    --icon-size: 22px;
    --icon-top: 14px;
  }
  body{ padding-top: 64px; }
}
/* === Force hamburger lines to black on mobile (wins cascade) === */
@media (max-width: 1024px) {
  /* 아이콘 자체 색상(현재색) → 검정 */
  .hamburger { color: #111 !important; }

  /* 선 색상 직설적으로 강제 (기존 white 규칙 무력화) */
  .hamburger span { background-color: #111 !important; }

  /* hovered/active 등에 의해 덮이는 경우까지 커버 */
  header.hovered .hamburger span,
  .hamburger.active span { background-color: #111 !important; }
}