/* ============================================================
   HEADER & NAVIGATION — Premium
   ============================================================ */

/* ── Header bar ─────────────────────────────────────────── */
.header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.header-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    gap: 24px;
}

/* ── Logo ────────────────────────────────────────────────── */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: 38px;
    width: auto;
}

@media (max-width: 480px) {
    .logo img { height: 30px; }
}

/* ── Desktop nav wrapper ─────────────────────────────────── */
.nav-desktop {
    display: none;
}

@media (min-width: 992px) {
    .nav-desktop {
        display: flex;
        align-items: center;
        gap: 6px;
    }
}

/* ── Nav page links ──────────────────────────────────────── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-family: var(--brand-font);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    padding: 7px 13px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link-icon {
    font-size: 0.78rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    color: var(--brand-blue);
    background: rgba(26, 167, 255, 0.08);
}

.nav-link:hover .nav-link-icon {
    opacity: 1;
}

.nav-link.active {
    color: var(--brand-blue);
    background: rgba(26, 167, 255, 0.1);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    background: var(--brand-blue);
    border-radius: 2px;
}

/* ── Divider between links and buttons ───────────────────── */
.nav-divider {
    width: 1px;
    height: 22px;
    background: var(--border-light);
    margin: 0 12px;
    flex-shrink: 0;
}

/* ── Create CV pill ──────────────────────────────────────── */
.nav-cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--brand-yellow);
    color: var(--dark);
    font-family: var(--brand-font);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 100px;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 235, 56, 0.35);
}

.nav-cta-pill i {
    font-size: 0.78rem;
}

.nav-cta-pill:hover {
    background: #ffe600;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 235, 56, 0.45);
    color: var(--dark);
}

/* ── Auth buttons ────────────────────────────────────────── */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.btn-nav-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-family: var(--brand-font);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1.5px solid var(--border-light);
    background: transparent;
    transition: all 0.22s ease;
    white-space: nowrap;
}

.btn-nav-login:hover {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
    background: rgba(26, 167, 255, 0.06);
}

.btn-nav-signup {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #0d8ee0 100%);
    color: #fff;
    font-family: var(--brand-font);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    padding: 9px 20px;
    border-radius: 100px;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(26, 167, 255, 0.35);
}

.btn-nav-signup i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.btn-nav-signup:hover {
    background: linear-gradient(135deg, #1495e6 0%, #0a7cc7 100%);
    box-shadow: 0 6px 20px rgba(26, 167, 255, 0.45);
    transform: translateY(-1px);
    color: #fff;
}

.btn-nav-signup:hover i {
    transform: translateX(3px);
}

/* ── Profile avatar ──────────────────────────────────────── */
.profile-wrapper {
    position: relative;
    margin-left: 8px;
}

.profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue), #0d8ee0);
    color: #fff;
    font-family: var(--brand-font);
    font-size: 0.95rem;
    font-weight: 700;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s ease;
    position: relative;
    flex-shrink: 0;
}

.profile-avatar:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(26, 167, 255, 0.18);
}

.profile-avatar-mobile {
    margin-right: 4px;
}

/* ── Profile dropdown ────────────────────────────────────── */
.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 230px;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.13), 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-light);
    z-index: 1100;
    overflow: hidden;
}

.profile-dropdown.open {
    display: block;
    animation: dropdownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 14px;
}

.profile-dropdown-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue), #0d8ee0);
    color: #fff;
    font-family: var(--brand-font);
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-dropdown-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-dropdown-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--border-light);
}

.profile-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    background: none;
    border: none;
    font-family: var(--brand-font);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease;
}

.profile-dropdown-item:hover {
    background: rgba(239, 68, 68, 0.06);
    color: #ef4444;
}

/* ── Mobile toggle area ──────────────────────────────────── */
.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 992px) {
    .mobile-header-right { display: none; }
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    background: var(--light-gray);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    gap: 0;
    transition: background 0.2s ease;
}

.menu-toggle:hover {
    background: #e8eaed;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    margin: 2.5px 0;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; width: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Mobile overlay ──────────────────────────────────────── */
.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.45);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active { opacity: 1; }

/* ── Mobile panel ────────────────────────────────────────── */
.nav-mobile {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 88%;
    height: 100%;
    background: var(--white);
    z-index: 1000;
    transform: translateX(105%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
}

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

/* Panel header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.mobile-menu-header .logo img { height: 30px; }

.mobile-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Logged-in user card */
.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(26,167,255,0.06), rgba(26,167,255,0.02));
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.mobile-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue), #0d8ee0);
    color: #fff;
    font-family: var(--brand-font);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(26,167,255,0.3);
}

.mobile-user-details { display: flex; flex-direction: column; min-width: 0; }

.mobile-user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-user-email {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Nav links */
.mobile-nav {
    padding: 14px 12px;
    flex: 1;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dark);
    font-family: var(--brand-font);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 10px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.mobile-nav-link:hover {
    background: rgba(26, 167, 255, 0.08);
    color: var(--brand-blue);
}

.mobile-nav-link.active {
    background: rgba(26, 167, 255, 0.12);
    color: var(--brand-blue);
    font-weight: 600;
}

.mobile-nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover .mobile-nav-icon,
.mobile-nav-link.active .mobile-nav-icon {
    background: rgba(26, 167, 255, 0.15);
    color: var(--brand-blue);
}

.mobile-nav-cta {
    background: rgba(255, 235, 56, 0.15);
    color: #856d00;
    font-weight: 600;
    margin-top: 10px;
}

.mobile-nav-cta .mobile-nav-icon {
    background: rgba(255, 235, 56, 0.3);
    color: #856d00;
}

.mobile-nav-cta:hover {
    background: var(--brand-yellow);
    color: var(--dark);
}

.mobile-nav-cta:hover .mobile-nav-icon {
    background: rgba(0,0,0,0.08);
    color: var(--dark);
}

/* ── Mobile footer (auth buttons) ───────────────────────── */
.mobile-nav-footer {
    padding: 16px 14px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.mobile-btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px;
    border-radius: 12px;
    border: 1.5px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--brand-font);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-btn-login:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: rgba(26, 167, 255, 0.05);
}

.mobile-btn-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-blue), #0d8ee0);
    color: #fff;
    font-family: var(--brand-font);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(26, 167, 255, 0.35);
    transition: all 0.2s ease;
}

.mobile-btn-signup:hover {
    box-shadow: 0 6px 20px rgba(26, 167, 255, 0.45);
    color: #fff;
    transform: translateY(-1px);
}

.mobile-btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    border: 1.5px solid #fee2e2;
    background: transparent;
    color: #ef4444;
    font-family: var(--brand-font);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-btn-logout:hover {
    background: #fee2e2;
}

.mobile-footer-copy {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin: 4px 0 0;
}

/* ── Body lock ───────────────────────────────────────────── */
body.menu-open { overflow: hidden; }

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .nav-mobile,
    .menu-toggle span,
    .mobile-nav-link { transition: none; }
}
