/* ===========================
   SHARED NAVIGATION STYLES
   Reference: form-escalation-documentation.html
=========================== */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--nav-bg, rgba(255,255,255,0.92));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-light, rgba(0,0,0,0.08));
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  height: 80px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
}

.logo-img {
  height: 100px;
  width: auto;
  transform: translateX(20%) translateY(-8px);
  padding: 14px 10px;
  transition: all 0.3s ease;
  display: block;
  min-height: 100px;
}

.logo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--premium-gradient, linear-gradient(135deg, #7b5fc4, #9d86e9));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.8px;
  font-size: 13px;
  text-transform: uppercase;
  transform: translateX(20%);
}

.nav-links {
  display: flex;
  gap: 50px;
}

.nav-link {
  color: var(--text-dark, #1a1a2e);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 17px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-purple, #7b5fc4);
}

.nav-link-container {
  position: relative;
  display: inline-block;
}

.new-tag {
  position: absolute;
  top: -12px;
  right: -35px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 10;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  transform: translateX(-20%);
}

.nav-auth-slot {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 175px;
  justify-content: flex-end;
}

.header-cta {
  background: var(--accent-purple, #7b5fc4);
  color: #fff;
  padding: 8px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(123,95,196,0.3);
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(123,95,196,0.35);
}

.sign-in {
  color: var(--text-dark, #1a1a2e);
  text-decoration: none;
  font-weight: 500;
  font-size: 17px;
}

.sign-in:hover {
  color: var(--accent-purple, #7b5fc4);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-dark, #1a1a2e);
  cursor: pointer;
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--light-gray, #f0f0f0);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-dark, #1a1a2e);
  cursor: pointer;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.mobile-toggle:hover {
  background-color: var(--light-gray, #f0f0f0);
}

.mobile-sign-in,
.mobile-sign-up {
  display: none;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-container {
    justify-content: center;
    position: relative;
  }

  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    height: 100%;
  }

  .logo-img {
    height: 125px;
    transform: none;
    padding: 12px 0;
  }

  .logo-fallback {
    transform: none;
  }

  .mobile-toggle {
    display: flex;
    position: absolute;
    left: 20px;
    align-items: center;
  }

  .nav-actions {
    transform: none;
    gap: 16px;
    position: absolute;
    right: 20px;
    align-items: center;
  }

  .nav-actions .sign-in,
  .nav-actions .header-cta {
    display: none;
  }

  .nav-auth-slot {
    min-width: 0;
    gap: 12px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--nav-bg, rgba(255,255,255,0.92));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px;
    border-top: 1px solid var(--border-light, rgba(0,0,0,0.08));
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    gap: 20px;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
  }

  .new-tag {
    position: static;
    margin-left: 8px;
  }

  .mobile-sign-in {
    display: block !important;
    margin-top: 10px;
    padding: 12px 20px;
    background: var(--primary-white, #fff);
    color: var(--accent-purple, #7b5fc4);
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--accent-purple, #7b5fc4);
    transition: all 0.3s ease;
  }

  .mobile-sign-up {
    display: block !important;
    margin-top: 10px;
    padding: 12px 20px;
    background: var(--accent-purple, #7b5fc4);
    color: #fff;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--accent-purple, #7b5fc4);
    transition: all 0.3s ease;
  }
}
