/* ============================================
   header.css — iHelp Navigation Header Styles
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #1A3358;
  --navy-dk: #0F2140;
  --navy-lt: #243f6a;
  --accent:  #4A9EFF;
  --accent2: #60C8FF;
  --white:   #FFFFFF;
  --white70: rgba(255,255,255,0.70);
  --white40: rgba(255,255,255,0.40);
  --white15: rgba(255,255,255,0.15);
  --white08: rgba(255,255,255,0.08);
}

html, body {
  width: 100%;
  background: transparent;
}

/* ── HEADER ── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}
header.scrolled {
  background: rgba(15, 33, 64, 0.88);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 1px 0 rgba(74,158,255,0.15), 0 8px 32px rgba(0,0,0,0.35);
}

.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 2rem;
  height: 72px;
  display: flex; align-items: center; gap: 2rem;
}

/* ── LOGO ── */
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
  animation: fadeSlideDown 0.6s cubic-bezier(.22,1,.36,1) both;
}
.logo-img {
  width: 38px; height: 38px; object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(74,158,255,0.5));
  transition: transform 0.3s ease, filter 0.3s ease;
}
.logo:hover .logo-img {
  transform: scale(1.08) rotate(-4deg);
  filter: drop-shadow(0 0 14px rgba(74,158,255,0.85));
}
.logo-text {
  font-family: 'Sora', sans-serif;
  font-weight: 700; font-size: 22px; letter-spacing: -0.3px;
  color: var(--white);
  background: linear-gradient(120deg, #ffffff 0%, #a8d4ff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── NAV ── */
nav {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 0;
}
.nav-link {
  position: relative;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: 0.2px;
  color: var(--white70);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.25s ease, background 0.25s ease;
  animation: fadeSlideDown 0.6s cubic-bezier(.22,1,.36,1) both;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%; right: 50%;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: left 0.3s ease, right 0.3s ease;
}
.nav-link:hover            { color: var(--white); background: var(--white08); }
.nav-link:hover::after     { left: 16px; right: 16px; }
.nav-link.active           { color: var(--white); }
.nav-link.active::after    { left: 16px; right: 16px; }

/* stagger nav links */
.nav-link:nth-child(1) { animation-delay: 0.05s; }
.nav-link:nth-child(2) { animation-delay: 0.10s; }
.nav-link:nth-child(3) { animation-delay: 0.15s; }
.nav-link:nth-child(4) { animation-delay: 0.20s; }
.nav-link:nth-child(5) { animation-delay: 0.25s; }

/* ── DROPDOWN ── */
.nav-item { position: relative; }
.nav-item > .nav-link { display: flex; align-items: center; gap: 4px; }
.chevron {
  display: inline-block; width: 12px; height: 12px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease;
}
.nav-item:hover .chevron { transform: rotate(-135deg) translateY(-2px); }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(15, 33, 64, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(74,158,255,0.2);
  border-radius: 14px;
  padding: 8px;
  min-width: 200px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
}
.nav-item:hover .dropdown {
  opacity: 1; pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px; color: var(--white70);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.dropdown a:hover { background: var(--white08); color: var(--white); }
.drop-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--white08);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}

/* ── AUTH BUTTONS ── */
.auth-group {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  animation: fadeSlideDown 0.6s cubic-bezier(.22,1,.36,1) 0.30s both;
}
.btn-login {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  color: var(--white70);
  background: transparent;
  border: 1px solid var(--white15);
  border-radius: 10px;
  padding: 8px 20px;
  cursor: pointer; text-decoration: none;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  letter-spacing: 0.2px;
}
.btn-login:hover { color: var(--white); border-color: var(--white40); background: var(--white08); }

.btn-signup {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--navy-dk);
  background: linear-gradient(135deg, #4A9EFF 0%, #60C8FF 100%);
  border: none; border-radius: 10px;
  padding: 9px 22px;
  cursor: pointer; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 4px 16px rgba(74,158,255,0.35), 0 1px 0 rgba(255,255,255,0.25) inset;
  letter-spacing: 0.2px;
  position: relative; overflow: hidden;
}
.btn-signup::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.45s ease;
}
.btn-signup:hover::before { left: 100%; }
.btn-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(74,158,255,0.5);
  filter: brightness(1.05);
}
.btn-signup:active { transform: translateY(0); }

/* ── HAMBURGER ── */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px; cursor: pointer;
  border: none; background: transparent; padding: 4px;
  border-radius: 8px; transition: background 0.2s;
  flex-shrink: 0;
}
.hamburger:hover { background: var(--white08); }
.hamburger span {
  display: block; height: 2px; background: var(--white);
  border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}
.hamburger span:nth-child(2) { width: 70%; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU ── */
.mobile-menu {
  position: fixed; top: 72px; left: 0; right: 0;
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(74,158,255,0.15);
  padding: 1.5rem 2rem 2rem;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateY(-110%);
  transition: transform 0.35s cubic-bezier(.22,1,.36,1);
  z-index: 99;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; font-weight: 500;
  color: var(--white70); text-decoration: none;
  padding: 12px 16px; border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}
.mobile-link:hover { background: var(--white08); color: var(--white); }
.mobile-divider { height: 1px; background: var(--white15); margin: 8px 0; }
.mobile-auth { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* ── KEYFRAMES ── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav, .auth-group { display: none; }
  .hamburger { display: flex; }
  .header-inner { gap: 0; justify-content: space-between; }
}