/**
 * ============================================================================
 * HOW WE WORK SECTION - CREATIVE ENHANCED
 * Interactive timeline with advanced animations
 * ============================================================================
 */

/* Section Container */
.how-we-work-section {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(
        180deg,
        #FFFFFF 0%,
        #fdf2f8 30%,
        #fce7f3 50%,
        #fdf2f8 70%,
        #FFFFFF 100%
    );
    overflow: hidden;
}

/* Animated Background Shapes */
.work-bg-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.work-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.work-shape-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2), transparent);
    animation: morphShape 15s ease-in-out infinite;
}

.work-shape-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(252, 231, 243, 0.4), transparent);
    animation: morphShape 20s ease-in-out infinite reverse;
}

@keyframes morphShape {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        border-radius: 50%;
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
        border-radius: 40% 60% 60% 40%;
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
        border-radius: 60% 40% 40% 60%;
    }
}

/* Section Header */
.how-we-work-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.how-we-work-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #ec4899, #f472b6);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
    animation: tagFloat 3s ease-in-out infinite;
}

@keyframes tagFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.tag-pulse {
    position: absolute;
    left: 10px;
    width: 8px;
    height: 8px;
    background: #FFFFFF;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.how-we-work-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    line-height: 1.2;
}

.title-gradient {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 50%, #ec4899 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: flowGradient 3s linear infinite;
}

@keyframes flowGradient {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.how-we-work-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: #64748b;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* Steps Container */
.how-we-work-steps {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    z-index: 2;
}

/* Animated Progress Line */
.progress-line-container {
    position: absolute;
    left: 36px;
    top: 36px;
    bottom: 36px;
    width: 2px;
    z-index: 1;
}

.progress-line {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
}

.progress-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(
        to bottom,
        #ec4899,
        #f472b6,
        #ec4899
    );
    background-size: 100% 200%;
    animation: fillProgress 3s ease-out forwards, flowProgress 2s linear infinite;
}

@keyframes fillProgress {
    to {
        height: 100%;
    }
}

@keyframes flowProgress {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 0% 100%;
    }
}

/* Work Step */
.work-step {
    position: relative;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 40px;
    margin-bottom: 60px;
    opacity: 0;
    animation: slideInStep 0.8s ease forwards;
}

.work-step:nth-child(1) { animation-delay: 0.2s; }
.work-step:nth-child(2) { animation-delay: 0.4s; }
.work-step:nth-child(3) { animation-delay: 0.6s; }
.work-step:nth-child(4) { animation-delay: 0.8s; }

.work-step:last-child {
    margin-bottom: 0;
}

@keyframes slideInStep {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step Timeline */
.step-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Step Number Container */
.step-number-container {
    position: relative;
    z-index: 2;
}

.number-ripple {
    position: absolute;
    inset: -15px;
    border: 2px solid #ec4899;
    border-radius: 50%;
    opacity: 0;
    animation: rippleEffect 2s ease-out infinite;
}

@keyframes rippleEffect {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.step-number {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ec4899, #f472b6);
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.4);
    transition: all 0.4s ease;
    cursor: pointer;
}

.work-step:hover .step-number {
    transform: scale(1.15) rotate(360deg);
    box-shadow: 0 12px 40px rgba(236, 72, 153, 0.6);
}

.number-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    z-index: 2;
}

.number-glow {
    position: absolute;
    inset: -5px;
    background: linear-gradient(135deg, #ec4899, #f472b6);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.work-step:hover .number-glow {
    opacity: 0.6;
}

/* Step Connector */
.step-connector {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.connector-dots {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.connector-dots span {
    width: 8px;
    height: 8px;
    background: #fce7f3;
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

.connector-dots span:nth-child(1) { animation-delay: 0s; }
.connector-dots span:nth-child(2) { animation-delay: 0.3s; }
.connector-dots span:nth-child(3) { animation-delay: 0.6s; }

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        background: #fce7f3;
    }
    50% {
        transform: scale(1.5);
        background: #ec4899;
    }
}

/* Step Card */
.step-card {
    position: relative;
    padding: 36px;
    background: #FFFFFF;
    border: 2px solid #f3f4f6;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: cardShine 3s ease-in-out infinite;
}

@keyframes cardShine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.work-step:hover .step-card {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.15);
    border-color: #fce7f3;
}

/* Step Icon Box */
.step-icon-box {
    display: inline-flex;
    margin-bottom: 20px;
}

.icon-float {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fce7f3, #fdf2f8);
    border-radius: 16px;
    transition: all 0.4s ease;
}

.work-step:hover .icon-float {
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.3);
}

.icon-float i {
    font-size: 1.75rem;
    color: #ec4899;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Step Content */
.step-content {
    position: relative;
    z-index: 2;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.3;
}

.step-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #64748b;
    margin-bottom: 20px;
}

/* Step Features */
.step-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fce7f3, #fdf2f8);
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #ec4899;
}

.feature-tag i {
    font-size: 0.75rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .how-we-work-section {
        padding: 60px 0;
    }
    
    .how-we-work-header {
        margin-bottom: 60px;
    }
    
    .work-step {
        grid-template-columns: 60px 1fr;
        gap: 24px;
        margin-bottom: 48px;
    }
    
    .progress-line-container {
        left: 30px;
    }
    
    .step-number-container {
        width: 60px;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
    }
    
    .number-text {
        font-size: 1.25rem;
    }
    
    .step-card {
        padding: 24px;
    }
    
    .icon-float {
        width: 56px;
        height: 56px;
    }
    
    .icon-float i {
        font-size: 1.5rem;
    }
    
    .step-title {
        font-size: 1.25rem;
    }
    
    .step-description {
        font-size: 0.875rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .work-shape-1,
    .work-shape-2,
    .how-we-work-tag,
    .tag-pulse,
    .title-gradient,
    .progress-line-fill,
    .number-ripple,
    .connector-dots span,
    .card-shine,
    .icon-float i {
        animation: none;
    }
    
    .work-step:hover .step-number,
    .work-step:hover .icon-float,
    .work-step:hover .step-card {
        transform: none;
    }
}