/* ============================================================
   Steps Flow Widget – Frontend Styles
   ============================================================ */

/* ── Google Fonts import (Archivo + Inter) ─────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@700&family=Inter:wght@400;700&display=swap');

/* ── Section wrapper ───────────────────────────────────────── */
.sfw-section {
    width: 100%;
}

/* ── Row ───────────────────────────────────────────────────── */
.sfw-row {
    display: flex;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 44px;  /* overridden by Elementor control */
    flex-wrap: nowrap;
}

.sfw-row:last-child {
    margin-bottom: 0 !important;
}

/*
   Continued rows (row 2, 3 …) are offset by one step-width (200 px default).
   This visually aligns step N+1 under step 2 of the previous row,
   creating the wrap-around flow look.
   The offset is overridden automatically when step_width changes via Elementor.
*/
.sfw-row-continued {
    padding-left: 200px; /* matches default step_width */
}

/* ── Step item ─────────────────────────────────────────────── */
.sfw-step-item {
    flex: 0 0 200px;   /* overridden by Elementor control */
    width: 200px;
    text-align: center;
}

/* ── Visual area (number + icon circle) ────────────────────── */
.sfw-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 95px;       /* overridden by Elementor control */
    margin-bottom: 18px;
}

/* ── Step number ───────────────────────────────────────────── */
.sfw-step-num {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 72px;    /* overridden by typography control */
    line-height: 1;
    /* Gradient fade: transparent → #303E47 at 88 % (matches Figma) */
    background: linear-gradient(
        to bottom,
        rgba(48, 62, 71, 0.05) 0%,
        rgba(48, 62, 71, 0.22) 88%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Elementor color control replaces -webkit-text-fill-color via selectors */
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
    user-select: none;
    letter-spacing: -2px;
}

/* ── Icon circle ───────────────────────────────────────────── */
.sfw-icon-circle {
    width: 84px;        /* overridden by Elementor control */
    height: 84px;
    border-radius: 50%; /* overridden by Elementor control */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.sfw-icon-circle span {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sfw-icon-circle i,
.sfw-icon-circle svg {
    font-size: 28px;    /* overridden by Elementor control */
    width: 28px;
    height: 28px;
}

/* ── Title ─────────────────────────────────────────────────── */
.sfw-step-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 17px;
    color: #1A2935;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* ── Description ───────────────────────────────────────────── */
.sfw-step-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #586773;
    line-height: 1.65;
    padding: 0 6px;
}

/* ── Arrow connector ───────────────────────────────────────── */
.sfw-arrow {
    flex: 1;
    min-width: 40px;
    display: flex;
    align-items: center;
    /* Default top padding aligns arrow with icon centre (95/2 ≈ 47.5) */
    padding-top: 46px;  /* overridden by Elementor icon-height control */
    color: #B8CDD6;     /* overridden by Elementor arrow-color control */
}

.sfw-arrow svg {
    width: 100%;
    height: 14px;
    overflow: visible;
    display: block;
}

/* Leading arrow: slightly wider max so it looks proportionate */
.sfw-leading-arrow {
    max-width: 280px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .sfw-row,
    .sfw-row-continued {
        flex-direction: column;
        align-items: center;
        padding-left: 0 !important;
    }

    .sfw-step-item {
        flex: none;
        width: 100%;
        max-width: 320px;
    }

    .sfw-arrow,
    .sfw-leading-arrow {
        /* Rotate arrow to point downward on mobile */
        transform: rotate(90deg);
        padding-top: 0;
        padding-left: 0;
        width: 60px;
        min-width: unset;
        max-width: unset;
        flex: none;
        margin: 8px auto;
    }

    .sfw-arrow svg {
        width: 60px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .sfw-step-item { max-width: 260px; }
}
