/* ═══════════════════════════════════════
   Career Progress - Design System
   Matches: newswire-redesign (7)/app/profile/page.tsx
   ═══════════════════════════════════════ */

@keyframes crPulseRing {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79,110,247,0.25); }
    50% { box-shadow: 0 0 0 0.35vw rgba(79,110,247,0.06); }
}
@keyframes crBarGrow {
    from { width: 0%; }
    to { width: var(--bw); }
}
@keyframes crFadeIn {
    from { opacity: 0; transform: translateY(0.3vw); }
    to { opacity: 1; transform: translateY(0); }
}

.career-progress-container {
    width: 100%;
}

/* ── Hero Card (OverviewCard) ── */
.cr-hero-card {
    background: #fff;
    border-radius: 0.6vw;
    border: 0.06vw solid #e2e5ea;
    overflow: hidden;
    margin-bottom: 0.8vw;
    position: relative;
}

.cr-hero-inner {
    display: flex;
    align-items: stretch;
}

.cr-hero-image {
    width: 40%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
}

.cr-hero-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}

.cr-hero-level-badge {
    position: absolute;
    top: 0.6vw;
    left: 0.6vw;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    border-radius: 0.3vw;
    padding: 0.18vw 0.5vw;
    display: flex;
    align-items: center;
    gap: 0.25vw;
}

.cr-hero-level-badge .cr-level-dot {
    width: 0.35vw;
    height: 0.35vw;
    border-radius: 50%;
    background: var(--cr-level-color, #10b981);
}

.cr-hero-level-badge span:last-child {
    font-size: 0.5vw;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03vw;
}

.cr-hero-content {
    flex: 1;
    padding: 1vw 1.2vw;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.cr-hero-users-reached {
    margin-top: auto;
    padding-top: 0.9vw;
    border-top: 0.06vw solid rgba(0,0,0,0.06);
    display: inline-flex;
    align-items: center;
    gap: 0.35vw;
    font-size: 0.65vw;
    font-weight: 500;
    color: #667085;
}

.cr-hero-users-count {
    font-weight: 600;
    color: var(--cr-level-color, #10b981);
}

.cr-hero-users-label {
    letter-spacing: 0.02vw;
}

.cr-hero-title-row {
    display: flex;
    align-items: center;
    gap: 0.4vw;
    margin-bottom: 0.25vw;
}

.cr-hero-title {
    margin: 0;
    font-size: 1.2vw;
    font-weight: 800;
    color: #111318;
}

.cr-hero-rank-badge {
    font-size: 0.45vw;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    border-radius: 0.15vw;
    padding: 0.08vw 0.3vw;
    letter-spacing: 0.06vw;
}

.cr-hero-description {
    font-size: 0.72vw;
    color: #555;
    line-height: 1.65;
    margin: 0 0 0.6vw;
    max-width: 24vw;
}

/* ── Level Selector Strip ── */
.cr-level-strip {
    background: #fff;
    border-radius: 0.6vw;
    border: 0.06vw solid #e2e5ea;
    padding: 0.45vw 0.55vw;
    display: flex;
    gap: 0.3vw;
    margin-bottom: 0.8vw;
    pointer-events: auto;
}

.cr-level-tab {
    flex: 1;
    padding: 0.5vw 0.3vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25vw;
    border-radius: 0.4vw;
    cursor: default;
    transition: all 0.25s;
    border: 0.08vw solid transparent;
    background: none;
    font-family: inherit;
}

.cr-level-tab:disabled {
    cursor: default;
}

.cr-level-tab:hover {
    background: rgba(79,110,247,0.03);
}

.cr-level-tab.current {
    background: color-mix(in srgb, var(--cr-tab-color) 6%, transparent);
    border-color: color-mix(in srgb, var(--cr-tab-color) 19%, transparent);
    animation: crPulseRing 2.5s ease infinite;
}

.cr-level-tab.unlocked {
    cursor: pointer;
    opacity: 1;
}

.cr-level-tab.unlocked:hover {
    background: rgba(79,110,247,0.04);
}

.cr-level-tab.locked {
    opacity: 0.4;
}

.cr-level-tab-icon {
    width: 1.8vw;
    height: 1.8vw;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cr-level-tab.current .cr-level-tab-icon {
    background: var(--cr-tab-color);
}

.cr-level-tab.current .cr-level-tab-icon svg {
    color: #fff;
}

.cr-level-tab.unlocked .cr-level-tab-icon {
    background: color-mix(in srgb, var(--cr-tab-color) 9%, transparent);
    border: 0.08vw solid color-mix(in srgb, var(--cr-tab-color) 19%, transparent);
}

.cr-level-tab.unlocked .cr-level-tab-icon svg {
    color: var(--cr-tab-color);
}

.cr-level-tab.locked .cr-level-tab-icon {
    background: #f0f1f3;
    border: 0.08vw solid #e2e5ea;
}

.cr-level-tab.locked .cr-level-tab-icon svg {
    color: #b0b5c0;
}

.cr-level-tab-name {
    font-size: 0.68vw;
    font-weight: 600;
    color: #111318;
    text-align: center;
    line-height: 1.2;
}

.cr-level-tab.current .cr-level-tab-name {
    color: var(--cr-tab-color);
}

.cr-level-tab.locked .cr-level-tab-name {
    color: #a0a5b2;
}

.cr-level-tab-num {
    font-size: 0.58vw;
    color: #667085;
    font-weight: 500;
}

.cr-level-tab.current .cr-level-tab-num {
    color: var(--cr-tab-color);
}

/* ── Requirements Card ── */
.cr-requirements-card {
    background: #fff;
    border-radius: 0.6vw;
    border: 0.06vw solid #e2e5ea;
    overflow: hidden;
    animation: crFadeIn 0.4s ease;
}

.cr-req-header {
    padding: 0.65vw 0.85vw;
    border-bottom: 0.06vw solid #f0f1f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cr-req-header-left {
    display: flex;
    align-items: center;
    gap: 0.4vw;
}

.cr-req-header-left svg {
    width: 0.85vw;
    height: 0.85vw;
    color: #4f6ef7;
}

.cr-req-title {
    font-size: 0.95vw;
    font-weight: 700;
    color: #111318;
}

.cr-req-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.5vw;
}

.cr-circular-progress {
    position: relative;
    width: 2.2vw;
    height: 2.2vw;
}

.cr-circular-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.cr-circular-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.52vw;
    font-weight: 700;
    color: #111318;
}

.cr-req-count {
    font-size: 0.58vw;
}

.cr-req-count-line {
    white-space: nowrap;
}

.cr-req-count strong {
    font-weight: 600;
    color: #111318;
}

.cr-req-header {
    padding: 0.5vw 0.85vw;
}

/* ── Requirements Grid ── */
.cr-req-grid {
    padding: 0.45vw 0.85vw;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5vw;
}

.cr-req-item {
    border-radius: 0.45vw;
    background: #fff;
    border: 0.08vw solid #e2e5ea;
    overflow: hidden;
    position: relative;
    transition: all 0.25s;
}

.cr-req-item:hover {
    transform: translateY(-0.15vw);
    box-shadow: 0 0.3vw 1vw rgba(0,0,0,0.07);
}

.cr-req-item.completed {
    border-color: rgba(16,185,129,0.25);
}

.cr-req-item-bar {
    height: 0.18vw;
    background: linear-gradient(90deg, #4f6ef7, rgba(129,140,248,0.5));
    position: relative;
}

.cr-req-item.completed .cr-req-item-bar {
    background: linear-gradient(90deg, #10b981, #059669);
}

.cr-req-item-body {
    padding: 0.45vw 0.55vw;
}

.cr-req-item-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35vw;
    margin-bottom: 0.4vw;
    position: relative;
}

.cr-req-item-icon {
    width: 1.5vw;
    height: 1.5vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cr-req-item-icon svg {
    color: #4f6ef7;
}

.cr-req-item.completed .cr-req-item-icon svg {
    color: #10b981;
}

.cr-req-item-label {
    font-size: 0.75vw;
    font-weight: 600;
    color: #111318;
    text-align: center;
}

.cr-req-item-values {
    display: flex;
    align-items: baseline;
    gap: 0.2vw;
    margin-bottom: 0.35vw;
}

.cr-req-item-values strong {
    font-size: 0.95vw;
    font-weight: 800;
    color: #111318;
}

.cr-req-item-values span {
    font-size: 0.6vw;
    font-weight: 500;
    color: #a0a5b2;
}

.cr-req-item-progress {
    height: 0.3vw;
    border-radius: 0.2vw;
    background: #f0f1f3;
    overflow: hidden;
}

.cr-req-item-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f6ef7, #818cf8);
    border-radius: 0.2vw;
    animation: crBarGrow 1s ease-out;
}

.cr-req-item.completed .cr-req-item-progress-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.cr-req-item-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.15vw;
}

.cr-req-complete {
    font-size: 0.6vw;
    font-weight: 600;
    color: #10b981;
}

.cr-req-percent {
    font-size: 0.6vw;
    font-weight: 600;
    color: #4f6ef7;
}

.cr-req-item.completed .cr-req-item-footer .cr-req-complete {
    color: #10b981;
}

.cr-req-item:not(.completed) .cr-req-item-footer .cr-req-percent {
    color: #4f6ef7;
}

/* ── Veteran Card ── */
.cr-veteran-card {
    background: linear-gradient(135deg, rgba(79,110,247,0.04) 0%, rgba(139,92,246,0.06) 50%, rgba(236,72,153,0.04) 100%);
    border: 0.08vw solid rgba(79,110,247,0.2);
    border-radius: 0.6vw;
    padding: 2vw;
    text-align: center;
    animation: crFadeIn 0.4s ease;
}

.cr-veteran-icon {
    width: 4vw;
    height: 4vw;
    margin: 0 auto 1vw;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f6ef7, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 1.5vw rgba(79,110,247,0.4);
}

.cr-veteran-icon svg {
    width: 2vw;
    height: 2vw;
    color: #fff;
}

.cr-veteran-title {
    font-size: 1.3vw;
    font-weight: 800;
    background: linear-gradient(135deg, #4f6ef7, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5vw;
}

.cr-veteran-description {
    font-size: 0.78vw;
    color: #667085;
    line-height: 1.6;
    max-width: 30vw;
    margin: 0 auto;
}

.cr-veteran-perks {
    display: flex;
    justify-content: center;
    gap: 1.2vw;
    margin-top: 1.3vw;
}

.cr-veteran-perk {
    padding: 0.6vw 0.8vw;
    background: rgba(255,255,255,0.7);
    border-radius: 0.4vw;
    border: 0.06vw solid rgba(79,110,247,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35vw;
}

.cr-veteran-perk svg {
    width: 1vw;
    height: 1vw;
    color: #4f6ef7;
}

.cr-veteran-perk span {
    font-size: 0.58vw;
    color: #555;
    font-weight: 500;
}

/* Fix reward badge color - use current level color */
/* Responsive */
@media (max-width: 96.685vw) {
    .cr-req-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 70.718vw) {
    .cr-hero-inner {
        flex-direction: column;
        min-height: auto;
    }
    
    .cr-hero-image {
        width: 100%;
        padding-bottom: 56.25%;
        height: 0;
    }
    
    .cr-hero-image img {
        position: absolute;
    }
    
    .cr-req-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 53.039vw) {
    .cr-level-strip {
        flex-wrap: wrap;
    }
    
    .cr-level-tab {
        flex: 1 1 30%;
    }
    
    .cr-req-grid {
        grid-template-columns: 1fr;
    }
}
