 /* =========================
   Header / Topbar (ONLY)
========================= */


/* Tokens (header¿¡ Á÷Á¢ ¿µÇâ) */
:root {
  --topbar-h: 90px;
}


/* Body theme toggle ½Ã topbar »ö ¹Ù²î´Â º¯¼ö */
.topbar {
  --topbar-fg: #fff;
  --topbar-bg: transparent;


  /* &#9989; Dropdown token */
  --lang-border: rgba(255, 255, 255, 0.35);
  --lang-bg: rgba(0, 0, 0, 0.18);
  --lang-menu-bg: rgba(10, 10, 10, 0.92);
  --lang-menu-border: rgba(255, 255, 255, 0.14);
}


/* Topbar */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  z-index: 50;
  background: var(--topbar-bg);
  color: var(--topbar-fg);
  transition:
    color 0.25s ease,
    background 0.25s ease;
}


.topbar__inner {
  height: 100%;
  max-width: 1860px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}


.logo {
  display: inline-flex;
  align-items: center;
}


.logo img {
  height: 22px;
  width: auto;
  display: block;
  transition: opacity 0.25s ease;
}


/* ¼½¼Ç¿¡ µû¶ó topbar ¶óÀÌÆ® ¸ðµå */
.topbar.is-light {
  --topbar-fg: #222;


  /* &#9989; ¶óÀÌÆ® ¸ðµå¿¡¼­ µå·Ó´Ù¿îµµ °°ÀÌ ¹ÝÀü */
  --lang-border: rgba(0, 0, 0, 0.22);
  --lang-bg: rgba(255, 255, 255, 0.55);
  --lang-menu-bg: rgba(255, 255, 255, 0.96);
  --lang-menu-border: rgba(0, 0, 0, 0.08);
}


/* GNB */
.gnb {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}


.gnb__link {
  border: 0;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 1.1rem;
  color: inherit;
}


/* Hamburger */
.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: inherit;
}


/* =========================
   Language Dropdown (FINAL)
========================= */


.langSelect {
  position: relative;
  margin-left: 10px;
}


.langSelect__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;


  border: 1px solid var(--lang-border);
  background: var(--lang-bg);
  color: inherit;


  padding: 9px 12px;
  border-radius: 999px;


  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;


  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}


.langSelect__chev {
  font-size: 0.9em;
  opacity: 0.85;
  transform: translateY(-1px);
}


.langSelect__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);


  min-width: 150px;
  padding: 8px;


  background: var(--lang-menu-bg);
  border: 1px solid var(--lang-menu-border);
  border-radius: 14px;


  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  display: none;
  z-index: 999;
}


.langSelect.is-open .langSelect__menu {
  display: block;
}


.langSelect__menu a {
  display: block;
  padding: 10px 10px;
  border-radius: 12px;
  color: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.92;
}


.langSelect__menu a:hover {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
}


/* ¶óÀÌÆ® ¸ðµå ¸Þ´º hover */
.topbar.is-light .langSelect__menu a:hover {
  background: rgba(0, 0, 0, 0.06);
}


/* ÇöÀç ¾ð¾î °­Á¶ */
.langSelect__menu a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}


/* =========================
   Mobile Header / Menu
========================= */
@media (max-width: 768px) {
  :root {
    --topbar-h: 64px;
  }


  .gnb {
    position: fixed;
    top: var(--topbar-h);
    right: -100%;
    width: 240px;
    height: calc(100vh - var(--topbar-h));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 12px;
    transition: right 0.3s ease;
    box-shadow: -18px 0 42px rgba(0, 0, 0, 0.12);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    color: #111;
    align-items: stretch;
  }


  .gnb.active {
    right: 0;
  }


  .gnb__link {
    width: 100%;
    text-align: left;
    padding: 12px;
    border-radius: 12px;
  }


  .menu-toggle {
    display: block;
  }


  /* &#9989; ¸ð¹ÙÀÏ¿¡¼­´Â µå·Ó´Ù¿îÀ» "¸®½ºÆ®"Ã³·³ */
  .langSelect {
    margin-left: 0;
    width: 100%;
  }


  .langSelect__btn {
    width: 100%;
    justify-content: space-between;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.85);
  }


  .langSelect__menu {
    position: static;
    margin-top: 8px;
    min-width: 0;
    width: 100%;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    display: none;
  }


  .langSelect.is-open .langSelect__menu {
    display: block;
  }


  .langSelect__menu a {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    margin-top: 8px;
  }


  .langSelect__menu a:hover {
    background: rgba(0, 0, 0, 0.08);
  }
}

