@font-face {
  font-family: "BinggraeII";
  src: url("../fonts/BinggraeII.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html,
body {
  font-family:
    "BinggraeII",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  font-size: 16px;
  background-color: #f4f9ff;
  margin: 0;
}

/* ===============================
   HEADER TOP BAR
================================ */

.header {
  width: 100%;
  background: linear-gradient(to bottom, #f0c895, #d58f4a);
}

.header-inner {
  width: 60%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contact {
  max-width: 385px;
  width: 100%;
  padding-left: 10px;
}

.realtime {
  color: #484149;
  font-size: 13px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  line-height: 1;
}

.korea-active {
  height: 16px;
  display: block;
  padding-right: 10px;
}

/* ===============================
   MAIN NAVBAR
================================ */

.top-nav {
  position: relative;
  z-index: 1000;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.top-nav-inner {
  width: 60%;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===============================
   LEFT SIDE
================================ */

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo img {
  height: 50px;
  cursor: pointer;
  padding-left: 10px;
}

/* ===============================
   NAV MENU
================================ */

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Top-level items (links + dropdown wrappers) */
.nav-menu > a,
.nav-menu > .nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 70px;
}

/* Top-level links */
.nav-menu a {
  position: relative;
  font-size: 16px;
  font-weight: 200;
  color: #222;
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.25s ease;
  cursor: pointer;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #edbe8a;
}

/* Underline animation */
.nav-menu > a::after,
.nav-item > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 10px;
  width: 0;
  height: 3px;
  background: #edbe8a;
  transition: width 0.25s ease;
}

.nav-menu > a:hover::after,
.nav-menu > a.active::after,
.nav-item:hover > a::after,
.nav-item > a.active::after {
  width: 100%;
}

/* ===============================
   DROPDOWN
================================ */

.nav-item {
  position: relative;
}

.nav-item > a {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Dropdown panel */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 10px);
  min-width: 180px;
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 6px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 9999;
}

/* Show dropdown */
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Dropdown links */
.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: #222;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

/* Dropdown hover */
.nav-dropdown a:hover {
  background: #f8f2ea;
  color: #d58f4a;
}

/* Disable underline in dropdown */
.nav-dropdown a::after {
  display: none !important;
}

/* ===============================
   RIGHT SIDE
================================ */

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile img {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  border: 1px solid #808080;
  object-fit: cover;
}

.auth-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.login-link {
  font-size: 14px;
  color: #edbe8a;
  text-decoration: none;
}

.login-link:hover {
  text-decoration: underline;
}

.buddy-link {
  font-size: 13px;
  color: #9cbb2f;
  text-decoration: none;
  margin-top: 2px;
}

.buddy-link:hover {
  text-decoration: underline;
}

/* ===============================
   RESPONSIVE (SAFE MODE)
================================ */
/* ===============================
   HAMBURGER BUTTON
================================ */

.hamburger {
  display: none;
  width: 28px;
  height: 22px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #222;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Active animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ===============================
   MOBILE MENU BEHAVIOR (CUSTOM LAYOUT)
================================ */

/* MOBILE MENU PANEL */
@media (max-width: 1024px) {
  /* NAVBAR CONTAINER */
  .top-nav-inner {
    position: relative;
    padding-top: 30px;
    padding-bottom: 50px; /* space for hamburger & nav-right */
  }

  /* LOGO — TOP CENTER */
  .nav-logo {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-logo img {
    height: 70px;
  }

  /* LEFT BOTTOM — NAV RIGHT */
  .nav-right {
    position: absolute;
    bottom: 12px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
  }

  /* RIGHT BOTTOM — HAMBURGER */
  .hamburger {
    display: flex;
    position: absolute;
    bottom: 12px;
    right: 16px;
    z-index: 2001; /* above menu */
  }

  /* NAV MENU PANEL — FULL WIDTH, BELOW NAVBAR */
  .nav-menu {
    position: absolute; /* relative to .top-nav-inner */
    top: 100%; /* immediately below top-nav-inner */
    left: 0;
    width: 100%;
    height: 250px;
    background: #ffffff;
    flex-direction: column;
    gap: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    z-index: 1999;
  }

  /* Open state */
  .nav-menu.open {
    max-height: 50vh; /* half viewport height */
    overflow-y: auto;
  }

  /* MAIN ITEMS */
  .nav-menu > a,
  .nav-menu > .nav-item {
    width: 100%;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    box-sizing: border-box;
  }

  .nav-menu a {
    font-size: 16px;
    width: 100%;
  }

  .nav-menu a::after {
    display: none !important;
  }

  /* DROPDOWN ACCORDION — BELOW PARENT ITEM */
  .nav-dropdown {
    display: none; /* hidden by default */
    flex-direction: column;
    width: 100%; /* full width of nav-menu */
    padding-left: 0; /* remove indent */
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-item.open .nav-dropdown {
    display: flex; /* show dropdown below parent */
  }

  .nav-dropdown a {
    padding: 10px 20px; /* match parent padding */
    font-size: 15px;
    width: 100%; /* full width */
    box-sizing: border-box;
  }
  /* CUSTOM SCROLLBAR FOR MOBILE NAV-MENU */
  .nav-menu::-webkit-scrollbar {
    width: 8px; /* width of scrollbar */
  }

  .nav-menu::-webkit-scrollbar-track {
    background: #f0f0f0; /* light background for track */
    border-radius: 4px;
  }

  .nav-menu::-webkit-scrollbar-thumb {
    background-color: #f0c895; /* your gold/copper color */
    border-radius: 4px;
    border: 2px solid #ffffff; /* optional: padding around thumb */
  }

  /* Firefox scrollbar */
  .nav-menu {
    scrollbar-width: thin;
    scrollbar-color: #f0c895 #f0f0f0; /* thumb color / track color */
  }
}

/* ===============================
   WIDTH RULES
================================ */

@media screen and (min-width: 1300px) and (max-width: 1800px) {
  .header-inner,
  .top-nav-inner {
    width: 80%;
  }
}

@media screen and (min-width: 32px) and (max-width: 1299px) {
  .header-inner,
  .top-nav-inner {
    width: 100%;
  }
}

/* ===============================
   HEADER CENTERED STACK (MOBILE)
================================ */

@media (max-width: 630px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .contact {
    width: 100%;
    margin: 0 auto;
  }

  .realtime {
    width: 100%;
    justify-content: center;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    gap: 3px;
  }
  .contact {
    max-width: 300px;
  }

  .realtime {
    font-size: 11px;
  }
}
