/* ======================================
   HEADER & NAVIGATION
   ====================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo__text {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

/* GNB Navigation */
.gnb {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.gnb__item {
  position: relative;
}

.gnb__btn,
.gnb__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  border-radius: 0;
  white-space: nowrap;
  position: relative;
  transition: color 0.15s;
}

.gnb__btn::after,
.gnb__link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--brand-blue);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.gnb__btn:hover,
.gnb__link:hover {
  color: var(--brand-blue);
}

.gnb__btn:hover::after,
.gnb__link:hover::after {
  transform: scaleX(1);
}

/* Rotating nav item */
.gnb__item--rotating {
  width: 140px;
}

.gnb__btn--active {
  color: var(--brand-blue);
  gap: 4px;
  width: 100%;
  justify-content: center;
  overflow: hidden;
}

.gnb__btn--active::after {
  background: var(--brand-blue);
  transform: scaleX(1);
  left: 0;
  right: 0;
}

.gnb__trend-icon {
  flex-shrink: 0;
  margin-top: -1px;
}

.gnb__rotating-text {
  display: inline-block;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.gnb__rotating-out {
  opacity: 0;
  transform: translateY(-6px);
}

.gnb__rotating-in {
  animation: rotateIn 0.3s ease;
}

@keyframes rotateIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dropdown menus */
.gnb__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  padding: 8px 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 200;
}

.gnb__item.is-open .gnb__dropdown {
  display: block;
}

.gnb__dropdown a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-2);
  transition: background 0.1s;
}

.gnb__dropdown a:hover {
  background: var(--bg-light);
  color: var(--brand-blue);
}

.tag-new {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-red);
  font-style: normal;
}

/* Header actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-text-link {
  font-size: 13px;
  color: var(--brand-blue);
  white-space: nowrap;
}

.btn-text-link:hover {
  text-decoration: underline;
}

.btn-login {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-blue);
  border: 1px solid var(--brand-blue);
  border-radius: 6px;
  background: var(--white);
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-login:hover {
  background: #f2f8ff;
}

.signup-wrap {
  position: relative;
}

.btn-signup {
  display: inline-block;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  background: var(--brand-blue);
  border-radius: 6px;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-signup:hover {
  background: var(--brand-blue-dark);
}

/* Signup tooltip */
.signup-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  padding: 12px 32px 12px 16px;
  background: #3b3b3b;
  color: var(--white);
  border-radius: 8px;
  white-space: nowrap;
  z-index: 300;
  animation: tooltipFadeIn 0.4s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.signup-tooltip.is-hidden {
  display: none;
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.signup-tooltip__arrow {
  position: absolute;
  top: -6px;
  right: 28px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #3b3b3b;
}

.signup-tooltip strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 2px;
}

.signup-tooltip span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
}

.signup-tooltip__close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
  z-index: 10;
}

.signup-tooltip__close:hover {
  color: var(--white);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-menu-btn.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
