/* How It Works - Interactive Question Selector Component */

.how-it-works-section {
    padding: 80px 0;
    background: #F5F5F5;
}

.how-it-works-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.how-it-works-title {
    font-size: 48px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 60px;
    color: #707070;
}

.how-it-works-content {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    min-height: 600px;
}

/* Questions Section - LEFT SIDE */
.how-it-works-questions-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    order: 1;
    align-items: flex-start;
}

/* Image Section - RIGHT SIDE */
.how-it-works-image-section {
    flex: 1;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
}

.how-it-works-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.how-it-works-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.how-it-works-image.active {
    opacity: 1;
    position: relative;
    transform: scale(1);
}

/* Question Buttons - White Pills */
.how-it-works-question-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border: 1px solid #E8E8E8;
    border-radius: 50px;
    padding: 14px 22px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    text-align: left;
    width: auto;
}

.how-it-works-question-btn:hover {
    background: #FAFAFA;
    border-color: #D0D0D0;
}

.how-it-works-question-btn.active {
    background: #FFFFFF;
    border-color: #D0D0D0;
}

.how-it-works-question-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid #AAAAAA;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #AAAAAA;
    font-size: 14px;
    font-weight: 300;
    flex-shrink: 0;
    line-height: 1;
}

.how-it-works-question-btn.active .how-it-works-question-icon {
    background: #00C967;
    border-color: #00C967;
    color: white;
}

.how-it-works-question-title {
    font-size: 16px;
    font-weight: 500;
    color: #707070;
    margin: 0;
}

/* Separate Answer Box - Green */
.how-it-works-answer-box {
    display: none;
    background: #D4F1DE;
    border-radius: 20px;
    padding: 24px 28px;
    width: 100%;
    max-width: 380px;
    margin: 4px 0;
    animation: fadeInAnswer 0.3s ease;
}

.how-it-works-answer-box.visible {
    display: block;
}

@keyframes fadeInAnswer {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.how-it-works-answer-title {
    font-size: 17px;
    font-weight: 600;
    color: #707070;
    margin: 0 0 12px 0;
}

.how-it-works-answer-text {
    font-size: 14px;
    line-height: 1.6;
    color: #707070;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .how-it-works-section {
        padding: 60px 0;
    }

    .how-it-works-title {
        font-size: 36px;
        margin-bottom: 40px;
    }

    .how-it-works-content {
        flex-direction: column;
        gap: 40px;
    }

    .how-it-works-image-section {
        order: 1;
        min-height: 300px;
    }

    .how-it-works-questions-section {
        order: 2;
    }

    .how-it-works-question-title {
        font-size: 15px;
    }

    .how-it-works-question-btn {
        padding: 12px 18px;
    }

    .how-it-works-answer-box {
        max-width: 100%;
        padding: 20px 22px;
    }
}

@media (max-width: 480px) {
    .how-it-works-title {
        font-size: 28px;
    }

    .how-it-works-question-btn {
        padding: 12px 16px;
    }

    .how-it-works-question-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .how-it-works-answer-title {
        font-size: 15px;
    }

    .how-it-works-answer-text {
        font-size: 13px;
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    .how-it-works-image,
    .how-it-works-question-btn,
    .how-it-works-answer-box {
        transition-duration: 0.01ms;
        animation-duration: 0.01ms;
    }
}
