/**
 * Steps Block Styles — Wavy Path Layout with Video Background
 *
 * @package LiquidationSpa
 */

.lspa-steps {
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
}

/* ── Wave Separators ── */
.lspa-steps__wave-sep {
    position: absolute;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 3;
}

.lspa-steps__wave-sep--top {
    top: -1px;
}

.lspa-steps__wave-sep--bottom {
    bottom: -1px;
}

.lspa-steps__wave-sep svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* ── Video Background ── */
.lspa-steps__video-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.lspa-steps__video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lspa-steps__video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(1, 41, 81, 0.80);
}

.lspa-steps__container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Header ── */
.lspa-steps__header {
    text-align: center;
    max-width: 600px;
    margin-bottom: 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lspa-steps__header .lspa-steps__cta {
    margin-top: 1.25rem;
}

.lspa-steps__pill {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6CA6C4;
    margin-bottom: 1rem;
}

.lspa-steps__title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    isolation: isolate;
}

.lspa-steps__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin: 0;
}

/* ── Wavy Steps Section ── */
.lspa-steps__wave {
    position: relative;
    width: 100%;
}

/*
 * Layout: 3-row grid
 *   Row 1 (top-text):   text for steps 2 & 4 lives here
 *   Row 2 (wave-band):  SVG path + all circles
 *   Row 3 (bottom-text): text for steps 1 & 3 lives here
 */
.lspa-steps__wave-items {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto 80px auto;
    width: 100%;
    z-index: 2;
    padding: 0 2rem;
    column-gap: 1rem;
}

/* SVG wave line — spans full grid, but viewBox maps to middle band */
.lspa-steps__wave-svg {
    position: absolute;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 1;
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    height: 80px;
}

.lspa-steps__wave-path {
    /* dashed pattern is set inline via stroke-dasharray */
}

/* Individual step item */
.lspa-steps__wave-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

/*
 * Bottom-anchored steps (1, 3): circle in middle row, text in row 3
 */
.lspa-steps__wave-item--bottom {
    grid-row: 2 / 4;
    align-self: start;
    padding-top: 30px;
}

/*
 * Top-anchored steps (2, 4): text in row 1, circle in middle row
 */
.lspa-steps__wave-item--top {
    grid-row: 1 / 3;
    align-self: end;
    padding-bottom: 30px;
}

.lspa-steps__wave-item--top .lspa-steps__wave-text {
    order: -1;
}

/* Numbered circle */
.lspa-steps__wave-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6CA6C4 0%, #4A8DAF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(108, 166, 196, 0.4);
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 3;
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.lspa-steps__wave-item--top .lspa-steps__wave-circle {
    margin-bottom: 0;
    margin-top: 0.75rem;
}

.lspa-steps__wave-item:hover .lspa-steps__wave-circle {
    transform: scale(1.12);
    box-shadow: 0 6px 20px rgba(108, 166, 196, 0.55);
}

.lspa-steps__wave-circle span {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1;
}

/* Step text */
.lspa-steps__wave-text {
    max-width: 200px;
}

.lspa-steps__wave-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.3;
    margin: 0 0 0.35rem 0;
}

.lspa-steps__wave-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
}

/* CTA Button */
.lspa-steps__cta {
    flex-shrink: 0;
}

.lspa-steps__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background-color: #6CA6C4;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    border: 2px solid #6CA6C4;
    transition: all 200ms ease;
}

.lspa-steps__button:hover {
    background-color: transparent;
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.lspa-steps__button-icon {
    width: 18px;
    height: 18px;
    transition: transform 200ms ease;
}

.lspa-steps__button:hover .lspa-steps__button-icon {
    transform: translateX(4px);
}

/* ── Responsive ── */

/* Tablet */
@media (max-width: 1024px) {
    .lspa-steps {
        padding: 7rem 0;
    }

    .lspa-steps__wave-items {
        grid-template-rows: auto 60px auto;
        column-gap: 0.5rem;
    }

    .lspa-steps__wave-item--bottom {
        padding-top: 20px;
    }

    .lspa-steps__wave-item--top {
        padding-bottom: 20px;
    }

    .lspa-steps__wave-title {
        font-size: 0.9375rem;
    }

    .lspa-steps__wave-desc {
        font-size: 0.75rem;
    }

    .lspa-steps__wave-circle {
        width: 44px;
        height: 44px;
    }

    .lspa-steps__wave-circle span {
        font-size: 1.1rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .lspa-steps {
        padding: 5rem 0;
    }

    .lspa-steps__header {
        margin-bottom: 2.5rem;
    }

    /* On mobile, switch to vertical timeline */
    .lspa-steps__wave-svg {
        display: none;
    }

    .lspa-steps__wave-items {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 0;
    }

    .lspa-steps__wave-item,
    .lspa-steps__wave-item--bottom,
    .lspa-steps__wave-item--top {
        flex-direction: row;
        text-align: left;
        max-width: 100%;
        padding: 1.25rem !important;
        justify-content: flex-start;
        align-self: auto;
        grid-row: auto;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        border-left: 4px solid #6CA6C4;
        backdrop-filter: blur(4px);
    }

    .lspa-steps__wave-item--top .lspa-steps__wave-text {
        order: 0;
    }

    .lspa-steps__wave-item--top .lspa-steps__wave-circle {
        margin-top: 0;
        margin-bottom: 0;
    }

    .lspa-steps__wave-circle {
        width: 44px;
        height: 44px;
        margin-bottom: 0;
    }

    .lspa-steps__wave-text {
        max-width: none;
    }

    .lspa-steps__wave-title {
        font-size: 1rem;
    }

    .lspa-steps__wave-desc {
        font-size: 0.8125rem;
    }

    .lspa-steps__button {
        width: 100%;
        justify-content: center;
    }

    .lspa-steps__wave-sep svg {
        height: 50px;
    }
}

/* ── Editor Preview ── */
.editor-styles-wrapper .lspa-steps {
    margin: 1rem 0;
}
