/* ==========================================================================
   9wickets — "শুরু করার নিয়ম" (How to Start) section REDESIGN v2 "Journey
   Path" (loads LAST)
   --------------------------------------------------------------------------
   Replaces the static 4-card grid (.vk-steps / .vk-step, flat gradient bar
   connector, no scroll animation) with a genuinely different concept from
   the other homepage redesigns this pass (agents = slim rows, why-us =
   trust split / rail / timeline): an alternating up/down "zigzag" row of
   four stops connected by a curved SVG path that DRAWS itself in on scroll
   (stroke-dashoffset animation — a different animation technique from the
   scaleX/scaleY fills used in the why-us layers), each stop a numbered,
   pulsing badge with a small themed icon.

   NOTE ON NAMING: prefixed `.vk-hw-*` (How) rather than `.vk-w4-*` — the
   why-us "Trust Split" redesign already claimed `.vk-w4-*` for its own
   v4 iteration. Different section, must not share a class prefix or the
   two stylesheets (both loaded on the same homepage) would collide.

   Scoped entirely under .vk-how--v2 / .vk-hw-*.
   Markup: claudedocs/build/build_how_v2.php (post 11, widget vp0004).
   ========================================================================== */

body.vk .vk-how--v2 .vk-steps { display: none; } /* safety net: old grid never shows if left in markup */

body.vk .vk-hw-road {
    position: relative;
    max-width: 1180px;
    margin: 54px auto 0;
}

/* ---- the connecting path — draws itself left-to-right on scroll ---- */
body.vk .vk-hw-path {
    position: absolute;
    left: 0;
    top: -34px;
    width: 100%;
    height: calc(100% + 34px);
    z-index: 0;
    overflow: visible;
    pointer-events: none;
}
body.vk .vk-hw-path path {
    fill: none;
    stroke: url(#vkHwGrad);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.9s cubic-bezier(.2, .7, .15, 1);
}
body.vk .vk-hw-road.is-in .vk-hw-path path { stroke-dashoffset: 0; }

/* ---- the zigzag row ---- */
body.vk .vk-hw-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
body.vk .vk-hw-step {
    --y: 0px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #FFFFFF;
    border: 1px solid rgba(30, 27, 20, 0.08);
    border-radius: 18px;
    padding: 30px 18px 20px;
    box-shadow: 0 6px 22px rgba(30, 27, 20, 0.08);
    transform: translateY(var(--y));
    transition: transform .4s cubic-bezier(.2, .7, .15, 1), box-shadow .4s ease, border-color .4s ease;
}
body.vk .vk-hw-step:hover {
    transform: translateY(calc(var(--y) - 6px));
    border-color: rgba(200, 134, 11, 0.35);
    box-shadow: 0 18px 40px rgba(200, 134, 11, 0.18);
}

/* ---- numbered badge with pulsing ring ---- */
body.vk .vk-hw-badge {
    position: absolute;
    top: -26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--btn-grad, linear-gradient(135deg, #FFD34D 0%, #F7B500 48%, #E8940A 100%));
    color: #1A1813;
    font-family: var(--vk-font-en, 'Plus Jakarta Sans', sans-serif);
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(200, 134, 11, 0.40);
}
body.vk .vk-hw-badge::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(200, 134, 11, 0.35);
    animation: vk-hw-ring 3s ease-in-out infinite;
}
@keyframes vk-hw-ring {
    0%, 100% { transform: scale(1); opacity: .8; }
    50%      { transform: scale(1.2); opacity: 0; }
}

body.vk .vk-hw-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(255, 199, 44, 0.16);
    color: #B5830F;
    margin: 20px 0 10px;
}
body.vk .vk-hw-icon svg { width: 14px; height: 14px; }

body.vk .vk-hw-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #1A1813;
    margin: 0 0 8px;
    line-height: 1.3;
}
body.vk .vk-hw-desc {
    font-size: 13px;
    line-height: 1.65;
    color: #5A5340;
    margin: 0;
}

/* ---- responsive: 2-col grid, path hidden (would need per-breakpoint
        recalculation to stay aligned — a flat connector isn't worth it at
        narrow widths), zigzag offsets neutralised ---- */
@media (max-width: 900px) {
    body.vk .vk-hw-path { display: none; }
    body.vk .vk-hw-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 16px; }
    body.vk .vk-hw-step { --y: 0px !important; }
    body.vk .vk-hw-road { margin-top: 40px; }
}
@media (max-width: 520px) {
    body.vk .vk-hw-row { grid-template-columns: 1fr; gap: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    body.vk .vk-hw-path path { transition: none; stroke-dashoffset: 0; }
    body.vk .vk-hw-badge::after { animation: none; }
    body.vk .vk-hw-step { transition: none; }
}
