@charset "UTF-8";

.topbar {
  background: linear-gradient(135deg, #0f57c8, #1f7dea);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000; /* 기존 100 → 1000 */
  box-shadow: 0 6px 18px rgba(15, 87, 200, .22);
}
.top-inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.6px;
}
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 700;
}
.nav a { opacity: .95; }
.nav a:hover { opacity: 1; border-bottom: 2px solid #fff; }
.nav-list,
.nav-grid { display: contents; }

/* PC 메뉴 + 로그인 영역 */
.pc-right {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

/* PC 로그인/회원가입 버튼 */
.pc-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.pc-auth a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 17px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  transition: .2s ease;
}
.pc-auth-login {
  color: #fff;
  border: 1px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.08);
}
.pc-auth-login:hover {
  background: rgba(255,255,255,.18);
}
.pc-auth-join {
  color: #0f57c8;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}
.pc-auth-join:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  position: relative;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: #fff;
  left: 0;
}
.menu-toggle span::before { top: -8px; }
.menu-toggle span::after { top: 8px; }

.mobile-home {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

/* 모바일 메뉴 배경 */
.mobile-dim {
  display: none;
  position: fixed;
  inset: 0;
  /* background: rgba(0,0,0,.55); */
  z-index: 900;
}
.mobile-dim.open { display: block; }

.mobile-menu-head,
.mobile-menu-auth {
  display: none;
}

@media (max-width: 720px) {
  .topbar {
    background: linear-gradient(135deg, #0d5ec8, #1f86f2);
  }
  .top-inner {
    max-width: none;
    height: 66px;
    min-height: 66px;
    padding: 0 14px;
    justify-content: center;
  }
  .brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 950;
    gap: 8px;
  }
  .brand img { display: none; }
  .menu-toggle {
    display: flex;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
  .mobile-home {
    display: flex;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
  /* 모바일에서도 navMenu가 열릴 수 있도록 부모(pc-right)는 숨기지 않음 */
  .pc-right {
    display: block;
    margin-left: 0;
  }
  .pc-right .pc-auth {
    display: none;
  }
  /* 모바일 햄버거 슬라이드 메뉴 */
  .mobile-dim {
    display: none;
  }
  .mobile-dim.open {
    display: block;
  }
   .nav {
    position: fixed;
    top: 0;
    left: -88%;
    width: 88%;
    max-width: 390px;
    height: 100vh;
    background: #fff;
    display: block;
    padding: 0;
    box-shadow: 8px 0 24px rgba(0,0,0,.22);
    z-index: 1100;
    overflow-y: auto;
    transition: left .28s ease;
  }
  .nav.open {
    left: 0;
  }
  .mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 0 18px;
    background: #005fc7;
    color: #fff;
  }
  .mobile-menu-title {
    font-size: 20px;
    font-weight: 950;
    letter-spacing: -.5px;
  }
  .mobile-menu-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 0;
  }
  .mobile-menu-auth {
    display: flex;
    gap: 12px;
    padding: 14px 10px 16px;
    background: #005fc7;
  }
  .mobile-menu-auth a {
    flex: 1;
    height: 42px;
    border-radius: 999px;
    background: #fff;
    color: #005fc7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
  }
  .nav-list {
    padding: 20px;
    background: #fff;
  }
  .nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid #d8d8d8;
    border-left: 1px solid #d8d8d8;
  }
  .nav a {
    display: flex;
    min-height: 82px;
    padding: 12px 8px;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid #d8d8d8;
    border-bottom: 1px solid #d8d8d8;
    font-size: 15px;
    font-weight: 900;
    color: #111;
    line-height: 1.3;
    background: #fff;
  }
  .nav a:hover {
    border-bottom: 1px solid #d8d8d8;
    background: #f2f7ff;
    color: #005fc7;
  }
}

.pc-auth-after,
.mobile-auth-after {
  align-items: center;
}

.pc-login-name {
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  margin-right: 6px;
}

.pc-auth-mypage {
  background: #fff;
  color: #005fc7;
}

.pc-auth-logout {
  color: #fff;
  border: 1px solid rgba(255,255,255,0.7);
}

.mobile-auth-after .mobile-user-box {
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.mobile-auth-after .mobile-user-box strong {
  font-size: 15px;
}

.mobile-auth-after .mobile-user-box span {
  font-size: 12px;
}
