/* =========================================
   헤더 네비게이션 확장 스타일 (header.css)
   드롭다운 메뉴, 햄버거 버튼, 모바일 서랍
   ========================================= */

/* =========================================
   F1 GUIDE 드롭다운 (데스크탑)
   ========================================= */

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  background: none;
  border: none;
  color: #888;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  font-family: inherit;
}

.nav-dropdown-trigger:hover {
  color: #dc2626;
}

/* 2026 시즌 드롭다운 트리거 - 빨간 테두리 스타일 유지 */
.nav-link-season.nav-dropdown-trigger {
  color: #e10600;
  font-weight: bold;
  border: 1px solid #e10600;
  border-radius: 0.5rem;
}

.nav-link-season.nav-dropdown-trigger:hover,
.nav-dropdown.open .nav-link-season.nav-dropdown-trigger {
  background-color: rgba(225, 6, 0, 0.1);
  color: #e10600;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 0.5rem;
  padding: 0.375rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 0.625rem 1rem;
  color: #ccc;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-dropdown-item:hover {
  background: #2a2a2a;
  color: #dc2626;
}

/* =========================================
   햄버거 버튼 (모바일 전용)
   ========================================= */

.hamburger-btn {
  display: none; /* 데스크탑에서 숨김 */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 60;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: #f5f5f5;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 햄버거 → X 변환 */
.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   모바일 메뉴 서랍
   ========================================= */

.mobile-drawer {
  display: none; /* 기본 숨김 */
  flex-direction: column;
  background: #111;
  border-top: 1px solid #2a2a2a;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.mobile-drawer.open {
  max-height: 400px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  color: #ccc;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  border-bottom: 1px solid #1a1a1a;
  background: transparent;
  font-family: inherit;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  min-height: 48px;
}

.mobile-drawer-link:hover,
.mobile-drawer-link:active {
  background: #1a1a1a;
  color: #dc2626;
}

/* =========================================
   반응형: 모바일 (< 768px)
   ========================================= */

@media (max-width: 768px) {
  /* 데스크탑 메뉴 숨김 */
  .nav-desktop {
    display: none;
  }

  /* 햄버거 버튼 표시 */
  .hamburger-btn {
    display: flex;
  }

  /* 모바일 서랍 표시 가능 상태 */
  .mobile-drawer {
    display: flex;
  }
}
