/* ============================================================
   HRS OUTBOOKS LLC — HEADER STYLES
   Glass Navbar, Mega Menu, Scroll Effects
   ============================================================ */

/* ─── Main Header ─── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  padding: 20px 0;
  transition: all 0.45s var(--ease-smooth);
  background: transparent;
}

/* Scrolled State */
#site-header.scrolled {
  padding: 12px 0;
  background: rgba(4, 30, 66, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 40px rgba(4, 30, 66, 0.4);
}

/* Light Header (for interior pages) */
#site-header.header-light {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(11, 61, 145, 0.08);
  box-shadow: var(--shadow-sm);
  padding: 14px 0;
}

#site-header.header-light .nav-link {
  color: var(--text-dark) !important;
}

#site-header.header-light .nav-link:hover,
#site-header.header-light .nav-link.active {
  color: var(--primary-bright) !important;
}

#site-header.header-light .logo-text { color: var(--navy-dark); }
#site-header.header-light .logo-text span { color: var(--primary-bright); }
#site-header.header-light .navbar-toggler-icon { filter: invert(1) brightness(0); }

/* ─── Nav Container ─── */
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* ─── Logo ─── */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(30, 94, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: rotate(45deg);
  animation: logoShine 4s ease-in-out infinite;
}

@keyframes logoShine {
  0%, 70%, 100% { transform: translateX(-100%) rotate(45deg); }
  40% { transform: translateX(100%) rotate(45deg); }
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo-text span {
  color: var(--cyan-accent);
}

.logo-tagline {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

#site-header.header-light .logo-tagline { color: var(--text-muted); }

/* ─── Navigation ─── */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.nav-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease-bounce);
  opacity: 0.7;
}

.nav-item:hover .nav-link svg {
  transform: rotate(180deg);
  opacity: 1;
}

/* ─── Dropdown ─── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(4, 30, 66, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 12px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease-smooth);
  box-shadow: 0 20px 60px rgba(4, 30, 66, 0.6);
  z-index: var(--z-dropdown);
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(30, 94, 255, 0.15);
  color: var(--white);
  padding-left: 18px;
}

.dropdown-item .drop-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(30, 94, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-bright);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.dropdown-item:hover .drop-icon {
  background: var(--primary-bright);
  color: var(--white);
}

/* Mega Menu */
.nav-dropdown.mega {
  left: auto;
  right: auto;
  transform: translateX(0) translateY(-8px);
  min-width: 680px;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.nav-item:has(.nav-dropdown.mega) {
  position: static;
}

.nav-item:has(.nav-dropdown.mega):hover .nav-dropdown.mega {
  transform: translateX(0) translateY(0);
}

/* ─── CTA Button in Nav ─── */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-cta .btn {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.15);
  transition: var(--transition-fast);
}

.nav-phone:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}

#site-header.header-light .nav-phone {
  color: var(--primary);
  border-color: rgba(11, 61, 145, 0.2);
}

#site-header.header-light .nav-phone:hover {
  background: rgba(11, 61, 145, 0.05);
}

/* ─── Mobile Hamburger ─── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

#site-header.header-light .hamburger {
  background: rgba(11, 61, 145, 0.08);
  border-color: rgba(11, 61, 145, 0.15);
}

#site-header.header-light .hamburger span { background: var(--navy-dark); }

/* ─── Mobile Nav Overlay ─── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 30, 66, 0.97);
  backdrop-filter: blur(24px);
  z-index: calc(var(--z-header) - 1);
  overflow-y: auto;
  padding: 100px 24px 40px;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-smooth);
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.mobile-nav-link:hover { color: var(--white); }

.mobile-submenu {
  padding: 0 0 12px 16px;
  display: none;
}

.mobile-submenu.open { display: block; }

.mobile-submenu-link {
  display: block;
  padding: 10px 0;
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.mobile-submenu-link:hover { color: var(--cyan-accent); }

.mobile-nav-cta {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Responsive ─── */
@media (max-width: 1199px) {
  .nav-link { padding: 8px 10px; font-size: 0.82rem; }
}

@media (max-width: 991px) {
  .main-nav, .nav-cta .nav-phone { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
}

@media (max-width: 480px) {
  .logo-text { font-size: 1.15rem; }
}
