/* ================================
   WizerFlow - Section Styles
   How It Works Timeline, FAQ, Animations
   ================================ */

/* ── How It Works: Timeline Pipeline ── */

.max-900 {
    max-width: 960px;
    margin: 0 auto;
}

.row.flex {
    display: flex;
    position: relative;
    gap: 0;
}

/* Horizontal connecting line */
.row.flex::before {
    content: '';
    position: absolute;
    top: 44px;
    left: calc(12.5% + 12px);
    right: calc(12.5% + 12px);
    height: 2px;
    background: linear-gradient(90deg,
        rgba(74, 158, 255, 0.15),
        rgba(108, 99, 255, 0.25),
        rgba(139, 92, 246, 0.25),
        rgba(42, 188, 155, 0.2)
    );
    z-index: 0;
}

/* Step column */
.w-col {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 12px;
    position: relative;
}

/* Step card */
.how-it-works-links {
    background: var(--surface-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    padding: 32px 24px 28px;
    height: 100%;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.how-it-works-links:hover {
    transform: translateY(-6px);
    background: var(--surface-bg-hover);
    border-color: var(--border-medium);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

/* Step number */
.step-number {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

/* Gradient color progression for each step */
.w-col:nth-child(1) .step-number {
    color: var(--blue);
}
.w-col:nth-child(2) .step-number {
    color: var(--purple);
}
.w-col:nth-child(3) .step-number {
    color: var(--violet);
}
.w-col:nth-child(4) .step-number {
    color: var(--teal);
}

/* Timeline node dot on the connecting line */
.w-col::before {
    content: '';
    position: absolute;
    top: 44px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.4s ease;
}

.w-col:nth-child(1)::before {
    background: var(--blue);
    box-shadow: 0 0 12px rgba(74, 158, 255, 0.4);
}
.w-col:nth-child(2)::before {
    background: var(--purple);
    box-shadow: 0 0 12px rgba(108, 99, 255, 0.4);
}
.w-col:nth-child(3)::before {
    background: var(--violet);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}
.w-col:nth-child(4)::before {
    background: var(--teal);
    box-shadow: 0 0 12px rgba(42, 188, 155, 0.4);
}

/* Node pulse on hover */
.w-col:hover::before {
    transform: translate(-50%, -50%) scale(1.5);
}
.w-col:nth-child(1):hover::before { box-shadow: 0 0 24px rgba(74, 158, 255, 0.6); }
.w-col:nth-child(2):hover::before { box-shadow: 0 0 24px rgba(108, 99, 255, 0.6); }
.w-col:nth-child(3):hover::before { box-shadow: 0 0 24px rgba(139, 92, 246, 0.6); }
.w-col:nth-child(4):hover::before { box-shadow: 0 0 24px rgba(42, 188, 155, 0.6); }

/* Step icon */
.step-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    padding: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    position: relative;
}

/* Per-step icon colors */
.w-col:nth-child(1) .step-icon {
    background: rgba(74, 158, 255, 0.12);
    border: 1px solid rgba(74, 158, 255, 0.2);
}
.w-col:nth-child(2) .step-icon {
    background: rgba(108, 99, 255, 0.12);
    border: 1px solid rgba(108, 99, 255, 0.2);
}
.w-col:nth-child(3) .step-icon {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.w-col:nth-child(4) .step-icon {
    background: rgba(42, 188, 155, 0.12);
    border: 1px solid rgba(42, 188, 155, 0.2);
}

/* Icon hover glow */
.w-col:hover .step-icon {
    transform: scale(1.1);
}
.w-col:nth-child(1):hover .step-icon { box-shadow: 0 0 20px rgba(74, 158, 255, 0.2); }
.w-col:nth-child(2):hover .step-icon { box-shadow: 0 0 20px rgba(108, 99, 255, 0.2); }
.w-col:nth-child(3):hover .step-icon { box-shadow: 0 0 20px rgba(139, 92, 246, 0.2); }
.w-col:nth-child(4):hover .step-icon { box-shadow: 0 0 20px rgba(42, 188, 155, 0.2); }

.step-icon svg {
    width: 22px;
    height: 22px;
    color: var(--text-primary);
}

.w-col:nth-child(1) .step-icon svg { color: var(--blue); }
.w-col:nth-child(2) .step-icon svg { color: var(--purple); }
.w-col:nth-child(3) .step-icon svg { color: var(--violet); }
.w-col:nth-child(4) .step-icon svg { color: var(--teal); }

/* Step title */
.how-it-works-links h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

/* Arrow connector between steps (desktop) */
.w-col:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 44px;
    right: -2px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid rgba(255, 255, 255, 0.12);
    transform: translateY(-50%);
    z-index: 1;
    transition: border-left-color 0.3s ease;
}

.w-col:not(:last-child):hover::after {
    border-left-color: rgba(255, 255, 255, 0.25);
}

/* ── How It Works: Mobile Vertical Timeline ── */

@media (max-width: 991px) {
    .row.flex {
        flex-direction: column;
        gap: 0;
    }

    .row.flex::before {
        top: 0;
        bottom: 0;
        left: 24px;
        right: auto;
        width: 2px;
        height: 100%;
        background: linear-gradient(180deg,
            rgba(74, 158, 255, 0.2),
            rgba(108, 99, 255, 0.25),
            rgba(139, 92, 246, 0.25),
            rgba(42, 188, 155, 0.2)
        );
    }

    .w-col {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 12px 0 60px;
        margin-bottom: 24px;
        position: relative;
    }

    .w-col:last-child {
        margin-bottom: 0;
    }

    /* Node dot on vertical line */
    .w-col::before {
        top: 32px;
        left: 24px;
        transform: translate(-50%, 0);
    }

    /* Hide arrow connectors on mobile */
    .w-col:not(:last-child)::after {
        display: none;
    }

    .how-it-works-links {
        padding: 28px 24px;
    }
}

@media (max-width: 767px) {
    .w-col {
        padding-left: 52px;
    }

    .row.flex::before {
        left: 18px;
    }

    .w-col::before {
        left: 18px;
        width: 10px;
        height: 10px;
    }
}

/* ── FAQ Section ── */

#faq-section {
    padding: var(--section-padding) 0;
    background: var(--dark-bg);
    position: relative;
    overflow: hidden;
}

#faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(108, 99, 255, 0.04), transparent 60%);
    pointer-events: none;
}

.faq-row {
    display: flex;
    width: 100%;
    gap: 3rem;
    align-items: flex-start;
}

.faq-col-left {
    width: 30%;
    padding: 0 2%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: sticky;
    top: 100px;
}

.faq-title-icon {
    width: 64px;
    margin-bottom: 24px;
    opacity: 0.8;
}

.faq-col-left h4 {
    font-size: 2.25rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.faq-col-middle {
    width: 3%;
}

.faq-col-right {
    width: 60%;
    padding: 0 2%;
}

/* FAQ Item */
.faq-item.dark {
    margin-bottom: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    background: var(--surface-bg);
    transition: all 0.3s ease;
}

.faq-item.dark:hover {
    border-color: var(--border-medium);
    background: var(--surface-bg-hover);
}

.faq-item.dark.active {
    border-color: rgba(108, 99, 255, 0.2);
    box-shadow: 0 8px 32px rgba(108, 99, 255, 0.06);
}

/* FAQ Title/Trigger */
.faq-item-title.dark {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    user-select: none;
    transition: all 0.3s ease;
}

.faq-item-title.dark:hover {
    color: var(--text-primary);
}

/* FAQ Plus/Minus Icon */
.faq-icon.dark {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.faq-icon.dark::before,
.faq-icon.dark::after {
    content: '';
    position: absolute;
    background: var(--blue);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.faq-icon.dark::before {
    top: 50%;
    left: 2px;
    right: 2px;
    height: 2px;
    transform: translateY(-50%);
}

.faq-icon.dark::after {
    left: 50%;
    top: 2px;
    bottom: 2px;
    width: 2px;
    transform: translateX(-50%);
}

/* Active state: rotate to X */
.faq-item.dark.active .faq-icon.dark::after,
.w-dropdown-toggle[aria-expanded="true"] .faq-icon.dark::after {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.faq-item.dark.active .faq-icon.dark::before,
.w-dropdown-toggle[aria-expanded="true"] .faq-icon.dark::before {
    background: var(--purple);
    transform: translateY(-50%) rotate(180deg);
}

/* FAQ Content */
.faq-item-content.dark {
    padding: 0 1.5rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.dark.active .faq-item-content.dark,
.w-dropdown-toggle[aria-expanded="true"] + .faq-item-content.dark {
    padding: 0 1.5rem 1.5rem 3.25rem;
    max-height: 800px;
    opacity: 1;
    transform: translateY(0);
}

.faq-item-content.dark p,
.faq-item-content.dark ul {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.faq-item-content.dark ul {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    padding-left: 0;
    list-style: none;
}

.faq-item-content.dark li {
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.faq-item-content.dark strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* FAQ Responsive */
@media (max-width: 991px) {
    .faq-row {
        flex-direction: column;
        gap: 2rem;
    }

    .faq-col-left,
    .faq-col-middle,
    .faq-col-right {
        width: 100%;
        padding: 0;
    }

    .faq-col-left {
        position: static;
        align-items: center;
        text-align: center;
    }

    .faq-col-middle {
        display: none;
    }
}

/* ── Inner Section (light variant — kept for compatibility) ── */

.inner-section.white {
    background: var(--surface-bg);
    padding: var(--section-padding) 0;
    position: relative;
}

.inner-section.white h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.inner-section.white .text-grey {
    color: var(--text-secondary);
}

/* ── Scroll Reveal Animations ── */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Section Divider ── */

.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
    margin: 0;
    border: none;
}

/* ── Tracking Expand Animation (Hero) ── */

.tracking-in-expand {
    -webkit-animation: tracking-in-expand 2s cubic-bezier(0.215, 0.610, 0.355, 1) 0.5s both;
    animation: tracking-in-expand 2s cubic-bezier(0.215, 0.610, 0.355, 1) 0.5s both;
}

@keyframes tracking-in-expand {
    0% {
        letter-spacing: -0.5em;
        opacity: 0;
    }
    40% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}
