/* ===================================================
   WORLD-CLASS HEADER WITH PROPER UL/LI STRUCTURE
   WordPress-Native Navigation | Mobile-First Design
   =================================================== */

/* Base Header */
.bj-header {
  background: linear-gradient(135deg, #f8fafc 0%, #f0f4ff 100%);
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.bj-header-main {
  padding: 12px 0;
}

.bj-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.bj-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 60px;
}

/* ===================================================
   LOGO SECTION
   =================================================== */

.bj-logo-section {
  flex-shrink: 0;
}

.bj-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.bj-logo:hover {
  transform: scale(1.02);
}

.bj-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.bj-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.bj-logo-brand {
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.3px;
}

.bj-logo-badge {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.2px;
}

/* ===================================================
   WORDPRESS NATIVE NAVIGATION (UL/LI)
   =================================================== */

.bj-nav-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .bj-nav-wrapper {
    display: none;
  }
}

.bj-nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.bj-menu-item {
  position: relative;
  margin: 0;
  padding: 0;
}

.bj-menu-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #4f46e5;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.bj-menu-item-title {
  display: inline-flex;
  align-items: center;
}

.bj-menu-item-employer > .bj-menu-link {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.18);
}

.bj-menu-item-employer > .bj-menu-link:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  border-color: transparent;
}

.bj-menu-link:hover,
.bj-menu-item.bj-active > .bj-menu-link {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
}

/* Arrow for dropdown items */
.bj-menu-arrow {
  display: inline-block;
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
}

.bj-has-submenu > .bj-menu-link:hover .bj-menu-arrow {
  transform: rotate(180deg);
}

/* ===================================================
   DROPDOWN MENUS (SUBMENU)
   =================================================== */

.bj-sub-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  border: 1px solid rgba(37, 99, 235, 0.1);
  min-width: 220px;
  margin-top: 4px;
}

.bj-sub-menu-0 {
  padding: 12px;
}

.bj-sub-menu-1 {
  padding: 8px;
}

.bj-has-submenu:hover > .bj-sub-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: slideDown 0.3s ease;
}

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

.bj-sub-menu .bj-menu-item {
  margin: 0;
}

.bj-sub-menu .bj-menu-link {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bj-sub-menu .bj-menu-link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.bj-nav-menu > .bj-menu-item > .bj-sub-menu-0 {
  min-width: 720px;
  padding: 20px;
}

.bj-nav-menu > .bj-menu-item > .bj-sub-menu-0 > .bj-menu-item > .bj-sub-menu-1 {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 0;
  margin-top: 8px;
  box-shadow: none;
  border: none;
}

.bj-nav-menu > .bj-menu-item > .bj-sub-menu-0 > .bj-menu-item > .bj-menu-link {
  padding: 0 0 6px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  font-weight: 700;
}

/* ===================================================
   HEADER ACTIONS
   =================================================== */

.bj-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Auth Buttons */
.bj-auth-buttons {
  display: flex;
  gap: 8px;
}

.bj-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.bj-btn-ghost {
  color: #2563eb;
  border-color: #2563eb;
}

.bj-btn-ghost:hover {
  background: rgba(37, 99, 235, 0.1);
}

.bj-btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: white;
}

.bj-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* User Menu */
.bj-user-menu {
  position: relative;
}

.bj-user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.bj-user-menu-trigger:hover {
  background: rgba(37, 99, 235, 0.1);
}

.bj-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  overflow: hidden;
}

.bj-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bj-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #4f46e5;
}

.bj-user-menu-icon {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
}

.bj-user-menu-trigger:hover .bj-user-menu-icon {
  transform: rotate(180deg);
}

.bj-user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  border: 1px solid rgba(37, 99, 235, 0.1);
  min-width: 200px;
  margin-top: 8px;
  padding: 8px;
  animation: slideDownRight 0.3s ease;
}

@keyframes slideDownRight {
  from {
    opacity: 0;
    transform: translateY(-10px) translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

.bj-user-menu:hover .bj-user-dropdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bj-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.bj-user-dropdown-item:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.bj-user-dropdown-item svg {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.bj-user-dropdown-divider {
  height: 1px;
  background: rgba(37, 99, 235, 0.1);
  margin: 4px 0;
}

/* Mobile Toggle */
.bj-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .bj-mobile-toggle {
    display: flex;
  }
}

.bj-mobile-toggle:hover {
  background: rgba(37, 99, 235, 0.1);
}

.bj-mobile-toggle-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: #4f46e5;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.bj-mobile-toggle[aria-expanded="true"] .bj-mobile-toggle-icon:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.bj-mobile-toggle[aria-expanded="true"] .bj-mobile-toggle-icon:nth-child(2) {
  opacity: 0;
}

.bj-mobile-toggle[aria-expanded="true"] .bj-mobile-toggle-icon:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* ===================================================
   MOBILE NAVIGATION MENU
   =================================================== */

.bj-mobile-menu {
  display: none;
  background: white;
  border-top: 1px solid rgba(37, 99, 235, 0.1);
  padding: 16px 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  animation: slideDown 0.3s ease;
}

@media (max-width: 768px) {
  .bj-header {
    position: relative;
  }

  .bj-mobile-menu[aria-expanded="true"] {
    display: block;
  }
}

.bj-mobile-menu-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.bj-mobile-nav-menu {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.bj-mobile-nav-menu .bj-menu-item {
  margin: 0;
}

.bj-mobile-nav-menu .bj-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #4f46e5;
  border: none;
  border-radius: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid rgba(37, 99, 235, 0.05);
}

.bj-mobile-nav-menu .bj-menu-link:hover,
.bj-mobile-nav-menu .bj-menu-item.bj-active > .bj-menu-link {
  background: rgba(37, 99, 235, 0.05);
  color: #2563eb;
}

.bj-mobile-nav-menu .bj-sub-menu {
  display: flex !important;
  position: static;
  background: rgba(37, 99, 235, 0.05);
  box-shadow: none;
  border: none;
  border-radius: 0;
  margin: 0;
  margin-top: -1px;
  padding: 8px 0 8px 32px;
  min-width: auto;
  flex-direction: column;
  gap: 0;
}

.bj-mobile-nav-menu .bj-sub-menu .bj-menu-link {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  border: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.05);
}

.bj-mobile-nav-menu .bj-sub-menu .bj-menu-link:hover {
  color: #2563eb;
}

/* Mobile Auth Buttons */
.bj-mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid rgba(37, 99, 235, 0.1);
  margin-top: 12px;
}

.bj-mobile-btn {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.bj-mobile-btn-ghost {
  color: #2563eb;
  border-color: #2563eb;
}

.bj-mobile-btn-ghost:active {
  background: rgba(37, 99, 235, 0.1);
}

.bj-mobile-btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: white;
}

.bj-mobile-btn-primary:active {
  transform: scale(0.98);
}

/* ===================================================
   RESPONSIVE ADJUSTMENTS
   =================================================== */

@media (max-width: 1024px) {
  .bj-header-inner {
    gap: 16px;
  }

  .bj-logo-brand {
    font-size: 18px;
  }

  .bj-logo-badge {
    font-size: 16px;
  }

  .bj-nav-menu {
    gap: 4px;
  }

  .bj-menu-link {
    padding: 8px 12px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .bj-header-main {
    padding: 8px 0;
  }

  .bj-header-inner {
    min-height: 56px;
  }

  .bj-logo-brand {
    font-size: 16px;
  }

  .bj-logo-badge {
    font-size: 14px;
  }

  .bj-auth-buttons {
    display: none;
  }

  .bj-user-menu {
    display: none;
  }

  .bj-container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .bj-header-main {
    padding: 6px 0;
  }

  .bj-container {
    padding: 0 12px;
  }

  .bj-header-inner {
    gap: 12px;
  }

  .bj-logo-icon {
    width: 32px;
    height: 32px;
  }

  .bj-logo-brand {
    font-size: 14px;
  }

  .bj-logo-badge {
    font-size: 12px;
  }

  .bj-mobile-toggle {
    padding: 6px;
  }

  .bj-mobile-toggle-icon {
    width: 20px;
  }
}

/* ===================================================
   ACCESSIBILITY & PRINT
   =================================================== */

@media (prefers-reduced-motion: reduce) {
  .bj-menu-link,
  .bj-user-menu-trigger,
  .bj-btn,
  .bj-mobile-menu,
  .bj-sub-menu,
  .bj-user-dropdown {
    transition: none;
    animation: none;
  }
}

@media print {
  .bj-header {
    display: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .bj-header {
    border-bottom-width: 2px;
  }

  .bj-menu-link:focus,
  .bj-btn:focus,
  .bj-mobile-toggle:focus {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
  }
}
