:root {
  --color-blue: #337dc3;
  --color-green: #a4cbb4;
  --color-purple: #b39ddb;
  --color-gray: #e0e0e0;
  --color-text: #333333;

  --radius-round: 999px;
  --radius-box: 0.6em;
}

/* 기본 설정 */
body {
  margin: 0;
  font-family: 'Noto Sans KR', sans-serif;
  padding-top: 4em;
  overflow-x: hidden;
}

/* ==============================
   HEADER 영역
============================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: white;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 0.8em 1em;
  box-sizing: border-box;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 로고 */
.logo a {
  font-size: 1.55em;
  color: var(--color-blue);
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}

/* 메뉴 버튼(모바일) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8em;
  cursor: pointer;
  color: var(--color-text);
}

/* 메뉴 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2em;
}

.nav-menu a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  transition: color 0.3s ease;
  max-width: 140px;
  text-align: center;
  word-break: keep-all;
}

.nav-menu a:hover {
  color: var(--color-purple);
}

/* ==============================
   언어 드롭다운
============================== */

.lang-selector {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25em;
  padding: 0.45em 0.9em;
  background: #ffffff;
  border-radius: var(--radius-round);
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text);
  white-space: nowrap;
}

.lang-toggle:hover {
  background: #f5f5f5;
}

.lang-arrow {
  font-size: 0.75em;
  opacity: 0.7;
}

.lang-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.4em);
  background: #ffffff;
  min-width: 11rem;
  border-radius: var(--radius-box);
  box-shadow: 0 0.25em 0.8em rgba(0, 0, 0, 0.12);
  padding: 0.4em 0;
  display: none;
  z-index: 999;
}

.lang-selector.open .lang-menu {
  display: block;
}

.lang-option {
  padding: 0.65em 1.1em;
  display: block;
  font-size: 0.9rem;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.lang-option:hover {
  background: #f5f9ff;
}

.lang-option.active {
  font-weight: 700;
  color: var(--color-blue);
  background: #eef4ff;
}

/* ==============================
   모바일 반응형
============================== */

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    padding: 1em;
    gap: 0.8em;
    box-shadow: 0 0.3em 0.6em rgba(0, 0, 0, 0.1);
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu a {
    width: 100%;
    padding: 0.9em;
    text-align: center;
    background: #f9f9f9;
    border-radius: var(--radius-box);
    font-size: 1.05rem;
  }

  .nav-menu a:hover {
    background: var(--color-blue);
    color: white;
  }

  /* 모바일에서 언어 메뉴도 width 100% */
  .lang-selector {
    width: 100%;
  }

  .lang-toggle {
    width: 100%;
    justify-content: center;
  }

  .lang-menu {
    width: 100%;
    left: 0;
  }
}

/* PC 패딩 */
@media (min-width: 768px) {
  .main-header {
    padding-left: 2em;
    padding-right: 2em;
  }
}
