header {
    background: var(--white);
    height: 80px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.logo img {
    display: block;
    height: 90px;
    width: auto;
    max-width: 360px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav a {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary);
}

.auth-btns {
    display: flex;
    gap: 15px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dropdown-arrow {
    font-size: 11px;
    color: #000000;
    transform: rotate(0deg);
    transition: transform 0.25s ease;
}

.nav-item.has-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: -14px;
    right: -14px;
    height: 4px;
}

.job-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: -16px;
    min-width: 520px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 18px;
    border: 1px solid rgba(77, 166, 255, 0.25);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 20px 44px rgba(17, 67, 121, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 50;
}

.job-dropdown-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.job-dropdown-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    color: #4da6ff;
    margin-bottom: 4px;
}

.job-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.35;
    border-radius: 10px;
    padding: 9px 10px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.job-dropdown a:hover {
    color: #1f74ca;
    background: rgba(77, 166, 255, 0.14);
    transform: translateX(2px);
}

.nav-item.has-dropdown:hover .dropdown-trigger,
.nav-item.has-dropdown.is-open .dropdown-trigger,
.nav-item.has-dropdown:focus-within .dropdown-trigger {
    color: #4da6ff;
}

.nav-item.has-dropdown:hover .job-dropdown,
.nav-item.has-dropdown.is-open .job-dropdown,
.nav-item.has-dropdown:focus-within .job-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-item.has-dropdown:hover .dropdown-arrow,
.nav-item.has-dropdown.is-open .dropdown-arrow,
.nav-item.has-dropdown:focus-within .dropdown-arrow {
    transform: rotate(180deg);
}

.cv-dropdown {
    min-width: 580px;
    gap: 18px;
    padding: 20px;
}

.cv-dropdown .job-dropdown-col {
    gap: 10px;
}

.cv-dropdown .mega-menu-link {
    display: grid;
    grid-template-columns: 26px 1fr;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cv-dropdown .mega-menu-link:hover {
    background: #f0f7ff;
    transform: translateX(3px);
}

.cv-dropdown .mega-menu-icon {
    font-size: 18px;
    line-height: 1;
    margin-top: 2px;
}

.cv-dropdown .mega-menu-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cv-dropdown .mega-menu-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
}

.cv-dropdown .mega-menu-desc {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.45;
}

.cv-dropdown .mega-menu-link:hover .mega-menu-title {
    color: #1f74ca;
}

.cv-dropdown .mega-menu-link:hover .mega-menu-desc {
    color: #4f5f75;
}

/* ===== CV NAV DROPDOWN (Role-based) ===== */
.cv-nav-dropdown {
    min-width: 560px;
    grid-template-columns: 1fr 1fr;
    left: -20px;
}

.cv-nav-dropdown .cv-role-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cv-nav-dropdown .cv-role-header {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 4px 10px 8px;
    border-bottom: 1.5px solid #f0f4f8;
    margin-bottom: 4px;
}

.cv-nav-dropdown .cv-role-header.candidate-header {
    color: #0984e3;
}

.cv-nav-dropdown .cv-role-header.employer-header {
    color: #6c5ce7;
}

.cv-nav-dropdown .cv-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 10px;
    padding: 9px 10px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cv-nav-dropdown .cv-menu-link:hover {
    background: rgba(77,166,255,0.1);
    color: #1f74ca;
    transform: translateX(2px);
}

.cv-nav-dropdown .cv-menu-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

/* Hide sections based on auth state — JS toggles these */
.cv-nav-dropdown .cv-role-section[data-role="employer"] {
    display: none;
}

.cv-nav-dropdown .cv-role-section[data-role="employer"].visible {
    display: flex;
}

.cv-nav-dropdown .cv-role-section[data-role="candidate"].hidden {
    display: none;
}