/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f1f1f;
    background-color: #ffffff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0 40px 0;
    background: linear-gradient(135deg, #0056d3 0%, #004ba0 100%);
    position: relative;
    overflow: hidden;
}

.how-it-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="20" cy="80" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.section-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

/* Steps Container */
.steps-container {
    position: relative;
    z-index: 2;
    margin-bottom: 80px;
}

/* Step Items */
.step-item {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.step-item::before {
    content: '';
    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-out;
}

.step-item:hover::before {
    left: 100%;
}

.step-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.step-item:nth-child(even) {
    transform: translateX(50px);
}

.step-item:nth-child(even).animate {
    transform: translateX(0);
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Step Number */
.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0056d3, #004ba0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.step-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease-out;
}

.step-item:hover .step-number::before {
    transform: translateX(100%);
}

.step-number span {
    font-size: 24px;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
}

/* Step Content */
.step-content {
    flex: 1;
    margin-right: 25px;
}

.step-title {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 600;
    color: #1f1f1f;
    margin-bottom: 12px;
}

.step-description {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: #545454;
    line-height: 1.7;
}

/* Step Icon */
.step-icon {
    width: 50px;
    height: 50px;
    color: #0056d3;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.step-icon svg {
    width: 100%;
    height: 100%;
}

.step-item:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
    color: #004ba0;
}

/* Step Connectors */
.step-connector {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    margin: 0 auto 20px;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1s forwards;
}

.step-connector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Benefits Section */
.benefits-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 1.2s forwards;
}

.benefits-title {
    text-align: center;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    color: #1f1f1f;
    margin-bottom: 30px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.benefit-item {
    text-align: center;
    padding: 25px;
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.benefit-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 86, 211, 0.05), rgba(0, 75, 160, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
}

.benefit-item:hover::before {
    opacity: 1;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    color: #0056d3;
    transition: all 0.3s ease;
}

.benefit-icon svg {
    width: 100%;
    height: 100%;
}

.benefit-item:hover .benefit-icon {
    transform: scale(1.1);
    color: #004ba0;
}

.benefit-item h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f1f1f;
    margin-bottom: 12px;
}

.benefit-item p {
    color: #545454;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.2);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .how-it-works {
        padding: 60px 0;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .step-content {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .step-icon {
        order: -1;
        margin-bottom: 15px;
    }
    
    .benefits-section {
        padding: 40px 25px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .step-item {
        padding: 20px 15px;
    }
    
    .benefits-section {
        padding: 30px 20px;
    }
}