/**
 * Step Block Mobile Styles
 * Optimized for displaying mobile app screenshots with step-by-step instructions
 */

.step-block-mobile {
    padding: 36px;
    background-color: #fff;
    border-radius: 25px;
    margin: 24px 0;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Header with badge and heading */
.step-block-mobile__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.step-block-mobile__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: #F8F8F8;
    border: 1px solid #E6E6E6;
    border-radius: 50%;
    color: #1E2128;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    flex-shrink: 0;
}

/* Main Heading */
.step-block-mobile__main-heading {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
    color: #34363D;
    font-family: 'Manrope', sans-serif;
    line-height: 130%;
}

/* Main Description */
.step-block-mobile__main-description {
    margin: 0 0 24px 0;
    font-size: 20px;
    line-height: 28px;
    color: #34363D;
    font-family: 'Manrope', sans-serif;
}

/* Slider Wrapper */
.step-block-mobile__slider-wrapper {
    position: relative;
    width: 100%;
}

.step-block-mobile__slider-wrapper.slider-active {
    overflow: hidden;
}

/* Custom Scrollbar */
.step-block-mobile__scrollbar {
    display: none;
    width: 100%;
    height: 6px;
    background: #E8E8E8;
    border-radius: 3px;
    margin-top: 16px;
    position: relative;
    cursor: pointer;
}

.step-block-mobile__slider-wrapper.slider-active .step-block-mobile__scrollbar {
    display: block;
}

.step-block-mobile__scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #5DB24C;
    border-radius: 3px;
    cursor: grab;
    transition: background 0.2s ease;
}

.step-block-mobile__scrollbar-thumb:active {
    cursor: grabbing;
    background: #4a9a3d;
}

.step-block-mobile__scrollbar-thumb:hover {
    background: #4a9a3d;
}

/* Steps Container - Horizontal layout */
.step-block-mobile__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    transition: transform 0.3s ease-in-out;
}

/* When slider is active */
.step-block-mobile__steps.slider-active {
    display: flex !important;
    flex-wrap: nowrap;
    grid-template-columns: none;
    overflow: visible;
    cursor: grab;
}

.step-block-mobile__steps.slider-active:active {
    cursor: grabbing;
}

.step-block-mobile__steps.slider-active .step-block-mobile__item {
    flex-shrink: 0;
    margin-right: 0;
}

.step-block-mobile__steps.slider-active .step-block-mobile__item:last-child {
    margin-right: 0;
}

/* Slider Navigation */
.step-block-mobile__slider-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.step-slider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #5DB24C;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.step-slider-btn:hover:not(:disabled) {
    background: #4a9a3d;
    transform: scale(1.05);
}

.step-slider-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.step-slider-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.step-slider-dot {
    width: 8px;
    height: 8px;
    background: #D9D9D9;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.step-slider-dot.active {
    background: #5DB24C;
    width: 24px;
    border-radius: 4px;
}

/* Individual Step Item */
.step-block-mobile__item {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid #E6E6E6;
    border-radius: 16px;
    padding: 16px;
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    height: 520px;
}

/* Image wrapper for mobile screenshots */
.step-block-mobile__image-wrapper {
    width: 100%;
    max-width: 180px;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #D4E7CF 0%, #E8F3E5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 0 auto;
    flex-shrink: 1;
}

.step-block-mobile__image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Step Content */
.step-block-mobile__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    max-width: 180px;
}

/* Step Badge (Step 1, Step 2, etc.) */
.step-block-mobile__step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #5DB24C;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    align-self: flex-start;
}

/* Step Label (main action description) */
.step-block-mobile__step-label {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #34363D;
    font-family: 'Manrope', sans-serif;
    line-height: 130%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Step Description (optional additional text) */
.step-block-mobile__step-description {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 150%;
    color: #8C8C8C;
    font-family: 'Manrope', sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .step-block-mobile {
        padding: 16px;
    }

    .step-block-mobile__steps {
        gap: 16px;
    }
    .step-block-mobile__main-heading {
        font-size: 32px;
        margin-top: 0 !important;
        margin-bottom: 8px !important;
    }
}

@media (max-width: 1200px) {
    .step-block-mobile__steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .step-block-mobile__steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .step-block-mobile {
        padding: 20px;
    }

    .step-block-mobile__main-heading {
        font-size: 28px;
    }

    .step-block-mobile__main-description {
        font-size: 18px;
        line-height: 26px;
    }

    .step-block-mobile__steps {
        gap: 20px;
        padding: 20px;
        grid-template-columns: repeat(2, 1fr);
    }

    .step-block-mobile__item {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .step-block-mobile__image-wrapper {
        width: 100%;
        max-width: 240px;
        margin: 0 auto;
    }

    .step-block-mobile__step-badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    .step-block-mobile__step-label {
        font-size: 16px;
    }

    .step-block-mobile__step-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .step-block-mobile__steps {
        grid-template-columns: 1fr;
    }

    .step-block-mobile__steps.slider-active .step-block-mobile__item {
        min-width: 100%;
        margin-right: 0;
    }

    .step-block-mobile__item {
        min-width: 100%;
    }

    .step-block-mobile__image-wrapper {
        max-width: 160px;
    }

    .step-slider-btn {
        width: 36px;
        height: 36px;
    }

    .step-slider-btn svg {
        width: 18px;
        height: 18px;
    }
}
