/* ================= 상단탭 =================*/
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: white;
  padding: 15px 40px;
  z-index: 1000;
  box-sizing: border-box;

  transition: top 0.8s;
}

/* 레이아웃 */
.navbar {
  display: flex;
  align-items: center;
}

/* 왼쪽 */
.logo {
  flex: 1;
}

.logo img {
  height: 60px;
}

/* 가운데 메뉴 */
.menu {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* 메뉴 링크 */
.menu a {
  color: black;
  text-decoration: none;
  position: relative;
  padding: 5px 0;
}

.menu-title {
  color: black;
  cursor: default;
  position: relative;
}

/* hover + active */
.menu a:hover,
.menu a.active {
  color: #B22222;
}

/* 밑줄 애니메이션 */
.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: #FF4C4C;
  transition: 0.3s;
}

.menu a:hover::after,
.menu a.active::after {
  width: 100%;
}

/* 오른쪽 */
.nav-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

/*오른쪽 소셜아이콘*/
.nav-right img {
  height: 40px;
}

.nav-social-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.nav-social-label {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translate(-50%, -2px);
  color: #555555;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-social-link:hover .nav-social-label,
.nav-social-link:focus-visible .nav-social-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 버튼 */
.contact-btn {
  padding: 8px 15px;
  background: black;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

.contact-btn:hover {
  background: #B22222;
}

.icon {
  transition: 0.3s;
}

/* hover 시 이미지 변경 */
.insta:hover {
  content: url("../images/logo/instagram_red.png");
}

.youtube:hover {
  content: url("../images/logo/youtube_red.png");
}

.wiki:hover {
  content: url("../images/logo/wiki_red.png");
}

/* ===== 드롭다운 ===== */
.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

/* 드롭다운 박스 */
.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 140px;
  display: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 드롭다운 보이기 */
.dropdown:hover .dropdown-content {
  display: block;
}

/* 드롭다운 링크 */
.dropdown-content a {
  display: block;
  padding: 10px;
  color: black;
  position: relative;
}

/* 드롭다운 hover */
.dropdown-content a:hover {
  color: #B22222;
}

/* 드롭다운 밑줄 위치 */
.dropdown-content a::after {
  bottom: 2px;
}