/* =========================================================
   how-it-works.css
   Only loaded on how-it-works.php. Depends on the CSS
   variables (--primary, --navy, etc.) defined in style.css,
   which loads first via header.php.
   ========================================================= */

.hiw-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--primary) 100%);
    padding: 70px 0 60px;
    color: var(--white);
    text-align: center;
}
.hiw-hero h1 { color: var(--white); font-size: 2.4rem; margin: 12px 0 14px; }

/* ---------- Risk-free banner ---------- */
.hiw-riskfree { padding: 0; margin-top: -30px; position: relative; z-index: 5; }
.hiw-riskfree-inner {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 26px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.hiw-riskfree-icon { font-size: 2.2rem; flex-shrink: 0; }
.hiw-riskfree-inner h3 { font-size: 1.15rem; margin-bottom: 6px; }
.hiw-riskfree-inner p { color: var(--text-light); font-size: 0.92rem; }

/* ---------- Timeline ---------- */
.hiw-timeline-section { padding: 90px 0 70px; }

.hiw-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* The vertical line running down the center, with an animated fill */
.hiw-timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border);
    transform: translateX(-50%);
}
.hiw-timeline-line-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    transition: height 0.15s linear;
}

.hiw-step {
    position: relative;
    width: 50%;
    padding: 0 50px 70px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.hiw-step.in-view { opacity: 1; transform: translateY(0); }

.hiw-step-left { left: 0; text-align: right; }
.hiw-step-right { left: 50%; text-align: left; }
.hiw-step-left.in-view { transform: translateX(0); }
.hiw-step-right.in-view { transform: translateX(0); }
.hiw-step-left:not(.in-view) { transform: translate(-20px, 30px); }
.hiw-step-right:not(.in-view) { transform: translate(20px, 30px); }

.hiw-step-marker {
    position: absolute;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 800;
    color: var(--text-light);
    z-index: 2;
    transition: all 0.4s ease;
}
.hiw-step-left .hiw-step-marker { right: -22px; }
.hiw-step-right .hiw-step-marker { left: -22px; }
.hiw-step.in-view .hiw-step-marker {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 6px var(--sky);
}

.hiw-step-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 26px;
    box-shadow: var(--shadow);
}
.hiw-step-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.hiw-step-card p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 10px; }

.hiw-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--sky);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.hiw-step-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}
.hiw-step-link:hover { text-decoration: underline; }

/* ---------- CTA ---------- */
.hiw-cta {
    background: var(--navy);
    padding: 70px 0;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.hiw-cta.in-view { opacity: 1; transform: translateY(0); }
.hiw-cta h2 { color: var(--white); font-size: 1.6rem; max-width: 640px; margin: 0 auto 24px; }

/* Generic fade-up used by riskfree banner + stats band on this page */
[data-animate="fade-up"] { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-animate="fade-up"].in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive: single column, marker on the left ---------- */
@media (max-width: 760px) {
    .hiw-timeline-line { left: 22px; }
    .hiw-step,
    .hiw-step-left,
    .hiw-step-right {
        width: 100%;
        left: 0;
        text-align: left;
        padding: 0 0 50px 60px;
    }
    .hiw-step-left:not(.in-view),
    .hiw-step-right:not(.in-view) { transform: translate(0, 30px); }
    .hiw-step-left .hiw-step-marker,
    .hiw-step-right .hiw-step-marker { left: 0; right: auto; }

    .hiw-riskfree-inner { flex-direction: column; text-align: center; }
}