/**
 * 2PX Elementor Suite — Steps Widget
 * BEM Methodology
 */

/* ── Base ───────────────────────────────────────────────────────────────────── */
.twopx-steps {
    box-sizing: border-box;
}

.twopx-steps * {
    box-sizing: border-box;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.twopx-steps__header {
    margin-bottom: 50px;
}

.twopx-steps__header-subtitle {
    margin: 0 0 10px 0;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.twopx-steps__header-title {
    margin: 0;
    line-height: 1.2;
}

/* ── Track: line + items container ─────────────────────────────────────────── */
.twopx-steps__track {
    position: relative;
}

/* ── Line ───────────────────────────────────────────────────────────────────── */
.twopx-steps__line {
    position: absolute;
    background-color: #d0d0d0;
    pointer-events: none;
    z-index: 0;
}

/* ══════════════════════════════════════
   HORIZONTAL LAYOUT
   ══════════════════════════════════════ */
.twopx-steps--horizontal .twopx-steps__items {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

.twopx-steps--horizontal .twopx-steps__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    z-index: 1;
}

/* Horizontal line: sits at the vertical center of the number circles.
   72px default circle size → center at 36px from top of .twopx-steps__items */
.twopx-steps--horizontal .twopx-steps__line {
    top: 36px;           /* half of default 72px circle — Elementor overrides via inline style if circle size changes */
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
}

/* ══════════════════════════════════════
   VERTICAL LAYOUT
   ══════════════════════════════════════ */
.twopx-steps--vertical .twopx-steps__items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.twopx-steps--vertical .twopx-steps__item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

/* Vertical line: runs along the left side through circle centers */
.twopx-steps--vertical .twopx-steps__line {
    top: 0;
    bottom: 0;
    left: 36px;          /* half of default 72px circle */
    width: 2px;
    transform: translateX(-50%);
}

.twopx-steps--vertical .twopx-steps__item-body {
    flex: 1;
    min-width: 0;
}

/* ── Number circle ──────────────────────────────────────────────────────────── */
.twopx-steps__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #a52828;  /* fallback — overridden by Elementor control */
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
    z-index: 2;                  /* above the line */
    line-height: 1;
}

/* Horizontal: number sits above text, bottom margin separates */
.twopx-steps--horizontal .twopx-steps__number {
    margin-bottom: 24px;
}

/* Vertical: number is on the left, right margin separates from text */
.twopx-steps--vertical .twopx-steps__number {
    margin-right: 24px;
    margin-bottom: 0;
}

/* ── Item text ──────────────────────────────────────────────────────────────── */
.twopx-steps__item-title {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.twopx-steps__item-desc {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

/* On mobile, horizontal collapses to vertical */
@media (max-width: 767px) {
    .twopx-steps--horizontal .twopx-steps__items {
        flex-direction: column;
        align-items: stretch;
    }

    .twopx-steps--horizontal .twopx-steps__item {
        flex-direction: row;
        align-items: flex-start;
    }

    .twopx-steps--horizontal .twopx-steps__number {
        margin-bottom: 0;
        margin-right: 20px;
        flex-shrink: 0;
    }

    /* Vertical line replaces horizontal line on mobile */
    .twopx-steps--horizontal .twopx-steps__line {
        top: 0;
        bottom: 0;
        left: 36px;
        right: auto;
        width: 2px;
        height: auto;
        transform: translateX(-50%);
    }

    .twopx-steps--horizontal .twopx-steps__item-title,
    .twopx-steps--horizontal .twopx-steps__item-desc {
        text-align: left;
    }
}
