/* ========================================
   Workstep Timeline Styles
   New horizontal timeline layout for desktop
   Vertical layout for mobile
   ======================================== */

/* Reset old styles */
.workstep__list,
.workstep-list,
.workstep-list__item,
.workstep-item,
.workstep-item__num,
.workstep-item__title,
.workstep-item__text,
.workstep-item__btn {
    all: unset;
}

/* Base Styles */
.workstep {
    padding: 30px 0 30px;
    overflow: visible;
}

.workstep__wrapper {
    max-width: 100%;
}

.workstep__title {
    font-size: 35px;
    margin-bottom: 60px;
    margin-top: 0;
    font-weight: 700;
    line-height: 1.04 !important;
    text-align: center;
}

/* CTA Button at bottom */
.workstep__cta {
    text-align: center;
    margin-top: 30px;
}

.workstep__cta .button {
    display: inline-block;
}

/* Desktop Layout - Horizontal Timeline (>1200px) */
@media (min-width: 1201px) {
    .workstep__timeline {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 20px;
    }

    /* Horizontal line at the top */
    .workstep__timeline::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #ff6f00 0%, #ff9600 100%);
        z-index: 1;
    }

    /* Step container */
    .workstep__step {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* All steps have same layout - content below the line */
    .workstep__step--odd,
    .workstep__step--even {
        padding-top: 0;
    }

    .workstep__step--odd .workstep__step-node,
    .workstep__step--even .workstep__step-node {
        position: absolute;
        top: -12.5px;
    }

    .workstep__step--odd .workstep__step-content,
    .workstep__step--even .workstep__step-content {
        margin-top: 40px;
    }

    /* Step node (numbered bubble on the line) */
    .workstep__step-node {
        height: 25px;
        background: #ff6f00;
        border-radius: 5px;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 20px;
        font-weight: 700;
        padding: 15px;
    }

    /* Display number from data attribute */
    .workstep__step-node::before {
        content: "Крок " attr(data-number);
    }

    /* Step content container */
    .workstep__step-content {
        background: #fff;
        padding: 12px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        width: 100%;
        max-width: 260px;
        min-height: 200px;
    }

    /* Step header - no longer used but keeping for compatibility */
    .workstep__step-header {
        display: none;
    }

    /* Step number - hide as it's now in the node */
    .workstep__step-num {
        display: none;
    }

    /* Step title */
    .workstep__step-title {
        font-size: 16px;
        font-weight: 700;
        margin: 0 0 10px 0;
        line-height: 1.3;
        color: #212121;
        display: block;
    }

    /* Step text */
    .workstep__step-text {
        font-size: 14px;
        line-height: 1.5;
        margin: 0;
        color: #212121;
        font-weight: 300;
    }

    /* CTA Button */
    .workstep__cta {
        margin-top: 30px;
    }
}

/* Tablet/Mobile Layout - Vertical Timeline (<=1200px) */
@media (max-width: 1200px) {
    .workstep {
        padding: 50px 0 40px;
    }

    .workstep__title {
        font-size: 30px;
        margin-bottom: 40px;
    }

    .workstep__timeline {
        position: relative;
        padding-left: 40px;
    }

    /* Vertical line */
    .workstep__timeline::before {
        content: "";
        position: absolute;
        left: 12px;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(180deg, #ff6f00 0%, #ff9600 100%);
        z-index: 1;
    }

    /* Step container - stack vertically */
    .workstep__step {
        position: relative;
        margin-bottom: 30px;
        display: block;
    }

    /* Remove odd/even distinction for mobile */
    .workstep__step--odd,
    .workstep__step--even {
        display: block;
    }

    /* Step node (numbered bubble on the line) */
    .workstep__step-node {
        position: absolute;
        left: -28px;
        top: -14px;
        height: 20px;
        background: #ff6f00;
        border-radius: 5px;
        padding: 13px;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 20px;
        font-weight: 700;
    }

    /* Display number from data attribute */
    .workstep__step-node::before {
        content: "Крок " attr(data-number);
    }

    /* Step content */
    .workstep__step-content {
        background: #fff;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    /* Step header - hide as number is now on the line */
    .workstep__step-header {
        display: none;
    }

    /* Step number - hide as it's now in the node */
    .workstep__step-num {
        display: none;
    }

    /* Step title */
    .workstep__step-title {
        font-size: 16px;
        font-weight: 700;
        margin: 0 0 10px 0;
        line-height: 1.3;
        color: #212121;
    }

    /* Step text */
    .workstep__step-text {
        font-size: 14px;
        line-height: 1.5;
        margin: 0;
        color: #212121;
        font-weight: 300;
    }

    /* Remove bottom margin from last step */
    .workstep__step:last-child {
        margin-bottom: 0;
    }

    /* CTA Button */
    .workstep__cta {
        margin-top: 40px;
    }
}

/* Mobile - Extra Small Screens (<576px) */
@media (max-width: 576px) {
    .workstep {
        padding: 40px 0 30px;
    }

    .workstep__title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .workstep__timeline {
        padding-left: 35px;
    }

    .workstep__timeline::before {
        left: 10px;
        width: 2px;
    }

    .workstep__step {
        margin-bottom: 25px;
    }

    .workstep__step-node {
        left: -25px;
        height: 18px;
        padding: 13px;
        border-radius: 5px;
        top: -10px;
        font-size: 20px;
    }

    .workstep__step-content {
        padding: 18px;
    }

    .workstep__step-num {
        display: none;
    }

    .workstep__step-title {
        font-size: 15px;
        margin: 0 0 8px 0;
    }

    .workstep__step-text {
        font-size: 13px;
        line-height: 1.4;
    }

    .workstep__cta {
        margin-top: 35px;
    }

    .workstep__cta .button {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }
}
