.how-it-works-section {
    padding: 100px 0 80px;
    position: relative;
    background: radial-gradient(circle at 50% 0%, rgb(237 249 255 / 40%), transparent 50%);
}

[data-theme="dark"] .how-it-works-section {
    background: radial-gradient(circle at 50% 0%, rgba(108, 109, 236, 0.08), transparent 50%);
}

.how-it-works-section .section-header {
    margin-bottom: 48px;
}

.how-it-works-section .section-label {
    font-size: 30px;
    font-weight: 700;
    position: relative;
}

.how-it-works-section .section-label::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
    margin-top: 32px;
    position: relative;
}

.case-grid::before {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(33.333% - 24px);
    width: calc(33.333% + 48px);
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(143, 211, 255, 0.3) 20%, 
        rgba(143, 211, 255, 0.5) 50%, 
        rgba(143, 211, 255, 0.3) 80%, 
        transparent 100%);
    transform: translateY(-50%);
    z-index: 0;
    animation: flowLine 2s ease-in-out infinite;
}

.case-grid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(66.666% - 24px);
    width: calc(33.333% + 48px);
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(143, 211, 255, 0.3) 20%, 
        rgba(143, 211, 255, 0.5) 50%, 
        rgba(143, 211, 255, 0.3) 80%, 
        transparent 100%);
    transform: translateY(-50%);
    z-index: 0;
    animation: flowLine 2s ease-in-out infinite 0.5s;
}

@keyframes flowLine {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(-50%) scaleX(0.95);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-50%) scaleX(1);
    }
}

.case-card::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -24px;
    width: 0;
    height: 0;
    border-left: 12px solid rgb(0 114 188 / 74%);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    transform: translateY(-50%);
    z-index: 1;
    transition: all 0.3s ease;
    animation: pulseArrow 2s ease-in-out infinite;
}

.case-card:nth-child(3)::before {
    display: none;
}

@keyframes pulseArrow {
    0%, 100% {
        opacity: 0.4;
        transform: translateY(-50%) translateX(0);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-50%) translateX(4px);
    }
}

.case-card {
    border-radius: var(--border-radius-lg);
    background: #111217;
    color: #ffffff;
    padding: 30px 30px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    box-shadow: var(--shadow-card);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s ease,
                background 0.3s ease;
    animation: fadeInUp 0.6s ease-out both;
    position: relative;
    z-index: 1;
}

.case-card:nth-child(1) {
    animation-delay: 0.1s;
}

.case-card:nth-child(2) {
    animation-delay: 0.2s;
}

.case-card:nth-child(3) {
    animation-delay: 0.3s;
}

.case-card::after {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    top: -16px;
    left: 30px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #111217;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(143, 211, 255, 0.3);
    z-index: 2;
    animation: scaleIn 0.5s ease-out both;
}

.case-grid {
    counter-reset: step-counter;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.case-card:nth-child(1)::after {
    animation-delay: 0.2s;
}

.case-card:nth-child(2)::after {
    animation-delay: 0.3s;
}

.case-card:nth-child(3)::after {
    animation-delay: 0.4s;
}

.case-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    background: #1a1b22;
}

.case-card:hover::before {
    border-left-color: var(--accent);
    opacity: 1;
    transform: translateY(-50%) translateX(4px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

    .case-card:nth-child(2) {
        background: #171821;
    }

.case-title {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 14px;
    opacity: 0.75;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.case-card:hover .case-title {
    opacity: 1;
    transform: translateX(4px);
}

.case-text {
    font-size: 17px;
    color: #f3f3f3;
    margin-bottom: 24px;
}

.case-link {
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    opacity: 0.9;
    cursor: pointer;
    transition: gap 0.2s ease, opacity 0.2s ease;
}

.case-link:hover {
    gap: 12px;
    opacity: 1;
}

.case-link:hover span.icon {
    transform: translateX(4px);
}

    .case-link span.icon {
        width: 28px;
        height: 28px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        transition: transform 0.2s ease;
    }

@media (max-width: 960px) {
    .case-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px;
    }
    
    .case-grid::before {
        left: calc(50% - 18px);
        width: calc(50% + 36px);
    }
    
    .case-grid::after {
        display: none;
    }
    
    .case-card:nth-child(2)::before {
        display: none;
    }
}

@media (max-width: 720px) {
    .how-it-works-section {
        padding: 80px 0 60px;
    }
    
    .how-it-works-section .section-label {
        font-size: 24px;
    }
    
    .case-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
    
    .case-grid::before,
    .case-grid::after {
        display: none;
    }
    
    .case-card::before {
        display: none;
    }
    
    .case-card {
        min-height: 220px;
    }

    .section-header {
        flex-direction: column;
        gap: 10px;
    }
}
