/* Hero Section Background */
.hero-bg {
    background-color: #0a0a0a;
    background-image: radial-gradient(circle at 25% 25%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(244, 114, 182, 0.1) 0%, transparent 50%);
}

/* Card Border Gradient for a sleek, modern look */
.card-border-gradient {
    border: 1px solid transparent;
    background: linear-gradient(hsl(var(--background)), hsl(var(--background))) padding-box,
        linear-gradient(135deg, hsl(var(--primary) / 0.3), hsl(var(--muted) / 0.3)) border-box;
    transition: all 0.3s ease;
}

.card-border-gradient:hover {
    border-color: transparent;
    background: linear-gradient(hsl(var(--background)), hsl(var(--background))) padding-box,
        linear-gradient(135deg, hsl(var(--primary)), hsl(var(--muted))) border-box;
}

/* Glow Effect for interactive elements */
.glow-effect {
    position: relative;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, hsl(var(--primary) / 0.1), transparent 70%);
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.glow-effect:hover::before {
    opacity: 1;
}

/* General scroll reveal animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Specific animation delays */
.reveal-on-scroll:nth-child(1) {
    transition-delay: 0s;
}

.reveal-on-scroll:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-on-scroll:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal-on-scroll:nth-child(4) {
    transition-delay: 0.3s;
}

.reveal-on-scroll:nth-child(5) {
    transition-delay: 0.4s;
}

.reveal-on-scroll:nth-child(6) {
    transition-delay: 0.5s;
}

/* How It Works Timeline specific styles */
.timeline-container {
    position: relative;
    padding-bottom: 3rem;
    overflow: hidden;
    /* Crucial to prevent horizontal scroll from positioning */
}

/* The main animated timeline line */
.timeline-line {
    position: absolute;
    top: 0;
    /* For mobile, align to the left side of the content */
    left: calc(1.25rem);
    /* Aligns with the left edge of the mobile dot */
    width: var(--timeline-line-width-mobile);
    background: linear-gradient(to bottom, hsl(var(--border)), hsl(var(--primary)));
    height: 0;
    /* Initially 0 for animation */
    z-index: 5;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    /* Align content to top for mobile */
    margin-bottom: 3rem;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: 1.25rem;
    /* Position relative to the timeline-step for mobile */
    transform: translateX(-50%);
    /* Center horizontally */
    top: 0.25rem;
    /* Align with text */
    width: var(--timeline-dot-size-mobile);
    height: var(--timeline-dot-size-mobile);
    background-color: hsl(var(--primary));
    border-radius: 50%;
    border: 2px solid hsl(var(--primary)/0.3);
    box-shadow: 0 0 0 4px hsl(var(--primary)/0.1);
    z-index: 10;
}

.timeline-content-wrapper {
    flex-grow: 1;
    /* Allow content to take remaining space on mobile */
    padding-left: calc(var(--timeline-dot-size-mobile) + var(--timeline-gap));
    /* Space for dot and gap */
    text-align: left;
}

.timeline-card {
    width: 100%;
    /* Full width on mobile */
}

/* Desktop timeline adjustments */
@media (min-width: 768px) {
    .timeline-line {
        left: 50%;
        /* Center for desktop */
        transform: translateX(-50%);
        width: var(--timeline-line-width-desktop);
        /* Thicker for desktop */
    }

    .timeline-step {
        display: flex;
        align-items: center;
        /* Vertically align items in the row */
        margin-bottom: 3rem;
        position: relative;
        width: 100%;
        /* Take full width of parent */
    }

    .timeline-dot {
        position: absolute;
        left: 50%;
        /* Center on the main timeline line */
        transform: translateX(-50%);
        width: var(--timeline-dot-size-desktop);
        height: var(--timeline-dot-size-desktop);
        background-color: hsl(var(--primary));
        border-radius: 50%;
        border: 3px solid hsl(var(--primary)/0.3);
        box-shadow: 0 0 0 6px hsl(var(--primary)/0.1);
        z-index: 10;
    }

    .timeline-content-wrapper {
        width: 50%;
        /* Each wrapper takes half the space */
        max-width: 450px;
        /* Max width for cards on desktop to prevent them from being too wide */
        padding-left: 0;
        /* Reset mobile padding */
        flex-shrink: 0;
        box-sizing: border-box;
    }

    /* Odd steps: Card on left */
    .timeline-step:nth-child(odd) {
        justify-content: flex-start;
        /* Push the content-wrapper to the left half */
    }

    .timeline-step:nth-child(odd) .timeline-content-wrapper {
        text-align: right;
        padding-right: var(--timeline-gap);
        /* Add padding on the right to create gap from center line */
        margin-left: auto;
        /* Pushes the content wrapper to the left within its 50% */
    }

    .timeline-step:nth-child(odd) .timeline-card {
        /* No specific margin needed here as wrapper handles positioning */
    }

    /* Even steps: Card on right */
    .timeline-step:nth-child(even) {
        justify-content: flex-end;
        /* Push the content-wrapper to the right half */
    }

    .timeline-step:nth-child(even) .timeline-content-wrapper {
        text-align: left;
        padding-left: var(--timeline-gap);
        /* Add padding on the left to create gap from center line */
        margin-right: auto;
        /* Pushes the content wrapper to the right within its 50% */
    }

    .timeline-step:nth-child(even) .timeline-card {
        /* No specific margin needed here as wrapper handles positioning */
    }
}