/* ═══════════════════════════════════════════════════════
   HOW WE WORK SECTION - PREMIUM DESIGN (FINAL FIXED)
   ═══════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────
   1. BASE SECTION
   ───────────────────────────────────────────────────── */

.how-we-work-section {
    position: relative;
    min-height: 100vh;
    padding: 140px 0 100px;
    background: #0a0a0a;
    overflow: hidden;
    isolation: isolate;
}

.work-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* ─────────────────────────────────────────────────────
   2. ANIMATED BACKGROUND
   ───────────────────────────────────────────────────── */

.work-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: floatOrb 25s ease-in-out infinite;
}

.bg-orb.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #FFD700 0%, #FF8C00 50%, transparent 70%);
    top: -15%;
    right: -10%;
    animation-delay: 0s;
}

.bg-orb.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #9333ea 0%, #6366f1 50%, transparent 70%);
    bottom: -10%;
    left: -5%;
    animation-delay: 8s;
}

.bg-orb.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #ec4899 0%, #8b5cf6 50%, transparent 70%);
    top: 40%;
    left: 40%;
    animation-delay: 16s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 40px) scale(0.9);
    }
    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

/* ─────────────────────────────────────────────────────
   3. SECTION HEADER
   ───────────────────────────────────────────────────── */

.work-header {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: rgba(255, 215, 0, 0.05);
    border: 1.5px solid rgba(255, 215, 0, 0.2);
    border-radius: 100px;
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-badge:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.15);
}

.header-badge svg {
    animation: rotateStar 4s linear infinite;
}

@keyframes rotateStar {
    to {
        transform: rotate(360deg);
    }
}

.header-badge span {
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.work-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #FFD700 50%, 
        #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -1px;
}

.work-description {
    font-size: 19px;
    color: rgba(255, 255, 255, 0.65);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ─────────────────────────────────────────────────────
   4. TIMELINE PROGRESS BAR
   ───────────────────────────────────────────────────── */

.timeline-progress-wrapper {
    position: relative;
    margin-bottom: 20px;
    height: 4px;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.timeline-progress-bar {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: visible;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, 
        #FFD700 0%, 
        #FFA500 50%, 
        #9333ea 100%);
    border-radius: 10px;
    animation: fillProgress 2s ease-out 0.5s forwards;
}

@keyframes fillProgress {
    to {
        width: 100%;
    }
}

.progress-glow {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 0;
    height: 20px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 215, 0, 0.6), 
        transparent);
    filter: blur(10px);
    animation: glowMove 2s ease-out 0.5s forwards;
}

@keyframes glowMove {
    to {
        width: 100%;
    }
}

/* ─────────────────────────────────────────────────────
   5. STEPS GRID
   ───────────────────────────────────────────────────── */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.step-item {
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    animation: stepFadeIn 0.8s ease-out forwards;
}

.step-item:nth-child(1) { animation-delay: 0.4s; }
.step-item:nth-child(2) { animation-delay: 0.6s; }
.step-item:nth-child(3) { animation-delay: 0.8s; }
.step-item:nth-child(4) { animation-delay: 1s; }

@keyframes stepFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─────────────────────────────────────────────────────
   6. STEP NUMBER CIRCLE
   ───────────────────────────────────────────────────── */

.step-number-circle {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-border {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    background: 
        linear-gradient(#0a0a0a, #0a0a0a) padding-box,
        linear-gradient(135deg, #FFD700, #9333ea) border-box;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.circle-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #9333ea);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.step-num {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

.step-item:hover .circle-border {
    transform: rotate(180deg) scale(1.1);
}

.step-item:hover .circle-glow {
    opacity: 0.4;
    animation: pulseGlow 2s ease infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

.step-item:hover .step-num {
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* ─────────────────────────────────────────────────────
   7. STEP CARD
   ───────────────────────────────────────────────────── */

.step-card {
    position: relative;
    background: rgba(15, 15, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 40px 28px;
    backdrop-filter: blur(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-glow-effect {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 215, 0, 0.08) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.step-card:hover {
    transform: translateY(-12px);
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(20, 20, 25, 0.8);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.step-card:hover .card-glow-effect {
    opacity: 1;
    animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
    to {
        transform: rotate(360deg);
    }
}

/* ─────────────────────────────────────────────────────
   8. STEP ICON - FIX: پس‌زمینه آیکون
   ───────────────────────────────────────────────────── */

.step-icon-wrapper {
    position: relative;
    width: 75px;
    height: 75px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.2) 0%, 
        rgba(255, 165, 0, 0.15) 50%,
        rgba(147, 51, 234, 0.2) 100%);
    border: 1.5px solid rgba(255, 215, 0, 0.25);
    border-radius: 18px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px rgba(255, 215, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.step-icon-wrapper i {
    font-size: 36px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

.step-card:hover .icon-bg {
    transform: rotate(-10deg) scale(1.15);
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.3) 0%, 
        rgba(255, 165, 0, 0.25) 50%,
        rgba(147, 51, 234, 0.3) 100%);
    box-shadow: 
        0 8px 32px rgba(255, 215, 0, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 215, 0, 0.4);
}

.step-card:hover .step-icon-wrapper i {
    transform: scale(1.1) translateY(-3px);
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.4));
}

/* ─────────────────────────────────────────────────────
   9. STEP CONTENT
   ───────────────────────────────────────────────────── */

.step-heading {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    text-align: center;
    transition: all 0.4s ease;
}

.step-card:hover .step-heading {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-2px);
}

.step-text {
    font-size: 14.5px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* ─────────────────────────────────────────────────────
   10. FEATURES LIST - FIX: پس‌زمینه آیکون‌ها
   ───────────────────────────────────────────────────── */

.step-features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover {
    background: rgba(255, 215, 0, 0.05);
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateX(-5px);
}

.feature-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.25) 0%, 
        rgba(255, 165, 0, 0.2) 50%,
        rgba(147, 51, 234, 0.25) 100%);
    border: 1.5px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(255, 215, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.feature-icon i {
    font-size: 11px;
    color: #FFD700;
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: rotate(360deg) scale(1.1);
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.35) 0%, 
        rgba(255, 165, 0, 0.3) 50%,
        rgba(147, 51, 234, 0.35) 100%);
    box-shadow: 
        0 4px 12px rgba(255, 215, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
}

.feature-item span {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: color 0.3s ease;
}

.feature-item:hover span {
    color: #FFD700;
}

/* ─────────────────────────────────────────────────────
   11. BOTTOM CTA SECTION - FIX: جلوگیری از همپوشانی
   ───────────────────────────────────────────────────── */

.work-cta-section {
    position: relative;
    animation: fadeInUp 1s ease-out 1.2s backwards;
    z-index: 5;
    margin-top: 200px;
}

.cta-content {
    position: relative;
    text-align: center;
    padding: 70px 50px;
    background: rgba(15, 15, 20, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 0 1px rgba(255, 255, 255, 0.1);
}

.cta-glow {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(
        circle,
        rgba(255, 215, 0, 0.08) 0%,
        transparent 50%
    );
    animation: rotateCTAGlow 15s linear infinite;
    pointer-events: none;
}

@keyframes rotateCTAGlow {
    to {
        transform: rotate(360deg);
    }
}

.cta-heading {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.cta-text {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.premium-cta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 18px 48px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #0a0a0a;
    font-size: 17px;
    font-weight: 700;
    border-radius: 100px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 
        0 4px 20px rgba(255, 215, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    transition: all 0.4s ease;
}

.btn-icon i {
    font-size: 13px;
    transition: transform 0.4s ease;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.6s ease;
}

.premium-cta-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.premium-cta-btn:hover .btn-glow {
    left: 100%;
}

.premium-cta-btn:hover .btn-icon {
    transform: scale(1.15);
    background: rgba(0, 0, 0, 0.25);
}

.premium-cta-btn:hover .btn-icon i {
    transform: translateX(-3px);
}

.premium-cta-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* ─────────────────────────────────────────────────────
   12. RESPONSIVE - FIX: جلوگیری از همپوشانی موبایل
   ───────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    .work-title {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .how-we-work-section {
        padding: 100px 0 80px;
    }

    .work-wrapper {
        padding: 0 20px;
    }

    .work-header {
        margin-bottom: 60px;
    }

    .work-title {
        font-size: 36px;
    }

    .work-description {
        font-size: 16px;
    }

    /* FIX: تک ستونی برای موبایل */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        margin-bottom: 70px;
    }

    .timeline-progress-wrapper {
        display: none;
    }

    .step-number-circle {
        width: 80px;
        height: 80px;
        margin-bottom: 24px;
    }

    .step-num {
        font-size: 28px;
    }

    .step-card {
        padding: 35px 24px;
    }

    .step-icon-wrapper {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .step-icon-wrapper i {
        font-size: 32px;
    }

    .step-heading {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .step-text {
        font-size: 14px;
        margin-bottom: 20px;
    }

    /* FIX: فاصله CTA در موبایل */
    .work-cta-section {
        margin-top: 70px;
    }

    .cta-content {
        padding: 50px 25px;
    }

    .cta-heading {
        font-size: 26px;
        line-height: 1.3;
        margin-bottom: 14px;
    }

    .cta-text {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .premium-cta-btn {
        padding: 16px 40px;
        font-size: 16px;
        width: 100%;
        justify-content: center;
    }

    .bg-orb {
        filter: blur(100px);
        opacity: 0.08;
    }
}

@media (max-width: 480px) {
    .how-we-work-section {
        padding: 80px 0 60px;
    }

    .work-wrapper {
        padding: 0 16px;
    }

    .work-title {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .work-description {
        font-size: 14px;
    }

    .header-badge {
        padding: 10px 20px;
    }

    .header-badge span {
        font-size: 13px;
    }

    /* FIX: فاصله بهتر در موبایل کوچک */
    .steps-grid {
        gap: 30px;
        margin-bottom: 60px;
    }

    .step-number-circle {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .step-num {
        font-size: 24px;
    }

    .step-card {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .step-icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .step-icon-wrapper i {
        font-size: 28px;
    }

    .step-heading {
        font-size: 18px;
    }

    .step-text {
        font-size: 13px;
        line-height: 1.7;
    }

    .feature-item {
        padding: 8px 10px;
    }

    .feature-icon {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }

    .feature-icon i {
        font-size: 10px;
    }

    .feature-item span {
        font-size: 12.5px;
    }

    /* FIX: CTA در موبایل کوچک */
    .work-cta-section {
        margin-top: 60px;
    }

    .cta-content {
        padding: 40px 20px;
        border-radius: 20px;
    }

    .cta-heading {
        font-size: 22px;
    }

    .cta-text {
        font-size: 14px;
        line-height: 1.6;
    }

    .premium-cta-btn {
        padding: 14px 32px;
        font-size: 15px;
    }
}

/* ═══════════════════════════════════════════════════════
   END OF CSS
   ═══════════════════════════════════════════════════════ */
