/* ── Steps / How-it-works section ─────────────────────── */

.nq-steps {
    position: relative;
    overflow: hidden;
    padding-top: 5.5rem;
    padding-bottom: 5.5rem;
    isolation: isolate;
}

body.nq-homepage-2 .neuroquest-home-2 .nq-steps__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 18% 10%, rgba(73, 222, 255, 0.22), transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 75%, rgba(15, 134, 248, 0.18), transparent 55%),
        radial-gradient(ellipse 50% 35% at 50% 50%, rgba(24, 169, 255, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(232, 248, 255, 0.92) 0%, rgba(214, 240, 255, 0.78) 100%);
    pointer-events: none;
    z-index: -2;
}

.nq-steps__path-deco {
    position: absolute;
    top: 4rem;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 12rem;
    height: auto;
    pointer-events: none;
    opacity: 0.45;
    z-index: 0;
    animation: nq-steps-path-pulse 8s ease-in-out infinite;
}

@keyframes nq-steps-path-pulse {
    0%, 100% { opacity: 0.30; }
    50%      { opacity: 0.65; }
}

.nq-steps__deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: nq-deco-drift ease-in-out infinite;
    animation-fill-mode: both;
}

.nq-steps__deco--1 {
    top: 11%;
    right: 9%;
    animation-duration: 9s;
    animation-delay: 1s;
}

.nq-steps__deco--2 {
    bottom: 18%;
    left: 7%;
    animation-duration: 11s;
    animation-delay: 2.5s;
}

.nq-steps__header {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.nq-steps__heading {
    font-size: clamp(1.75rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--nq-text);
}

.nq-steps__subtitle {
    max-width: 32rem;
    font-size: clamp(0.95rem, 1.6vw, 1.12rem);
    line-height: 1.8;
    color: var(--nq-text-soft);
}

.nq-steps__progress {
    position: relative;
    z-index: 2;
    max-width: 40rem;
    margin: 0 auto 2.25rem;
    padding: 1rem 1.1rem 1.15rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(15, 134, 248, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(240, 252, 255, 0.62));
    backdrop-filter: blur(14px);
    box-shadow:
        0 18px 50px rgba(15, 134, 248, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.nq-steps__progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--nq-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nq-steps__progress-track {
    height: 0.5rem;
    border-radius: 999px;
    background: rgba(15, 134, 248, 0.08);
    overflow: hidden;
}

.nq-steps__progress-fill {
    position: relative;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0a63b8 0%, #0f86f8 50%, #49deff 100%);
    background-size: 220% 100%;
    transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
    box-shadow:
        0 0 12px rgba(15, 134, 248, 0.45),
        0 0 22px rgba(73, 222, 255, 0.30);
    animation: nq-hp-shimmer 3s ease-in-out infinite 2s;
}

.nq-steps__progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: nq-hp-sweep 2.4s ease-in-out infinite 2.5s;
    border-radius: inherit;
}

.nq-steps__timeline {
    position: relative;
    z-index: 2;
    max-width: 42rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nq-steps__line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 1.375rem;
    width: 2px;
    background: rgba(15, 134, 248, 0.08);
    overflow: hidden;
}

.nq-steps__line-fill {
    display: block;
    width: 100%;
    height: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, #49deff, #0f86f8, #18a9ff);
    transition: height 1.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.nq-steps__item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    padding-bottom: 1.5rem;
}

.nq-steps__item:last-child {
    padding-bottom: 0;
}

.nq-steps__node {
    position: relative;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #49deff, #0f86f8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 0.7),
        0 0 24px rgba(73, 222, 255, 0.22);
    z-index: 1;
    animation: nq-node-pulse 3s ease-in-out infinite;
}

.nq-steps__item:nth-child(2) .nq-steps__node { animation-delay: 0.5s; }
.nq-steps__item:nth-child(3) .nq-steps__node { animation-delay: 1s; }
.nq-steps__item:nth-child(4) .nq-steps__node { animation-delay: 1.5s; }
.nq-steps__item:nth-child(5) .nq-steps__node { animation-delay: 2s; }

@keyframes nq-node-pulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.7), 0 0 24px rgba(73, 222, 255, 0.22); }
    50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.5), 0 0 36px rgba(73, 222, 255, 0.35); }
}

.nq-steps__node-number {
    font-size: 0.85rem;
    font-weight: 800;
    color: #04111d;
}

.nq-steps__card {
    flex: 1;
    position: relative;
    padding: 1.3rem 1.2rem 1.2rem;
    border: 1px solid rgba(15, 134, 248, 0.14);
    border-radius: 1.35rem;
    background:
        radial-gradient(ellipse 110% 60% at 50% 0%, rgba(73, 222, 255, 0.16), transparent 65%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(240, 252, 255, 0.65));
    backdrop-filter: blur(14px);
    box-shadow:
        0 16px 42px rgba(15, 134, 248, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.nq-steps__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 2px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, transparent, #0f86f8, #49deff, #0f86f8, transparent);
    background-size: 200% 100%;
    opacity: 0.7;
    animation: nq-section-edge-shimmer 4s ease-in-out infinite;
}

.nq-steps__item:nth-child(2) .nq-steps__card::before { animation-delay: 0.7s; }
.nq-steps__item:nth-child(3) .nq-steps__card::before { animation-delay: 1.4s; }
.nq-steps__item:nth-child(4) .nq-steps__card::before { animation-delay: 2.1s; }
.nq-steps__item:nth-child(5) .nq-steps__card::before { animation-delay: 2.8s; }

.nq-steps__card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 22px 56px rgba(15, 134, 248, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: rgba(15, 134, 248, 0.28);
}

.nq-steps__card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.nq-steps__quest,
.nq-steps__reward {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nq-steps__quest {
    background: rgba(15, 134, 248, 0.08);
    color: var(--nq-primary);
}

.nq-steps__reward {
    background: rgba(73, 222, 255, 0.12);
    color: #0b75bf;
}

.nq-steps__reward.nq-xp-pop {
    position: static;
    text-transform: uppercase;
}

.nq-steps__card-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(73, 222, 255, 0.14), rgba(15, 134, 248, 0.08));
    color: var(--nq-primary);
    box-shadow: 0 10px 24px rgba(15, 134, 248, 0.08);
}

.nq-steps__card-icon svg,
.nq-steps__card-icon i {
    width: 1.35rem;
    height: 1.35rem;
}

.nq-steps__card-icon i {
    line-height: 1;
    --fa-primary-color: currentColor;
    --fa-secondary-color: #49deff;
    --fa-primary-opacity: 1;
    --fa-secondary-opacity: 0.35;
}

.nq-steps__card-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--nq-text);
    margin-bottom: 0.5rem;
}

.nq-steps__card-copy {
    font-size: 0.93rem;
    line-height: 1.75;
    color: var(--nq-text-soft);
}

@media (max-width: 767px) {
    .nq-steps {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }

    .nq-steps__path-deco {
        width: 8rem;
        opacity: 0.30;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nq-steps__progress-fill,
    .nq-steps__progress-fill::after,
    .nq-steps__card::before,
    .nq-steps__path-deco {
        animation: none !important;
    }
}
