/* ============================================
   MEGA MENU SYSTEM - Advanced Navigation
   ============================================ */

/* Primary Navigation Container */
.bj-nav-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 900px;
    margin: 0 40px;
}

/* Main Navigation Menu */
.bj-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
    align-items: center;
    width: 100%;
}

/* Menu Items */
.bj-menu-item {
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
}

.bj-menu-item > a {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.bj-menu-item > a:hover {
    background-color: #f3f4f6;
    color: #2563eb;
}

/* Arrow Indicator */
.bj-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.bj-menu-item:hover .bj-arrow {
    transform: rotate(180deg);
}

/* Mega Menu Container */
.bj-mega-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    z-index: 1000;
    animation: slideDown 0.3s ease forwards;
    min-width: 500px;
}

.bj-has-mega-menu:hover .bj-mega-menu {
    display: block;
}

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

/* Mega Menu Inner Container */
.bj-mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 30px;
}

/* Mega Menu Column */
.bj-mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bj-mega-menu-heading {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

/* Mega Menu List */
.bj-mega-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bj-mega-menu-list li {
    display: flex;
}

.bj-mega-menu-list a {
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    padding: 6px 0;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    padding-left: 8px;
}

.bj-mega-menu-list a:hover {
    color: #2563eb;
    border-left-color: #2563eb;
    padding-left: 12px;
}

/* Employers Highlight */
.bj-employers-highlight .bj-employers-link {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 16px !important;
}

.bj-employers-highlight .bj-employers-link:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
}

/* Responsive - Medium Screens */
@media (max-width: 1024px) {
    .bj-nav-wrapper {
        max-width: 600px;
        margin: 0 20px;
    }

    .bj-menu-item > a {
        padding: 0 12px;
        font-size: 13px;
    }

    .bj-mega-menu {
        min-width: 450px;
        left: -50px;
    }

    .bj-mega-menu-inner {
        gap: 20px;
        padding: 20px;
    }
}

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

    /* Show mobile menu toggle instead */
    .bj-mobile-toggle {
        display: block;
    }
}

/* Mobile Navigation Menu */
.bj-mobile-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 999;
}

.bj-mobile-menu.active {
    display: block;
}

.bj-mobile-menu-inner {
    padding: 20px 0;
}

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

.bj-mobile-nav-menu > li {
    border-bottom: 1px solid #f3f4f6;
}

.bj-mobile-nav-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: #111827;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.bj-mobile-nav-menu > li > a:hover {
    background-color: #f9fafb;
    color: #2563eb;
    padding-left: 24px;
}

/* Submenu for Mobile */
.bj-mobile-nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    background-color: #f9fafb;
}

.bj-mobile-nav-menu li.active > ul {
    display: flex;
    flex-direction: column;
}

.bj-mobile-nav-menu ul li a {
    display: block;
    padding: 10px 20px 10px 40px;
    color: #64748b;
    text-decoration: none;
    font-weight: 400;
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.bj-mobile-nav-menu ul li a:hover {
    color: #2563eb;
    border-left-color: #2563eb;
    padding-left: 44px;
}

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

.bj-mobile-toggle:hover {
    background-color: #f3f4f6;
}

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

.bj-mobile-toggle.active .bj-mobile-toggle-icon:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.bj-mobile-toggle.active .bj-mobile-toggle-icon:nth-child(2) {
    opacity: 0;
}

.bj-mobile-toggle.active .bj-mobile-toggle-icon:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Auth Buttons */
.bj-mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.bj-mobile-btn {
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.bj-mobile-btn-ghost {
    background-color: #f3f4f6;
    color: #111827;
}

.bj-mobile-btn-ghost:hover {
    background-color: #e5e7eb;
}

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

.bj-mobile-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .bj-mega-menu,
    .bj-menu-item > a,
    .bj-mobile-toggle-icon,
    .bj-mobile-btn {
        transition: none !important;
        animation: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: more) {
    .bj-mega-menu {
        border-width: 2px;
    }

    .bj-menu-item > a {
        border: 2px solid transparent;
    }

    .bj-menu-item > a:hover {
        border-color: #2563eb;
    }
}
