/**
 * Modern Workflow Section
 * Enhanced "How It Works" section with timeline and step indicators
 */

/* ========================================================================
   Workflow Section Base
   ======================================================================== */

.workflow-section-modern {
    padding: 5rem 0 4rem;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    position: relative;
    overflow: hidden;
}

.workflow-section-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* ========================================================================
   Section Header
   ======================================================================== */

.workflow-header {
    max-width: 750px;
    margin: 0 auto 3.5rem;
    text-align: center;
    padding: 0 1rem;
}

.section-badge {
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: center;
}

.badge-modern {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.badge-modern.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    color: #1e40af;
    border: 2px solid rgba(59, 130, 246, 0.2);
}

.section-title-modern {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-subtitle-modern {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: #6B7280;
    line-height: 1.7;
    max-width: 650px;
    margin: 0 auto;
    font-weight: 500;
}

/* ========================================================================
   Workflow Steps Container
   ======================================================================== */

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    position: relative;
    max-width: 1100px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

/* Timeline Connector (Desktop) */
.workflow-timeline {
    position: absolute;
    top: 25px;
    left: 50%;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #e5e7eb 0%, #4F46E5 50%, #e5e7eb 100%);
    transform: translateX(-50%);
    z-index: 0;
    display: none;
}

@media (min-width: 992px) {
    .workflow-steps {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .workflow-timeline {
        display: block;
        width: calc(100% - 200px);
    }
}

/* ========================================================================
   Individual Workflow Step
   ======================================================================== */

.workflow-step {
    position: relative;
    z-index: 1;
}

/* Step Number Badge */
.step-number-badge {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 0 auto 1.25rem;
    z-index: 10;
}

.step-number {
    position: relative;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
    z-index: 2;
}

.step-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.3);
    animation: pulse-step 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse-step {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* ========================================================================
   Workflow Card
   ======================================================================== */

.workflow-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 1.5rem 1.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    border: 2px solid #F3F4F6;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.workflow-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4F46E5, #7C3AED);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px 16px 0 0;
}

.workflow-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: #E5E7EB;
}

.workflow-card:hover::before {
    opacity: 1;
}

/* Featured Card (Middle Step) */
.workflow-card-featured {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    transform: scale(1.03);
    box-shadow: 0 12px 36px rgba(79, 70, 229, 0.25);
    border-color: transparent;
}

.workflow-card-featured .workflow-title,
.workflow-card-featured .workflow-description {
    color: white;
}

.workflow-card-featured .step-number {
    background: white;
    color: #4F46E5;
}

.workflow-card-featured .workflow-icon-container {
    background: rgba(255, 255, 255, 0.2);
}

.workflow-card-featured:hover {
    transform: scale(1.05) translateY(-8px);
}

/* ========================================================================
   Workflow Icon
   ======================================================================== */

.workflow-icon-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    border-radius: 16px;
    background: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.workflow-card:hover .workflow-icon-container {
    transform: scale(1.08);
}

.workflow-icon-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 16px;
    opacity: 0.12;
    z-index: 0;
}

.workflow-icon-bg-1 {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
}

.workflow-icon-bg-2 {
    background: linear-gradient(135deg, #10b981, #059669);
}

.workflow-icon-bg-3 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.workflow-icon {
    position: relative;
    z-index: 2;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.workflow-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* ========================================================================
   Workflow Content
   ======================================================================== */

.workflow-content {
    text-align: center;
}

.workflow-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.workflow-description {
    font-size: 0.9375rem;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ========================================================================
   Workflow Arrow Indicator
   ======================================================================== */

.workflow-arrow {
    display: none;
}

/* ========================================================================
   Workflow CTA
   ======================================================================== */

.workflow-cta {
    margin-top: 2rem;
    position: relative;
    z-index: 20;
}

.workflow-cta .btn-modern-primary {
    padding: 1.125rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    position: relative;
    z-index: 20;
}

.workflow-cta .btn-modern-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
}

/* ========================================================================
   Mobile Responsiveness
   ======================================================================== */

@media (max-width: 991px) {
    .workflow-section-modern {
        padding: 5rem 0;
    }
    
    .workflow-header {
        margin-bottom: 3rem;
    }
    
    .workflow-steps {
        gap: 2rem;
    }
    
    .workflow-card {
        padding: 2rem 1.5rem;
    }
    
    .workflow-card-featured {
        transform: scale(1);
    }
    
    .workflow-card-featured:hover {
        transform: translateY(-8px);
    }
    
    .step-number-badge {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    .step-pulse {
        width: 60px;
        height: 60px;
    }
    
    .workflow-icon-container {
        width: 100px;
        height: 100px;
    }
    
    .workflow-icon {
        width: 60px;
        height: 60px;
    }
    
    .workflow-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .workflow-section-modern {
        padding: 4rem 0;
    }
    
    .workflow-steps {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .section-title-modern {
        font-size: 1.75rem;
    }
    
    .section-subtitle-modern {
        font-size: 1rem;
    }
    
    .workflow-card {
        padding: 2rem 1.25rem;
    }
}

@media (max-width: 576px) {
    .workflow-section-modern {
        padding: 3rem 0;
    }
    
    .workflow-header {
        margin-bottom: 2rem;
    }
    
    .step-number-badge {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .step-pulse {
        width: 50px;
        height: 50px;
    }
    
    .workflow-icon-container {
        width: 90px;
        height: 90px;
    }
    
    .workflow-icon {
        width: 50px;
        height: 50px;
    }
    
    .workflow-title {
        font-size: 1.125rem;
    }
    
    .workflow-description {
        font-size: 0.9375rem;
    }
    
    .workflow-cta .btn-modern-primary {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
    }
}

/* ========================================================================
   Animations
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
    .step-pulse,
    .workflow-arrow,
    .workflow-card:hover .workflow-icon-container {
        animation: none;
        transform: none;
    }
}

/* ========================================================================
   Alternate Layout (If more than 3 steps)
   ======================================================================== */

.workflow-steps:has(.workflow-step:nth-child(4)) {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 768px) and (max-width: 991px) {
    .workflow-steps:has(.workflow-step:nth-child(4)) {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================================================
   Hover States
   ======================================================================== */

.workflow-step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.4);
}

.workflow-card:hover .workflow-title {
    color: #4F46E5;
}

.workflow-card-featured:hover .workflow-title {
    color: white;
}

/* ========================================================================
   Print Styles
   ======================================================================== */

@media print {
    .workflow-section-modern {
        padding: 2rem 0;
    }
    
    .workflow-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .step-pulse,
    .workflow-arrow {
        display: none;
    }
}
